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

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
    -moz-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body {
    font-family: 'Pixelify Sans', sans-serif;
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a2e 100%);
    color: #fff;
    min-height: 100vh;
    padding: 20px;
}

/* Header */
.game-header {
    text-align: center;
    margin-bottom: 40px;
}

.game-header h1 {
    font-size: 3.5em;
    color: #ffd700;
    text-shadow: 0 0 20px rgba(255, 215, 0, 0.8);
    margin-bottom: 10px;
    animation: headerFloat 3s ease-in-out infinite;
}

@keyframes headerFloat {
    0%, 100% {
        transform: translateY(0px);
        text-shadow: 0 0 20px rgba(255, 215, 0, 0.8),
                     0 0 40px rgba(255, 215, 0, 0.4);
    }
    50% {
        transform: translateY(-10px);
        text-shadow: 0 0 40px rgba(255, 215, 0, 1),
                     0 0 80px rgba(255, 215, 0, 0.6),
                     0 0 120px rgba(255, 215, 0, 0.3);
    }
}

.game-subtitle {
    font-size: 1.2em;
    color: rgba(255, 215, 0, 0.7);
    margin-bottom: 15px;
    animation: subtitlePulse 2.5s ease-in-out infinite;
}

@keyframes subtitlePulse {
    0%, 100% {
        opacity: 0.7;
        text-shadow: 0 0 5px rgba(255, 215, 0, 0.3);
    }
    50% {
        opacity: 1;
        text-shadow: 0 0 15px rgba(255, 215, 0, 0.6);
    }
}

.back-link {
    display: inline-block;
    color: #fff;
    text-decoration: none;
    padding: 10px 20px;
    background: rgba(255, 215, 0, 0.2);
    border-radius: 8px;
    transition: all 0.3s ease;
    border: 2px solid rgba(255, 215, 0, 0.3);
}

.back-link:hover {
    background: rgba(255, 215, 0, 0.3);
    border-color: #ffd700;
    transform: translateX(-5px);
}

/* Collapsible Navigation */
.collapsible-nav {
    position: fixed;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    z-index: 1000;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.collapsible-nav.hidden {
    transform: translateY(-50%) translateX(-100%);
    opacity: 0;
}

.collapsible-nav .nav-button {
    display: flex;
    align-items: center;
    gap: 12px;
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.95) 0%, rgba(255, 140, 0, 0.95) 100%);
    backdrop-filter: blur(10px);
    padding: 12px 20px 12px 12px;
    border-radius: 0 50px 50px 0;
    text-decoration: none;
    color: #1a1a2e;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.4);
    transition: all 0.3s ease;
    min-width: 50px;
    cursor: pointer;
}

.collapsible-nav .nav-icon {
    width: 44px;
    height: 44px;
    background: rgba(0, 0, 0, 0.15);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5em;
    flex-shrink: 0;
}

.collapsible-nav .nav-text {
    position: relative;
    font-weight: 700;
    max-width: 0;
    overflow: hidden;
    white-space: nowrap;
    opacity: 0;
    transition: max-width 0.3s ease, opacity 0.3s ease;
}

.collapsible-nav.expanded .nav-text,
.collapsible-nav .nav-button:hover .nav-text {
    max-width: 250px;
    opacity: 1;
    animation: scrollText 8s ease-in-out infinite;
}

@keyframes scrollText {
    0%, 20% {
        transform: translateX(0);
    }
    80%, 100% {
        transform: translateX(calc(-100% + 200px));
    }
}

.collapsible-nav .nav-button:hover {
    transform: translateX(5px);
    box-shadow: 0 6px 20px rgba(255, 215, 0, 0.6);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .collapsible-nav {
        top: auto;
        bottom: 20px;
        left: 10px;
        transform: none;
    }

    .collapsible-nav.hidden {
        transform: translateX(-100%);
    }

    .collapsible-nav .nav-button {
        padding: 10px 15px 10px 10px;
        font-size: 0.9em;
    }

    .collapsible-nav .nav-icon {
        width: 40px;
        height: 40px;
        font-size: 1.3em;
    }
}

/* Sound Toggle */
.sound-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.95) 0%, rgba(255, 140, 0, 0.95) 100%);
    border: 2px solid rgba(255, 215, 0, 0.5);
    font-size: 1.5em;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 1000;
    animation: soundPulse 2s ease-in-out infinite;
    display: flex;
    align-items: center;
    justify-content: center;
}

@keyframes soundPulse {
    0%, 100% {
        box-shadow: 0 0 10px rgba(255, 215, 0, 0.3);
    }
    50% {
        box-shadow: 0 0 25px rgba(255, 215, 0, 0.6);
    }
}

.sound-toggle:hover {
    background: linear-gradient(135deg, rgba(255, 215, 0, 1) 0%, rgba(255, 140, 0, 1) 100%);
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.6);
}

.sound-toggle.muted::after {
    content: '🔇';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Main Container */
#main-container {
    max-width: 1200px;
    margin: 0 auto;
}

/* Screen Management */
.screen {
    display: none;
}

.screen.active {
    display: block;
}

/* Welcome Screen */
.welcome-content {
    background: rgba(0, 0, 0, 0.6);
    border: 3px solid rgba(255, 215, 0, 0.3);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 0 30px rgba(255, 215, 0, 0.2);
    animation: cardBreathe 3s ease-in-out infinite, fadeSlideUp 0.8s ease-out;
}

@keyframes cardBreathe {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 30px rgba(255, 215, 0, 0.2);
        border-color: rgba(255, 215, 0, 0.3);
    }
    50% {
        transform: scale(1.01);
        box-shadow: 0 0 50px rgba(255, 215, 0, 0.4), 0 0 80px rgba(255, 215, 0, 0.2);
        border-color: rgba(255, 215, 0, 0.5);
    }
}

@keyframes fadeSlideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.welcome-content h2 {
    font-size: 2.5em;
    color: #ffd700;
    text-align: center;
    margin-bottom: 20px;
    animation: titleFloat 2s ease-in-out infinite;
    text-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
}

@keyframes titleFloat {
    0%, 100% {
        transform: translateY(0);
        text-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
    }
    50% {
        transform: translateY(-5px);
        text-shadow: 0 5px 30px rgba(255, 215, 0, 0.8);
    }
}

.intro-text {
    text-align: center;
    font-size: 1.25em;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 40px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    animation: fadeSlideUp 1s ease-out 0.3s backwards;
}

/* Game Modes */
.game-modes {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
    margin-bottom: 50px;
}

.mode-card {
    background: rgba(255, 215, 0, 0.05);
    border: 3px solid rgba(255, 215, 0, 0.3);
    border-radius: 15px;
    padding: 30px;
    transition: all 0.4s ease;
    position: relative;
    text-align: center;
    animation: fadeSlideUp 0.6s ease-out backwards;
}

.mode-card:nth-child(1) { animation-delay: 0.4s; }
.mode-card:nth-child(2) { animation-delay: 0.6s; }
.mode-card:nth-child(3) { animation-delay: 0.8s; }

.mode-card:hover {
    transform: translateY(-10px) scale(1.02);
    border-color: #ffd700;
    box-shadow: 0 10px 40px rgba(255, 215, 0, 0.4),
                0 0 60px rgba(255, 215, 0, 0.6),
                0 0 100px rgba(255, 215, 0, 0.3);
    animation: cardGlowPulse 0.6s ease-out;
}

@keyframes cardGlowPulse {
    0% {
        box-shadow: 0 5px 20px rgba(255, 215, 0, 0.2);
    }
    50% {
        box-shadow: 0 15px 50px rgba(255, 215, 0, 0.5),
                    0 0 80px rgba(255, 215, 0, 0.7),
                    0 0 120px rgba(255, 215, 0, 0.4);
    }
    100% {
        box-shadow: 0 10px 40px rgba(255, 215, 0, 0.4),
                    0 0 60px rgba(255, 215, 0, 0.6),
                    0 0 100px rgba(255, 215, 0, 0.3);
    }
}

.mode-card.featured {
    border-color: rgba(255, 215, 0, 0.6);
    background: rgba(255, 215, 0, 0.1);
}

.mode-badge {
    position: absolute;
    top: -15px;
    right: 20px;
    background: linear-gradient(135deg, #ffd700, #ffa500);
    color: #000;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.85em;
    font-weight: bold;
}

.mode-icon {
    font-size: 4em;
    margin-bottom: 15px;
    animation: iconBounce 2s ease-in-out infinite;
    filter: drop-shadow(0 0 10px rgba(255, 215, 0, 0.5));
}

@keyframes iconBounce {
    0%, 100% {
        transform: scale(1) rotate(0deg);
        filter: drop-shadow(0 0 10px rgba(255, 215, 0, 0.5));
    }
    25% {
        transform: scale(1.1) rotate(-5deg);
    }
    50% {
        transform: scale(1.15) rotate(0deg);
        filter: drop-shadow(0 0 25px rgba(255, 215, 0, 0.8));
    }
    75% {
        transform: scale(1.1) rotate(5deg);
    }
}

.mode-card h3 {
    font-size: 2em;
    color: #ffd700;
    margin-bottom: 15px;
}

.mode-card p {
    font-size: 1em;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 20px;
}

.mode-features {
    text-align: left;
    list-style: none;
    margin-bottom: 25px;
}

.mode-features li {
    padding: 8px 0;
    padding-left: 25px;
    position: relative;
    color: rgba(255, 255, 255, 0.8);
    animation: fadeSlideUp 0.4s ease-out backwards;
    transition: all 0.3s ease;
}

.mode-features li:nth-child(1) { animation-delay: 0.5s; }
.mode-features li:nth-child(2) { animation-delay: 0.6s; }
.mode-features li:nth-child(3) { animation-delay: 0.7s; }
.mode-features li:nth-child(4) { animation-delay: 0.8s; }
.mode-features li:nth-child(5) { animation-delay: 0.9s; }

.mode-features li:hover {
    color: #ffd700;
    padding-left: 30px;
}

.mode-features li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #ffd700;
    font-weight: bold;
}

.mode-button {
    width: 100%;
    padding: 15px 30px;
    font-size: 1.2em;
    background: rgba(255, 215, 0, 0.6);
    color: #000;
    border: 2px solid #ffd700;
    border-radius: 10px;
    cursor: pointer;
    font-family: 'Pixelify Sans', sans-serif;
    font-weight: bold;
    transition: all 0.3s ease;
}

.mode-button:hover {
    background: #ffd700;
    box-shadow: 0 0 25px rgba(255, 215, 0, 0.8),
                0 0 50px rgba(255, 215, 0, 0.6),
                0 0 80px rgba(255, 215, 0, 0.4);
    transform: scale(1.08);
    animation: buttonExplode 0.6s ease-out;
}

@keyframes buttonExplode {
    0% {
        box-shadow: 0 0 10px rgba(255, 215, 0, 0.4);
    }
    50% {
        box-shadow: 0 0 40px rgba(255, 215, 0, 1),
                    0 0 70px rgba(255, 215, 0, 0.8),
                    0 0 100px rgba(255, 215, 0, 0.5);
    }
    100% {
        box-shadow: 0 0 25px rgba(255, 215, 0, 0.8),
                    0 0 50px rgba(255, 215, 0, 0.6),
                    0 0 80px rgba(255, 215, 0, 0.4);
    }
}

/* Methodology Popup */
.cta-popup {
    position: fixed;
    right: -400px;
    top: 50%;
    transform: translateY(-50%);
    width: 350px;
    padding: 40px 30px;
    background: linear-gradient(135deg, rgba(138, 43, 226, 0.95), rgba(106, 27, 178, 0.95));
    border: 3px solid rgba(216, 180, 254, 0.8);
    border-right: none;
    border-radius: 25px 0 0 25px;
    z-index: 1500;
    box-shadow: -5px 0 30px rgba(138, 43, 226, 0.6),
                -10px 0 50px rgba(138, 43, 226, 0.4);
    transition: right 0.6s ease;
    text-align: center;
}

.cta-popup.show {
    right: 0;
}

.cta-popup h2 {
    font-size: 2em;
    color: #fff;
    margin-bottom: 20px;
    text-shadow: 0 0 20px rgba(138, 43, 226, 0.8);
}

.cta-popup p {
    font-size: 1.1em;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 30px;
    line-height: 1.6;
}

.cta-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
    flex-direction: column;
}

.cta-btn {
    padding: 18px 45px;
    font-size: 1.3em;
    font-family: 'Pixelify Sans', cursive;
    font-weight: 700;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    animation: ctaButtonPulse 2s ease-in-out infinite;
    border: none;
}

@keyframes ctaButtonPulse {
    0%, 100% {
        box-shadow: 0 0 20px rgba(138, 43, 226, 0.4);
    }
    50% {
        box-shadow: 0 0 40px rgba(138, 43, 226, 0.7);
    }
}

.cta-btn.primary {
    background: linear-gradient(135deg, #8a2be2, #6a1bb2);
    color: white;
}

.cta-btn.primary:hover {
    transform: scale(1.08);
    box-shadow: 0 10px 40px rgba(138, 43, 226, 0.6),
                0 0 60px rgba(138, 43, 226, 0.5);
    animation: none;
}

.cta-btn.secondary {
    background: linear-gradient(135deg, #ffd700, #ff8c00);
    color: #000;
}

.cta-btn.secondary:hover {
    transform: scale(1.08);
    box-shadow: 0 10px 40px rgba(255, 215, 0, 0.6),
                0 0 60px rgba(255, 215, 0, 0.5);
    animation: none;
}

/* Popup Close Button */
.popup-close-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    width: 35px;
    height: 35px;
    font-size: 1.3em;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: Arial, sans-serif;
    z-index: 10;
}

.popup-close-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg) scale(1.1);
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.5);
}

/* Popup Toggle Tab */
.popup-tab {
    position: fixed;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    background: linear-gradient(135deg, rgba(138, 43, 226, 0.95), rgba(106, 27, 178, 0.95));
    border: 3px solid rgba(216, 180, 254, 0.8);
    border-right: none;
    border-radius: 15px 0 0 15px;
    padding: 20px 12px;
    color: #fff;
    font-size: 1.1em;
    font-weight: bold;
    cursor: pointer;
    z-index: 1499;
    transition: all 0.3s ease;
    writing-mode: vertical-rl;
    text-orientation: mixed;
    box-shadow: -5px 0 20px rgba(138, 43, 226, 0.4);
}

.popup-tab:hover {
    transform: translateY(-50%) translateX(-5px);
    box-shadow: -5px 0 30px rgba(138, 43, 226, 0.6);
}

.popup-tab.hidden {
    opacity: 0;
    pointer-events: none;
    transform: translateY(-50%) translateX(100%);
}

/* Mobile Responsive for Popup */
@media (max-width: 768px) {
    .cta-popup {
        width: 90%;
        max-width: 320px;
        right: -100%;
        padding: 25px 20px;
        border-right: 3px solid rgba(216, 180, 254, 0.8);
        border-radius: 15px 0 0 15px;
        top: auto;
        bottom: 80px;
        transform: none;
        z-index: 9999;
    }

    .cta-popup.show {
        right: 0;
    }

    .cta-popup h2 {
        font-size: 1.5em;
        margin-bottom: 15px;
    }

    .cta-popup p {
        font-size: 0.95em;
        margin-bottom: 20px;
    }

    .cta-popup::before {
        content: '◀';
        position: fixed;
        right: 0;
        top: 50%;
        transform: translateY(-50%);
        left: auto;
        width: 30px;
        height: 60px;
        background: linear-gradient(135deg, rgba(138, 43, 226, 0.95), rgba(106, 27, 178, 0.95));
        border: 3px solid rgba(216, 180, 254, 0.8);
        border-right: none;
        border-radius: 15px 0 0 15px;
        display: flex;
        align-items: center;
        justify-content: center;
        color: #fff;
        font-size: 1.2em;
        box-shadow: -5px 0 15px rgba(138, 43, 226, 0.4);
        cursor: pointer;
        pointer-events: all;
        z-index: 9998;
    }

    .cta-popup.show::before {
        display: none;
    }

    .popup-tab {
        display: none;
    }
}

/* Collaboration Section */
.collab-glow-btn {
    animation: collabButtonGlow 2s ease-in-out infinite;
    position: relative;
    overflow: hidden;
}

.collab-glow-btn::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(138, 43, 226, 0.4) 0%, transparent 70%);
    animation: rotateGlow 3s linear infinite;
    z-index: 0;
}

.collab-glow-btn * {
    position: relative;
    z-index: 1;
}

@keyframes collabButtonGlow {
    0%, 100% {
        box-shadow: 0 0 15px rgba(138, 43, 226, 0.5),
                    0 0 30px rgba(138, 43, 226, 0.3);
        border-color: #8a2be2;
    }
    50% {
        box-shadow: 0 0 30px rgba(138, 43, 226, 0.8),
                    0 0 60px rgba(138, 43, 226, 0.5),
                    0 0 90px rgba(138, 43, 226, 0.3);
        border-color: #d8b4fe;
    }
}

@keyframes rotateGlow {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

.collab-glow-btn:hover {
    background: rgba(138, 43, 226, 0.8) !important;
    transform: scale(1.08) translateY(-3px);
    box-shadow: 0 0 40px rgba(138, 43, 226, 1),
                0 0 80px rgba(138, 43, 226, 0.7),
                0 0 120px rgba(138, 43, 226, 0.4) !important;
    animation: none;
}

@keyframes bonusPulse {
    0%, 100% {
        opacity: 0.8;
    }
    50% {
        opacity: 1;
    }
}

/* Other Game Link */
.other-game-link {
    text-align: center;
    margin-top: 40px;
    padding: 25px;
    background: rgba(138, 43, 226, 0.05);
    border: 2px solid rgba(138, 43, 226, 0.2);
    border-radius: 10px;
}

.other-game-link p {
    font-size: 1.1em;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 15px;
}

.sprint-link {
    display: inline-block;
    padding: 12px 30px;
    font-size: 1.1em;
    background: rgba(138, 43, 226, 0.6);
    color: #fff;
    text-decoration: none;
    border-radius: 10px;
    border: 2px solid #8a2be2;
    font-weight: bold;
    transition: all 0.3s ease;
}

.sprint-link:hover {
    background: rgba(138, 43, 226, 0.8);
    box-shadow: 0 0 25px rgba(138, 43, 226, 0.6);
    transform: scale(1.05);
}

/* Progress Indicator */
#progress-indicator {
    background: rgba(0, 0, 0, 0.6);
    border: 2px solid rgba(255, 215, 0, 0.3);
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 30px;
}

.progress-bar-container {
    margin-bottom: 15px;
}

.progress-label {
    font-size: 0.9em;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 5px;
}

.progress-bar {
    width: 100%;
    height: 25px;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 12px;
    overflow: hidden;
    border: 2px solid rgba(255, 215, 0, 0.3);
}

#progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #ffd700, #ffa500, #ffd700);
    background-size: 200% 100%;
    animation: shimmer 2s linear infinite;
    transition: width 0.5s ease;
}

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

.progress-info {
    text-align: center;
    margin-top: 10px;
    font-size: 1em;
    color: #ffd700;
}

.live-stats {
    display: flex;
    justify-content: space-around;
    margin-top: 15px;
}

.stat-item {
    text-align: center;
}

.stat-label {
    font-size: 0.9em;
    color: rgba(255, 255, 255, 0.7);
    display: block;
    margin-bottom: 5px;
}

.stat-value {
    font-size: 1.5em;
    color: #ffd700;
    font-weight: bold;
}

/* Game Container */
#game {
    background: rgba(0, 0, 0, 0.6);
    border: 3px solid rgba(255, 215, 0, 0.3);
    border-radius: 15px;
    padding: 40px;
    min-height: 400px;
    max-width: 900px;
    margin: 20px auto;
}

#game h2 {
    color: #ffd700;
    font-size: 2.2em;
    margin-bottom: 25px;
    text-align: center;
}

#game p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.25em;
    line-height: 1.7;
    margin-bottom: 25px;
}

#game button {
    display: block;
    width: 100%;
    padding: 20px;
    margin: 15px 0;
    font-size: 1.15em;
    font-family: 'Pixelify Sans', sans-serif;
    background: rgba(255, 215, 0, 0.15);
    color: #fff;
    border: 2px solid rgba(255, 215, 0, 0.4);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

#game button:hover {
    background: rgba(255, 215, 0, 0.3);
    border-color: #ffd700;
    transform: translateX(10px);
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.4);
}

/* Scenario Container */
#scenario-container {
    background: rgba(0, 0, 0, 0.6);
    border: 3px solid rgba(255, 215, 0, 0.3);
    border-radius: 15px;
    padding: 40px;
    min-height: 400px;
}

/* Results Screen */
.results-content {
    background: rgba(0, 0, 0, 0.6);
    border: 3px solid rgba(255, 215, 0, 0.3);
    border-radius: 20px;
    padding: 50px;
    text-align: center;
}

.results-content h2 {
    font-size: 3em;
    color: #ffd700;
    margin-bottom: 30px;
}

#results-details {
    font-size: 1.2em;
    line-height: 2;
    margin-bottom: 40px;
}

.results-actions {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.action-btn {
    padding: 15px 35px;
    font-size: 1.1em;
    border-radius: 10px;
    cursor: pointer;
    font-family: 'Pixelify Sans', sans-serif;
    font-weight: bold;
    transition: all 0.3s ease;
    text-decoration: none;
    border: 2px solid;
    display: inline-block;
}

.action-btn.primary {
    background: rgba(255, 215, 0, 0.6);
    color: #000;
    border-color: #ffd700;
}

.action-btn.primary:hover {
    background: #ffd700;
    box-shadow: 0 0 25px rgba(255, 215, 0, 0.8);
}

.action-btn.secondary {
    background: rgba(138, 43, 226, 0.6);
    color: #fff;
    border-color: #8a2be2;
}

.action-btn.secondary:hover {
    background: rgba(138, 43, 226, 0.8);
    box-shadow: 0 0 25px rgba(138, 43, 226, 0.6);
}

.action-btn.tertiary {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.3);
}

.action-btn.tertiary:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
}

/* Modals */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: linear-gradient(135deg, rgba(26, 26, 46, 0.95), rgba(10, 10, 10, 0.95));
    border: 3px solid rgba(255, 215, 0, 0.5);
    border-radius: 20px;
    padding: 40px;
    max-width: 800px;
    max-height: 85vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 0 50px rgba(255, 215, 0, 0.3);
    animation: modalSlideIn 0.3s ease;
}

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

.modal-content.info-modal {
    max-width: 900px;
}

.close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: #ffd700;
    font-size: 35px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.close:hover {
    color: #fff;
    text-shadow: 0 0 15px rgba(255, 215, 0, 0.8);
}

.modal-content h2 {
    font-size: 2.5em;
    color: #ffd700;
    margin-bottom: 25px;
    text-shadow: 0 0 15px rgba(255, 215, 0, 0.5);
}

.modal-body {
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.9);
}

.modal-body h3 {
    font-size: 1.8em;
    color: #ffd700;
    margin: 25px 0 15px;
}

.modal-body h4 {
    font-size: 1.3em;
    color: #ffa500;
    margin: 20px 0 10px;
}

.modal-body ul {
    margin-left: 20px;
    margin-bottom: 15px;
}

.modal-body li {
    margin: 10px 0;
}

.soi-dimension, .theory-dimension {
    background: rgba(255, 215, 0, 0.05);
    border-left: 4px solid #ffd700;
    padding: 20px;
    margin: 20px 0;
    border-radius: 8px;
}

/* Member Grid */
.member-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.member-card {
    background: rgba(255, 215, 0, 0.1);
    border: 2px solid rgba(255, 215, 0, 0.3);
    border-radius: 15px;
    padding: 25px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.member-card:hover {
    background: rgba(255, 215, 0, 0.2);
    border-color: #ffd700;
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(255, 215, 0, 0.4);
}

.member-avatar {
    font-size: 4em;
    margin-bottom: 15px;
}

.member-card h3 {
    font-size: 1.3em;
    color: #ffd700;
    margin-bottom: 8px;
}

.member-role {
    font-size: 0.9em;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 12px;
}

.member-strength {
    font-size: 0.85em;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.8);
}

/* Chat */
.chat-container {
    background: rgba(0, 0, 0, 0.4);
    border-radius: 15px;
    padding: 20px;
}

.chat-messages {
    height: 300px;
    overflow-y: auto;
    margin-bottom: 15px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
}

.chat-message {
    margin: 10px 0;
    padding: 12px;
    border-radius: 10px;
    animation: messageSlideIn 0.3s ease;
}

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

.chat-message.system {
    background: rgba(138, 43, 226, 0.2);
    text-align: center;
    font-style: italic;
}

.chat-message.user {
    background: rgba(255, 215, 0, 0.2);
    margin-left: 20%;
}

.chat-message.team {
    background: rgba(138, 43, 226, 0.3);
    margin-right: 20%;
}

.chat-input-area {
    display: flex;
    gap: 10px;
}

#chat-input {
    flex: 1;
    padding: 12px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 215, 0, 0.3);
    border-radius: 8px;
    color: #fff;
    font-family: 'Pixelify Sans', sans-serif;
    font-size: 1em;
}

#chat-input:focus {
    outline: none;
    border-color: #ffd700;
}

.chat-input-area button {
    padding: 12px 25px;
    background: rgba(255, 215, 0, 0.6);
    color: #000;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-family: 'Pixelify Sans', sans-serif;
    font-weight: bold;
    transition: all 0.3s ease;
}

.chat-input-area button:hover {
    background: #ffd700;
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.6);
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 215, 0, 0.5);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 215, 0, 0.7);
}

/* Responsive Design */
@media (max-width: 768px) {
    .game-header h1 {
        font-size: 2.5em;
    }

    .welcome-content,
    .results-content {
        padding: 25px;
    }

    .game-modes {
        grid-template-columns: 1fr;
    }

    .resource-buttons,
    .collab-buttons {
        grid-template-columns: 1fr;
    }

    .results-actions {
        flex-direction: column;
    }

    .action-btn {
        width: 100%;
    }

    .modal-content {
        padding: 25px;
        margin: 20px;
    }
}
