:root {
    --bg-color: #000000;
    --text-color: #E7E9EA;
    --secondary-text: #71767B;
    --accent-color: #9D44C0;
    /* Parody Purple */
    --accent-glow: rgba(157, 68, 192, 0.5);
    --border-color: #2F3336;
    --tweet-hover: #080808;
    --red-color: #F4212E;
    --green-color: #00BA7C;
    --font-main: 'Roboto', sans-serif;
    --font-jp: 'Noto Sans JP', sans-serif;
    --glass-bg: rgba(0, 0, 0, 0.7);
    --glass-border: rgba(255, 255, 255, 0.1);
}

body {
    margin: 0;
    padding: 0;
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-main);
    overflow: hidden;
    height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Animated Background */
.background-glow {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: radial-gradient(circle at 50% 50%, rgba(157, 68, 192, 0.15), transparent 70%);
    z-index: -1;
    animation: pulseGlow 10s infinite alternate;
}

@keyframes pulseGlow {
    0% {
        transform: scale(1);
        opacity: 0.5;
    }

    100% {
        transform: scale(1.05);
        opacity: 0.8;
    }
}

header {
    display: flex;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(12px);
    position: sticky;
    top: 0;
    z-index: 100;
    height: 53px;
    padding: 0 16px;
}

.header-content {
    display: flex;
    align-items: center;
    gap: 20px;
    width: 100%;
}

.back-icon {
    font-size: 20px;
    color: var(--text-color);
    cursor: pointer;
    transition: color 0.2s;
}

.back-icon:hover {
    color: var(--accent-color);
}

.header-text h1 {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.subtitle {
    font-size: 13px;
    color: var(--secondary-text);
}

#game-container {
    flex-grow: 1;
    overflow-y: auto;
    padding-bottom: 300px;
    /* Space for HUD */
    scrollbar-width: none;
    max-width: 900px;
    margin: 0 auto;
    width: 100%;
    border-left: 1px solid var(--border-color);
    border-right: 1px solid var(--border-color);
}

#game-container::-webkit-scrollbar {
    display: none;
}

.tweet {
    padding: 16px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    gap: 12px;
    transition: background-color 0.2s;
    position: relative;
}

.viral-tweet {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.05) 0%, rgba(0, 0, 0, 0) 100%);
}

.zombie-tweet {
    background-color: rgba(157, 68, 192, 0.05);
    animation: slideIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border-left: 3px solid transparent;
}

.active-zombie {
    background-color: rgba(244, 33, 46, 0.08);
    border-left: 3px solid var(--red-color);
    box-shadow: inset 0 0 20px rgba(244, 33, 46, 0.1);
}

@keyframes slideIn {
    from {
        transform: translateY(50px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background-color: var(--secondary-text);
    flex-shrink: 0;
    border: 2px solid transparent;
    background-size: cover;
    background-position: center;
}

.user-avatar {
    border-color: var(--accent-color);
}

.zombie-avatar {
    filter: grayscale(0.5);
    transition: filter 0.3s;
}

.active-zombie .zombie-avatar {
    filter: grayscale(0) drop-shadow(0 0 5px var(--red-color));
}

.tweet-content {
    flex-grow: 1;
}

.user-info {
    display: flex;
    gap: 5px;
    align-items: center;
    font-size: 15px;
}

.display-name {
    font-weight: 700;
    color: var(--text-color);
}

.verified-icon {
    color: var(--accent-color);
    font-size: 16px;
}

.tweet-text {
    margin-top: 4px;
    font-size: 15px;
    line-height: 1.5;
    color: var(--text-color);
    white-space: pre-wrap;
    word-wrap: break-word;
}

.tweet-stats {
    display: flex;
    justify-content: space-around;
    margin-top: 12px;
    max-width: 425px;
    color: var(--secondary-text);
    font-size: 13px;
}

.tweet-stats span {
    display: flex;
    align-items: center;
    gap: 5px;
    transition: color 0.2s;
}

.tweet-stats span:hover {
    color: var(--accent-color);
}

/* Typing HUD */
#typing-hud {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 20px;
    box-sizing: border-box;
    z-index: 200;
    background: linear-gradient(to top, #000 80%, transparent);
}

.hud-glass {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(20px);
    border-top: 1px solid var(--glass-border);
    z-index: -1;
}

.status-bar {
    display: flex;
    justify-content: space-around;
    align-items: flex-end;
    margin-bottom: 20px;
    padding: 0 20px;
}

.stat {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.time-stat {
    position: relative;
    align-items: flex-start;
}

.time-with-hourglass {
    display: flex;
    align-items: flex-end;
    gap: 6px;
}

.label {
    font-size: 13px;
    color: var(--secondary-text);
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 6px;
    font-weight: 500;
}

.value {
    font-size: 32px;
    font-weight: 900;
    color: var(--text-color);
    text-shadow: 0 0 15px rgba(255, 255, 255, 0.4);
    font-family: 'Roboto', sans-serif;
}

#score {
    color: var(--accent-color);
    text-shadow: 0 0 15px var(--accent-glow);
}

#life-gauge {
    letter-spacing: 4px;
    font-size: 28px;
}

/* Easy Mode Infinity Symbol - Rainbow Glow */
#life-gauge.easy-mode {
    font-size: 42px;
    letter-spacing: 0;
    background: linear-gradient(90deg,
            #ff0000, #ff7f00, #ffff00, #00ff00, #0000ff, #4b0082, #9400d3, #ff0000);
    background-size: 400% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: rainbowFlow 3s linear infinite, easyModePulse 1.5s ease-in-out infinite alternate;
    filter: drop-shadow(0 0 8px currentColor);
}

@keyframes rainbowFlow {
    0% {
        background-position: 0% 50%;
        filter: drop-shadow(0 0 10px #ff0000) drop-shadow(0 0 20px #ff0000);
    }

    14% {
        filter: drop-shadow(0 0 10px #ff7f00) drop-shadow(0 0 20px #ff7f00);
    }

    28% {
        filter: drop-shadow(0 0 10px #ffff00) drop-shadow(0 0 20px #ffff00);
    }

    42% {
        filter: drop-shadow(0 0 10px #00ff00) drop-shadow(0 0 20px #00ff00);
    }

    57% {
        filter: drop-shadow(0 0 10px #0000ff) drop-shadow(0 0 20px #0000ff);
    }

    71% {
        filter: drop-shadow(0 0 10px #4b0082) drop-shadow(0 0 20px #4b0082);
    }

    85% {
        filter: drop-shadow(0 0 10px #9400d3) drop-shadow(0 0 20px #9400d3);
    }

    100% {
        background-position: 400% 50%;
        filter: drop-shadow(0 0 10px #ff0000) drop-shadow(0 0 20px #ff0000);
    }
}

@keyframes easyModePulse {
    0% {
        transform: scale(1);
    }

    100% {
        transform: scale(1.15);
    }
}

#global-timer {
    font-variant-numeric: tabular-nums;
}

.combo-stat .value {
    color: #FFD700;
    text-shadow: 0 0 15px rgba(255, 215, 0, 0.5);
    transform: scale(1);
    transition: transform 0.1s;
}

.combo-with-next {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.combo-with-next .next-bonus {
    font-size: 10px;
    color: var(--secondary-text);
    font-weight: 500;
    white-space: nowrap;
}

.combo-with-next .next-bonus span {
    color: var(--accent-color);
    font-weight: 700;
}


.combo-pop {
    transform: scale(1.5) !important;
}


/* Combo Meter */
#combo-meter-container {
    margin: 0 10px 20px 10px;
    position: relative;
}

.meter-label {
    font-size: 13px;
    color: var(--secondary-text);
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 5px;
}


.meter-track {
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    position: relative;
    overflow: visible;
    /* Allow markers to stick out */
}

#combo-meter-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--accent-color), #9D44C0);
    border-radius: 4px;
    transition: width 0.2s ease-out;
    box-shadow: 0 0 10px rgba(29, 155, 240, 0.5);
}

.meter-marker {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 2px;
    height: 12px;
    background: rgba(255, 255, 255, 0.3);
    z-index: 2;
}

.meter-marker span {
    position: absolute;
    top: -18px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 9px;
    color: var(--secondary-text);
    white-space: nowrap;
}

.meter-marker.reached {
    background: #FFD700;
    box-shadow: 0 0 5px #FFD700;
}

.meter-marker.reached span {
    color: #FFD700;
    font-weight: bold;
}

#target-display {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 20px;
    padding: 24px;
    text-align: center;
    border: 1px solid var(--glass-border);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    position: relative;
    overflow: hidden;
}

#target-display::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent-color), transparent);
    animation: scanline 2s linear infinite;
}

@keyframes scanline {
    0% {
        transform: translateX(-100%);
    }

    100% {
        transform: translateX(100%);
    }
}

.kanji {
    font-family: var(--font-jp);
    font-size: 1.5rem;
    margin-bottom: 12px;
    color: var(--text-color);
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.kana {
    font-family: var(--font-jp);
    font-size: 1rem;
    color: var(--secondary-text);
    margin-bottom: 8px;
}

.romaji {
    font-family: 'Courier New', monospace;
    font-size: 1.3rem;
    letter-spacing: 2px;
    font-weight: 700;
}

.typed {
    color: var(--accent-color);
    text-shadow: 0 0 10px var(--accent-color);
}

.untyped {
    color: #555;
}

.miss {
    color: var(--red-color);
    text-shadow: 0 0 10px var(--red-color);
    animation: shake 0.3s;
}

/* Defeat Animation */
.zombie-defeated {
    transform: scale(0.95);
    opacity: 0;
    filter: blur(10px);
    transition: all 0.3s ease-out;
    background-color: rgba(157, 68, 192, 0.2);
}

/* Shake Animation */
@keyframes shake {
    0% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-5px);
    }

    50% {
        transform: translateX(5px);
    }

    75% {
        transform: translateX(-5px);
    }

    100% {
        transform: translateX(0);
    }
}

.shake {
    animation: shake 0.3s;
}

/* Countdown Animation */
@keyframes countdownPop {
    0% {
        transform: scale(0.5);
        opacity: 0;
    }

    50% {
        transform: scale(1.2);
        opacity: 1;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.countdown-animate {
    animation: countdownPop 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

/* --- Visual Enhancements (Sidebars & Background) --- */

/* Grid Pattern Background */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    z-index: -2;
    pointer-events: none;
}

/* Sidebar Container */
.sidebar-decoration {
    position: fixed;
    top: 0;
    height: 100vh;
    display: none;
    /* Hidden by default on small screens */
    flex-direction: column;
    padding: 20px;
    box-sizing: border-box;
    z-index: 10;
}

/* Left Sidebar (Navigation) */
.left-sidebar {
    right: calc(50% + 460px);
    /* 450px (half game width) + 10px gap */
    width: 270px;
    align-items: flex-end;
    padding-right: 30px;
    padding-top: 60px;
}

.nav-logo {
    font-size: 30px;
    margin-bottom: 20px;
    padding: 10px;
    color: var(--accent-color);
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 12px 24px;
    margin-bottom: 8px;
    border-radius: 30px;
    cursor: pointer;
    transition: background-color 0.2s;
    color: var(--text-color);
    font-size: 20px;
    font-weight: 700;
    white-space: nowrap;
}

.nav-item:hover {
    background-color: rgba(231, 233, 234, 0.1);
}

.nav-item.active {
    font-weight: 900;
}

.nav-item .material-icons {
    font-size: 28px;
}

.nav-button {
    margin-top: 20px;
    background-color: var(--accent-color);
    color: white;
    font-weight: 700;
    font-size: 17px;
    padding: 15px 0;
    width: 100%;
    text-align: center;
    border-radius: 30px;
    box-shadow: 0 4px 10px var(--accent-glow);
    cursor: pointer;
    transition: background-color 0.2s;
}

.nav-button:hover {
    background-color: #8e3db0;
    width: 100%;
}

/* Right Sidebar (Trends) */
.right-sidebar {
    left: calc(50% + 460px);
    width: 350px;
    padding-left: 30px;
    padding-top: 60px;
    /* Fix cutoff */
}

.trends-container {
    background-color: #16181C;
    border-radius: 16px;
    padding: 12px;
    width: 100%;
}

.trends-container h3 {
    margin: 0 0 10px 0;
    font-size: 20px;
    font-weight: 900;
}

.trend-item {
    padding: 8px 0;
    cursor: pointer;
    transition: background-color 0.2s;
}

.trend-item:hover {
    background-color: rgba(255, 255, 255, 0.03);
}

.trend-meta {
    font-size: 13px;
    color: var(--secondary-text);
    margin-bottom: 2px;
}

.trend-name {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 2px;
    color: var(--text-color);
}

.trend-count {
    font-size: 13px;
    color: var(--secondary-text);
}

@keyframes floatUp {
    0% {
        transform: translate(-50%, -50%);
        opacity: 0;
    }

    20% {
        transform: translate(-50%, -100%);
        opacity: 1;
    }

    100% {
        transform: translate(-50%, -150%);
        opacity: 0;
    }
}

@keyframes timerColorChange {
    0% {
        background-color: #00BA7C;
    }

    /* Green */
    50% {
        background-color: #FFD700;
    }

    /* Yellow */
    80% {
        background-color: #F4212E;
    }

    /* Red */
    100% {
        background-color: #F4212E;
    }
}

/* Hourglass Timer (HUD Version) */
#hourglass {
    --hg-width: 40px;
    --hg-glass-height: calc(var(--hg-width) * 0.82);
    --hg-gap: 4px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    pointer-events: none;
}

.hourglass-frame {
    width: var(--hg-width);
    height: calc(var(--hg-glass-height) * 2 - 12px);
    position: relative;
    filter: drop-shadow(0 0 12px rgba(0, 0, 0, 0.6));
    transition: transform 0.3s ease, filter 0.3s ease;
}

#hourglass.boost .hourglass-frame {
    animation: hourglassPulse 0.6s ease;
}

#hourglass.low-time .hourglass-frame {
    filter: drop-shadow(0 0 14px rgba(244, 33, 46, 0.6));
}

.glass {
    position: relative;
    width: var(--hg-width);
    height: var(--hg-glass-height);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: inset 0 0 15px rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(6px);
}

.top-glass {
    clip-path: polygon(10% 0, 90% 0, 65% 100%, 35% 100%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.bottom-glass {
    clip-path: polygon(35% 0, 65% 0, 90% 100%, 10% 100%);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    margin-top: calc(var(--hg-gap) * -1);
}

.sand {
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    background: linear-gradient(180deg, #e1c184, #c49a53);
    transition: height 1s linear;
}

.sand-top {
    height: 100%;
    opacity: 0.95;
}

.sand-bottom {
    height: 0%;
    opacity: 0.95;
}

#hourglass.low-time .sand {
    background: linear-gradient(180deg, #F4212E, #b3121d);
}

.sand-stream {
    position: absolute;
    left: 50%;
    top: calc(var(--hg-glass-height) - var(--hg-gap) * 0.5);
    width: calc(var(--hg-width) * 0.05);
    height: calc(var(--hg-width) * 0.18);
    transform: translateX(-50%);
    background: linear-gradient(180deg, #e1c184, transparent);
    opacity: 0;
    border-radius: 3px;
}

#hourglass.flowing .sand-stream {
    opacity: 0.9;
    animation: sandFlow 0.8s linear infinite;
}

#hourglass.low-time.flowing .sand-stream {
    background: linear-gradient(180deg, #F4212E, transparent);
}

.hourglass-label {
    font-size: 12px;
    letter-spacing: 0.5px;
    color: var(--secondary-text);
    text-transform: uppercase;
    font-weight: 700;
    text-shadow: 0 0 8px rgba(0, 0, 0, 0.4);
}

#hourglass-time {
    color: var(--text-color);
    font-size: 20px;
    font-weight: 900;
    margin-right: 2px;
}

#hourglass.low-time #hourglass-time {
    color: #F4212E;
    text-shadow: 0 0 12px rgba(244, 33, 46, 0.6);
}

.hourglass-toast {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(213, 171, 99, 0.92);
    color: white;
    padding: 4px 8px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 700;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.35);
    animation: floatUp 0.8s ease-out forwards;
    pointer-events: none;
}

#hourglass.low-time .hourglass-toast {
    background: rgba(244, 33, 46, 0.9);
}

@keyframes sandFlow {
    0% {
        height: 18px;
        opacity: 0.6;
    }

    50% {
        height: 26px;
        opacity: 0.95;
    }

    100% {
        height: 18px;
        opacity: 0.6;
    }
}

@keyframes hourglassPulse {
    0% {
        transform: translateY(0) scale(1);
    }

    50% {
        transform: translateY(-4px) scale(1.03);
    }

    100% {
        transform: translateY(0) scale(1);
    }
}

/* Media Query for Large Screens */
@media (min-width: 1350px) {
    .sidebar-decoration {
        display: flex;
    }
}

/* Responsive Design for Small Screens */
@media (max-width: 768px) {
    .status-bar {
        gap: 8px;
        padding: 0 5px;
        flex-wrap: wrap;
        justify-content: center;
        align-items: flex-end;
    }

    .stat {
        min-width: 0;
        flex: 0 1 auto;
    }

    .label {
        font-size: 9px;
    }

    .value {
        font-size: 18px;
    }

    #hourglass {
        --hg-width: 60px;
    }

    .hourglass-label {
        font-size: 10px;
    }

    #hourglass-time {
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    #typing-hud {
        padding: 15px 10px;
    }

    .status-bar {
        gap: 6px;
        padding: 0;
        align-items: flex-end;
    }

    .stat {
        min-width: 60px;
    }

    .label {
        font-size: 8px;
    }

    .value {
        font-size: 16px;
    }

    #hourglass {
        --hg-width: 50px;
        gap: 4px;
        margin-bottom: 8px;
    }

    .hourglass-label {
        font-size: 9px;
    }

    #hourglass-time {
        font-size: 14px;
    }

    .kanji {
        font-size: 1.2rem;
    }

    .kana {
        font-size: 0.9rem;
    }

    .romaji {
        font-size: 1.1rem;
    }
}

/* ==============================
   Result Screen (Fancy Design)
   ============================== */
#result-screen {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(10px);
}

.result-container {
    position: relative;
    text-align: center;
    padding: 50px 80px;
    background: linear-gradient(145deg, rgba(30, 30, 35, 0.9), rgba(15, 15, 20, 0.95));
    border-radius: 30px;
    border: 1px solid rgba(157, 68, 192, 0.3);
    box-shadow: 0 0 60px rgba(157, 68, 192, 0.3), 0 20px 60px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    animation: resultSlideIn 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.result-glow {
    position: absolute;
    top: -100px;
    left: 50%;
    transform: translateX(-50%);
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(157, 68, 192, 0.4), transparent 70%);
    pointer-events: none;
    animation: resultGlowPulse 2s ease-in-out infinite;
}

.result-title {
    font-size: 72px;
    font-weight: 900;
    margin: 0 0 40px 0;
    background: linear-gradient(135deg, #FFD700, #FFA500, #FF6B6B);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 0 30px rgba(255, 215, 0, 0.5));
    animation: resultTitlePop 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275) 0.2s both;
    letter-spacing: 4px;
}

.result-title.game-over {
    background: linear-gradient(135deg, #F4212E, #FF6B6B);
    -webkit-background-clip: text;
    background-clip: text;
    filter: drop-shadow(0 0 30px rgba(244, 33, 46, 0.5));
}

.result-stats {
    display: flex;
    gap: 50px;
    justify-content: center;
    margin-bottom: 40px;
}

.result-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    animation: resultStatSlide 0.6s ease-out both;
}

.result-stat:nth-child(1) {
    animation-delay: 0.4s;
}

.result-stat:nth-child(2) {
    animation-delay: 0.5s;
}

.result-label {
    font-size: 14px;
    color: var(--secondary-text);
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 8px;
    font-weight: 500;
}

.result-value {
    font-size: 56px;
    font-weight: 900;
    color: var(--text-color);
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
    font-family: 'Roboto', sans-serif;
}

.result-combo {
    color: #FFD700;
    text-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
}

.result-button {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 18px 50px;
    font-size: 20px;
    font-weight: 700;
    background: linear-gradient(135deg, var(--accent-color), #7B2D99);
    color: white;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 10px 30px rgba(157, 68, 192, 0.4);
    animation: resultButtonPop 0.6s ease-out 0.7s both;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.result-button:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 15px 40px rgba(157, 68, 192, 0.6);
    background: linear-gradient(135deg, #B060D0, var(--accent-color));
}

.result-button:active {
    transform: translateY(0) scale(0.98);
}

.result-button .material-icons {
    font-size: 24px;
}

.result-buttons {
    display: flex;
    flex-direction: column;
    gap: 15px;
    align-items: center;
}

.result-button.primary {
    background: linear-gradient(135deg, var(--accent-color), #7B2D99);
}

.result-button.secondary {
    background: transparent;
    border: 2px solid rgba(255, 255, 255, 0.3);
    box-shadow: none;
    padding: 14px 40px;
    font-size: 16px;
}

.result-button.secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.5);
    box-shadow: 0 5px 20px rgba(255, 255, 255, 0.1);
}


@keyframes resultSlideIn {
    0% {
        opacity: 0;
        transform: scale(0.8) translateY(50px);
    }

    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

@keyframes resultGlowPulse {

    0%,
    100% {
        opacity: 0.5;
        transform: translateX(-50%) scale(1);
    }

    50% {
        opacity: 0.8;
        transform: translateX(-50%) scale(1.2);
    }
}

@keyframes resultTitlePop {
    0% {
        opacity: 0;
        transform: scale(0.5);
    }

    50% {
        transform: scale(1.1);
    }

    100% {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes resultStatSlide {
    0% {
        opacity: 0;
        transform: translateY(30px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes resultButtonPop {
    0% {
        opacity: 0;
        transform: scale(0.8);
    }

    100% {
        opacity: 1;
        transform: scale(1);
    }
}

@media (max-width: 600px) {
    .result-container {
        padding: 30px 40px;
        margin: 20px;
    }

    .result-title {
        font-size: 48px;
    }

    .result-stats {
        flex-direction: column;
        gap: 25px;
    }

    .result-value {
        font-size: 40px;
    }

    .result-button {
        padding: 15px 35px;
        font-size: 16px;
    }
}


/* ==============================
   Defeat Animation - Account Frozen!
   ============================== */
.zombie-defeated {
    position: relative;
    animation: zombieFreeze 0.8s ease-out forwards;
    pointer-events: none;
}

.zombie-defeated::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(100, 200, 255, 0.4), rgba(150, 220, 255, 0.2));
    border: 2px solid rgba(150, 220, 255, 0.6);
    border-radius: 8px;
    animation: iceFlash 0.3s ease-out;
    pointer-events: none;
}

.zombie-defeated::after {
    content: '🧊 FROZEN';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: linear-gradient(135deg, #64C8FF, #00A8FF);
    color: white;
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 16px;
    font-weight: 900;
    letter-spacing: 2px;
    box-shadow: 0 0 30px rgba(100, 200, 255, 0.8), 0 0 60px rgba(100, 200, 255, 0.4);
    animation: frozenBadgePop 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) 0.1s both;
    z-index: 10;
}

.ice-particle {
    position: fixed;
    width: 8px;
    height: 8px;
    background: linear-gradient(135deg, #64C8FF, #FFFFFF);
    border-radius: 2px;
    pointer-events: none;
    z-index: 9999;
    box-shadow: 0 0 8px rgba(100, 200, 255, 0.8);
}

@keyframes zombieFreeze {
    0% {
        filter: brightness(1) saturate(1);
        transform: scale(1);
    }

    20% {
        filter: brightness(1.5) saturate(0.5) hue-rotate(180deg);
        transform: scale(1.02);
    }

    40% {
        filter: brightness(1.2) saturate(0.3) hue-rotate(180deg);
        transform: scale(1);
    }

    70% {
        filter: brightness(1) saturate(0) hue-rotate(180deg);
        transform: scale(0.98);
        opacity: 1;
    }

    100% {
        filter: brightness(0.8) saturate(0) hue-rotate(180deg) blur(5px);
        transform: scale(0.9) translateY(-10px);
        opacity: 0;
    }
}

@keyframes iceFlash {
    0% {
        opacity: 0;
        transform: scale(1.2);
    }

    50% {
        opacity: 1;
        box-shadow: 0 0 40px rgba(100, 200, 255, 0.8), inset 0 0 30px rgba(255, 255, 255, 0.4);
    }

    100% {
        opacity: 0.5;
    }
}

@keyframes frozenBadgePop {
    0% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.3) rotate(-10deg);
    }

    60% {
        transform: translate(-50%, -50%) scale(1.2) rotate(5deg);
    }

    100% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1) rotate(0deg);
    }
}

@keyframes iceShatter {
    0% {
        opacity: 1;
        transform: translate(0, 0) rotate(0deg) scale(1);
    }

    100% {
        opacity: 0;
        transform: translate(var(--tx), var(--ty)) rotate(var(--rot)) scale(0);
    }
}

/* ==============================
   Progressive Freezing Effect
   ============================== */
.zombie-tweet {
    --freeze-progress: 0;
}

.zombie-tweet.freezing {
    filter: saturate(calc(1 - var(--freeze-progress) * 0.7)) brightness(calc(1 + var(--freeze-progress) * 0.3)) hue-rotate(calc(var(--freeze-progress) * 180deg));
    transition: filter 0.15s ease-out;
}

.zombie-tweet.freezing::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg,
            rgba(100, 200, 255, calc(var(--freeze-progress) * 0.3)),
            rgba(200, 240, 255, calc(var(--freeze-progress) * 0.15)));
    border: calc(var(--freeze-progress) * 3px) solid rgba(150, 220, 255, calc(var(--freeze-progress) * 0.8));
    border-radius: 8px;
    pointer-events: none;
    opacity: var(--freeze-progress);
}

/* Ice crystals forming */
.freeze-crystal {
    position: absolute;
    width: 20px;
    height: 20px;
    pointer-events: none;
    opacity: 0;
    animation: crystalForm 0.3s ease-out forwards;
    z-index: 5;
}

@keyframes crystalForm {
    0% {
        opacity: 0;
        transform: scale(0) rotate(0deg);
    }

    100% {
        opacity: 0.8;
        transform: scale(1) rotate(45deg);
    }
}

/* Enhanced Shatter Effect */
.zombie-shatter {
    animation: shatterExplode 0.6s ease-out forwards !important;
}

@keyframes shatterExplode {
    0% {
        filter: brightness(1.5) saturate(0) hue-rotate(180deg);
        transform: scale(1);
    }

    20% {
        filter: brightness(2) saturate(0) hue-rotate(180deg);
        transform: scale(1.05);
    }

    40% {
        filter: brightness(3) saturate(0) hue-rotate(180deg) blur(2px);
        transform: scale(1.02);
    }

    100% {
        filter: brightness(0) blur(20px);
        transform: scale(0.8) translateY(-30px);
        opacity: 0;
    }
}

/* Shatter pieces */
.shatter-piece {
    position: fixed;
    pointer-events: none;
    z-index: 9999;
    background-size: cover;
    box-shadow: 0 0 10px rgba(100, 200, 255, 0.8), inset 0 0 5px rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(200, 240, 255, 0.6);
}

/* Screen shake on shatter */
@keyframes screenShake {

    0%,
    100% {
        transform: translateX(0);
    }

    10% {
        transform: translateX(-8px) translateY(3px);
    }

    20% {
        transform: translateX(8px) translateY(-3px);
    }

    30% {
        transform: translateX(-6px) translateY(2px);
    }

    40% {
        transform: translateX(6px) translateY(-2px);
    }

    50% {
        transform: translateX(-4px) translateY(1px);
    }

    60% {
        transform: translateX(4px) translateY(-1px);
    }

    70% {
        transform: translateX(-2px);
    }

    80% {
        transform: translateX(2px);
    }
}

.screen-shake {
    animation: screenShake 0.4s ease-out;
}

/* Frozen badge enhanced */
.frozen-badge {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    background: linear-gradient(135deg, #64C8FF, #00A8FF);
    color: white;
    padding: 15px 40px;
    border-radius: 30px;
    font-size: 28px;
    font-weight: 900;
    letter-spacing: 4px;
    box-shadow: 0 0 50px rgba(100, 200, 255, 1), 0 0 100px rgba(100, 200, 255, 0.6);
    z-index: 10000;
    animation: badgeSlam 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

@keyframes badgeSlam {
    0% {
        transform: translate(-50%, -50%) scale(3) rotate(-15deg);
        opacity: 0;
    }

    50% {
        transform: translate(-50%, -50%) scale(0.9) rotate(5deg);
        opacity: 1;
    }

    70% {
        transform: translate(-50%, -50%) scale(1.1) rotate(-2deg);
    }

    100% {
        transform: translate(-50%, -50%) scale(1) rotate(0deg);
        opacity: 1;
    }
}

/* Enhanced Progressive Freezing - Frost Effect */
.zombie-tweet.freezing {
    position: relative;
    filter: saturate(calc(1 - var(--freeze-progress) * 0.8)) brightness(calc(1 + var(--freeze-progress) * 0.2));
    transition: filter 0.15s ease-out;
}

/* Frost overlay spreading from edges */
.zombie-tweet.freezing::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(ellipse at top left, rgba(180, 220, 255, calc(var(--freeze-progress) * 0.6)) 0%, transparent 50%),
        radial-gradient(ellipse at top right, rgba(200, 240, 255, calc(var(--freeze-progress) * 0.5)) 0%, transparent 45%),
        radial-gradient(ellipse at bottom left, rgba(150, 200, 255, calc(var(--freeze-progress) * 0.5)) 0%, transparent 45%),
        radial-gradient(ellipse at bottom right, rgba(180, 230, 255, calc(var(--freeze-progress) * 0.6)) 0%, transparent 50%);
    border: calc(var(--freeze-progress) * 4px) solid rgba(200, 240, 255, calc(var(--freeze-progress) * 0.9));
    border-radius: 8px;
    pointer-events: none;
    opacity: 1;
    box-shadow:
        inset 0 0 calc(var(--freeze-progress) * 30px) rgba(180, 220, 255, calc(var(--freeze-progress) * 0.4)),
        0 0 calc(var(--freeze-progress) * 20px) rgba(150, 200, 255, calc(var(--freeze-progress) * 0.3));
}

/* Ice crystal texture overlay */
.zombie-tweet.freezing::after {
    content: '❄';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(calc(var(--freeze-progress) * 2));
    font-size: 40px;
    opacity: calc(var(--freeze-progress) * 0.3);
    pointer-events: none;
    text-shadow:
        20px -10px 0 rgba(255, 255, 255, 0.2),
        -25px 15px 0 rgba(255, 255, 255, 0.15),
        30px 20px 0 rgba(255, 255, 255, 0.2),
        -15px -20px 0 rgba(255, 255, 255, 0.15);
    filter: blur(1px);
}

/* Ultra Enhanced Freezing - Cracks & Cold Blue */
.zombie-tweet.freezing {
    position: relative;
    /* More blue/cyan tint for cold feeling */
    filter: saturate(calc(1 - var(--freeze-progress) * 0.9)) brightness(calc(1 + var(--freeze-progress) * 0.1)) hue-rotate(calc(var(--freeze-progress) * 200deg));
    transition: filter 0.1s ease-out;
}

/* Icy blue frost overlay */
.zombie-tweet.freezing::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(ellipse at top left, rgba(0, 150, 255, calc(var(--freeze-progress) * 0.5)) 0%, transparent 40%),
        radial-gradient(ellipse at top right, rgba(50, 180, 255, calc(var(--freeze-progress) * 0.4)) 0%, transparent 35%),
        radial-gradient(ellipse at bottom left, rgba(30, 160, 255, calc(var(--freeze-progress) * 0.4)) 0%, transparent 35%),
        radial-gradient(ellipse at bottom right, rgba(0, 140, 255, calc(var(--freeze-progress) * 0.5)) 0%, transparent 40%),
        linear-gradient(135deg, rgba(0, 100, 200, calc(var(--freeze-progress) * 0.2)), transparent);
    border: calc(var(--freeze-progress) * 3px) solid rgba(100, 200, 255, calc(var(--freeze-progress) * 0.9));
    border-radius: 8px;
    pointer-events: none;
    box-shadow:
        inset 0 0 calc(var(--freeze-progress) * 40px) rgba(0, 150, 255, calc(var(--freeze-progress) * 0.5)),
        0 0 calc(var(--freeze-progress) * 25px) rgba(0, 180, 255, calc(var(--freeze-progress) * 0.4));
}

/* Progressive cracks overlay */
.zombie-tweet.freezing::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    opacity: var(--freeze-progress);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200' viewBox='0 0 200 200'%3E%3Cpath d='M100 0 L105 50 L150 45 L120 80 L180 100 L130 110 L160 150 L100 120 L90 170 L80 130 L30 160 L60 100 L10 90 L70 70 L40 30 L90 60 Z' stroke='rgba(200,240,255,0.8)' stroke-width='2' fill='none'/%3E%3Cpath d='M100 100 L60 40' stroke='rgba(180,220,255,0.6)' stroke-width='1'/%3E%3Cpath d='M100 100 L150 60' stroke='rgba(180,220,255,0.6)' stroke-width='1'/%3E%3Cpath d='M100 100 L40 120' stroke='rgba(180,220,255,0.6)' stroke-width='1'/%3E%3Cpath d='M100 100 L160 140' stroke='rgba(180,220,255,0.6)' stroke-width='1'/%3E%3Cpath d='M100 100 L80 170' stroke='rgba(180,220,255,0.6)' stroke-width='1'/%3E%3C/svg%3E");
    background-size: 100% 100%;
    transform: scale(calc(0.5 + var(--freeze-progress) * 0.5));
    filter: blur(calc((1 - var(--freeze-progress)) * 2px));
}

/* Ice crystals spawning during freeze */
.freeze-crystal {
    position: absolute;
    color: rgba(150, 220, 255, 0.9);
    font-size: 20px;
    pointer-events: none;
    animation: crystalGrow 0.3s ease-out forwards;
    text-shadow: 0 0 10px rgba(100, 200, 255, 0.8);
    z-index: 5;
}

@keyframes crystalGrow {
    0% {
        opacity: 0;
        transform: scale(0) rotate(0deg);
    }

    100% {
        opacity: 1;
        transform: scale(1) rotate(15deg);
    }
}

/* Full Coverage Crack Pattern */
.zombie-tweet.freezing::after {
    content: '';
    position: absolute;
    top: -10%;
    left: -10%;
    right: -10%;
    bottom: -10%;
    pointer-events: none;
    opacity: calc(var(--freeze-progress) * 1.2);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='400' height='200' viewBox='0 0 400 200'%3E%3Cg stroke='rgba(200,240,255,0.9)' fill='none'%3E%3C!-- Main cracks from center --%3E%3Cpath d='M200 100 L50 20' stroke-width='2'/%3E%3Cpath d='M200 100 L350 15' stroke-width='2'/%3E%3Cpath d='M200 100 L380 100' stroke-width='2'/%3E%3Cpath d='M200 100 L360 180' stroke-width='2'/%3E%3Cpath d='M200 100 L200 190' stroke-width='2'/%3E%3Cpath d='M200 100 L40 185' stroke-width='2'/%3E%3Cpath d='M200 100 L20 100' stroke-width='2'/%3E%3Cpath d='M200 100 L30 50' stroke-width='2'/%3E%3C!-- Branch cracks --%3E%3Cpath d='M120 60 L80 10' stroke-width='1.5'/%3E%3Cpath d='M120 60 L150 30' stroke-width='1.5'/%3E%3Cpath d='M280 55 L320 10' stroke-width='1.5'/%3E%3Cpath d='M280 55 L250 25' stroke-width='1.5'/%3E%3Cpath d='M300 100 L380 80' stroke-width='1.5'/%3E%3Cpath d='M300 100 L380 130' stroke-width='1.5'/%3E%3Cpath d='M280 140 L350 180' stroke-width='1.5'/%3E%3Cpath d='M280 140 L320 195' stroke-width='1.5'/%3E%3Cpath d='M200 150 L160 190' stroke-width='1.5'/%3E%3Cpath d='M200 150 L240 195' stroke-width='1.5'/%3E%3Cpath d='M120 140 L50 180' stroke-width='1.5'/%3E%3Cpath d='M120 140 L80 195' stroke-width='1.5'/%3E%3Cpath d='M100 100 L20 70' stroke-width='1.5'/%3E%3Cpath d='M100 100 L15 130' stroke-width='1.5'/%3E%3C!-- Fine detail cracks --%3E%3Cpath d='M160 80 L130 50' stroke-width='1' opacity='0.7'/%3E%3Cpath d='M240 80 L270 50' stroke-width='1' opacity='0.7'/%3E%3Cpath d='M160 120 L130 150' stroke-width='1' opacity='0.7'/%3E%3Cpath d='M240 120 L270 150' stroke-width='1' opacity='0.7'/%3E%3Cpath d='M180 90 L155 70' stroke-width='1' opacity='0.7'/%3E%3Cpath d='M220 90 L245 70' stroke-width='1' opacity='0.7'/%3E%3Cpath d='M180 110 L155 130' stroke-width='1' opacity='0.7'/%3E%3Cpath d='M220 110 L245 130' stroke-width='1' opacity='0.7'/%3E%3C/g%3E%3C/svg%3E");
    background-size: 100% 100%;
    background-position: center;
    filter: drop-shadow(0 0 3px rgba(150, 220, 255, 0.8));
}

/* Earned Points Animation */
@keyframes earnedPointsPop {
    0% {
        opacity: 0;
        transform: translateY(-50%) scale(0.5);
    }

    20% {
        opacity: 1;
        transform: translateY(-50%) scale(1.2);
    }

    40% {
        transform: translateY(-50%) scale(1);
    }

    100% {
        opacity: 0;
        transform: translateY(-100%) scale(1);
    }
}

.earned-points {
    z-index: 100;
}

/* Large Hourglass Toast for Time Extension */
.hourglass-toast {
    position: absolute;
    top: -40px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #FFD700, #FFA500);
    color: #000;
    font-size: 24px;
    font-weight: 900;
    padding: 8px 16px;
    border-radius: 20px;
    white-space: nowrap;
    z-index: 200;
    animation: toastPop 0.8s ease-out forwards;
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.8), 0 4px 15px rgba(0, 0, 0, 0.3);
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.5);
}

@keyframes toastPop {
    0% {
        opacity: 0;
        transform: translateX(-50%) scale(0.5) translateY(20px);
    }

    30% {
        opacity: 1;
        transform: translateX(-50%) scale(1.3) translateY(-10px);
    }

    50% {
        transform: translateX(-50%) scale(1) translateY(0);
    }

    100% {
        opacity: 0;
        transform: translateX(-50%) scale(1) translateY(-30px);
    }
}

#hourglass.boost {
    animation: hourglassPulse 0.5s ease-out;
}

@keyframes hourglassPulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.2);
        filter: brightness(1.3);
    }
}

/* Enhanced Result Screen */
#result-screen {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg,
            rgba(10, 22, 40, 0.98) 0%,
            rgba(13, 31, 60, 0.98) 50%,
            rgba(26, 10, 46, 0.95) 100%);
    z-index: 1000;
    justify-content: center;
    align-items: flex-start;
    padding: 20px 0;
    overflow-y: auto;
    backdrop-filter: blur(20px);
}

.result-container.enhanced {
    position: relative;
    text-align: center;
    padding: 40px 60px;
    background: linear-gradient(145deg,
            rgba(20, 40, 60, 0.95) 0%,
            rgba(15, 25, 45, 0.98) 50%,
            rgba(30, 20, 50, 0.95) 100%);
    border-radius: 30px;
    border: 2px solid rgba(125, 211, 252, 0.3);
    box-shadow:
        0 0 60px rgba(56, 189, 248, 0.2),
        0 0 100px rgba(14, 165, 233, 0.15),
        0 0 150px rgba(125, 211, 252, 0.1),
        inset 0 1px 0 rgba(186, 230, 253, 0.2),
        inset 0 0 40px rgba(56, 189, 248, 0.05);
    max-width: 520px;
    width: 90%;
    animation: resultSlideIn 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
    overflow: hidden;
}

.result-container.enhanced::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 120px;
    background: linear-gradient(180deg,
            rgba(56, 189, 248, 0.1) 0%,
            transparent 100%);
    pointer-events: none;
}

.result-container.enhanced::after {
    content: '❄';
    position: absolute;
    top: 15px;
    left: 20px;
    font-size: 24px;
    opacity: 0.3;
    animation: snowflakeSpin 8s linear infinite;
}

@keyframes resultSlideIn {
    from {
        opacity: 0;
        transform: scale(0.8) translateY(50px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.result-container.enhanced .result-glow {
    position: absolute;
    top: -120px;
    left: 50%;
    transform: translateX(-50%);
    width: 500px;
    height: 500px;
    background: radial-gradient(circle,
            rgba(56, 189, 248, 0.4) 0%,
            rgba(125, 211, 252, 0.2) 30%,
            rgba(14, 165, 233, 0.1) 50%,
            transparent 70%);
    pointer-events: none;
    animation: resultGlowPulse 3s ease-in-out infinite;
}

@keyframes resultGlowPulse {

    0%,
    100% {
        opacity: 0.6;
        transform: translateX(-50%) scale(1);
    }

    50% {
        opacity: 1;
        transform: translateX(-50%) scale(1.15);
    }
}

.result-header {
    margin-bottom: 20px;
    position: relative;
    z-index: 1;
}

.result-container.enhanced .result-title {
    font-size: 52px;
    font-weight: 900;
    margin: 0 0 8px 0;
    background: linear-gradient(135deg,
            #f0f9ff 0%,
            #7dd3fc 25%,
            #38bdf8 50%,
            #0ea5e9 75%,
            #bae6fd 100%);
    background-size: 200% 100%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 0 25px rgba(56, 189, 248, 0.6));
    animation: resultTitlePop 0.6s ease-out 0.2s both, resultTitleShine 4s ease-in-out infinite;
    letter-spacing: 3px;
}

@keyframes resultTitleShine {

    0%,
    100% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }
}

.result-container.enhanced .result-title.game-over {
    background: linear-gradient(135deg, #F4212E, #FF6B6B, #F4212E);
    background-size: 200% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    filter: drop-shadow(0 0 25px rgba(244, 33, 46, 0.6));
}

@keyframes resultTitlePop {
    0% {
        opacity: 0;
        transform: scale(0.5);
    }

    60% {
        transform: scale(1.1);
    }

    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.result-subtitle {
    font-size: 16px;
    color: rgba(186, 230, 253, 0.8);
    margin: 0;
    letter-spacing: 2px;
    text-shadow: 0 0 10px rgba(56, 189, 248, 0.3);
}

.result-main-stats {
    display: flex;
    gap: 40px;
    justify-content: center;
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(125, 211, 252, 0.2);
    position: relative;
    z-index: 1;
}

.result-stat.featured {
    display: flex;
    flex-direction: column;
    align-items: center;
    animation: resultStatSlide 0.5s ease-out both;
}

.result-stat.featured:nth-child(1) {
    animation-delay: 0.3s;
}

.result-stat.featured:nth-child(2) {
    animation-delay: 0.4s;
}

@keyframes resultStatSlide {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.result-stat.featured .result-label {
    font-size: 12px;
    color: rgba(186, 230, 253, 0.7);
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 5px;
}

.result-stat.featured .result-value {
    font-size: 48px;
    font-weight: 900;
    background: linear-gradient(135deg, #f0f9ff, #7dd3fc, #38bdf8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 0 15px rgba(56, 189, 248, 0.5));
}

.result-stat.featured .result-combo {
    background: linear-gradient(135deg, #fef08a, #facc15, #f59e0b);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 0 15px rgba(250, 204, 21, 0.5));
}

/* Detail Stats */
.result-detail-stats {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 25px;
    padding: 18px;
    background: linear-gradient(145deg,
            rgba(20, 40, 60, 0.6) 0%,
            rgba(15, 30, 50, 0.7) 100%);
    border-radius: 16px;
    border: 1px solid rgba(125, 211, 252, 0.15);
    box-shadow: inset 0 0 20px rgba(56, 189, 248, 0.05);
    position: relative;
    z-index: 1;
}

.stat-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    border-radius: 8px;
    transition: background 0.2s;
    animation: statRowFade 0.4s ease-out both;
}

.stat-row:nth-child(1) {
    animation-delay: 0.5s;
}

.stat-row:nth-child(2) {
    animation-delay: 0.55s;
}

.stat-row:nth-child(3) {
    animation-delay: 0.6s;
}

.stat-row:nth-child(4) {
    animation-delay: 0.65s;
}

.stat-row:nth-child(5) {
    animation-delay: 0.7s;
}

.stat-row:nth-child(6) {
    animation-delay: 0.75s;
}

.stat-row:nth-child(7) {
    animation-delay: 0.8s;
}

@keyframes statRowFade {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.stat-row.highlight {
    background: linear-gradient(135deg,
            rgba(56, 189, 248, 0.15) 0%,
            rgba(14, 165, 233, 0.1) 100%);
    border: 1px solid rgba(125, 211, 252, 0.25);
}

.stat-icon {
    font-size: 18px;
    margin-right: 10px;
    filter: drop-shadow(0 0 5px rgba(56, 189, 248, 0.3));
}

.stat-name {
    flex: 1;
    text-align: left;
    font-size: 14px;
    color: rgba(186, 230, 253, 0.9);
    font-family: var(--font-jp);
}

.stat-row .stat-value {
    font-size: 16px;
    font-weight: 700;
    color: #f0f9ff;
    font-family: 'Roboto', sans-serif;
}

.stat-row.highlight .stat-value {
    background: linear-gradient(135deg, #7dd3fc, #38bdf8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 0 8px rgba(56, 189, 248, 0.5));
}

/* Result Button */
.result-container.enhanced .result-button {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 16px 40px;
    font-size: 18px;
    font-weight: 700;
    color: white;
    background: linear-gradient(135deg, #0ea5e9, #0284c7, #0369a1);
    border: 1px solid rgba(125, 211, 252, 0.3);
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow:
        0 5px 25px rgba(14, 165, 233, 0.4),
        inset 0 1px 0 rgba(186, 230, 253, 0.3);
    animation: resultButtonPop 0.5s ease-out 0.9s both;
    position: relative;
    overflow: hidden;
}

.result-container.enhanced .result-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
            transparent,
            rgba(255, 255, 255, 0.2),
            transparent);
    transition: left 0.5s ease;
}

.result-container.enhanced .result-button:hover::before {
    left: 100%;
}

@keyframes resultButtonPop {
    from {
        opacity: 0;
        transform: scale(0.8);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.result-container.enhanced .result-button:hover {
    transform: translateY(-3px);
    box-shadow:
        0 10px 35px rgba(14, 165, 233, 0.5),
        0 0 50px rgba(56, 189, 248, 0.3);
    background: linear-gradient(135deg, #38bdf8, #0ea5e9, #0284c7);
}

.result-container.enhanced .result-button.secondary {
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.2), rgba(14, 165, 233, 0.15));
    border: 1px solid rgba(125, 211, 252, 0.3);
    box-shadow: 0 5px 20px rgba(14, 165, 233, 0.2);
}

.result-container.enhanced .result-button.secondary:hover {
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.3), rgba(14, 165, 233, 0.25));
    box-shadow:
        0 8px 30px rgba(14, 165, 233, 0.3),
        0 0 40px rgba(56, 189, 248, 0.2);
}

.result-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: center;
    position: relative;
    z-index: 1;
}

/* ==================== Title Screen - Commercial Quality ==================== */
#title-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2000;
    display: flex;
    justify-content: center;
    align-items: center;
    background: linear-gradient(180deg, #0a1628 0%, #0d1f3c 50%, #1a0a2e 100%);
    overflow: hidden;
}

#title-screen.hidden {
    display: none;
}

/* Snow particle canvas */
#snow-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

/* Background layers */
.title-bg-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.layer-aurora {
    background:
        radial-gradient(ellipse 80% 50% at 50% 0%, rgba(56, 189, 248, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse 60% 40% at 30% 20%, rgba(125, 211, 252, 0.1) 0%, transparent 40%),
        radial-gradient(ellipse 60% 40% at 70% 30%, rgba(186, 230, 253, 0.08) 0%, transparent 40%);
    animation: auroraMove 15s ease-in-out infinite;
}

@keyframes auroraMove {

    0%,
    100% {
        transform: translateY(0) scale(1);
        opacity: 0.8;
    }

    50% {
        transform: translateY(-20px) scale(1.05);
        opacity: 1;
    }
}

.layer-gradient {
    background:
        radial-gradient(circle at 20% 80%, rgba(56, 189, 248, 0.1) 0%, transparent 40%),
        radial-gradient(circle at 80% 70%, rgba(14, 165, 233, 0.08) 0%, transparent 35%);
    animation: gradientPulse 8s ease-in-out infinite;
}

@keyframes gradientPulse {

    0%,
    100% {
        opacity: 0.6;
    }

    50% {
        opacity: 1;
    }
}

.layer-frost {
    background: url("data:image/svg+xml,%3Csvg viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='4' /%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.03'/%3E%3C/svg%3E");
    opacity: 0.5;
}

/* Floating ice shards */
.ice-shards {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 2;
}

.shard {
    position: absolute;
    background: linear-gradient(135deg,
            rgba(255, 255, 255, 0.4) 0%,
            rgba(186, 230, 253, 0.3) 50%,
            rgba(125, 211, 252, 0.2) 100%);
    clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
    animation: shardFloat 20s ease-in-out infinite;
    box-shadow: 0 0 20px rgba(125, 211, 252, 0.3);
}

.shard-1 {
    width: 60px;
    height: 60px;
    top: 10%;
    left: 5%;
    animation-delay: 0s;
    animation-duration: 18s;
}

.shard-2 {
    width: 40px;
    height: 40px;
    top: 25%;
    right: 10%;
    animation-delay: 2s;
    animation-duration: 22s;
}

.shard-3 {
    width: 80px;
    height: 80px;
    bottom: 30%;
    left: 8%;
    animation-delay: 4s;
    animation-duration: 25s;
}

.shard-4 {
    width: 50px;
    height: 50px;
    top: 60%;
    right: 5%;
    animation-delay: 6s;
    animation-duration: 20s;
}

.shard-5 {
    width: 35px;
    height: 35px;
    bottom: 15%;
    left: 15%;
    animation-delay: 8s;
    animation-duration: 23s;
}

.shard-6 {
    width: 45px;
    height: 45px;
    top: 40%;
    right: 15%;
    animation-delay: 10s;
    animation-duration: 19s;
}

@keyframes shardFloat {

    0%,
    100% {
        transform: translateY(0) rotate(0deg);
        opacity: 0.6;
    }

    25% {
        transform: translateY(-30px) rotate(45deg);
        opacity: 0.8;
    }

    50% {
        transform: translateY(-10px) rotate(90deg);
        opacity: 0.5;
    }

    75% {
        transform: translateY(-40px) rotate(135deg);
        opacity: 0.7;
    }
}

/* Title content container */
.title-content {
    position: relative;
    z-index: 10;
    text-align: center;
    padding: 40px;
}

/* Title logo area */
.title-logo {
    position: relative;
    margin-bottom: 60px;
    padding: 40px 60px;
}

/* Enhanced ice frame with icicles */
.ice-frame-top {
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 5;
}

.icicle-row {
    display: flex;
    justify-content: center;
    gap: 15px;
}

.icicle {
    position: relative;
    background: linear-gradient(180deg,
            rgba(255, 255, 255, 0.95) 0%,
            rgba(224, 242, 254, 0.9) 20%,
            rgba(186, 230, 253, 0.8) 50%,
            rgba(125, 211, 252, 0.5) 80%,
            rgba(56, 189, 248, 0.2) 100%);
    border-radius: 3px 3px 50% 50%;
    box-shadow:
        0 0 15px rgba(186, 230, 253, 0.6),
        inset -3px 0 6px rgba(255, 255, 255, 0.7),
        inset 2px 0 4px rgba(125, 211, 252, 0.5);
    animation: icicleAppear 0.8s ease-out both, icicleGlisten 4s ease-in-out infinite;
}

.icicle::before {
    content: '';
    position: absolute;
    top: 5%;
    left: 20%;
    width: 25%;
    height: 50%;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.8), transparent);
    border-radius: 2px;
}

.icicle-sm {
    width: 8px;
    height: 30px;
    animation-delay: 0.1s;
}

.icicle-md {
    width: 12px;
    height: 50px;
    animation-delay: 0.2s;
}

.icicle-lg {
    width: 16px;
    height: 70px;
    animation-delay: 0.3s;
}

.icicle-xl {
    width: 20px;
    height: 90px;
    animation-delay: 0.4s;
}

@keyframes icicleAppear {
    from {
        height: 0;
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes icicleGlisten {

    0%,
    100% {
        filter: brightness(1) drop-shadow(0 0 10px rgba(186, 230, 253, 0.5));
    }

    50% {
        filter: brightness(1.4) drop-shadow(0 0 20px rgba(255, 255, 255, 0.8));
    }
}

/* Frost frame border */
.frost-frame {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border: 2px solid rgba(186, 230, 253, 0.3);
    border-radius: 20px;
    box-shadow:
        inset 0 0 40px rgba(125, 211, 252, 0.1),
        0 0 30px rgba(56, 189, 248, 0.1);
    pointer-events: none;
    animation: framePulse 4s ease-in-out infinite;
}

@keyframes framePulse {

    0%,
    100% {
        border-color: rgba(186, 230, 253, 0.3);
        box-shadow: inset 0 0 40px rgba(125, 211, 252, 0.1), 0 0 30px rgba(56, 189, 248, 0.1);
    }

    50% {
        border-color: rgba(186, 230, 253, 0.5);
        box-shadow: inset 0 0 60px rgba(125, 211, 252, 0.2), 0 0 50px rgba(56, 189, 248, 0.2);
    }
}

/* Logo wrapper */
.logo-wrapper {
    position: relative;
    display: inline-block;
}

.logo-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 120%;
    height: 200%;
    background: radial-gradient(ellipse, rgba(56, 189, 248, 0.3) 0%, transparent 70%);
    filter: blur(30px);
    animation: logoGlowPulse 3s ease-in-out infinite;
    pointer-events: none;
}

@keyframes logoGlowPulse {

    0%,
    100% {
        opacity: 0.5;
        transform: translate(-50%, -50%) scale(1);
    }

    50% {
        opacity: 0.8;
        transform: translate(-50%, -50%) scale(1.1);
    }
}

/* Main title */
.title-main {
    position: relative;
    font-family: var(--font-jp);
    font-size: 3.5rem;
    font-weight: 900;
    margin: 0;
    line-height: 1.2;
}

.title-text-shadow {
    position: absolute;
    top: 4px;
    left: 4px;
    color: rgba(0, 50, 80, 0.5);
    filter: blur(8px);
    z-index: 1;
}

.title-text-main {
    position: relative;
    z-index: 2;
    background: linear-gradient(180deg,
            #ffffff 0%,
            #f0f9ff 10%,
            #e0f2fe 25%,
            #bae6fd 40%,
            #7dd3fc 55%,
            #38bdf8 70%,
            #0ea5e9 85%,
            #0284c7 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    filter:
        drop-shadow(0 0 2px rgba(255, 255, 255, 1)) drop-shadow(0 0 10px rgba(186, 230, 253, 0.9)) drop-shadow(0 0 25px rgba(56, 189, 248, 0.7)) drop-shadow(0 0 50px rgba(14, 165, 233, 0.5));
    animation: titleReveal 1s ease-out both, titleGlow 4s ease-in-out 1s infinite;
}

.title-text-shine {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(120deg,
            transparent 30%,
            rgba(255, 255, 255, 0.8) 50%,
            transparent 70%);
    background-size: 200% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: shineMove 3s ease-in-out infinite;
    z-index: 3;
    pointer-events: none;
}

@keyframes titleReveal {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.9);
        filter: blur(10px) drop-shadow(0 0 0 transparent);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes titleGlow {

    0%,
    100% {
        filter:
            drop-shadow(0 0 2px rgba(255, 255, 255, 1)) drop-shadow(0 0 10px rgba(186, 230, 253, 0.9)) drop-shadow(0 0 25px rgba(56, 189, 248, 0.7)) drop-shadow(0 0 50px rgba(14, 165, 233, 0.5));
    }

    50% {
        filter:
            drop-shadow(0 0 5px rgba(255, 255, 255, 1)) drop-shadow(0 0 20px rgba(186, 230, 253, 1)) drop-shadow(0 0 40px rgba(56, 189, 248, 0.9)) drop-shadow(0 0 80px rgba(14, 165, 233, 0.7));
    }
}

@keyframes shineMove {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

/* Crystal container */
.crystal-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 15;
}

.crystal {
    position: absolute;
    font-size: 2rem;
    color: rgba(186, 230, 253, 0.9);
    text-shadow:
        0 0 10px rgba(125, 211, 252, 0.8),
        0 0 20px rgba(56, 189, 248, 0.5);
    animation: crystalFloat 5s ease-in-out infinite;
}

.crystal-1 {
    top: -30px;
    left: -50px;
    font-size: 2.5rem;
    animation-delay: 0s;
}

.crystal-2 {
    top: 20px;
    right: -40px;
    font-size: 1.8rem;
    animation-delay: 0.8s;
}

.crystal-3 {
    bottom: 40px;
    left: -60px;
    font-size: 2.2rem;
    animation-delay: 1.5s;
}

.crystal-4 {
    bottom: 10px;
    right: -50px;
    font-size: 1.5rem;
    animation-delay: 2.2s;
}

.crystal-5 {
    top: 50%;
    left: -70px;
    font-size: 2rem;
    animation-delay: 3s;
}

.crystal-6 {
    top: 30%;
    right: -55px;
    font-size: 1.6rem;
    animation-delay: 3.8s;
}

@keyframes crystalFloat {

    0%,
    100% {
        transform: translateY(0) rotate(0deg) scale(1);
        opacity: 0.7;
    }

    50% {
        transform: translateY(-15px) rotate(20deg) scale(1.1);
        opacity: 1;
    }
}

/* Subtitle section */
.subtitle-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin: 25px 0 15px;
    animation: subtitleReveal 0.8s ease-out 0.3s both;
}

.subtitle-line {
    width: 80px;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(125, 211, 252, 0.8), transparent);
    animation: linePulse 2s ease-in-out infinite;
}

@keyframes linePulse {

    0%,
    100% {
        opacity: 0.5;
        width: 80px;
    }

    50% {
        opacity: 1;
        width: 100px;
    }
}

.title-sub {
    font-family: var(--font-jp);
    font-size: 2.2rem;
    font-weight: 800;
    letter-spacing: 12px;
    margin: 0;
    background: linear-gradient(180deg, #f0f9ff 0%, #7dd3fc 50%, #0ea5e9 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 15px rgba(56, 189, 248, 0.6));
    animation: subtitlePulse 3s ease-in-out infinite;
}

@keyframes subtitlePulse {

    0%,
    100% {
        filter: drop-shadow(0 0 15px rgba(56, 189, 248, 0.6));
    }

    50% {
        filter: drop-shadow(0 0 25px rgba(125, 211, 252, 0.9));
    }
}

@keyframes subtitleReveal {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Tagline */
.title-tagline {
    font-family: var(--font-jp);
    font-size: 1.2rem;
    color: #7dd3fc;
    margin: 0;
    text-shadow: 0 0 20px rgba(56, 189, 248, 0.4);
    animation: subtitleReveal 0.8s ease-out 0.5s both;
}

/* Title buttons */
.title-buttons {
    display: flex;
    flex-direction: column;
    gap: 18px;
    align-items: center;
    margin-bottom: 40px;
}

.title-button {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    font-size: 1.3rem;
    font-weight: 700;
    font-family: var(--font-jp);
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 300px;
    overflow: hidden;
}

.btn-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 20px 55px;
    position: relative;
    z-index: 2;
}

.title-button.primary {
    background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 50%, #0369a1 100%);
    color: white;
    box-shadow:
        0 5px 30px rgba(14, 165, 233, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    animation: buttonReveal 0.8s ease-out 0.7s both;
}

.title-button.primary .btn-glow {
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: btnGlowMove 3s ease-in-out infinite;
}

@keyframes btnGlowMove {
    0% {
        left: -100%;
    }

    50%,
    100% {
        left: 100%;
    }
}

.title-button.primary:hover {
    transform: translateY(-4px) scale(1.03);
    box-shadow:
        0 10px 40px rgba(14, 165, 233, 0.7),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    background: linear-gradient(135deg, #38bdf8 0%, #0ea5e9 50%, #0284c7 100%);
}

.title-button.secondary {
    background: rgba(56, 189, 248, 0.1);
    color: #bae6fd;
    border: 2px solid rgba(125, 211, 252, 0.3);
    backdrop-filter: blur(10px);
    animation: buttonReveal 0.8s ease-out 0.9s both;
}

.title-button.secondary:hover {
    background: rgba(56, 189, 248, 0.2);
    border-color: rgba(125, 211, 252, 0.6);
    transform: translateY(-3px);
    box-shadow: 0 5px 25px rgba(56, 189, 248, 0.3);
}

/* Prevent clicks before animation completes - only for title screen buttons */
.title-buttons .title-button {
    pointer-events: none;
}

@keyframes buttonReveal {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.9);
        pointer-events: none;
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
        pointer-events: auto;
    }
}

/* Hint */
.title-hint {
    font-size: 1rem;
    color: rgba(186, 230, 253, 0.6);
    margin: 0;
    animation: hintBlink 2.5s ease-in-out infinite;
}

.hint-key {
    display: inline-block;
    padding: 4px 12px;
    background: rgba(56, 189, 248, 0.15);
    border: 1px solid rgba(125, 211, 252, 0.3);
    border-radius: 6px;
    font-family: 'Roboto', monospace;
    font-weight: 600;
    color: #7dd3fc;
}

@keyframes hintBlink {

    0%,
    100% {
        opacity: 0.5;
    }

    50% {
        opacity: 1;
    }
}

/* Bottom ice ground */
.ice-ground {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 120px;
    z-index: 5;
    overflow: hidden;
}

.ice-chunk {
    position: absolute;
    bottom: 0;
    background: linear-gradient(180deg,
            rgba(186, 230, 253, 0.4) 0%,
            rgba(125, 211, 252, 0.3) 50%,
            rgba(56, 189, 248, 0.2) 100%);
    border-radius: 5px 5px 0 0;
    box-shadow:
        0 0 30px rgba(125, 211, 252, 0.3),
        inset 0 10px 20px rgba(255, 255, 255, 0.2);
}

.chunk-1 {
    left: 0;
    width: 25%;
    height: 80px;
    clip-path: polygon(0 100%, 0 40%, 30% 20%, 60% 35%, 100% 0, 100% 100%);
}

.chunk-2 {
    left: 20%;
    width: 30%;
    height: 100px;
    clip-path: polygon(0 100%, 0 50%, 20% 25%, 50% 10%, 80% 30%, 100% 0, 100% 100%);
}

.chunk-3 {
    left: 45%;
    width: 25%;
    height: 70px;
    clip-path: polygon(0 100%, 0 20%, 40% 0, 70% 15%, 100% 40%, 100% 100%);
}

.chunk-4 {
    left: 65%;
    width: 30%;
    height: 90px;
    clip-path: polygon(0 100%, 0 35%, 25% 10%, 55% 0, 85% 20%, 100% 45%, 100% 100%);
}

.chunk-5 {
    left: 85%;
    width: 20%;
    height: 60px;
    clip-path: polygon(0 100%, 0 25%, 50% 0, 100% 30%, 100% 100%);
}

/* ==================== Frozen Corners ==================== */
.frozen-corners {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 3;
}

.corner {
    position: absolute;
    width: 200px;
    height: 200px;
}

.corner-tl {
    top: 0;
    left: 0;
}

.corner-tr {
    top: 0;
    right: 0;
}

.corner-bl {
    bottom: 0;
    left: 0;
}

.corner-br {
    bottom: 0;
    right: 0;
}

/* Corner ice chunks */
.corner-ice {
    position: absolute;
    width: 100%;
    height: 100%;
}

.corner-tl .corner-ice {
    background:
        radial-gradient(ellipse 150% 150% at 0% 0%, rgba(186, 230, 253, 0.4) 0%, transparent 50%),
        linear-gradient(135deg, rgba(255, 255, 255, 0.3) 0%, transparent 60%);
    clip-path: polygon(0 0, 100% 0, 80% 20%, 40% 35%, 20% 60%, 0 100%);
}

.corner-tr .corner-ice {
    background:
        radial-gradient(ellipse 150% 150% at 100% 0%, rgba(186, 230, 253, 0.4) 0%, transparent 50%),
        linear-gradient(-135deg, rgba(255, 255, 255, 0.3) 0%, transparent 60%);
    clip-path: polygon(0 0, 100% 0, 100% 100%, 80% 60%, 60% 35%, 20% 20%);
}

.corner-bl .corner-ice {
    background:
        radial-gradient(ellipse 150% 150% at 0% 100%, rgba(186, 230, 253, 0.4) 0%, transparent 50%),
        linear-gradient(45deg, rgba(255, 255, 255, 0.3) 0%, transparent 60%);
    clip-path: polygon(0 0, 20% 40%, 40% 65%, 80% 80%, 100% 100%, 0 100%);
}

.corner-br .corner-ice {
    background:
        radial-gradient(ellipse 150% 150% at 100% 100%, rgba(186, 230, 253, 0.4) 0%, transparent 50%),
        linear-gradient(-45deg, rgba(255, 255, 255, 0.3) 0%, transparent 60%);
    clip-path: polygon(80% 40%, 60% 65%, 20% 80%, 0 100%, 100% 100%, 100% 0);
}

/* Corner icicles */
.corner-icicles {
    position: absolute;
    display: flex;
    gap: 8px;
}

.corner-tl .corner-icicles {
    top: 0;
    left: 20px;
}

.corner-tr .corner-icicles {
    top: 0;
    right: 20px;
    flex-direction: row-reverse;
}

.icicle-corner {
    background: linear-gradient(180deg,
            rgba(255, 255, 255, 0.9) 0%,
            rgba(186, 230, 253, 0.7) 50%,
            rgba(125, 211, 252, 0.3) 100%);
    border-radius: 0 0 50% 50%;
    box-shadow:
        0 0 10px rgba(186, 230, 253, 0.5),
        inset -1px 0 3px rgba(255, 255, 255, 0.6);
    animation: icicleAppear 0.8s ease-out both;
}

.ic-1 {
    width: 6px;
    height: 25px;
    animation-delay: 0.5s;
}

.ic-2 {
    width: 10px;
    height: 45px;
    animation-delay: 0.6s;
}

.ic-3 {
    width: 8px;
    height: 35px;
    animation-delay: 0.7s;
}

/* Frost edges */
.frost-edge {
    position: absolute;
    background: linear-gradient(var(--edge-direction),
            rgba(186, 230, 253, 0.5) 0%,
            rgba(125, 211, 252, 0.3) 30%,
            transparent 100%);
}

.edge-top {
    --edge-direction: 180deg;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
}

.corner-tl .edge-top {
    left: 50px;
    right: auto;
    width: 150px;
}

.corner-tr .edge-top {
    right: 50px;
    left: auto;
    width: 150px;
}

.edge-left {
    --edge-direction: 90deg;
    top: 0;
    left: 0;
    bottom: 0;
    width: 60px;
}

.corner-tl .edge-left {
    top: 50px;
    bottom: auto;
    height: 150px;
}

.corner-bl .edge-left {
    bottom: 50px;
    top: auto;
    height: 150px;
}

.edge-right {
    --edge-direction: -90deg;
    top: 0;
    right: 0;
    bottom: 0;
    width: 60px;
}

.corner-tr .edge-right {
    top: 50px;
    bottom: auto;
    height: 150px;
}

.corner-br .edge-right {
    bottom: 50px;
    top: auto;
    height: 150px;
}

.edge-bottom {
    --edge-direction: 0deg;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
}

.corner-bl .edge-bottom {
    left: 50px;
    right: auto;
    width: 150px;
}

.corner-br .edge-bottom {
    right: 50px;
    left: auto;
    width: 150px;
}

/* ==================== Top Icicle Row ==================== */
.top-icicle-row {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-around;
    padding: 0 180px;
    z-index: 4;
    pointer-events: none;
}

.icicle-top {
    background: linear-gradient(180deg,
            rgba(255, 255, 255, 0.95) 0%,
            rgba(224, 242, 254, 0.85) 20%,
            rgba(186, 230, 253, 0.7) 50%,
            rgba(125, 211, 252, 0.4) 80%,
            rgba(56, 189, 248, 0.1) 100%);
    border-radius: 2px 2px 50% 50%;
    box-shadow:
        0 0 15px rgba(186, 230, 253, 0.4),
        inset -2px 0 4px rgba(255, 255, 255, 0.5);
    animation: icicleAppear 1s ease-out both, icicleGlisten 5s ease-in-out infinite;
}

.it-1 {
    width: 8px;
    height: 40px;
    animation-delay: 0.1s;
}

.it-2 {
    width: 12px;
    height: 65px;
    animation-delay: 0.15s;
}

.it-3 {
    width: 6px;
    height: 30px;
    animation-delay: 0.2s;
}

.it-4 {
    width: 14px;
    height: 80px;
    animation-delay: 0.25s;
}

.it-5 {
    width: 10px;
    height: 55px;
    animation-delay: 0.3s;
}

.it-6 {
    width: 8px;
    height: 45px;
    animation-delay: 0.35s;
}

.it-7 {
    width: 16px;
    height: 90px;
    animation-delay: 0.4s;
}

.it-8 {
    width: 10px;
    height: 50px;
    animation-delay: 0.45s;
}

.it-9 {
    width: 6px;
    height: 35px;
    animation-delay: 0.5s;
}

.it-10 {
    width: 12px;
    height: 70px;
    animation-delay: 0.55s;
}

.it-11 {
    width: 8px;
    height: 42px;
    animation-delay: 0.6s;
}

.it-12 {
    width: 10px;
    height: 58px;
    animation-delay: 0.65s;
}

/* ==================== Options Modal ==================== */

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    z-index: 3000;
    display: none;
    justify-content: center;
    align-items: center;
}

.modal-overlay.active {
    display: flex;
}

.modal-content {
    background: linear-gradient(180deg, #1a2a3a 0%, #16181C 30%, #16181C 100%);
    border-radius: 20px;
    padding: 0;
    width: 90%;
    max-width: 750px;
    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.6),
        0 0 40px rgba(56, 189, 248, 0.1),
        inset 0 1px 0 rgba(186, 230, 253, 0.1);
    border: 1px solid rgba(125, 211, 252, 0.2);
    animation: modalPop 0.3s ease-out;
    display: flex;
    flex-direction: column;
    max-height: 90vh;
    position: relative;
    overflow: hidden;
}

.modal-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 100px;
    background: linear-gradient(180deg,
            rgba(56, 189, 248, 0.08) 0%,
            transparent 100%);
    pointer-events: none;
    z-index: 0;
}

@keyframes modalPop {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(20px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    border-bottom: 1px solid rgba(125, 211, 252, 0.2);
    background: linear-gradient(135deg,
            rgba(14, 165, 233, 0.12) 0%,
            rgba(125, 211, 252, 0.08) 50%,
            rgba(186, 230, 253, 0.05) 100%);
    position: relative;
    z-index: 1;
}

.modal-header h2 {
    margin: 0;
    font-size: 1.3rem;
    font-family: var(--font-jp);
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-color);
    text-shadow: 0 0 20px rgba(125, 211, 252, 0.3);
    position: relative;
    z-index: 1;
}

.modal-header h2 .material-icons {
    color: #7dd3fc;
    filter: drop-shadow(0 0 8px rgba(125, 211, 252, 0.5));
}

.modal-close {
    background: none;
    border: none;
    color: var(--secondary-text);
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-color);
}

.modal-body {
    padding: 25px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    overflow-y: auto;
}

.option-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 18px;
    background: linear-gradient(135deg,
            rgba(125, 211, 252, 0.06) 0%,
            rgba(255, 255, 255, 0.02) 50%,
            rgba(56, 189, 248, 0.04) 100%);
    border-radius: 14px;
    border: 1px solid rgba(125, 211, 252, 0.12);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.option-row:hover {
    background: linear-gradient(135deg,
            rgba(125, 211, 252, 0.12) 0%,
            rgba(255, 255, 255, 0.05) 50%,
            rgba(56, 189, 248, 0.08) 100%);
    border-color: rgba(125, 211, 252, 0.3);
    transform: translateY(-2px);
    box-shadow:
        0 8px 20px rgba(0, 0, 0, 0.2),
        0 0 15px rgba(56, 189, 248, 0.1);
}

.option-row:last-child {
    border-bottom: 1px solid rgba(125, 211, 252, 0.12);
}

.option-group-vertical {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.option-label {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1rem;
    font-family: var(--font-jp);
    color: var(--text-color);
    white-space: nowrap;
}

.option-label .material-icons {
    color: #7dd3fc;
    font-size: 24px;
    filter: drop-shadow(0 0 6px rgba(125, 211, 252, 0.4));
    transition: all 0.3s ease;
}

.option-row:hover .option-label .material-icons {
    color: #bae6fd;
    filter: drop-shadow(0 0 10px rgba(186, 230, 253, 0.6));
}

/* Toggle Switch */
.toggle-switch {
    position: relative;
    width: 50px;
    height: 28px;
    cursor: pointer;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #2a3a4a 0%, var(--border-color) 100%);
    border-radius: 28px;
    transition: all 0.3s ease;
    border: 1px solid rgba(125, 211, 252, 0.1);
}

.toggle-slider::before {
    content: '';
    position: absolute;
    width: 22px;
    height: 22px;
    left: 3px;
    bottom: 3px;
    background: linear-gradient(135deg, #fff 0%, #e0f2fe 100%);
    border-radius: 50%;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.toggle-switch input:checked+.toggle-slider {
    background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
    border-color: rgba(125, 211, 252, 0.4);
    box-shadow: 0 0 15px rgba(14, 165, 233, 0.4);
}

.toggle-switch input:checked+.toggle-slider::before {
    transform: translateX(22px);
    background: linear-gradient(135deg, #fff 0%, #bae6fd 100%);
    box-shadow: 0 2px 10px rgba(14, 165, 233, 0.5);
}

.option-row.sfx-detail-row {
    grid-column: 1 / -1;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
}

.sfx-toggle-grid {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 8px;
}

.sfx-pill {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(125, 211, 252, 0.12);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.sfx-pill:hover {
    border-color: rgba(125, 211, 252, 0.35);
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.2);
    transform: translateY(-1px);
}

.sfx-pill input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.pill-indicator {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 1px solid rgba(125, 211, 252, 0.25);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.15) 0%, rgba(255, 255, 255, 0.05) 100%);
    box-shadow: inset 0 1px 4px rgba(0, 0, 0, 0.3);
    transition: all 0.2s ease;
}

.sfx-pill input:checked+.pill-indicator {
    background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
    border-color: rgba(125, 211, 252, 0.6);
    box-shadow: 0 0 8px rgba(14, 165, 233, 0.4);
}

.pill-label {
    font-family: var(--font-jp);
    font-size: 0.9rem;
    color: var(--text-color);
    white-space: nowrap;
}

.sfx-pill input:checked+.pill-indicator+.pill-label {
    color: #bae6fd;
}

.sfx-pill.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.sfx-pill.disabled .pill-label {
    color: var(--secondary-text);
}

.modal-footer {
    padding: 20px 25px;
    border-top: 1px solid rgba(125, 211, 252, 0.15);
    display: flex;
    justify-content: center;
    background: linear-gradient(0deg,
            rgba(14, 165, 233, 0.08) 0%,
            transparent 100%);
    position: relative;
}

.modal-footer .title-button {
    min-width: 200px;
    padding: 14px 30px;
    font-size: 1rem;
    animation: none;
}

/* Volume Slider */
.volume-control {
    display: flex;
    align-items: center;
    gap: 12px;
}

.volume-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 120px;
    height: 6px;
    background: linear-gradient(90deg,
            rgba(56, 189, 248, 0.3) 0%,
            rgba(125, 211, 252, 0.2) 100%);
    border-radius: 3px;
    outline: none;
    cursor: pointer;
    border: 1px solid rgba(125, 211, 252, 0.15);
}

.volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    background: linear-gradient(135deg, #38bdf8 0%, #0ea5e9 100%);
    border-radius: 50%;
    cursor: pointer;
    box-shadow:
        0 2px 8px rgba(14, 165, 233, 0.5),
        0 0 12px rgba(56, 189, 248, 0.3);
    transition: transform 0.2s, box-shadow 0.2s;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.volume-slider::-webkit-slider-thumb:hover {
    transform: scale(1.15);
    box-shadow:
        0 4px 12px rgba(14, 165, 233, 0.6),
        0 0 20px rgba(56, 189, 248, 0.5);
}

.volume-slider::-moz-range-thumb {
    width: 18px;
    height: 18px;
    background: var(--accent-color);
    border-radius: 50%;
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 6px rgba(157, 68, 192, 0.4);
}

.volume-value {
    min-width: 45px;
    text-align: right;
    font-size: 0.9rem;
    color: var(--secondary-text);
    font-family: 'Roboto', sans-serif;
}

/* Input Mode Toggle */
.input-mode-toggle {
    display: flex;
    gap: 0;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid rgba(125, 211, 252, 0.2);
    background: rgba(0, 0, 0, 0.2);
}

.mode-btn {
    padding: 8px 16px;
    font-size: 13px;
    font-family: var(--font-jp);
    background: transparent;
    color: var(--secondary-text);
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    white-space: nowrap;
}

.mode-btn:first-child {
    border-right: 1px solid rgba(125, 211, 252, 0.15);
}

.mode-btn:hover {
    background: rgba(125, 211, 252, 0.1);
    color: #bae6fd;
}

.mode-btn.active {
    background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
    color: white;
    box-shadow: 0 0 15px rgba(14, 165, 233, 0.4);
}

/* Help Modal Styles */
.help-modal-content {
    max-width: 500px;
    max-height: 80vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.help-body {
    overflow-y: auto;
    max-height: 60vh;
    padding: 20px 25px;
}

/* Help Modal Specifics */
.help-body {
    display: block;
    /* Reset grid for help modal */
}

.help-section {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
}

.help-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.help-section h3 {
    font-family: var(--font-jp);
    font-size: 1rem;
    margin: 0 0 10px 0;
    color: var(--accent-color);
}

.help-section p {
    margin: 0;
    line-height: 1.6;
    color: var(--text-color);
    font-family: var(--font-jp);
}

.help-section ul {
    margin: 0;
    padding-left: 20px;
}

.help-section li {
    margin-bottom: 6px;
    line-height: 1.5;
    color: var(--text-color);
    font-family: var(--font-jp);
}

.help-section strong {
    color: #00FF88;
}

/* BGM Selection Styles */
.bgm-list-container {
    margin-top: 0;
    padding: 15px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.bgm-list-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-jp);
    font-size: 0.9rem;
    color: var(--secondary-text);
    margin-bottom: 12px;
}

.bgm-list-header .material-icons {
    font-size: 18px;
    color: var(--accent-color);
}

.bgm-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: 200px;
    overflow-y: auto;
}

.bgm-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid transparent;
}

.bgm-item:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--border-color);
}

.bgm-item.selected {
    background: rgba(157, 68, 192, 0.2);
    border-color: var(--accent-color);
}

.bgm-item.playing {
    background: rgba(0, 255, 136, 0.1);
    border-color: #00FF88;
}

.bgm-item .material-icons {
    font-size: 20px;
    color: var(--secondary-text);
}

.bgm-item.selected .material-icons {
    color: var(--accent-color);
}

.bgm-item.playing .material-icons {
    color: #00FF88;
    animation: musicPulse 1s ease-in-out infinite;
}

@keyframes musicPulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

.bgm-item-name {
    flex: 1;
    font-family: var(--font-jp);
    font-size: 0.9rem;
    color: var(--text-color);
}

.bgm-item-status {
    font-size: 0.75rem;
    color: var(--secondary-text);
    font-family: var(--font-jp);
}

.bgm-item.selected .bgm-item-status {
    color: var(--accent-color);
}

.bgm-item.playing .bgm-item-status {
    color: #00FF88;
}

.bgm-controls {
    margin-top: 12px;
    display: flex;
    justify-content: center;
}

.bgm-control-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-color);
    font-family: var(--font-jp);
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
}

.bgm-control-btn:hover {
    background: rgba(255, 255, 255, 0.15);
}

.bgm-control-btn .material-icons {
    font-size: 18px;
}

/* Game Back Button */
#game-back-btn {
    cursor: pointer;
    transition: all 0.2s;
    border-radius: 50%;
    padding: 8px;
}

#game-back-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--accent-color);
}

/* Next Zombies Queue (Fairness Feature) */
.next-zombies-container {
    background-color: #16181C;
    border-radius: 16px;
    padding: 12px;
    width: 100%;
    margin-top: 12px;
    max-height: 500px;
    overflow-y: auto;
}

.next-zombies-container h3 {
    margin: 0 0 10px 0;
    font-size: 16px;
    font-weight: 900;
    color: var(--accent-color);
}

/* Responsive Options Modal */
@media (max-width: 700px) {
    .modal-body {
        grid-template-columns: 1fr;
    }
}

.next-zombie-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 13px;
    color: var(--text-color);
}

.next-zombie-item:last-child {
    border-bottom: none;
}

.next-zombie-item .zombie-icon {
    font-size: 16px;
    color: var(--secondary-text);
}

.next-zombie-item.is-current {
    background: rgba(244, 33, 46, 0.1);
    border-left: 2px solid var(--red-color);
}

.next-zombie-item.is-current .zombie-icon {
    color: var(--red-color);
}

/* Utility */
.hidden {
    display: none !important;
}

/* Sidebar Toggle */
#sidebar-nav-menu {
    display: flex;
    flex-direction: column;
    width: 100%;
}

#sidebar-nav-menu.hidden {
    display: none;
}

/* Responsive Fix for Laptop Screens (1366x768) */
@media (max-width: 1380px) {

    /* Shrink the main game container */
    #game-container {
        max-width: 600px;
    }

    /* Adjust sidebar positions based on new container width (300px half-width + 10px gap) */
    .left-sidebar {
        right: calc(50% + 310px);
    }

    .right-sidebar {
        left: calc(50% + 310px);
    }
}

/* ==================== Lite Mode - Maximum Performance ==================== */
body.lite-mode .background-glow,
body.lite-mode .ice-shards,
body.lite-mode #snow-canvas,
body.lite-mode .layer-aurora,
body.lite-mode .layer-gradient,
body.lite-mode .layer-frost,
body.lite-mode .frozen-corners,
body.lite-mode .top-icicle-row,
body.lite-mode .ice-frame-top,
body.lite-mode .frost-frame,
body.lite-mode .crystal-container,
body.lite-mode .ice-ground,
body.lite-mode .result-glow,
body.lite-mode .result-particles,
body.lite-mode .shard,
body.lite-mode .icicle,
body.lite-mode .freeze-crystal,
body.lite-mode .ice-particle,
body.lite-mode .title-logo .logo-glow {
    display: none !important;
}

body.lite-mode .zombie-tweet.freezing::before,
body.lite-mode .zombie-tweet.freezing::after,
body.lite-mode .zombie-defeated::before,
body.lite-mode .zombie-defeated::after {
    display: none !important;
}

body.lite-mode .zombie-tweet.freezing {
    filter: none !important;
}

body.lite-mode *:not(#zombie-timer-bar) {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
}

body.lite-mode .zombie-tweet {
    transition: none !important;
}

body.lite-mode header,
body.lite-mode .hud-glass {
    background: rgba(0, 0, 0, 0.9) !important;
}

body.lite-mode .modal-content {
    background: rgba(20, 20, 25, 0.98) !important;
}

body.lite-mode #title-screen {
    background: #0a1628 !important;
}

body.lite-mode #result-screen {
    background: rgba(0, 0, 0, 0.95) !important;
}

/* ==================== Commercial Grade Result Screen ==================== */

/* Background particles canvas */
#result-particles-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

/* Result Ice Frame - Icicles at top */
.result-ice-frame {
    position: absolute;
    top: -5px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    gap: 30px;
    z-index: 10;
}

.result-icicle {
    background: linear-gradient(180deg,
            rgba(255, 255, 255, 0.95) 0%,
            rgba(186, 230, 253, 0.8) 30%,
            rgba(125, 211, 252, 0.6) 60%,
            rgba(56, 189, 248, 0.3) 100%);
    border-radius: 3px 3px 50% 50%;
    box-shadow:
        0 0 15px rgba(125, 211, 252, 0.5),
        inset -2px 0 4px rgba(255, 255, 255, 0.6);
    animation: icicleAppear 0.5s ease-out both;
}

.result-icicle.r-ic-1 {
    width: 8px;
    height: 35px;
    animation-delay: 0.1s;
}

.result-icicle.r-ic-2 {
    width: 10px;
    height: 50px;
    animation-delay: 0.15s;
}

.result-icicle.r-ic-3 {
    width: 12px;
    height: 65px;
    animation-delay: 0.2s;
}

.result-icicle.r-ic-4 {
    width: 10px;
    height: 50px;
    animation-delay: 0.25s;
}

.result-icicle.r-ic-5 {
    width: 8px;
    height: 35px;
    animation-delay: 0.3s;
}

/* Sparkle effects */
.result-sparkles {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    overflow: hidden;
    z-index: 5;
}

.sparkle {
    position: absolute;
    font-size: 20px;
    color: rgba(186, 230, 253, 0.8);
    animation: sparkleFloat 4s ease-in-out infinite;
    text-shadow: 0 0 15px rgba(125, 211, 252, 0.8);
}

.sparkle.s1 {
    top: 10%;
    left: 5%;
    animation-delay: 0s;
    font-size: 24px;
}

.sparkle.s2 {
    top: 20%;
    right: 8%;
    animation-delay: 0.5s;
    font-size: 18px;
}

.sparkle.s3 {
    top: 60%;
    left: 3%;
    animation-delay: 1s;
    font-size: 22px;
}

.sparkle.s4 {
    top: 70%;
    right: 5%;
    animation-delay: 1.5s;
    font-size: 20px;
}

.sparkle.s5 {
    top: 40%;
    left: 8%;
    animation-delay: 2s;
    font-size: 16px;
}

.sparkle.s6 {
    top: 85%;
    right: 10%;
    animation-delay: 2.5s;
    font-size: 18px;
}

@keyframes sparkleFloat {

    0%,
    100% {
        transform: translateY(0) rotate(0deg) scale(1);
        opacity: 0.6;
    }

    25% {
        transform: translateY(-10px) rotate(15deg) scale(1.1);
        opacity: 1;
    }

    50% {
        transform: translateY(-5px) rotate(-10deg) scale(0.9);
        opacity: 0.8;
    }

    75% {
        transform: translateY(-15px) rotate(10deg) scale(1.05);
        opacity: 0.7;
    }
}

/* Rank Badge - Commercial Game Style */
.result-rank-container {
    position: relative;
    margin-bottom: 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 20;
    animation: rankAppear 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) 0.3s both;
}

@keyframes rankAppear {
    0% {
        opacity: 0;
        transform: scale(0) rotate(-180deg);
    }

    60% {
        transform: scale(1.2) rotate(10deg);
    }

    100% {
        opacity: 1;
        transform: scale(1) rotate(0deg);
    }
}

.rank-badge {
    position: relative;
    width: 80px;
    height: 80px;
    display: flex;
    justify-content: center;
    align-items: center;
    background: linear-gradient(145deg,
            rgba(56, 189, 248, 0.9) 0%,
            rgba(14, 165, 233, 0.95) 50%,
            rgba(2, 132, 199, 1) 100%);
    border-radius: 50%;
    border: 3px solid rgba(186, 230, 253, 0.8);
    box-shadow:
        0 0 30px rgba(56, 189, 248, 0.6),
        0 0 60px rgba(14, 165, 233, 0.4),
        inset 0 2px 8px rgba(255, 255, 255, 0.3),
        inset 0 -4px 12px rgba(2, 132, 199, 0.4);
}

.rank-badge::before {
    content: '';
    position: absolute;
    top: -8px;
    left: -8px;
    right: -8px;
    bottom: -8px;
    border-radius: 50%;
    border: 2px solid rgba(125, 211, 252, 0.4);
    animation: rankPulse 2s ease-in-out infinite;
}

@keyframes rankPulse {

    0%,
    100% {
        transform: scale(1);
        opacity: 0.6;
    }

    50% {
        transform: scale(1.1);
        opacity: 1;
    }
}

.rank-letter {
    font-size: 44px;
    font-weight: 900;
    font-family: 'Roboto', sans-serif;
    color: white;
    text-shadow:
        0 0 20px rgba(255, 255, 255, 0.8),
        0 2px 4px rgba(0, 0, 0, 0.3);
    animation: rankLetterGlow 1.5s ease-in-out infinite alternate;
}

@keyframes rankLetterGlow {
    0% {
        filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.5));
    }

    100% {
        filter: drop-shadow(0 0 25px rgba(255, 255, 255, 0.9));
    }
}

.rank-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 120%;
    height: 120%;
    transform: translate(-50%, -50%);
    background: radial-gradient(circle, rgba(56, 189, 248, 0.4) 0%, transparent 70%);
    animation: rankGlowPulse 2s ease-in-out infinite;
}

@keyframes rankGlowPulse {

    0%,
    100% {
        opacity: 0.5;
        transform: translate(-50%, -50%) scale(1);
    }

    50% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1.2);
    }
}

.rank-label {
    margin-top: 8px;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 3px;
    color: #7dd3fc;
    text-shadow: 0 0 10px rgba(125, 211, 252, 0.5);
    animation: rankLabelPulse 2s ease-in-out infinite;
}

@keyframes rankLabelPulse {

    0%,
    100% {
        opacity: 0.8;
    }

    50% {
        opacity: 1;
    }
}

/* Rank Colors */
.rank-badge.rank-s {
    background: linear-gradient(145deg, #fef08a, #facc15, #eab308);
    border-color: #fef08a;
    box-shadow: 0 0 50px rgba(250, 204, 21, 0.7), 0 0 100px rgba(234, 179, 8, 0.5);
}

.rank-badge.rank-s .rank-letter {
    background: linear-gradient(135deg, #fffbeb, #fef08a, #facc15);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 15px rgba(250, 204, 21, 0.8));
}

.rank-badge.rank-a {
    background: linear-gradient(145deg, #f472b6, #ec4899, #db2777);
    border-color: #f9a8d4;
    box-shadow: 0 0 50px rgba(236, 72, 153, 0.7), 0 0 100px rgba(219, 39, 119, 0.5);
}

.rank-badge.rank-b {
    background: linear-gradient(145deg, #38bdf8, #0ea5e9, #0284c7);
    border-color: #7dd3fc;
    box-shadow: 0 0 50px rgba(14, 165, 233, 0.7), 0 0 100px rgba(2, 132, 199, 0.5);
}

.rank-badge.rank-c {
    background: linear-gradient(145deg, #4ade80, #22c55e, #16a34a);
    border-color: #86efac;
    box-shadow: 0 0 50px rgba(34, 197, 94, 0.7), 0 0 100px rgba(22, 163, 74, 0.5);
}

.rank-badge.rank-d {
    background: linear-gradient(145deg, #94a3b8, #64748b, #475569);
    border-color: #cbd5e1;
    box-shadow: 0 0 30px rgba(100, 116, 139, 0.5);
}

/* Score/Combo Display Enhancement */
.score-display,
.combo-display {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.combo-suffix {
    font-size: 10px;
    letter-spacing: 2px;
    color: rgba(250, 204, 21, 0.7);
    margin-top: -5px;
}

.score-particles {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    transform: translate(-50%, -50%);
    pointer-events: none;
}

/* Enhanced stat rows with better visuals */
.stat-row {
    position: relative;
    background: rgba(20, 40, 60, 0.4);
    border: 1px solid rgba(125, 211, 252, 0.1);
}

.stat-row::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(180deg, transparent, rgba(56, 189, 248, 0.5), transparent);
    opacity: 0;
    transition: opacity 0.3s;
}

.stat-row:hover::before {
    opacity: 1;
}

.stat-row:hover {
    background: rgba(56, 189, 248, 0.1);
    border-color: rgba(125, 211, 252, 0.3);
}

/* ==================== Result Screen - Small Screen Responsive ==================== */

/* For small height screens (laptops with browser chrome) */
@media (max-height: 768px) {
    .result-container.enhanced {
        padding: 25px 35px;
        margin: 10px auto;
        max-height: none;
    }

    .result-rank-container {
        margin-bottom: 10px;
    }

    .rank-badge {
        width: 60px;
        height: 60px;
        border-width: 2px;
    }

    .rank-letter {
        font-size: 32px;
    }

    .rank-label {
        font-size: 11px;
        margin-top: 5px;
    }

    .result-header {
        margin-bottom: 12px;
    }

    .result-container.enhanced .result-title {
        font-size: 36px;
        margin-bottom: 5px;
    }

    .result-subtitle {
        font-size: 13px;
    }

    .result-main-stats {
        gap: 25px;
        margin-bottom: 15px;
        padding-bottom: 12px;
    }

    .result-stat.featured .result-label {
        font-size: 10px;
    }

    .result-stat.featured .result-value {
        font-size: 32px;
    }

    .combo-suffix {
        font-size: 8px;
    }

    .result-detail-stats {
        padding: 12px;
        gap: 4px;
        margin-bottom: 15px;
    }

    .stat-row {
        padding: 6px 10px;
    }

    .stat-icon {
        font-size: 14px;
        margin-right: 8px;
    }

    .stat-name {
        font-size: 12px;
    }

    .stat-row .stat-value {
        font-size: 13px;
    }

    .result-buttons {
        gap: 8px;
    }

    .result-container.enhanced .result-button {
        padding: 12px 28px;
        font-size: 14px;
    }

    /* Hide decorative elements on small screens */
    .result-sparkles,
    .result-ice-frame {
        display: none;
    }
}

/* Extra small height screens */
@media (max-height: 600px) {
    .result-container.enhanced {
        padding: 15px 25px;
    }

    .rank-badge {
        width: 50px;
        height: 50px;
    }

    .rank-letter {
        font-size: 26px;
    }

    .result-container.enhanced .result-title {
        font-size: 28px;
    }

    .result-stat.featured .result-value {
        font-size: 26px;
    }

    .result-detail-stats {
        padding: 8px;
        gap: 2px;
    }

    .stat-row {
        padding: 4px 8px;
    }

    .result-container.enhanced .result-button {
        padding: 10px 20px;
        font-size: 12px;
    }

    .result-glow {
        display: none;
    }
}
