:root {
    --global-scale: 1;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html {
    scroll-behavior: smooth;
    overflow: hidden;
    height: 100%;
}

body {
    font-family: 'Segoe UI', system-ui, -apple-system, 'Helvetica Neue', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    background-attachment: fixed;
    position: relative;
    overflow: hidden;
    -ms-overflow-style: none;
    scrollbar-width: none;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
    height: 100vh;
    height: 100dvh;
    max-height: 100vh;
    max-height: 100dvh;
}

body::-webkit-scrollbar { display: none; }

body.dark-theme {
    background: linear-gradient(135deg, #0f0c29, #302b63, #24243e, #1a1a2e);
    background-size: 400% 400%;
    animation: gradientFlow 8s ease infinite;
}

@keyframes gradientFlow {
    0% { background-position: 0% 50%; }
    25% { background-position: 100% 50%; }
    50% { background-position: 100% 100%; }
    75% { background-position: 0% 100%; }
    100% { background-position: 0% 50%; }
}

.floating-words-container {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    pointer-events: none; z-index: 1; overflow: hidden;
}

.floating-word {
    position: absolute; font-size: clamp(18px, 5vw, 45px); font-weight: bold;
    white-space: nowrap; opacity: 0; animation: floatWord linear forwards;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3); pointer-events: none; z-index: 1;
}

@keyframes floatWord {
    0% { transform: translateX(0) translateY(0) rotate(0deg); opacity: 0; }
    10% { opacity: 0.7; }
    90% { opacity: 0.7; }
    100% { transform: translateX(calc(100vw * var(--dx, 1))) translateY(calc(100vh * var(--dy, -1))) rotate(360deg); opacity: 0; }
}

.main-layout {
    display: flex; gap: 15px; max-width: 1600px; width: 95%; margin: 0 auto;
    position: relative; z-index: 10; align-items: stretch; height: 100%;
    max-height: 100vh; max-height: 100dvh; overflow: hidden;
}

.game-wrapper {
    flex: 4; min-width: 0; min-height: 0; display: flex;
    align-items: center; justify-content: center; height: 100%; overflow: hidden;
}

.game-container {
    background: rgba(255, 255, 255, 0.95); backdrop-filter: blur(12px);
    border-radius: 48px; padding: 25px 30px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25), 0 8px 24px rgba(0, 0, 0, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.3);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    width: 100%; max-width: none; height: 100%; display: flex;
    flex-direction: column; justify-content: center; overflow: hidden;
    -ms-overflow-style: none; scrollbar-width: none; min-height: 0;
}

.game-container::-webkit-scrollbar { display: none; }
.game-container:hover { box-shadow: 0 30px 60px -12px rgba(0, 0, 0, 0.3), 0 12px 28px rgba(0, 0, 0, 0.15); }

.leaderboard-container {
    background: rgba(255, 255, 255, 0.95); backdrop-filter: blur(12px);
    border-radius: 20px; padding: 16px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 15px 35px -8px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease; width: 100%; display: flex;
    flex-direction: column; max-height: 100%; overflow: hidden;
}

.leaderboard-container:hover { box-shadow: 0 20px 45px -8px rgba(0, 0, 0, 0.2); }
.leaderboard-container h3 { color: #e67e22; text-align: center; margin-bottom: 12px; font-size: 16px; font-weight: 800; flex-shrink: 0; }

.score-list {
    flex: 1; overflow-y: auto; min-height: 150px; border-radius: 12px;
    scroll-behavior: smooth; margin-bottom: 8px; scrollbar-width: thin;
    scrollbar-color: rgba(230, 126, 34, 0.3) rgba(0, 0, 0, 0.05);
}
.score-list::-webkit-scrollbar { width: 3px; }
.score-list::-webkit-scrollbar-track { background: rgba(0, 0, 0, 0.05); border-radius: 10px; }
.score-list::-webkit-scrollbar-thumb { background: rgba(230, 126, 34, 0.3); border-radius: 10px; }

.score-item { display: flex; justify-content: space-between; align-items: center; padding: 8px 10px; border-bottom: 1px solid rgba(0, 0, 0, 0.06); color: #2c3e50; font-size: 12px; border-radius: 8px; transition: all 0.2s ease; }
.score-item:hover { background: rgba(0, 0, 0, 0.03); transform: translateX(2px); }
.score-rank { font-weight: bold; color: #e67e22; width: 30px; font-size: 11px; }
.score-name { flex: 1; margin: 0 8px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.score-point { font-weight: bold; color: #2ecc71; font-size: 12px; }
.current-user { background: rgba(46, 204, 113, 0.12); border-radius: 8px; border-left: 3px solid #2ecc71; font-weight: 600; }

.leaderboard-selector { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; border-top: 1px solid rgba(0, 0, 0, 0.08); padding-top: 10px; flex-shrink: 0; }
.selector-row { display: flex; gap: 6px; justify-content: center; }

.lb-btn {
    background: rgba(0, 0, 0, 0.04); border: 1px solid rgba(0, 0, 0, 0.08); border-radius: 8px;
    padding: 6px 8px; font-size: 11px; font-weight: 600; color: #2c3e50; cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); flex: 1; text-align: center;
    max-width: 60px; min-height: 32px; display: flex; align-items: center;
    justify-content: center; position: relative; overflow: hidden;
}

.lb-btn::before { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: linear-gradient(135deg, #f1c40f, #e67e22, #f39c12); opacity: 0; transition: opacity 0.3s ease; z-index: 0; }
.lb-btn:hover::before { opacity: 1; }
.lb-btn:hover { color: white; border-color: transparent; transform: none; box-shadow: none; }
.lb-btn:active { transform: scale(0.95); }
.lb-btn.active { background: linear-gradient(135deg, #2ecc71, #27ae60); color: white; border-color: transparent; box-shadow: 0 2px 8px rgba(46, 204, 113, 0.3); transform: none; }
.lb-btn.active::before { display: none; }
.lb-btn span { position: relative; z-index: 1; }

.login-screen { display: flex; flex-direction: row; gap: 15px; flex-wrap: wrap; justify-content: center; align-items: stretch; height: 100%; overflow: hidden; }
.login-screen::-webkit-scrollbar { display: none; }

.menu-left { flex: 1.2; min-width: 240px; background: rgba(0, 0, 0, 0.02); border-radius: 28px; padding: 25px 20px; display: flex; flex-direction: column; justify-content: flex-start; transition: all 0.3s ease; overflow: hidden; }
.menu-left::-webkit-scrollbar { display: none; }
.menu-left:hover { background: rgba(0, 0, 0, 0.04); }

.menu-center { flex: 2.5; min-width: 320px; text-align: center; display: flex; flex-direction: column; justify-content: flex-start; background: rgba(0, 0, 0, 0.02); border-radius: 28px; padding: 25px 24px; transition: all 0.3s ease; overflow: hidden; }
.menu-center::-webkit-scrollbar { display: none; }
.menu-center:hover { background: rgba(0, 0, 0, 0.04); }

.menu-right { flex: 1.3; min-width: 240px; background: rgba(0, 0, 0, 0.02); border-radius: 28px; padding: 25px 20px; display: flex; flex-direction: column; justify-content: flex-start; transition: all 0.3s ease; overflow: hidden; }
.menu-right::-webkit-scrollbar { display: none; }
.menu-right:hover { background: rgba(0, 0, 0, 0.04); }

body.dark-theme .game-container { background: rgba(30, 35, 50, 0.92); border-color: rgba(255, 255, 255, 0.1); box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5); }
body.dark-theme .leaderboard-container { background: rgba(30, 35, 50, 0.92); border-color: rgba(255, 255, 255, 0.1); }
body.dark-theme .menu-left, body.dark-theme .menu-center, body.dark-theme .menu-right { background: rgba(30, 35, 50, 0.6); }
body.dark-theme .score-item { color: #ecf0f1; border-bottom: 1px solid rgba(255, 255, 255, 0.08); }
body.dark-theme .score-item:hover { background: rgba(255, 255, 255, 0.05); }
body.dark-theme .lb-btn { background: rgba(255, 255, 255, 0.08); border-color: rgba(255, 255, 255, 0.15); color: #ecf0f1; }
body.dark-theme .lb-btn:hover { background: rgba(255, 255, 255, 0.15); box-shadow: none; color: white; }
body.dark-theme .lb-btn.active { background: linear-gradient(135deg, #2ecc71, #27ae60); color: white; }
body.dark-theme .leaderboard-selector { border-top: 1px solid rgba(255, 255, 255, 0.1); }

.login-title { font-size: clamp(42px, 8vw, 72px); font-weight: 900; margin-bottom: 15px; background: linear-gradient(135deg, #F9D423, #FF8C00, #FFB347, #F4A460, #E67E22, #F39C12); background-size: 300% 300%; -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; animation: goldGradientShift 4s ease infinite, gentlePulse 2s ease-in-out infinite; letter-spacing: 3px; display: inline-block; width: 100%; line-height: 1.1; margin-top: 0; }

@keyframes goldGradientShift { 0% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } 100% { background-position: 0% 50%; } }
@keyframes gentlePulse { 0% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.03); opacity: 0.95; } 100% { transform: scale(1); opacity: 1; } }

.level-buttons { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; flex: 1; }
.level-btn { border: none; border-radius: 60px; padding: 12px 16px; font-weight: 700; cursor: pointer; transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); font-size: 13px; letter-spacing: 0.5px; display: flex; align-items: center; gap: 10px; background: rgba(255, 255, 255, 0.2); color: #2c3e50; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08); width: 100%; min-height: 60px; position: relative; overflow: hidden; }
.level-btn::before { content: ''; position: absolute; top: 0; left: -100%; width: 100%; height: 100%; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent); transition: left 0.5s ease; }
.level-btn:hover::before { left: 100%; }
.level-btn.kolay { border-left: 5px solid #2ecc71; background: rgba(46, 204, 113, 0.12); }
.level-btn.orta { border-left: 5px solid #3498db; background: rgba(52, 152, 219, 0.12); }
.level-btn.zor { border-left: 5px solid #e67e22; background: rgba(230, 126, 34, 0.12); }
.level-btn.sinav { border-left: 5px solid #9b59b6; background: rgba(155, 89, 182, 0.12); }
.level-btn.active { background: rgba(255, 255, 255, 0.35); backdrop-filter: blur(8px); box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15); transform: scale(1.02); }
.level-btn.active.kolay { border-left: 5px solid #2ecc71; background: rgba(46, 204, 113, 0.25); }
.level-btn.active.orta { border-left: 5px solid #3498db; background: rgba(52, 152, 219, 0.25); }
.level-btn.active.zor { border-left: 5px solid #e67e22; background: rgba(230, 126, 34, 0.25); }
.level-btn.active.sinav { border-left: 5px solid #9b59b6; background: rgba(155, 89, 182, 0.25); }
.level-btn:hover { transform: translateX(6px); background: rgba(255, 255, 255, 0.4); box-shadow: 0 6px 18px rgba(0, 0, 0, 0.15); }
.level-btn:active { transform: translateX(2px); transition: all 0.1s ease; }
.level-icon { font-size: 22px; min-width: 32px; text-align: center; }
.level-info { flex: 1; text-align: left; }
.level-name { font-weight: 800; font-size: 14px; margin-bottom: 3px; display: block; }
.level-desc { font-size: 11px; opacity: 0.7; display: block; line-height: 1.3; }

.selected-badge { margin-top: 20px; padding: 12px 14px; border-radius: 60px; text-align: center; font-weight: 700; font-size: 13px; transition: all 0.3s ease; background: rgba(0, 0, 0, 0.05); backdrop-filter: blur(4px); cursor: pointer; min-height: 44px; display: flex; align-items: center; justify-content: center; }
.selected-badge:hover { transform: scale(1.02); box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1); }

.username-area { margin: 15px 0; display: flex; justify-content: center; }
.username-area input { padding: 12px 20px; font-size: 15px; border-radius: 60px; border: 2px solid rgba(0, 0, 0, 0.1); background: white; width: 100%; max-width: 280px; text-align: center; font-weight: 500; outline: none; transition: all 0.3s ease; min-height: 44px; }
.username-area input:focus { border-color: #e67e22; box-shadow: 0 0 0 4px rgba(230, 126, 34, 0.15); transform: scale(1.02); }

.start-btn, #startGameBtn, #multiplayerBtn { background: linear-gradient(135deg, #2ecc71, #27ae60); color: white; border: none; padding: 12px 22px; font-size: 14px; border-radius: 60px; cursor: pointer; font-weight: bold; width: 100%; max-width: 200px; transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1); margin: 0 auto; box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1); min-height: 44px; position: relative; overflow: hidden; display: flex; align-items: center; justify-content: center; text-align: center; white-space: nowrap; }
.start-btn::before, #startGameBtn::before, #multiplayerBtn::before { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: linear-gradient(135deg, #f1c40f, #e67e22, #f39c12, #f1c40f); background-size: 300% 300%; opacity: 0; transition: opacity 0.4s ease; z-index: 0; animation: goldGradient 2s ease infinite; }
@keyframes goldGradient { 0% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } 100% { background-position: 0% 50%; } }
.start-btn:hover::before, #startGameBtn:hover::before, #multiplayerBtn:hover::before { opacity: 1; }
.start-btn:hover, #startGameBtn:hover, #multiplayerBtn:hover { transform: none; box-shadow: none; color: white; }
.start-btn span, #startGameBtn span, #multiplayerBtn span { position: relative; z-index: 1; }
.start-btn:active, #startGameBtn:active, #multiplayerBtn:active { transform: scale(0.98); }
#multiplayerBtn { background: linear-gradient(135deg, #9b59b6, #8e44ad); }
#multiplayerBtn::before { background: linear-gradient(135deg, #f1c40f, #e67e22, #f39c12, #f1c40f); background-size: 300% 300%; animation: goldGradient 2s ease infinite; }

.control-buttons { display: flex; gap: 10px; justify-content: center; margin: 15px 0; flex-wrap: wrap; }
.theme-btn, .sound-btn, .howto-btn, .multiplayer-btn, .speak-btn { background: rgba(0, 0, 0, 0.04); border: 1px solid rgba(0, 0, 0, 0.08); border-radius: 60px; padding: 10px 16px; cursor: pointer; font-size: 13px; color: #2c3e50; transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); font-weight: 600; backdrop-filter: blur(4px); min-height: 40px; display: flex; align-items: center; justify-content: center; }
.theme-btn:hover, .sound-btn:hover, .howto-btn:hover, .multiplayer-btn:hover, .speak-btn:hover { background: rgba(0, 0, 0, 0.08); transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1); }
.theme-btn:active, .sound-btn:active, .howto-btn:active, .multiplayer-btn:active, .speak-btn:active { transform: translateY(-1px); }
.multiplayer-btn { background: rgba(155, 89, 182, 0.12); border-color: #9b59b6; color: #9b59b6; }
.multiplayer-btn:hover { background: rgba(155, 89, 182, 0.2); box-shadow: 0 4px 14px rgba(155, 89, 182, 0.2); }
.speak-btn { background: rgba(52, 152, 219, 0.12); border-color: #3498db; color: #3498db; }
.speak-btn:hover { background: rgba(52, 152, 219, 0.2); box-shadow: 0 4px 14px rgba(52, 152, 219, 0.2); }

.footer-text { font-size: 11px; color: rgba(44, 62, 80, 0.7); margin-top: 15px; text-align: center; }
.footer-text a { color: #e67e22; text-decoration: none; transition: color 0.2s ease; }
.footer-text a:hover { color: #d35400; text-decoration: underline; }

.game-area { display: none; overflow: hidden; }
.game-area::-webkit-scrollbar { display: none; }
.game-area.active { display: flex; flex-direction: column; justify-content: flex-start; height: 100%; overflow: hidden; padding: 5px 0; gap: 2px; }
.game-area h1 { text-align: center; color: #e67e22; margin-bottom: 2px; font-weight: 800; flex-shrink: 0; display: flex; flex-direction: column; align-items: center; }
.game-title-main { font-size: clamp(30px, 6vw, 60px); font-weight: 900; margin-bottom: 3px; letter-spacing: 3px; background: linear-gradient(135deg, #F9D423, #FF8C00, #FFB347, #F4A460, #E67E22, #F39C12); background-size: 300% 300%; -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; animation: goldGradientShift 4s ease infinite, gentlePulse 2s ease-in-out infinite; line-height: 1.1; }
.game-title-sub { font-size: clamp(12px, 2.5vw, 18px); display: flex; align-items: center; justify-content: center; gap: 8px; color: #e67e22; }

.top-info { display: flex; justify-content: space-between; align-items: center; gap: 5px; margin-bottom: 4px; flex-wrap: wrap; flex-shrink: 0; }
.right-stats { display: flex; gap: 8px; align-items: center; justify-content: center; background: rgba(0, 0, 0, 0.04); padding: 6px 12px; border-radius: 60px; border: 1px solid rgba(0, 0, 0, 0.06); flex: 1; transition: all 0.5s ease; }

.combo-badge { display: flex; align-items: center; gap: 3px; background: linear-gradient(135deg, #e67e22, #f39c12); padding: 4px 8px; border-radius: 40px; transition: all 0.3s ease; }
.combo-badge.combo-high { background: linear-gradient(135deg, #e74c3c, #e67e22); animation: comboPulse 0.8s infinite; }
@keyframes comboPulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.08); } }
.combo-icon { font-size: 14px; }
.combo-text { color: white; font-size: 10px; font-weight: bold; }
.combo-number { font-size: 14px; font-weight: bold; color: white; background: rgba(0, 0, 0, 0.3); padding: 0 4px; border-radius: 30px; min-width: 18px; text-align: center; }

.hearts { font-size: clamp(14px, 2.5vw, 18px); letter-spacing: 0; display: flex; align-items: center; gap: 1px; }
.score { font-size: clamp(12px, 2vw, 16px); color: #e67e22; font-weight: bold; display: flex; align-items: center; gap: 3px; }

.hp-bar-container { background: rgba(0, 0, 0, 0.08); border-radius: 20px; padding: 2px; margin-bottom: 4px; flex-shrink: 0; }
.hp-bar { background: #e74c3c; height: clamp(6px, 1.5vh, 12px); border-radius: 15px; transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1); width: 100%; display: flex; align-items: center; justify-content: flex-end; padding-right: 6px; color: white; font-weight: bold; font-size: clamp(6px, 1.5vw, 10px); }

.pokemon-card { background: rgba(0, 0, 0, 0.04); border-radius: clamp(20px, 4vw, 40px); padding: clamp(8px, 2vh, 16px) clamp(10px, 2vw, 20px); margin: 4px 0; transition: all 0.5s ease; flex-shrink: 0; }
.pokemon-card:hover { background: rgba(0, 0, 0, 0.06); }
.english-word { font-size: clamp(22px, 5vw, 42px); font-weight: 800; color: #2c3e50; text-align: center; margin-bottom: 8px; letter-spacing: -1px; transition: all 0.3s ease; }

.word-speak-btn { display: inline-flex; align-items: center; justify-content: center; gap: 4px; background: rgba(52, 152, 219, 0.1); border: 1px solid rgba(52, 152, 219, 0.3); border-radius: 20px; padding: 4px 10px; cursor: pointer; font-size: 11px; color: #3498db; margin-left: 8px; transition: all 0.2s ease; vertical-align: middle; }
.word-speak-btn:hover { background: rgba(52, 152, 219, 0.2); }
.word-speak-btn:active { transform: scale(0.95); }

.timer-container-simple { background: rgba(0, 0, 0, 0.04); border-radius: 16px; padding: 6px 10px; margin-top: 3px; }
.timer-info { display: flex; justify-content: space-between; margin-bottom: 3px; }
.timer-label-simple { color: #7f8c8d; font-size: clamp(9px, 1.5vw, 12px); font-weight: 600; }
.timer-value { font-size: clamp(14px, 3vw, 24px); font-weight: bold; color: #e67e22; font-family: monospace; }
.timer-bar-long { width: 100%; height: clamp(4px, 0.8vh, 6px); background: rgba(0, 0, 0, 0.08); border-radius: 10px; overflow: hidden; }
.timer-progress-long { height: 100%; width: 100%; background: linear-gradient(90deg, #2ecc71, #27ae60); transition: width 0.15s linear, background 0.3s ease; border-radius: 10px; }
.timer-progress-long.warning { background: linear-gradient(90deg, #f39c12, #e67e22); }
.timer-progress-long.danger { background: linear-gradient(90deg, #e74c3c, #c0392b); animation: pulse 0.5s infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.6; } }

/* === MASASÜTÜ: OPSİYONLAR === */
.options-wrapper { flex: 1; display: flex; gap: clamp(4px, 1.5vh, 10px); margin: 0; padding: 4px 0; min-height: 0; align-items: stretch; }
.desktop-options { flex: 4; display: flex; flex-direction: column; gap: clamp(4px, 1.2vh, 8px); height: 100%; min-width: 0; }
.mobile-options { display: none; }
.options-row { flex: 1; display: flex; justify-content: center; gap: clamp(4px, 1.2vh, 8px); align-items: stretch; }

.option-btn {
    flex: 1; color: #2c3e50; border: none; display: flex; align-items: center; justify-content: center;
    padding: clamp(4px, 1vh, 10px) clamp(6px, 1.5vw, 12px); font-weight: 700; text-transform: uppercase;
    letter-spacing: 1px; border-radius: clamp(30px, 5vw, 60px); cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1), background 0.5s ease, box-shadow 0.5s ease;
    min-width: 0; -webkit-tap-highlight-color: transparent; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    height: 100%; position: relative; overflow: hidden; text-align: center;
    word-break: break-word; overflow-wrap: break-word; line-height: 1.15; font-size: clamp(14px, 2vw, 18px);
}

.option-btn::after { content: ''; position: absolute; top: 50%; left: 50%; width: 0; height: 0; border-radius: 50%; background: rgba(255, 255, 255, 0.3); transform: translate(-50%, -50%); transition: width 0.6s, height 0.6s; }
.option-btn:active::after { width: 300px; height: 300px; }
.option-btn:hover:not(:disabled) { transform: none; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05); }
.option-btn:focus-visible { outline: 3px solid #3498db; outline-offset: 2px; }

.option-btn.correct { background: #2ecc71 !important; color: white !important; animation: correctGlow 0.6s ease; box-shadow: 0 0 30px rgba(46, 204, 113, 0.8), 0 8px 20px rgba(46, 204, 113, 0.4) !important; }
@keyframes correctGlow { 0% { transform: scale(1); box-shadow: 0 0 0 rgba(46, 204, 113, 0); } 30% { transform: scale(1.08); box-shadow: 0 0 40px rgba(46, 204, 113, 1); } 60% { transform: scale(1.02); box-shadow: 0 0 20px rgba(46, 204, 113, 0.5); } 100% { transform: scale(1); box-shadow: 0 0 15px rgba(46, 204, 113, 0.3); } }

.option-btn.wrong { background: #e74c3c !important; color: white !important; animation: wrongShake 0.5s ease; box-shadow: 0 0 30px rgba(231, 76, 60, 0.8), 0 8px 20px rgba(231, 76, 60, 0.4) !important; }
@keyframes wrongShake { 0% { transform: translateX(0); } 15% { transform: translateX(-8px) rotate(-2deg); } 30% { transform: translateX(8px) rotate(2deg); } 45% { transform: translateX(-6px) rotate(-1deg); } 60% { transform: translateX(6px) rotate(1deg); } 75% { transform: translateX(-3px); } 100% { transform: translateX(0); } }

.option-btn.show-correct { background: #2ecc71 !important; color: white !important; animation: correctGlow 0.6s ease; box-shadow: 0 0 30px rgba(46, 204, 113, 0.8), 0 8px 20px rgba(46, 204, 113, 0.4) !important; }
.option-btn.eliminated { background: #bdc3c7 !important; text-decoration: line-through; opacity: 0.5; cursor: not-allowed; }
.option-btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

.joker-wrapper { flex: 0 0 auto; width: clamp(60px, 15vw, 100px); min-width: clamp(60px, 15vw, 100px); max-width: clamp(80px, 18vw, 120px); display: flex; align-items: stretch; flex-shrink: 0; }
.joker-main-btn { color: #ffffff; border: none; height: 100%; font-weight: bold; border-radius: 12px; cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: clamp(2px, 0.5vh, 5px); width: 100%; transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1), background 0.5s ease, box-shadow 0.5s ease; padding: clamp(4px, 1vh, 10px) clamp(3px, 1vw, 8px); }
.joker-main-btn:hover:not(:disabled) { filter: brightness(0.95); }
.joker-main-btn:active:not(:disabled) { transform: scale(0.95); transition: all 0.1s ease; }
.joker-main-btn:disabled { opacity: 0.5; cursor: not-allowed; filter: grayscale(30%); }
.joker-icon { font-size: clamp(18px, 4vw, 32px); }
.joker-text { font-size: clamp(8px, 1.5vw, 11px); font-weight: 600; }
.joker-count-badge { background: #f1c40f; color: #2c3e50; border-radius: 40px; padding: clamp(2px, 0.3vh, 5px) clamp(4px, 1vw, 8px); font-size: clamp(9px, 1.8vw, 13px); font-weight: bold; min-width: 24px; text-align: center; }

.game-status { flex-shrink: 0; text-align: center; font-size: clamp(10px, 2vw, 13px); padding: 4px 0; margin: 0; color: #2c3e50; font-weight: 500; min-height: auto; transition: all 0.3s ease; }

.button-group { flex-shrink: 0; display: flex; gap: clamp(4px, 1vw, 8px); justify-content: center; flex-wrap: nowrap; padding: 4px 0; margin: 0; transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); }
.pause-btn, .reset-btn, .logout-btn, .speak-word-btn { flex: 1; min-width: 60px; max-width: 140px; padding: clamp(8px, 1.5vh, 12px) clamp(8px, 2vw, 16px); font-size: clamp(10px, 2vw, 13px); font-weight: 700; border-radius: 60px; cursor: pointer; border: none; transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); letter-spacing: 0.5px; color: white; text-align: center; white-space: nowrap; min-height: clamp(30px, 5vh, 40px); position: relative; overflow: hidden; }
.speak-word-btn { background: linear-gradient(135deg, #3498db, #2980b9); box-shadow: 0 2px 10px rgba(52, 152, 219, 0.3); max-width: 100px; }
.speak-word-btn:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(52, 152, 219, 0.4); }
.pause-btn::after, .reset-btn::after, .logout-btn::after, .speak-word-btn::after { content: ''; position: absolute; top: 50%; left: 50%; width: 0; height: 0; border-radius: 50%; background: rgba(255, 255, 255, 0.2); transform: translate(-50%, -50%); transition: width 0.6s, height 0.6s; }
.pause-btn:active::after, .reset-btn:active::after, .logout-btn:active::after, .speak-word-btn:active::after { width: 300px; height: 300px; }
.pause-btn { background: linear-gradient(135deg, #f39c12, #e67e22); box-shadow: 0 2px 10px rgba(243, 156, 18, 0.3); }
.pause-btn:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(243, 156, 18, 0.4); }
.pause-btn.paused { background: linear-gradient(135deg, #2ecc71, #27ae60); box-shadow: 0 2px 12px rgba(46, 204, 113, 0.35); animation: softPulse 2s infinite; }
@keyframes softPulse { 0%, 100% { box-shadow: 0 2px 10px rgba(46, 204, 113, 0.3); } 50% { box-shadow: 0 2px 20px rgba(46, 204, 113, 0.6); } }
.reset-btn { background: linear-gradient(135deg, #3498db, #2980b9); box-shadow: 0 2px 10px rgba(52, 152, 219, 0.3); }
.reset-btn:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(52, 152, 219, 0.4); }
.logout-btn { background: linear-gradient(135deg, #95a5a6, #7f8c8d); box-shadow: 0 2px 10px rgba(127, 140, 141, 0.3); }
.logout-btn:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(127, 140, 141, 0.4); }
.pause-btn:active, .reset-btn:active, .logout-btn:active, .speak-word-btn:active { transform: scale(0.96); transition: all 0.1s ease; }

.word-counter { flex-shrink: 0; text-align: center; color: #7f8c8d; font-size: clamp(9px, 1.5vw, 11px); background: rgba(0, 0, 0, 0.04); display: inline-block; width: auto; margin: 0 auto; padding: 4px 10px; border-radius: 40px; }
.username-display { text-align: center; color: #e67e22; margin-bottom: 8px; font-weight: bold; background: rgba(0, 0, 0, 0.04); display: inline-block; width: auto; padding: clamp(3px, 0.5vh, 6px) clamp(8px, 2vw, 14px); border-radius: 60px; margin-left: auto; margin-right: auto; font-size: clamp(10px, 2vw, 14px); }
.random-badge { background: linear-gradient(135deg, #e67e22, #f39c12); color: white; padding: clamp(2px, 0.5vh, 5px) clamp(6px, 1.5vw, 10px); border-radius: 30px; font-size: clamp(10px, 2vw, 14px); display: inline-block; }

.wrong-words-btn { background: linear-gradient(135deg, #e74c3c, #c0392b); color: white; border: none; padding: 10px 18px; font-size: 13px; font-weight: bold; border-radius: 60px; cursor: pointer; margin-top: 12px; width: 100%; transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1); min-height: 40px; flex-shrink: 0; }
.wrong-words-btn:hover { transform: scale(1.02); box-shadow: 0 6px 20px rgba(231, 76, 60, 0.3); }
.wrong-words-btn:active { transform: scale(0.98); }

.selected-level-info { background: rgba(0, 0, 0, 0.04); border-radius: 24px; padding: 6px; margin-top: 8px; font-size: 11px; color: #2c3e50; text-align: center; }
.char-limit-warning { font-size: 10px; color: #e74c3c; margin-top: 3px; display: none; min-height: 16px; }
.info-cards { margin-bottom: 12px; flex-shrink: 0; }
.greeting-card { background: rgba(0, 0, 0, 0.04); border-radius: 16px; padding: 8px 12px; margin-bottom: 8px; text-align: center; transition: all 0.3s ease; }
.greeting-card:hover { background: rgba(0, 0, 0, 0.06); transform: scale(1.01); }
.greeting-text { font-size: 12px; font-weight: 600; color: #2c3e50; }

.word-of-day-card { background: linear-gradient(135deg, rgba(255, 107, 107, 0.08), rgba(255, 202, 87, 0.08), rgba(72, 219, 251, 0.08), rgba(255, 159, 243, 0.08)); border-radius: 16px; padding: 10px 12px; text-align: center; border: 1px solid rgba(0, 0, 0, 0.05); transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1); }
.word-of-day-card:hover { transform: scale(1.02); box-shadow: 0 6px 20px rgba(0, 0, 0, 0.06); }
.word-of-day-title { font-size: 10px; color: #7f8c8d; letter-spacing: 2px; font-weight: bold; }
.word-of-day-word { font-size: 20px; font-weight: bold; background: linear-gradient(135deg, #e74c3c, #f39c12, #2ecc71); background-size: 200% 200%; animation: textGradient 3s ease infinite; -webkit-background-clip: text; background-clip: text; color: transparent; margin: 4px 0; }
@keyframes textGradient { 0% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } 100% { background-position: 0% 50%; } }
.word-of-day-meaning { font-size: 11px; color: #e67e22; font-weight: bold; background: rgba(0, 0, 0, 0.04); display: inline-block; padding: 3px 10px; border-radius: 30px; }

.modal { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.7); backdrop-filter: blur(8px); z-index: 1000; justify-content: center; align-items: center; animation: fadeIn 0.3s ease; }
.modal-content { background: white; border-radius: 32px; max-width: 500px; width: 90%; padding: 30px; box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3); animation: modalFadeIn 0.4s cubic-bezier(0.4, 0, 0.2, 1); max-height: 80vh; overflow-y: auto; }
body.dark-theme .modal-content { background: #1a1a2e; color: white; }
@keyframes modalFadeIn { from { opacity: 0; transform: scale(0.9); } to { opacity: 1; transform: scale(1); } }
.modal-content h3 { color: #e67e22; text-align: center; margin-bottom: 20px; font-size: 26px; }
.modal-content h4 { color: #2ecc71; margin: 15px 0 8px 0; font-size: 18px; }
.modal-content p { color: inherit; font-size: 14px; line-height: 1.6; margin-bottom: 10px; }
.modal-content ul { color: inherit; font-size: 14px; margin-left: 20px; margin-bottom: 15px; }
.modal-content li { margin: 8px 0; line-height: 1.5; }
.modal-close { background: #e74c3c; color: white; border: none; padding: 12px 24px; border-radius: 60px; cursor: pointer; font-weight: bold; margin-top: 20px; width: 100%; transition: all 0.3s ease; min-height: 44px; }
.modal-close:hover { background: #c0392b; transform: scale(1.02); }
.modal-close:active { transform: scale(0.98); }
.highlight { color: #f39c12; font-weight: bold; }

.mobile-difficulty-popup { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.7); backdrop-filter: blur(8px); z-index: 2000; justify-content: center; align-items: center; animation: fadeIn 0.3s ease; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.mobile-difficulty-content { background: white; border-radius: 32px; padding: 24px; width: 90%; max-width: 400px; animation: slideUp 0.4s cubic-bezier(0.4, 0, 0.2, 1); box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3); }
body.dark-theme .mobile-difficulty-content { background: #1a1a2e; }
@keyframes slideUp { from { opacity: 0; transform: translateY(50px); } to { opacity: 1; transform: translateY(0); } }
.mobile-difficulty-item { display: flex; align-items: center; gap: 12px; padding: 16px 20px; margin: 10px 0; border-radius: 60px; background: #f8f9fa; cursor: pointer; font-weight: 700; font-size: 15px; border-left: 4px solid transparent; transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); min-height: 44px; }
body.dark-theme .mobile-difficulty-item { background: #2d2d44; color: white; }
.mobile-difficulty-item:hover { transform: translateX(4px); box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1); }
.mobile-difficulty-item.active { background: rgba(0, 0, 0, 0.1); box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15); transform: scale(1.02); }
.mobile-difficulty-item.kolay { border-left-color: #2ecc71; }
.mobile-difficulty-item.orta { border-left-color: #3498db; }
.mobile-difficulty-item.zor { border-left-color: #e67e22; }
.mobile-difficulty-item.sinav { border-left-color: #9b59b6; }
.mobile-difficulty-close { width: 100%; padding: 14px; border-radius: 60px; background: #e74c3c; color: white; border: none; margin-top: 16px; font-weight: bold; font-size: 14px; cursor: pointer; transition: all 0.3s ease; min-height: 44px; }
.mobile-difficulty-close:hover { background: #c0392b; transform: scale(1.02); }
.mobile-difficulty-close:active { transform: scale(0.98); }

/* ========== MOBİL & TABLET ========== */
@media (max-width: 900px) {
    body { padding: 6px; height: 100vh; height: 100dvh; min-height: 100vh; min-height: 100dvh; align-items: stretch; overflow: hidden; }
    .main-layout { flex-direction: column; gap: 10px; padding: 0; height: 100%; max-height: none; width: 100%; margin-top: 0; margin-bottom: 0; overflow: hidden; }
    .game-wrapper { width: 100%; margin-top: 0; order: -1; height: auto; flex: 1; min-height: 0; overflow: hidden; }
    .game-container { padding: 8px; border-radius: 20px; height: 100%; max-height: none; margin-top: 0; overflow: hidden; min-height: 0; }
    .game-area.active { justify-content: flex-start; padding: 0; gap: 2px; }
    .game-area h1 { margin-bottom: 1px; }
    .login-title { font-size: clamp(36px, 10vw, 56px); letter-spacing: 2px; margin-bottom: 10px; margin-top: 15px; line-height: 1; }
    .game-title-main { font-size: clamp(26px, 8vw, 48px); margin-bottom: 1px; }
    .game-title-sub { font-size: clamp(10px, 2vw, 14px); }
    .top-info { margin-bottom: 1px; gap: 3px; }
    .right-stats { padding: 3px 8px; gap: 4px; transition: all 0.5s ease; }
    .hp-bar-container { margin-bottom: 1px; }
    .pokemon-card { padding: clamp(8px, 2vh, 16px) clamp(8px, 2vw, 14px); margin: 2px 0 6px 0; border-radius: 20px; flex: 0 0 auto; transition: all 0.5s ease; }
    .english-word { font-size: clamp(24px, 6vw, 42px); margin-bottom: 4px; letter-spacing: 0; }
    .timer-container-simple { padding: 3px 6px; border-radius: 10px; }
    .timer-value { font-size: clamp(11px, 2.5vw, 16px); }

    .options-wrapper { flex: 1 1 auto; display: flex; gap: 10px; margin: 0; padding: 0; min-height: 0; align-items: stretch; }
    .desktop-options { display: none; }
    .mobile-options { flex: 3; display: flex; flex-direction: column; justify-content: space-between; gap: 8px; align-items: stretch; }
    .options-row { display: none; }

    .option-btn { flex: 1; color: #2c3e50; border: none; display: flex; align-items: center; justify-content: center; padding: 10px 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; border-radius: 14px; cursor: pointer; width: 100%; min-height: 0; max-height: none; height: auto; transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1), background 0.5s ease, box-shadow 0.5s ease; box-shadow: 0 2px 8px rgba(0,0,0,0.05); word-break: keep-all; overflow-wrap: normal; line-height: 1.2; text-align: center; white-space: nowrap; position: relative; overflow: hidden; }
    .option-btn:hover:not(:disabled) { transform: none; box-shadow: 0 2px 8px rgba(0,0,0,0.05); }

    .joker-wrapper { flex: 0 0 auto; width: 60px; min-width: 60px; max-width: 70px; display: flex; align-items: stretch; }
    .joker-main-btn { color: #ffffff; border: none; height: 100%; width: 100%; font-weight: bold; border-radius: 14px; cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; padding: 6px 3px; transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1), background 0.5s ease, box-shadow 0.5s ease; }
    .joker-main-btn:hover:not(:disabled) { filter: brightness(0.95); }
    .joker-icon { font-size: clamp(16px, 3.5vw, 24px); }
    .joker-text { font-size: clamp(7px, 1.5vw, 10px); }
    .joker-count-badge { font-size: clamp(8px, 1.5vw, 11px); padding: clamp(2px, 0.3vh, 4px) clamp(3px, 0.8vw, 6px); }

    .game-status { flex-shrink: 0; text-align: center; font-size: clamp(9px, 1.8vw, 12px); padding: 4px 0; margin: 4px 0; color: #2c3e50; font-weight: 500; min-height: auto; transition: all 0.3s ease; }
    .button-group { padding: 3px 0; gap: 3px; }
    .pause-btn, .reset-btn, .logout-btn, .speak-word-btn { padding: clamp(6px, 1vh, 10px) clamp(6px, 1.5vw, 12px); font-size: clamp(9px, 1.5vw, 11px); min-height: clamp(26px, 4vh, 34px); }
    .word-counter { padding: 2px 8px; margin-bottom: 1px; font-size: clamp(8px, 1.3vw, 10px); }
    .leaderboard-wrapper { width: 100%; height: auto; max-height: 180px; margin-top: 0; overflow: hidden; flex-shrink: 0; }
    .leaderboard-container { border-radius: 16px; padding: 10px; max-height: 180px; overflow: hidden; }
    .login-screen { flex-direction: column; gap: 8px; height: auto; max-height: none; overflow: hidden; }
    .menu-left { display: none; }
    .menu-center, .menu-right { width: 100%; min-width: unset; padding: 14px; border-radius: 20px; height: auto; overflow: hidden; }
    .menu-center { padding-top: 5px; justify-content: flex-start; }
    .username-area { margin: 10px 0; }
    #startGameBtn, #multiplayerBtn { margin: 0 4px; padding: 10px 16px; font-size: 13px; min-height: 40px; }
    .control-buttons { gap: 6px; margin: 10px 0; }
    .theme-btn, .sound-btn, .howto-btn { padding: 8px 12px; font-size: 11px; min-height: 36px; }
    .footer-text { margin-top: 10px; font-size: 10px; }
    .footer-text p { margin: 4px 0; }
    .info-cards { margin-bottom: 8px; }
    .greeting-card { padding: 6px 10px; margin-bottom: 6px; }
    .word-of-day-card { padding: 8px 10px; }
    .username-area input { padding: 10px 16px; font-size: 14px; min-height: 40px; }
    #mobileDifficultySelector { margin-bottom: 8px; }
    #mobileDifficultyBadge { padding: 10px 14px; font-size: 12px; min-height: 38px; }
    .char-limit-warning { margin-top: 2px; margin-bottom: 4px; }
}

@media (max-width: 480px) {
    body { padding: 4px; align-items: stretch; overflow: hidden; }
    .game-container { padding: 6px; border-radius: 16px; overflow: hidden; }
    .login-title { font-size: clamp(28px, 11vw, 42px); margin-top: 12px; margin-bottom: 8px; }
    .game-title-main { font-size: clamp(22px, 9vw, 38px); }
    .game-title-sub { font-size: clamp(9px, 2vw, 12px); }
    .pokemon-card { padding: clamp(6px, 2vh, 12px) clamp(6px, 1.5vw, 10px); margin: 1px 0 4px 0; border-radius: 16px; }
    .english-word { font-size: clamp(22px, 5.5vw, 36px); }
    .options-wrapper { gap: 8px; }
    .mobile-options { gap: 6px; }
    .option-btn { padding: 8px 10px; border-radius: 12px; }
    .joker-wrapper { width: 55px; min-width: 55px; max-width: 65px; }
    .joker-main-btn { border-radius: 12px; padding: 5px 3px; gap: 3px; }
    .leaderboard-container { padding: 8px; border-radius: 12px; max-height: 160px; overflow: hidden; }
    .login-screen { gap: 6px; overflow: hidden; }
    .menu-center, .menu-right { padding: 10px; border-radius: 16px; overflow: hidden; }
    #startGameBtn, #multiplayerBtn { padding: 8px 12px; font-size: 12px; min-height: 38px; }
    .control-buttons { gap: 4px; margin: 8px 0; }
    .theme-btn, .sound-btn, .howto-btn { padding: 6px 10px; font-size: 10px; min-height: 34px; }
    .username-area { margin: 8px 0; }
    .username-area input { padding: 8px 14px; font-size: 13px; min-height: 38px; }
}

@media (max-width: 900px) and (orientation: landscape) {
    .main-layout { flex-direction: row; gap: 8px; }
    .game-container { padding: 6px; }
    .options-wrapper { gap: 6px; }
    .mobile-options { gap: 4px; }
    .option-btn { padding: 4px 8px; border-radius: 10px; }
    .pokemon-card { padding: 4px; margin: 1px 0; }
    .english-word { font-size: clamp(16px, 3.5vw, 24px); margin-bottom: 2px; }
}