/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Exo 2', sans-serif;
    background: #0a0a0a;
    color: #ffffff;
    overflow-x: hidden;
    min-height: 100vh;
}

/* Typography */
.neon-text {
    font-family: 'Orbitron', monospace;
    font-weight: 900;
    font-size: 3rem;
    color: #00ffff;
    text-shadow: 
        0 0 2px #00ffff,
        0 0 4px #00ffff,
        0 0 8px #00ffff;
    animation: neonPulse 2s ease-in-out infinite alternate;
}

.error-text {
    font-family: 'Orbitron', monospace;
    font-weight: 900;
    font-size: 2.5rem;
    color: #ff0080;
    text-shadow: 
        0 0 2px #ff0080,
        0 0 4px #ff0080,
        0 0 8px #ff0080;
}

@keyframes neonPulse {
    from {
        text-shadow: 
            0 0 2px #00ffff,
            0 0 4px #00ffff,
            0 0 8px #00ffff;
    }
    to {
        text-shadow: 
            0 0 1px #00ffff,
            0 0 3px #00ffff,
            0 0 6px #00ffff;
    }
}

/* Background Animation */
.background-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.neon-grid {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(rgba(0, 255, 255, 0.1) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 255, 255, 0.1) 1px, transparent 1px);
    background-size: 50px 50px;
    animation: gridMove 20s linear infinite;
}

@keyframes gridMove {
    0% { transform: translate(0, 0); }
    100% { transform: translate(50px, 50px); }
}

.floating-particles {
    position: absolute;
    width: 100%;
    height: 100%;
}

/* Container Styles */
.container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 1;
}

/* Header Styles */
.game-header {
    text-align: center;
    padding: 2rem 1rem;
    background: linear-gradient(135deg, rgba(0, 255, 255, 0.1), rgba(255, 0, 128, 0.1));
    border-bottom: 2px solid rgba(0, 255, 255, 0.3);
}

.game-title {
    margin-bottom: 0.5rem;
}

.subtitle {
    display: block;
    font-size: 1.5rem;
    color: #ff0080;
    text-shadow: 
        0 0 5px #ff0080,
        0 0 10px #ff0080;
    margin-top: 0.5rem;
}

.game-description {
    font-size: 1.2rem;
    color: #cccccc;
    margin-top: 1rem;
}

/* Main Menu Styles */
.main-menu {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.menu-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 800px;
    width: 100%;
    margin-bottom: 3rem;
}

.menu-card {
    background: linear-gradient(135deg, rgba(0, 255, 255, 0.1), rgba(255, 0, 128, 0.1));
    border: 2px solid rgba(0, 255, 255, 0.3);
    border-radius: 15px;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.menu-card::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, #00ffff00, #ff008000, #00ffff00);
    border-radius: 15px;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.menu-card:hover::before {
    opacity: 1;
}

.menu-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 255, 255, 0.3);
}

.card-title {
    font-family: 'Orbitron', monospace;
    font-size: 1.5rem;
    color: #00ffff;
    margin-bottom: 1rem;
}

.card-description {
    color: #cccccc;
    margin-bottom: 2rem;
    font-size: 1rem;
}

/* Button Styles */
.neon-button {
    position: relative;
    background: transparent;
    border: 2px solid #00ffff;
    color: #00ffff;
    padding: 1rem 2rem;
    font-family: 'Orbitron', monospace;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.3s ease;
    overflow: hidden;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.neon-button span {
    position: relative;
    z-index: 2;
}

.button-glow {
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 255, 255, 0.4), transparent);
    transition: left 0.5s ease;
}

.neon-button:hover {
    color: #000000;
    background: #00ffff;
    box-shadow: 
        0 0 10px #00ffff,
        0 0 20px #00ffff,
        0 0 40px #00ffff;
    text-shadow: none;
}

.neon-button:hover .button-glow {
    left: 100%;
}

.neon-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.neon-button:disabled:hover {
    color: #00ffff;
    background: transparent;
    box-shadow: none;
}

/* Specific button variants */
.host-btn {
    border-color: #ff0080;
    color: #ff0080;
}

.host-btn:hover {
    background: #00ff80;
    box-shadow: 
        0 0 10px #00ff80,
        0 0 20px #00ff80,
        0 0 40px #00ff80;
}

.player-btn {
    border-color: #00ff80;
    color: #00ff80;
}

.player-btn:hover {
    background: #00ff80;
    box-shadow: 
        0 0 10px #00ff80,
        0 0 20px #00ff80,
        0 0 40px #00ff80;
}

.start-btn {
    border-color: #ffff00;
    color: #ffff00;
}

.start-btn:hover {
    background: #ffff00;
    color: #000000;
    box-shadow: 
        0 0 10px #ffff00,
        0 0 20px #ffff00,
        0 0 40px #ffff00;
}

.submit-btn {
    border-color: #ff8000;
    color: #ff8000;
    width: 100%;
    margin-top: 1rem;
}

.submit-btn:hover {
    background: #ff8000;
    box-shadow: 
        0 0 10px #ff8000,
        0 0 20px #ff8000,
        0 0 40px #ff8000;
}

.small {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

/* Game Info Styles */
.game-info {
    max-width: 600px;
    width: 100%;
}

.info-section {
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(0, 255, 255, 0.3);
    border-radius: 10px;
    padding: 1.5rem;
}

.info-section h3 {
    color: #00ffff;
    font-family: 'Orbitron', monospace;
    margin-bottom: 1rem;
    text-align: center;
}

.info-section ul {
    list-style: none;
}

.info-section li {
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    color: #cccccc;
}

.info-section li:last-child {
    border-bottom: none;
}

/* Footer */
.game-footer {
    text-align: center;
    padding: 1rem;
    color: #666666;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Screen Management */
.screen {
    display: none;
    min-height: 100vh;
    position: relative;
}

.screen.active {
    display: block;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    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(0, 255, 255, 0.1), rgba(255, 0, 128, 0.1));
    border: 2px solid rgba(0, 255, 255, 0.5);
    border-radius: 15px;
    padding: 2rem;
    text-align: center;
    max-width: 400px;
    width: 90%;
}

.modal-content h3 {
    color: #ff0080;
    font-family: 'Orbitron', monospace;
    margin-bottom: 1rem;
}

.modal-content p {
    color: #cccccc;
    margin-bottom: 1.5rem;
}

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

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

.mb-1 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 2rem; }
.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }

/* Responsive Design */
@media (max-width: 768px) {
    .neon-text {
        font-size: 2rem;
    }
    
    .subtitle {
        font-size: 1.2rem;
    }
    
    .menu-container {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .menu-card {
        padding: 1.5rem;
    }
    
    .neon-button {
        padding: 0.8rem 1.5rem;
        font-size: 0.9rem;
    }
    
    .game-header {
        padding: 1.5rem 1rem;
    }
    
    .main-menu {
        padding: 1rem;
    }
}

@media (max-width: 480px) {
    .neon-text {
        font-size: 1.5rem;
    }
    
    .subtitle {
        font-size: 1rem;
    }
    
    .game-description {
        font-size: 1rem;
    }
    
    .menu-card {
        padding: 1rem;
    }
    
    .card-title {
        font-size: 1.2rem;
    }
    
    .neon-button {
        padding: 0.7rem 1.2rem;
        font-size: 0.8rem;
    }
}

/* Animation for loading states */
@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

.pulse {
    animation: pulse 2s ease-in-out infinite;
}

/* Glow effects */
.glow {
    box-shadow: 
        0 0 10px currentColor,
        0 0 20px currentColor,
        0 0 40px currentColor;
}

/* Back link styles */
.back-link {
    margin-top: 2rem;
    text-align: center;
}

.back-btn {
    color: #00ffff;
    text-decoration: none;
    font-family: 'Orbitron', monospace;
    transition: all 0.3s ease;
}

.back-btn:hover {
    color: #ffffff;
    text-shadow: 0 0 10px #00ffff;
}