/* Keep all existing CSS styles */
:root {
    --space-dark: #0f1729;
    --space-medium: #1a2342;
    --space-light: #2a3b63;
    --accent-primary: #6366f1;
    --accent-secondary: #8b5cf6;
    --accent-tertiary: #a78bfa;
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.7);
    --text-tertiary: rgba(255, 255, 255, 0.5);
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    
    --card-bg: rgba(26, 35, 66, 0.7);
    --card-border: rgba(99, 102, 241, 0.2);
    --card-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    --card-hover-shadow: 0 12px 40px rgba(99, 102, 241, 0.3);
}

.loading-overlay.show {
    opacity: 1;
    visibility: visible;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(99, 102, 241, 0.2);
    border-top: 4px solid var(--accent-primary);
    border-radius: 50%;
    animation: spin 1.5s linear infinite;
    margin-bottom: 20px;
}

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

.loading-text {
    color: var(--text-primary);
    font-size: 1.1rem;
    font-weight: 500;
}

/* Cosmic background elements */
.cosmic-element {
    position: fixed;
    border-radius: 50%;
    filter: blur(40px);
    opacity: 0.15;
    z-index: -1;
}

.element-1 {
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, var(--accent-primary), transparent 70%);
    top: 10%;
    left: 5%;
    animation: float 12s ease-in-out infinite;
}

.element-2 {
    width: 250px;
    height: 250px;
    background: radial-gradient(circle, var(--accent-secondary), transparent 70%);
    bottom: 10%;
    right: 5%;
    animation: float 10s ease-in-out infinite reverse;
}

.element-3 {
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, var(--accent-tertiary), transparent 70%);
    top: 40%;
    right: 15%;
    animation: float 14s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0); }
    25% { transform: translate(-20px, 20px); }
    50% { transform: translate(10px, -15px); }
    75% { transform: translate(-15px, -10px); }
}

/* Match controls styling */
.match-controls {
    display: flex;
    align-items: center;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid rgba(99, 102, 241, 0.2);
}

/* Custom Player Count Selector */
.player-count-selector {
    position: relative;
    display: flex;
    align-items: center;
    background: rgba(26, 35, 66, 0.7);
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.2);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 120px;
    width: 120px;
}

.player-count-selector:hover {
    background: rgba(42, 59, 99, 0.8);
    box-shadow: 0 6px 16px rgba(99, 102, 241, 0.3);
    transform: translateY(-2px);
}

.current-player-count {
    display: none;
}

.player-count-dropdown {
    position: relative;
    display: flex;
    background: transparent;
    border: none;
    padding: 0;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    z-index: auto;
    opacity: 1;
    visibility: visible;
    transform: none;
    transition: none;
    width: 100%;
}

.player-count-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: none;
}

.player-count-option {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px 0;
    cursor: pointer;
    transition: all 0.2s ease;
    color: var(--text-primary);
    font-weight: 500;
    font-size: 1rem;
    border-right: 1px solid rgba(99, 102, 241, 0.2);
    flex: 1 1 0;
    min-width: 0;
    width: 33.333%;
}

.player-count-option:last-child {
    border-right: none;
}

.player-count-option:hover {
    background: rgba(99, 102, 241, 0.2);
    color: var(--text-primary);
}

.player-count-option.active {
    background: rgba(99, 102, 241, 0.3);
    color: var(--text-primary);
    font-weight: 600;
}


/* Media queries for responsive design */
/* Medium screens and smaller - stack game options vertically */
@media (max-width: 992px) {
    .game-options-grid {
        grid-template-columns: 1fr !important;
        grid-template-rows: auto auto;
        gap: 20px;
    }
    
    .game-option {
        padding: 20px;
    }
    
    .game-option h3 {
        font-size: 1.3rem;
        margin-bottom: 10px;
    }
    
    .game-option p {
        font-size: 0.95rem;
        margin-bottom: 15px;
    }
    
    .game-list {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }
    
    .game-item {
        min-height: 80px;
        padding: 12px;
        box-sizing: border-box;
        overflow: hidden;
    }
    
    .game-item i {
        font-size: 1.5rem;
        margin-bottom: 8px;
    }
    
    .game-item span {
        font-size: 0.9rem;
    }
}

/* Mobile phones */
@media (max-width: 480px) {
    .main-container {
        padding: 20px 15px;
        padding-top: 90px;
    }
    
    .section-header-container {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .section-header {
        font-size: 1.4rem;
    }
    
    .game-options-grid {
        gap: 12px;
    }
    
    .game-option {
        padding: 15px;
    }
    
    .game-option h3 {
        font-size: 1.2rem;
    }
    
    .game-option p {
        font-size: 0.9rem;
        margin-bottom: 12px;
    }
    
    .btn-cosmic {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
    
    .game-list {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }
    
    .game-item {
        min-height: 70px;
        padding: 10px;
        box-sizing: border-box;
        overflow: hidden;
    }
    
    .game-item i {
        font-size: 1.2rem;
        margin-bottom: 6px;
    }
    
    .game-item span {
        font-size: 0.8rem;
    }
}

/* Tablet screens */
@media (max-width: 991px) {
    .game-list {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .game-item {
        min-height: 70px;
        padding: 12px;
    }
    
    .main-container {
        padding-top: 80px;
    }
    
    .match-controls {
        flex-direction: row;
        gap: 12px;
        justify-content: center;
    }
    
    .player-count-dropdown {
        width: 100%;
        max-width: 120px;
    }
}



* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-user-select: none;  /* Safari */
    -ms-user-select: none;      /* IE 10 and IE 11 */
    user-select: none;  
}
/* Optional: If you want to allow selection in specific areas like input fields and textareas, add this */
input, textarea {
    -webkit-user-select: auto;  /* Safari */
    -ms-user-select: auto;      /* IE 10 and IE 11 */
    user-select: auto;          /* Standard syntax */
}
body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--space-dark);
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.6;
    overflow-x: hidden;
}

/* Star background */
.star-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
}

.star {
    position: absolute;
    background-color: white;
    border-radius: 50%;
}

@keyframes twinkle {
    0% { opacity: 0.2; }
    100% { opacity: 0.8; }
}

/* Custom Navbar Styles */
.navbar-cosmic {
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 0.8rem 0;
    border-bottom: 1px solid rgba(99, 102, 241, 0.2);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.navbar-cosmic .container-fluid {
    padding-left: 25px;
    padding-right: 25px;
}

.navbar-cosmic .navbar-brand {
    font-weight: 600;
    font-size: 1.5rem;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    transition: all 0.3s ease;
}

.navbar-cosmic .navbar-brand:hover {
    color: var(--accent-tertiary);
}

.navbar-cosmic .navbar-brand i {
    margin-right: 10px;
    color: var(--accent-primary);
}

.navbar-cosmic .nav-item {
    margin-right: 10px;
}

.navbar-cosmic .nav-link {
    color: var(--text-secondary);
    font-weight: 500;
    padding: 0.5rem 1.2rem;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
    position: relative;
}

.navbar-cosmic .nav-link:hover {
    color: var(--text-primary);
    background: rgba(99, 102, 241, 0.1);
}

.navbar-cosmic .nav-link.active {
    color: var(--text-primary);
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

/* Main container styles */
.main-container {
    padding-top: 100px;
    padding-bottom: 80px;
    min-height: 100vh;
}

/* Trailer Section */
.trailer-section {
    position: relative;
    width: fit-content;
    max-width: 100%;
    height: 700px;
    margin: 0 auto 40px auto;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(99, 102, 241, 0.2);
    transition: all 0.8s ease-in-out;
}

.trailer-section.compact {
    height: 250px;
}

/* Game board close area - clickable top border */
.game-board-close-area {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 25px;
    cursor: pointer;
    z-index: 25;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0 8px;
    gap: 8px;
    background: linear-gradient(180deg, 
        rgba(99, 102, 241, 0.05) 0%, 
        rgba(99, 102, 241, 0.02) 50%,
        transparent 100%);
    transition: all 0.3s ease;
}

.game-board-close-area:hover {
    background: linear-gradient(180deg, 
        rgba(99, 102, 241, 0.1) 0%, 
        rgba(99, 102, 241, 0.05) 50%,
        rgba(99, 102, 241, 0.02) 100%);
}

/* Corner arrows */
.corner-arrow {
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: all 0.3s ease;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.game-board-close-area:hover .corner-arrow {
    transform: translateY(-1px);
    text-shadow: 0 3px 6px rgba(0, 0, 0, 0.7);
}

.trailer-video {
    width: 100%;
    height: 100%;
    max-width: 2024px;
    max-height: 1500px;
    object-fit: contain;
    border-radius: 16px;
    cursor: pointer;
}


.trailer-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    pointer-events: none;
}

.trailer-overlay .hero-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Language selector container in Quick Match */
.language-selector-container {
    display: flex;
    justify-content: center;
    margin: 15px 0;
}

.language-selector-container.top-right {
    position: absolute;
    top: 15px;
    right: 15px;
    margin: 0;
    z-index: 10;
}

/* Custom Video Controls */
.custom-video-controls {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    pointer-events: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.custom-play-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: rgba(99, 102, 241, 0.9);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.custom-play-btn:hover {
    background: rgba(99, 102, 241, 1);
    transform: scale(1.1);
    box-shadow: 0 12px 32px rgba(99, 102, 241, 0.6);
    border-color: rgba(255, 255, 255, 0.5);
}

.custom-play-btn:active {
    transform: scale(0.95);
}

.custom-play-btn i {
    margin-left: 3px; /* Slight adjustment for play icon centering */
}

.custom-play-btn.hidden {
    opacity: 0;
    pointer-events: none;
    transform: scale(0.8);
}

/* Show play/pause button on hover */
.trailer-section:not(:hover) .custom-play-btn {
    opacity: 0;
    pointer-events: none;
}

.trailer-section:hover .custom-play-btn {
    opacity: 1;
    pointer-events: auto;
}

/* Begin Journey Button */
.begin-journey-btn {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    color: white;
    border: none;
    border-radius: 12px;
    padding: 15px 30px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    gap: 10px;
    position: relative;
    z-index: 20;
}

.begin-journey-btn:hover {
    background: linear-gradient(135deg, var(--accent-secondary), var(--accent-tertiary));
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.6);
}

.begin-journey-btn i {
    font-size: 18px;
}

/* Begin Journey Container */
.begin-journey-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 15px 0;
    width: 100%;
    transition: all 0.5s ease-in-out;
}

.begin-journey-container.hidden {
    opacity: 0;
    transform: translateY(-20px);
    pointer-events: none;
}


/* Game Controls Section */
.game-controls-section {
    background: var(--card-bg);
    border-radius: 16px;
    border: 1px solid var(--card-border);
    box-shadow: var(--card-shadow);
    padding: 25px;
    margin-top: -50px;
    margin-bottom: 40px;
    transition: all 0.8s ease-in-out;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transform: translateY(-20px);
    position: relative;
}

.game-controls-section.show {
    max-height: 1000px;
    opacity: 1;
    transform: translateY(0);
}

/* Top hover area for closing game board */
.game-controls-section::before {
    content: '';
    position: absolute;
    top: -25px;
    left: 50%;
    transform: translateX(-50%);
    width: 150px;
    height: 25px;
    cursor: pointer;
    z-index: 10;
    opacity: 0;
    transition: all 0.3s ease;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(99, 102, 241, 0.2), 
        rgba(99, 102, 241, 0.4), 
        rgba(99, 102, 241, 0.2), 
        transparent);
    border-radius: 20px;
}

.game-controls-section::after {
    content: '';
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 12px solid transparent;
    border-right: 12px solid transparent;
    border-bottom: 8px solid rgba(255, 255, 255, 0);
    cursor: pointer;
    z-index: 11;
    transition: all 0.3s ease;
    pointer-events: none;
}

.game-controls-section:hover::before {
    opacity: 1;
    transform: translateX(-50%) translateY(-2px);
    background: linear-gradient(90deg, 
        transparent, 
        rgba(99, 102, 241, 0.3), 
        rgba(99, 102, 241, 0.6), 
        rgba(99, 102, 241, 0.3), 
        transparent);
}

.game-controls-section:hover::after {
    border-bottom-color: rgba(255, 255, 255, 0.9);
    transform: translateX(-50%) translateY(-2px);
    pointer-events: auto;
}

/* Hero Section */
.hero-section {
    text-align: center;
    margin-bottom: 15px;
    padding: 30px 20px 15px 20px;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.hero-title {
    font-size: 2.8rem;
    font-weight: 700;
    margin-bottom: 15px;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    text-shadow: 0 0 20px rgba(99, 102, 241, 0.3);
}

.hero-title i {
    color: var(--accent-primary);
    font-size: 2.4rem;
    animation: pulse 2s ease-in-out infinite;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: var(--text-secondary);
    font-weight: 400;
    margin-bottom: 0;
    opacity: 0.9;
}

/* Game board container */
.game-board-container {
    background: var(--card-bg);
    border-radius: 16px;
    border: 1px solid var(--card-border);
    box-shadow: var(--card-shadow);
    padding: 25px;
    margin-bottom: 40px;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    min-height: calc(100vh - 450px);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Info container - separate from game board */
.info-container {
    padding-top: 80px;
    padding-bottom: 50px;
}



/* Section headers */
.section-header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.section-header {
    font-weight: 600;
    font-size: 1.5rem;
    color: var(--text-primary);
    margin-bottom: 0;
    display: flex;
    align-items: center;
}

.section-header i {
    margin-right: 12px;
    color: var(--accent-primary);
    font-size: 1.2rem;
}

/* Language Selector */
.language-selector {
    position: relative;
    display: flex;
    align-items: center;
}

.current-flag {
    font-size: 1.8rem;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 10px;
    background: rgba(26, 35, 66, 0.7);
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.2);
}

.current-flag:hover {
    background: rgba(42, 59, 99, 0.8);
    border-color: var(--accent-primary);
    box-shadow: 0 6px 16px rgba(99, 102, 241, 0.3);
    transform: translateY(-2px);
}

.flag-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: rgba(26, 35, 66, 0.95);
    border: 2px solid rgba(99, 102, 241, 0.3);
    border-radius: 12px;
    padding: 8px 0;
    min-width: 140px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
}

.flag-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.flag-option {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: var(--text-primary);
}

.flag-option:hover {
    background: rgba(99, 102, 241, 0.2);
    color: var(--text-primary);
}

.flag-option .flag {
    font-size: 1.2rem;
    margin-right: 10px;
}

.flag-option .label {
    font-size: 0.9rem;
    font-weight: 500;
}

/* Game options grid - side by side on desktop, stacked on mobile/tablet */
.game-options-grid {
    display: grid;
    grid-template-columns: 1fr 1fr; /* Side by side on desktop */
    grid-template-rows: auto auto;
    gap: 20px;
}

.game-option {
    background: rgba(42, 59, 99, 0.5);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    border: 1px solid rgba(99, 102, 241, 0.1);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    overflow: visible;
}

.game-option.multiplayer {
    padding: 30px 20px;
}

.game-option.multiplayer .game-icon {
    font-size: 3rem;
    margin-bottom: 15px;
}

.game-option.multiplayer h3 {
    font-size: 1.4rem;
    margin-bottom: 12px;
}

.game-option.multiplayer p {
    font-size: 1rem;
    margin-bottom: 20px;
}

.game-option.multiplayer .btn-cosmic {
    padding: 12px 25px;
    font-size: 1rem;
    font-weight: 600;
}



.game-icon {
    font-size: 2.2rem;
    margin-bottom: 12px;
    color: var(--accent-primary);
}

.game-option h3 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.game-option p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 15px;
}

.game-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-top: 15px;
    width: 100%;
    box-sizing: border-box;
}

.game-item {
    background: rgba(26, 35, 66, 0.7);
    border-radius: 10px;
    padding: 15px;
    text-align: center;
    cursor: pointer;
    transition: all 0.25s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(99, 102, 241, 0.1);
    min-height: 80px;
    overflow: hidden;
}

.game-item:hover {
    background: rgba(42, 59, 99, 0.7);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(99, 102, 241, 0.15);
    border-color: rgba(99, 102, 241, 0.3);
}

.game-item.active {
    background: rgba(99, 102, 241, 0.2);
    border-color: var(--accent-primary);
    box-shadow: 0 0 15px rgba(99, 102, 241, 0.4);
    transform: translateY(-2px);
}

.game-item i {
    font-size: 1.5rem;
    margin-bottom: 8px;
    color: var(--accent-secondary);
}

.game-item span {
    font-size: 0.9rem;
    font-weight: 500;
}


/* Cosmic buttons */
.btn-cosmic {
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
    color: white;
    border: none;
    border-radius: 8px;
    padding: 10px 20px;
    font-weight: 500;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.btn-cosmic i {
    margin-right: 8px;
}

.btn-cosmic:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(99, 102, 241, 0.4);
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-tertiary));
    color: white;
}

.btn-cosmic:active {
    transform: translateY(1px);
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
}

.btn-cosmic-secondary {
    background: rgba(42, 59, 99, 0.7);
    color: var(--text-secondary);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 8px;
    padding: 10px 20px;
    font-weight: 500;
    transition: all 0.3s ease;
    cursor: pointer;
}

.btn-cosmic-secondary:hover {
    background: rgba(42, 59, 99, 0.9);
    color: var(--text-primary);
    border-color: rgba(99, 102, 241, 0.4);
}

.btn-cosmic-secondary.active {
    background: rgba(99, 102, 241, 0.3);
    color: var(--text-primary);
    border-color: var(--accent-primary);
    box-shadow: 0 0 15px rgba(99, 102, 241, 0.4);
}

.btn-cosmic-secondary.active:hover {
    background: rgba(99, 102, 241, 0.4);
    border-color: var(--accent-secondary);
}

/* Form cosmic */
.form-cosmic {
    background: rgba(26, 35, 66, 0.7);
    border: 1px solid rgba(99, 102, 241, 0.2);
    color: var(--text-primary);
    border-radius: 8px;
    padding: 10px 15px;
    width: 100%;
    transition: all 0.3s ease;
}

.form-cosmic:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.3);
    outline: none;
}

/* Modal cosmic */
.cosmic-modal .modal-content {
    background: var(--space-medium);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    box-shadow: var(--card-shadow);
    color: var(--text-primary);
}

.cosmic-modal .modal-header {
    border-bottom: 1px solid rgba(99, 102, 241, 0.2);
    padding: 20px 25px;
}

.cosmic-modal .modal-title {
    font-weight: 600;
    font-size: 1.3rem;
}

.cosmic-modal .modal-body {
    padding: 25px;
}

.cosmic-modal .modal-footer {
    border-top: 1px solid rgba(99, 102, 241, 0.2);
    padding: 20px 25px;
}

.cosmic-modal .btn-close {
    color: white;
    filter: invert(1) grayscale(100%) brightness(200%);
    opacity: 0.7;
}

/* Setup options */
.setup-option {
    margin-bottom: 20px;
}

.setup-option label {
    display: block;
    font-weight: 500;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.difficulty-levels, .game-modes {
    display: flex;
    gap: 10px;
}

.difficulty-btn, .mode-btn {
    flex: 1;
    padding: 10px;
    text-align: center;
    background: rgba(26, 35, 66, 0.7);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 8px;
    color: var(--text-secondary);
    transition: all 0.3s ease;
    cursor: pointer;
}

.difficulty-btn:hover, .mode-btn:hover {
    background: rgba(42, 59, 99, 0.7);
    color: var(--text-primary);
}

.difficulty-btn.active, .mode-btn.active {
    background: rgba(99, 102, 241, 0.2);
    border-color: var(--accent-primary);
    color: var(--text-primary);
    box-shadow: 0 0 10px rgba(99, 102, 241, 0.3);
}

/* Status indicator in navbar */
.status-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 15px;
}

.status-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
}

.status-badge {
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-badge.ok {
    background: rgba(16, 185, 129, 0.2);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.status-badge.bad {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

/* Development info panel */
.dev-info-container {
    border-top: 1px solid rgba(99, 102, 241, 0.2);
    padding-top: 20px;
}

.dev-toggle {
    font-size: 0.9rem;
    padding: 8px 16px;
}

.dev-info-panel {
    background: rgba(26, 35, 66, 0.5);
    border-radius: 12px;
    padding: 20px;
    border: 1px solid rgba(99, 102, 241, 0.1);
}

.dev-info-panel h6 {
    color: var(--text-primary);
    font-weight: 600;
    margin-bottom: 10px;
}

.dev-info-panel pre {
    background: rgba(15, 23, 42, 0.8);
    color: #10b981;
    padding: 12px;
    border-radius: 8px;
    height: 200px;
    overflow: auto;
    font-size: 0.8rem;
    margin: 0;
    border: 1px solid rgba(99, 102, 241, 0.2);
}

/* Enhanced loading overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    z-index: 1050;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.loading-content {
    text-align: center;
    max-width: 400px;
    padding: 40px;
    background: rgba(26, 35, 66, 0.8);
    border-radius: 20px;
    border: 1px solid rgba(99, 102, 241, 0.3);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

.loading-subtitle {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-top: 10px;
    opacity: 0.8;
}

/* Cosmic Popup System */
.cosmic-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 2000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    padding: 20px;
    box-sizing: border-box;
}

.cosmic-popup-overlay.show {
    opacity: 1;
    visibility: visible;
}

.cosmic-popup {
    background: rgba(26, 35, 66, 0.95);
    border: 2px solid var(--accent-primary);
    border-radius: 16px;
    padding: 25px;
    max-width: 380px;
    width: 100%;
    text-align: center;
    box-shadow: 
        0 15px 40px rgba(0, 0, 0, 0.3),
        0 0 20px rgba(99, 102, 241, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    transform: scale(0.9) translateY(20px);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.cosmic-popup::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary), var(--accent-tertiary), var(--accent-primary));
    background-size: 200% 100%;
    animation: shimmer 2s linear infinite;
}

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

.cosmic-popup-overlay.show .cosmic-popup {
    transform: scale(1) translateY(0);
}

.cosmic-popup-icon {
    font-size: 3rem;
    margin-bottom: 15px;
    display: block;
    animation: pulse 2s ease-in-out infinite;
}

.cosmic-popup-icon.warning {
    color: var(--warning);
}

.cosmic-popup-icon.error {
    color: var(--danger);
}

.cosmic-popup-icon.info {
    color: var(--accent-primary);
}

.cosmic-popup-icon.success {
    color: var(--success);
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.05); opacity: 0.9; }
}

.cosmic-popup-title {
    color: var(--text-primary);
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 12px;
    text-shadow: 0 0 10px rgba(99, 102, 241, 0.3);
}

.cosmic-popup-message {
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.5;
    margin-bottom: 25px;
    font-weight: 400;
}

.cosmic-popup-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.cosmic-popup-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 100px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
}

.cosmic-popup-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s ease;
}

.cosmic-popup-btn:hover::before {
    left: 100%;
}

.cosmic-popup-btn.primary {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.cosmic-popup-btn.primary:hover {
    background: linear-gradient(135deg, var(--accent-secondary), var(--accent-tertiary));
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
}

.cosmic-popup-btn.secondary {
    background: rgba(42, 59, 99, 0.7);
    color: var(--text-primary);
    border: 1px solid rgba(99, 102, 241, 0.3);
}

.cosmic-popup-btn.secondary:hover {
    background: rgba(42, 59, 99, 0.9);
    border-color: rgba(99, 102, 241, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(42, 59, 99, 0.4);
}

.cosmic-popup-btn.danger {
    background: linear-gradient(135deg, var(--danger), #dc2626);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.cosmic-popup-btn.danger:hover {
    background: linear-gradient(135deg, #dc2626, #b91c1c);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(239, 68, 68, 0.4);
}

.cosmic-popup-btn.success {
    background: linear-gradient(135deg, var(--success), #059669);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.cosmic-popup-btn.success:hover {
    background: linear-gradient(135deg, #059669, #047857);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
}

.cosmic-popup-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

/* Mobile responsiveness for popups */
@media (max-width: 768px) {
    .cosmic-popup {
        padding: 20px;
        margin: 20px;
        max-width: calc(100% - 40px);
    }
    
    .cosmic-popup-icon {
        font-size: 2.5rem;
        margin-bottom: 12px;
    }
    
    .cosmic-popup-title {
        font-size: 1.3rem;
        margin-bottom: 10px;
    }
    
    .cosmic-popup-message {
        font-size: 0.95rem;
        margin-bottom: 20px;
    }
    
    .cosmic-popup-buttons {
        flex-direction: column;
        gap: 10px;
    }
    
    .cosmic-popup-btn {
        width: 100%;
        min-width: unset;
        padding: 12px 18px;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .cosmic-popup {
        padding: 18px 12px;
        border-radius: 14px;
    }
    
    .cosmic-popup-icon {
        font-size: 2.2rem;
        margin-bottom: 10px;
    }
    
    .cosmic-popup-title {
        font-size: 1.2rem;
        margin-bottom: 8px;
    }
    
    .cosmic-popup-message {
        font-size: 0.9rem;
        margin-bottom: 16px;
    }
    
    .cosmic-popup-btn {
        padding: 10px 15px;
        font-size: 0.85rem;
    }
}

/* About Section Styles */
.about-section {
    padding-top: 0;
}

.about-header {
    text-align: center;
    margin-bottom: 40px;
}

.about-header h2 {
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 15px;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.about-header h2 i {
    color: var(--accent-primary);
    font-size: 2rem;
}

.about-header .lead {
    font-size: 1.3rem;
    color: var(--text-secondary);
    font-weight: 400;
    margin-bottom: 0;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    margin-bottom: 50px;
}

.feature-card {
    background: rgba(26, 35, 66, 0.6);
    border: 1px solid rgba(99, 102, 241, 0.15);
    border-radius: 12px;
    padding: 30px 25px;
    text-align: center;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.feature-card:hover {
    background: rgba(42, 59, 99, 0.7);
    border-color: rgba(99, 102, 241, 0.3);
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(99, 102, 241, 0.2);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 20px;
    color: var(--accent-primary);
    display: block;
}

.feature-card h4 {
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 15px;
    color: var(--text-primary);
}

.feature-card p {
    font-size: 1rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 0;
}

.why-lingoduel {
    background: rgba(42, 59, 99, 0.4);
    border-radius: 16px;
    padding: 35px 30px;
    margin-bottom: 50px;
    border: 1px solid rgba(99, 102, 241, 0.15);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.why-lingoduel h3 {
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 25px;
    color: var(--text-primary);
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.why-lingoduel h3 i {
    color: var(--accent-primary);
    font-size: 1.6rem;
}

.benefits-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.benefit {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    padding: 15px 0;
}

.benefit i {
    color: var(--success);
    font-size: 1.2rem;
    margin-top: 3px;
    flex-shrink: 0;
}

.benefit span {
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.5;
}

.benefit strong {
    color: var(--text-primary);
    font-weight: 600;
}

.faq-section {
    background: rgba(26, 35, 66, 0.5);
    border-radius: 16px;
    padding: 40px 30px;
    border: 1px solid rgba(99, 102, 241, 0.2);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.faq-section h3 {
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 30px;
    color: var(--text-primary);
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.faq-section h3 i {
    color: var(--accent-primary);
    font-size: 1.6rem;
}

.faq-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.faq-item {
    background: rgba(42, 59, 99, 0.4);
    border-radius: 12px;
    border: 1px solid rgba(99, 102, 241, 0.1);
    overflow: hidden;
    transition: all 0.3s ease;
}

.faq-item:hover {
    border-color: rgba(99, 102, 241, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(99, 102, 241, 0.1);
}

.faq-question {
    padding: 20px 25px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 15px;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 1.1rem;
    transition: all 0.3s ease;
    user-select: none;
}

.faq-question:hover {
    background: rgba(42, 59, 99, 0.6);
}

.faq-question i {
    color: var(--accent-primary);
    font-size: 0.9rem;
    transition: transform 0.3s ease;
}

.faq-item.open .faq-question i {
    transform: rotate(90deg);
}

.faq-answer {
    padding: 0 25px 20px 55px;
    color: var(--text-secondary);
    line-height: 1.6;
    font-size: 1rem;
    display: none;
}

.faq-item.open .faq-answer {
    display: block;
    animation: fadeInDown 0.3s ease;
}

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

/* Mobile responsiveness for trailer */
@media (max-width: 768px) {
    .trailer-section {
        height: 250px;
        margin-bottom: 30px;
    }
    
    .trailer-overlay .hero-content .hero-title {
        font-size: 2.2rem;
        flex-direction: column;
        gap: 10px;
    }
    
    .trailer-overlay .hero-content .hero-subtitle {
        font-size: 1.1rem;
    }
}

@media (max-width: 480px) {
    .trailer-section {
        height: 200px;
        margin-bottom: 25px;
    }
    
    .trailer-overlay .hero-content .hero-title {
        font-size: 1.8rem;
    }
    
    .trailer-overlay .hero-content .hero-subtitle {
        font-size: 1rem;
    }
}

/* Mobile responsiveness for about section */
@media (max-width: 992px) {
    .features-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 20px;
    }
    
    .feature-card {
        padding: 25px 20px;
    }
    
    .benefits-list {
        grid-template-columns: 1fr;
        gap: 15px;
    }
}

@media (max-width: 768px) {
    .about-header h2 {
        font-size: 1.8rem;
        flex-direction: column;
        gap: 10px;
    }
    
    .about-header .lead {
        font-size: 1.1rem;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        margin-bottom: 40px;
    }
    
    .feature-icon {
        font-size: 2.5rem;
        margin-bottom: 15px;
    }
    
    .feature-card h4 {
        font-size: 1.3rem;
        margin-bottom: 12px;
    }
    
    .feature-card p {
        font-size: 0.95rem;
    }
    
    .why-lingoduel {
        padding: 25px 20px;
        margin-bottom: 40px;
    }
    
    .why-lingoduel h3 {
        font-size: 1.6rem;
        margin-bottom: 20px;
        flex-direction: column;
        gap: 8px;
    }
    
    .hero-section {
        padding: 30px 15px 15px 15px;
    }
    
    .info-container {
        padding-top: 60px;
    }
    
    .hero-title {
        font-size: 2.2rem;
        flex-direction: column;
        gap: 12px;
    }
    
    .hero-title i {
        font-size: 1.8rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .game-board-container {
        padding: 20px;
        min-height: calc(100vh - 480px);
    }
    
    .faq-section {
        padding: 30px 20px;
    }
    
    .faq-section h3 {
        font-size: 1.6rem;
        margin-bottom: 25px;
        flex-direction: column;
        gap: 8px;
    }
    
    .faq-question {
        padding: 18px 20px;
        font-size: 1rem;
    }
    
    .faq-answer {
        padding: 0 20px 18px 50px;
        font-size: 0.95rem;
    }
}

@media (max-width: 480px) {
    
    .about-header {
        margin-bottom: 30px;
    }
    
    .about-header h2 {
        font-size: 1.6rem;
    }
    
    .about-header .lead {
        font-size: 1rem;
    }
    
    .feature-card {
        padding: 20px 15px;
    }
    
    .feature-icon {
        font-size: 2.2rem;
    }
    
    .feature-card h4 {
        font-size: 1.2rem;
    }
    
    .feature-card p {
        font-size: 0.9rem;
    }
    
    .why-lingoduel {
        padding: 20px 15px;
    }
    
    .why-lingoduel h3 {
        font-size: 1.5rem;
    }
    
    .benefit {
        padding: 12px 0;
    }
    
    .benefit span {
        font-size: 0.95rem;
    }
    
    .hero-section {
        padding: 25px 10px 10px 10px;
    }
    
    .info-container {
        padding-top: 50px;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-title i {
        font-size: 1.6rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .game-board-container {
        padding: 18px;
        min-height: calc(100vh - 520px);
    }
    
    .faq-section {
        padding: 25px 15px;
    }
    
    .faq-section h3 {
        font-size: 1.5rem;
        margin-bottom: 20px;
    }
    
    .faq-question {
        padding: 15px 18px;
        font-size: 0.95rem;
    }
    
    .faq-answer {
        padding: 0 18px 15px 45px;
        font-size: 0.9rem;
    }
}

