/* Gameplay Visual Language (v1) */
body.modern-v2 #game-screen {
    background: linear-gradient(180deg, #07121f, #040910) !important;
    padding-top: 72px;
    padding-bottom: 0;
    justify-content: flex-start;
}

body.modern-v2 #hud-left,
body.modern-v2 #hud-right {
    position: absolute;
    top: 12px;
    z-index: 140;
}

body.modern-v2 #hud-left {
    left: 12px;
}

body.modern-v2 #hud-right {
    right: 12px;
}

body.modern-v2 #pause-btn,
body.modern-v2 #mic-btn {
    width: 48px;
    height: 48px;
    border-radius: 50% !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

body.modern-v2 #hud-center {
    padding: 8px 12px !important;
    border-radius: 14px !important;
    min-width: 152px;
    text-align: right;
}

body.modern-v2 #hud-level-text-parent {
    color: #ffcf7f !important;
    text-transform: uppercase;
    letter-spacing: 0.7px;
}

body.modern-v2 #hud-level-text {
    color: #fff5da !important;
}

body.modern-v2 #game-area {
    width: min(620px, 96vw);
    flex: 1 1 auto;
    min-height: 52vh;
    position: relative !important;
    margin: 0 auto;
    border-radius: 18px;
    overflow: hidden;
    background:
        radial-gradient(680px 240px at 50% -14%, rgba(109, 215, 255, 0.44), rgba(109, 215, 255, 0)),
        linear-gradient(180deg, #66c8ff 0%, #88d9ff 32%, #9fe0ff 56%, #afe6ff 100%) !important;
    border: 2px solid rgba(205, 236, 255, 0.86) !important;
    box-shadow: inset 0 -34px 60px rgba(23, 64, 96, 0.3), 0 20px 32px rgba(0, 0, 0, 0.32);
}

body.modern-v2 #castle {
    position: absolute;
    left: 50%;
    bottom: 52px !important;
    transform: translateX(-50%);
    width: 124px !important;
    height: 78px !important;
    z-index: 125 !important;
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    justify-content: center;
    align-items: flex-end;
    gap: 8px;
    filter: none !important;
}

body.modern-v2 #castle .tower {
    width: 30px;
    height: 68px;
    background: linear-gradient(180deg, #bac7d3, #8da0b3);
    border: 2px solid #415468;
    border-radius: 4px 4px 0 0;
    position: relative;
}

body.modern-v2 #castle .tower::before {
    content: "";
    position: absolute;
    top: -8px;
    left: -2px;
    width: 32px;
    height: 8px;
    border-radius: 2px;
    background: repeating-linear-gradient(90deg, #44586d 0 6px, #a9b8c8 6px 12px);
    border: 2px solid #415468;
    border-bottom: none;
}

body.modern-v2 #castle .gate {
    width: 46px;
    height: 42px;
    background: linear-gradient(180deg, #b7c5d1, #8b9fb3);
    border: 2px solid #415468;
    border-radius: 8px 8px 0 0;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}

body.modern-v2 #castle .gate::after {
    content: "";
    width: 24px;
    height: 31px;
    background: linear-gradient(180deg, #4d647b, #35495d);
    border-radius: 14px 14px 0 0;
    border: 2px solid #2e4053;
}

body.modern-v2 #ground {
    position: absolute !important;
    left: 0;
    right: 0;
    bottom: 0;
    height: 46px;
    z-index: 90 !important;
    border-top: 4px solid rgba(114, 248, 186, 0.9);
    background: linear-gradient(180deg, #25df9c, #11c27f) !important;
}

body.modern-v2 #controls {
    position: relative;
    width: min(620px, 96vw);
    margin: 0 auto;
    padding: 10px 10px calc(8px + env(safe-area-inset-bottom));
    background: linear-gradient(180deg, rgba(9, 17, 28, 0.94), rgba(7, 12, 20, 0.98)) !important;
    border-top: 1px solid rgba(161, 203, 247, 0.36) !important;
    box-shadow: 0 -16px 26px rgba(0, 0, 0, 0.4);
    z-index: 140;
    border-radius: 0 0 14px 14px;
}

body.modern-v2 #voice-feedback,
body.modern-v2 #voice-live-box,
body.modern-v2 #example-sentence-box {
    background: linear-gradient(145deg, rgba(24, 39, 59, 0.95), rgba(17, 29, 45, 0.96)) !important;
    border: 1px solid rgba(154, 198, 246, 0.42) !important;
    color: #f0f7ff !important;
    border-radius: 12px !important;
}

body.modern-v2 #voice-feedback {
    min-height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
}

body.modern-v2 #voice-live-box [style*="LIVE SPEECH"] {
    color: #93dfff !important;
}

body.modern-v2 #example-sentence-title {
    color: #7ef5bf !important;
}

body.modern-v2 #answers-container {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 8px !important;
    width: min(520px, 100%);
    margin: 6px auto 0 !important;
    padding: 0 2px !important;
}

body.modern-v2 .answer-btn {
    min-height: 52px;
    border-radius: 12px !important;
    border: 1px solid rgba(157, 199, 245, 0.44) !important;
    background: linear-gradient(150deg, #1f3552, #16283f) !important;
    color: #f6fbff !important;
    font-weight: 700;
    text-transform: none;
}

body.modern-v2 .answer-btn:hover {
    border-color: rgba(147, 224, 255, 0.7) !important;
}

body.modern-v2 .answer-btn.feedback-wrong {
    background: linear-gradient(145deg, #7f131d, #590b14) !important;
    border: 2px solid #ff7e90 !important;
    color: #ffffff !important;
    animation: wrongShake 260ms ease;
}

body.modern-v2 .answer-btn.feedback-correct {
    background: linear-gradient(145deg, #16583a, #0f402a) !important;
    border: 2px solid #84ffbf !important;
    color: #ffffff !important;
    animation: correctPulse 320ms ease;
}

@keyframes wrongShake {
    0% { transform: translateX(0); }
    25% { transform: translateX(-3px); }
    50% { transform: translateX(3px); }
    75% { transform: translateX(-2px); }
    100% { transform: translateX(0); }
}

@keyframes correctPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.02); }
    100% { transform: scale(1); }
}

body.modern-v2 #app-container .falling-word,
body.modern-v2 #app-container .falling-word.new-word,
body.modern-v2 #app-container .falling-word.gender-der,
body.modern-v2 #app-container .falling-word.gender-die,
body.modern-v2 #app-container .falling-word.gender-das {
    background: linear-gradient(145deg, #10283f, #0c1d2f) !important;
    border: 2px solid rgba(212, 236, 255, 0.95) !important;
    color: #ffffff !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5) !important;
    border-radius: 12px !important;
    z-index: 95 !important;
    opacity: 1 !important;
}

body.modern-v2 #app-container .falling-word .fw-top,
body.modern-v2 #app-container .falling-word .fw-bottom {
    color: #ffffff !important;
}

body.modern-v2 #app-container .falling-word .fw-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

@media (max-width: 680px) {
    body.modern-v2 #game-screen {
        padding-top: 68px;
        padding-bottom: 0;
    }

    body.modern-v2 #game-area {
        width: 100vw;
        border-left: none !important;
        border-right: none !important;
        border-radius: 0;
    }

    body.modern-v2 #controls {
        width: 100vw;
        border-left: none !important;
        border-right: none !important;
        border-radius: 0;
    }

    body.modern-v2 #answers-container {
        gap: 7px !important;
    }

    body.modern-v2 .answer-btn {
        min-height: 48px;
        font-size: 0.9rem !important;
    }
}
