* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Space Grotesk', 'Segoe UI', Tahoma, Geneva, Verdana, Arial, sans-serif !important;
    background: linear-gradient(135deg, #1a1a2e, #16213e);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #fff;
    padding: 20px;
}

.game-container {
    position: relative;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50px;
    padding: 32px;
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    width: 100%;
    max-width: 1320px; /* canvas width (1280) + padding */
    aspect-ratio: 16/9;
    display: flex;
    justify-content: center;
    align-items: center;
    box-sizing: border-box;
}

#gameCanvas {
    background: transparent;
    border-radius: 25px;
    width: 100%;
    height: 100%;
    display: block;
    box-sizing: border-box;
}

.game-over {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 15, 35, 0.97);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    border-radius: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    box-shadow: 0 8px 32px 0 rgba(0,0,0,0.35);
    border: 1px solid rgba(255,255,255,0.12);
    padding: 28px;
}

.game-over-content {
    display: flex;
    width: 100%;
    height: 100%;
    gap: 16px;
    align-items: center;
    justify-content: center;
    max-width: 1200px;
    margin: 0 auto;
}

.game-over-left {
    flex: 0 0 40%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 12px 0 0;
}

.game-over-right {
    flex: 0 0 60%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 28px 28px 28px 20px;
    min-width: 0;
}

.game-over-poster {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.game-over h2 {
    color: #ffd600;
    font-size: 2.8rem;
    letter-spacing: 2px;
    font-weight: 700;
    margin: 0 0 28px 0;
    text-transform: uppercase;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    line-height: 1.2;
    text-align: center;
}

.game-stats {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    padding: 10px 16px;
    background: rgba(20, 20, 40, 0.8);
    border-radius: 10px;
    margin-bottom: 24px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 6px;
    color: white;
    min-width: 80px;
    justify-content: center;
}

.stat-item i {
    color: #00ff9d;
    font-size: 1rem;
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-item span {
    font-size: 1.1rem;
    font-weight: 600;
    font-family: 'Space Grotesk', monospace;
    color: #fff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.game-over-message {
    color: #ff4e50;
    font-size: 1.5rem;
    line-height: 1.3;
    margin: 0 0 24px 0;
    text-align: center;
    font-weight: 500;
    padding: 12px 16px;
    background: rgba(255, 78, 80, 0.1);
    border-radius: 12px;
    border: 1px solid rgba(255, 78, 80, 0.2);
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    max-width: 90%;
    margin-left: auto;
    margin-right: auto;
    animation: fadeIn 0.5s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.rewards-container {
    margin-bottom: 28px;
    background: rgba(20, 20, 40, 0.6);
    border-radius: 12px;
    padding: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.rewards-title {
    color: #00ff9d;
    font-size: 0.9rem;
    margin: 0 0 12px 0;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-align: center;
    font-weight: 600;
}

.rewards-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    grid-template-rows: repeat(3, 1fr);
    gap: 6px;
    width: 100%;
}

.reward-cell {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    font-size: 1.4rem;
    padding: 6px 4px;
    background: rgba(30, 30, 40, 0.8);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: background-color 0.2s ease;
}

.reward-cell:hover {
    background: rgba(40, 40, 50, 0.9);
}

.reward-cell span {
    font-size: 1rem;
    font-weight: 600;
    color: #fff;
    margin-left: 2px;
    letter-spacing: 0.5px;
    line-height: 1;
    display: inline-block;
    vertical-align: middle;
    min-width: 14px;
    text-align: center;
}

.action-buttons {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin: 24px 0 16px 0;
    width: 100%;
}

.start-stream-btn {
    background: linear-gradient(45deg, #ffd600, #ff5252);
    color: #1a1a2e;
    border: none;
    padding: 14px 36px;
    font-size: 1.1rem;
    font-weight: 700;
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(255, 82, 82, 0.2);
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    overflow: hidden;
    flex-grow: 0;
    z-index: 1;
}

.start-stream-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, #ffeb3b, #ff1744);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}

.start-stream-btn span {
    position: relative;
    z-index: 2;
}

.start-stream-btn:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 6px 16px rgba(255, 82, 82, 0.3);
}

.start-stream-btn:hover::before {
    opacity: 1;
}

.start-stream-btn:active {
    transform: translateY(1px) scale(0.98);
    box-shadow: 0 2px 8px rgba(255, 82, 82, 0.2);
}

.shortcut-hint {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.4);
    text-align: center;
    margin-bottom: 0;
    letter-spacing: 0.5px;
}

/* Mobile responsiveness */
@media (max-width: 1024px) {
    .game-over {
        padding: 24px;
}

    .game-over-right {
        padding: 24px 24px 24px 16px;
}

    .game-over h2 {
        margin-bottom: 24px;
    }

    .game-stats {
        margin-bottom: 20px;
    }

    .game-over-message {
        margin-bottom: 20px;
}

    .rewards-container {
        margin-bottom: 24px;
    }

    .rewards-title {
        font-size: 0.85rem;
        margin-bottom: 10px;
}

    .rewards-grid {
        gap: 4px;
    }

    .reward-cell {
        font-size: 1.2rem;
        padding: 4px 2px;
}

    .reward-cell span {
        font-size: 0.9rem;
}

    .stat-item {
        min-width: 70px;
    }

    .stat-item span {
        font-size: 1rem;
    }

    .action-buttons {
        margin: 20px 0 14px 0;
        gap: 12px;
    }

    .start-stream-btn {
        padding: 12px 32px;
        font-size: 1rem;
    }
}

@media (max-width: 768px) {
    .game-over {
        padding: 20px;
    }

    .game-over-right {
        padding: 20px 20px 20px 14px;
    }

    .game-over h2 {
        margin-bottom: 20px;
    }

    .game-over-message {
        margin-bottom: 16px;
    }

    .game-over button {
        padding: 14px 32px;
        font-size: 1.1em;
    }

    .final-rewards {
        grid-template-columns: repeat(6, 1fr);
        grid-template-rows: repeat(3, 1fr);
    }
    
    .rewards-section {
        max-height: 150px;
    }
    
    .rewards-container {
        margin-bottom: 20px;
    }

    .rewards-grid {
        gap: 3px;
    }

    .reward-cell {
        font-size: 1.1rem;
        padding: 4px 2px;
    }

    .reward-cell span {
        font-size: 0.8rem;
        min-width: 12px;
    }

    .game-stats {
        margin-bottom: 16px;
    }

    .stat-item {
        min-width: 60px;
    }

    .stat-item i {
        font-size: 0.9rem;
    }

    .stat-item span {
        font-size: 0.9rem;
    }

    .action-buttons {
        margin: 16px 0 12px 0;
        gap: 10px;
    }

    .start-stream-btn {
        padding: 10px 28px;
        font-size: 0.95rem;
        border-radius: 12px;
    }

    .shortcut-hint {
        font-size: 0.7rem;
    }
}

.game-premise {
    margin-top: 30px;
    text-align: center;
    color: #fff;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    background: rgba(30, 20, 60, 0.7);
    border-radius: 18px;
    padding: 18px 28px 22px 28px;
    box-shadow: 0 2px 16px 0 rgba(60, 40, 120, 0.18);
}
.game-premise h1 {
    font-size: 2.2em;
    font-weight: bold;
    letter-spacing: 2px;
    margin-bottom: 10px;
    color: #ffd600;
    text-shadow: 0 2px 8px #000a;
}
.premise {
    font-size: 1.15em;
    color: #e0e0e0;
    margin-top: 0;
    margin-bottom: 0;
    line-height: 1.5;
}

.game-start-popup {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 10, 30, 0.92);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    flex-direction: column;
    padding: 0;
    border-radius: 50px;
    overflow: hidden;
}
.start-poster {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50px;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
}
.game-start-popup .start-btn {
    position: absolute;
    right: 48px;
    bottom: 48px;
    z-index: 2;
    background: linear-gradient(45deg, #ffd600, #ff5252);
    color: #23243a;
    font-weight: bold;
    font-size: 1.3em;
    border: none;
    border-radius: 24px;
    padding: 18px 54px;
    cursor: pointer;
    box-shadow: 0 2px 12px 0 rgba(60, 40, 120, 0.18);
    transition: background 0.2s, transform 0.2s;
}
.game-start-popup .start-btn:hover {
    background: linear-gradient(45deg, #ffeb3b, #ff1744);
    transform: translateY(-2px) scale(1.04);
}
.game-start-popup.hidden {
    display: none !important;
}

.start-glass-bar {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    min-height: 110px;
    background: rgba(30, 30, 60, 0.45);
    -webkit-backdrop-filter: blur(18px);
    backdrop-filter: blur(18px);
    border-bottom-left-radius: 50px;
    border-bottom-right-radius: 50px;
    display: flex;
    flex-direction: row;
    align-items: flex-end;
    justify-content: space-between;
    padding: 18px 38px 18px 38px;
    box-sizing: border-box;
    z-index: 3;
    gap: 32px;
}
.start-info-content {
    color: #fff;
    width: 100%;
    flex: 1 1 0;
    padding-right: 32px;
    max-width: none;
}
.start-info-title {
    font-size: 1.1em;
    font-weight: bold;
    margin-bottom: 6px;
    color: #ffd600;
    letter-spacing: 1px;
}
.start-info-message {
    font-size: 1em;
    color: #fffde7;
    line-height: 1.6;
    width: 100%;
    margin-top: 6px;
}
.start-instructions {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    min-width: 0;
}
.start-instructions-title {
    font-size: 1.05em;
    font-weight: bold;
    color: #ffd600;
    margin-bottom: 2px;
    align-self: flex-end;
}
.start-instructions-icons {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 2px;
}
.key-icon {
    display: inline-block;
    background: #23243a;
    color: #ffd600;
    font-size: 1.15em;
    font-family: 'Segoe UI', 'Arial', sans-serif;
    border-radius: 6px;
    padding: 2px 10px 2px 10px;
    margin-right: 2px;
    box-shadow: 0 1px 4px 0 rgba(30, 20, 60, 0.10);
    border: 1.5px solid #ffd60044;
}
.instruction-text {
    color: #fffde7;
    font-size: 1em;
    font-weight: 500;
    margin-left: 2px;
}
.game-start-popup .start-btn {
    position: static;
    margin-left: 0;
    margin-top: 10px;
    margin-bottom: 0;
    align-self: flex-end;
    background: linear-gradient(45deg, #ffd600, #ff5252);
    color: #23243a;
    font-weight: bold;
    font-size: 1.15em;
    border: none;
    border-radius: 24px;
    padding: 14px 38px;
    cursor: pointer;
    box-shadow: 0 2px 12px 0 rgba(60, 40, 120, 0.18);
    transition: background 0.2s, transform 0.2s;
    z-index: 4;
}
@media (max-width: 900px) {
    .start-glass-bar {
        flex-direction: column;
        align-items: stretch;
        padding: 14px 8px 14px 8px;
        gap: 12px;
        min-height: 160px;
    }
    .start-info-content {
        max-width: 100%;
    }
    .start-instructions {
        min-width: 0;
        align-items: flex-start;
    }
    .game-start-popup .start-btn {
        margin-left: 0;
        width: 100%;
        padding: 14px 0;
}
}

.key-icon.subtle {
    background: none;
    color: #ffd60099;
    font-size: 1.25em;
    border: none;
    box-shadow: none;
    padding: 0 8px 0 0;
    margin: 0 2px 0 0;
    border-radius: 0;
    font-weight: 400;
    opacity: 0.7;
    vertical-align: middle;
}

body, .game-container, .game-over, .final-rewards, .reward-item, .shortcut-hint, .game-premise, .premise, .game-start-popup, .start-info-content, .start-info-title, .start-info-message, .start-instructions, .key-icon, .instruction-text, .start-btn {
    font-family: 'Space Grotesk', 'Segoe UI', Tahoma, Geneva, Verdana, Arial, sans-serif !important;
}

.game-over-views {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #18181b;
    border-radius: 16px;
    padding: 10px 28px 10px 18px;
    margin: 0 auto 18px auto;
    width: fit-content;
    box-shadow: 0 2px 8px 0 rgba(0,0,0,0.10);
    font-size: 1.4em;
    color: #fff;
    font-family: 'Space Grotesk', sans-serif;
    gap: 12px;
}
.game-over-eye-icon {
    display: inline-block;
    width: 28px;
    height: 28px;
    margin-right: 6px;
    vertical-align: middle;
}
#gameOverViews {
    font-weight: 700;
    font-size: 1.2em;
    margin-left: 2px;
    color: #fff;
    font-family: 'Space Grotesk', monospace;
}

.game-over-buttons {
    display: flex;
    align-items: center;
    gap: 20px;
    margin: 18px 0;
}

.game-over-buttons .menu-button {
    position: static;
    margin: 0;
}

/* Menu Button */
.menu-button {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    transition: background 0.3s ease;
    z-index: 100;
}

.menu-button:hover {
    background: rgba(255, 255, 255, 0.3);
}

.menu-button i {
    color: white;
    font-size: 20px;
}

/* Menu Popup */
.menu-popup {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    border-radius: 50px;
}

.menu-content {
    background: rgba(255, 255, 255, 0.1);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    padding: 40px;
    border-radius: 20px;
    max-width: 600px;
    width: 90%;
    position: relative;
    color: white;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.close-menu {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    font-size: 24px;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.close-menu:hover {
    opacity: 1;
}

.menu-content h2 {
    font-size: 28px;
    margin-bottom: 10px;
    font-weight: 700;
}

.menu-content .version {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 5px;
}

.menu-content .developer {
    font-size: 16px;
    margin-bottom: 20px;
    color: rgba(255, 255, 255, 0.9);
}

.menu-content .description {
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 30px;
    color: rgba(255, 255, 255, 0.8);
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 20px;
}

.social-links a {
    color: white;
    font-size: 24px;
    opacity: 0.8;
    transition: all 0.3s ease;
}

.social-links a:hover {
    opacity: 1;
    transform: scale(1.1);
}

.hidden {
    display: none !important;
}

.game-over-stats {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    margin: 1rem 0;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: white;
    font-size: 1.1rem;
}

.stat-item i {
    color: #00ff9d;
    font-size: 1.2rem;
}

/* Hide any text that's not a number */
.stat-item span {
    font-family: 'Space Grotesk', monospace;
}

.rewards-section {
    margin-top: 2rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
}

.rewards-section h3 {
    color: #00ff9d;
    margin-bottom: 1rem;
    text-align: center;
}

.final-rewards {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
}

.reward-item {
    background: rgba(255, 255, 255, 0.1);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    color: white;
    font-size: 1.1rem;
} 