@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;700;900&family=Exo+2:wght@400;600;800&display=swap');

/* CSS Variables for consistent theming */
:root {
    --primary-gradient: linear-gradient(45deg, #1a1a2e, #16213e, #0f3460);
    --accent-cyan: #00ffff;
    --accent-magenta: #ff0080;
    --accent-purple: #8e44ad;
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --text-light: rgba(255, 255, 255, 0.8);
    --shadow-main: 0 25px 50px rgba(0, 0, 0, 0.5);
    --glow-cyan: 0 0 30px rgba(0, 255, 255, 0.4);
    --glow-magenta: 0 0 20px rgba(255, 0, 128, 0.4);
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.arcade-body {
    font-family: 'Exo 2', sans-serif;
    background: var(--primary-gradient);
    background-size: 400% 400%;
    animation: gradientShift 8s ease infinite;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}

.main-container {
    position: relative;
    z-index: 1;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
}

/* Background Effects */
@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.bg-particles {
    position: absolute;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 0;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: radial-gradient(circle, var(--accent-cyan), transparent);
    border-radius: 50%;
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); opacity: 0; }
    50% { transform: translateY(-20px) rotate(180deg); opacity: 1; }
}

/* Glass Container Base */
.glass-container {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 25px;
    padding: 40px;
    box-shadow: var(--shadow-main);
    position: relative;
    animation: containerGlow 3s ease-in-out infinite alternate;
}

@keyframes containerGlow {
    from { box-shadow: var(--shadow-main), 0 0 0 rgba(0, 255, 255, 0.2); }
    to { box-shadow: var(--shadow-main), var(--glow-cyan); }
}

/* Typography */
.arcade-title {
    font-family: 'Orbitron', monospace;
    font-weight: 900;
    text-align: center;
    background: linear-gradient(45deg, var(--accent-magenta), var(--accent-cyan), var(--accent-magenta));
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: textShine 3s ease-in-out infinite;
    text-shadow: var(--glow-cyan);
}

.arcade-title--large { 
    font-size: 42px; 
}

.arcade-title--medium { 
    font-size: 32px; 
}

.arcade-title--small { 
    font-size: 24px; 
}

@keyframes textShine {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.arcade-subtitle {
    color: var(--text-light);
    font-size: 18px;
    font-weight: 600;
    letter-spacing: 2px;
    text-align: center;
}

/* Buttons and Interactive Elements */
.arcade-btn {
    background: linear-gradient(135deg, rgba(255, 0, 128, 0.2), rgba(0, 255, 255, 0.2));
    border: 2px solid transparent;
    color: white;
    padding: 20px 25px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
    text-decoration: none;
    display: inline-block;
    font-family: inherit;
    font-weight: 600;
}

.arcade-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.6s;
}

.arcade-btn:hover::before {
    left: 100%;
}

.arcade-btn:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 15px 35px rgba(0, 255, 255, 0.3), var(--glow-magenta);
    border: 2px solid rgba(0, 255, 255, 0.5);
}

.arcade-btn--primary {
    background: linear-gradient(135deg, rgba(255, 0, 128, 0.4), rgba(0, 255, 255, 0.4));
    border: 2px solid var(--accent-cyan);
    box-shadow: 0 10px 30px rgba(0, 255, 255, 0.4), inset 0 0 20px rgba(255, 0, 128, 0.2);
    animation: selectedPulse 2s ease-in-out infinite;
}

@keyframes selectedPulse {
    0%, 100% { 
        box-shadow: 0 10px 30px rgba(0, 255, 255, 0.4), inset 0 0 20px rgba(255, 0, 128, 0.2); 
    }
    50% { 
        box-shadow: 0 15px 40px rgba(0, 255, 255, 0.6), inset 0 0 30px rgba(255, 0, 128, 0.4); 
    }
}

/* Magic Ball Icon */
.magic-ball-icon {
    display: inline-block;
    width: 28px;
    height: 28px;
    background: radial-gradient(circle, var(--accent-magenta), var(--accent-purple));
    border-radius: 50%;
    margin-right: 10px;
    box-shadow: var(--glow-magenta);
    animation: ballSpin 3s linear infinite;
    position: relative;
}

.magic-ball-icon::before {
    content: '';
    position: absolute;
    top: 6px;
    left: 8px;
    width: 12px;
    height: 12px;
    background: radial-gradient(circle at 30% 30%, white, transparent);
    border-radius: 50%;
    opacity: 0.7;
}
    
@keyframes ballSpin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Modal Styles */
.arcade-modal {
    position: fixed;
    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: 9999;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.arcade-modal.hidden {
    display: none;
}

.arcade-modal-content {
    background: #ffffff;
    padding: 30px 40px;
    border-radius: 15px;
    text-align: center;
    font-family: 'Exo 2', sans-serif;
    min-width: 250px;
    box-shadow: var(--shadow-main);
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from { transform: scale(0.8); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.arcade-modal-content button {
    margin: 10px;
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    background: var(--accent-cyan);
    color: #000;
    cursor: pointer;
    font-weight: 700;
    transition: all 0.3s ease;
}

.arcade-modal-content button:hover {
    background: #00bfbf;
    transform: translateY(-2px);
}

/* Loader */
.arcade-loader {
    border: 6px solid rgba(0, 0, 0, 0.1);
    border-top: 6px solid var(--accent-cyan);
    border-radius: 50%;
    width: 60px;
    height: 60px;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 768px) {
    .glass-container {
        padding: 30px 20px;
        margin: 10px;
    }

    .arcade-title--large { 
        font-size: 32px; 
    }

    .arcade-title--medium { 
        font-size: 28px; 
    }

    .arcade-title--small { 
        font-size: 20px; 
    }

    .arcade-btn {
        padding: 15px 20px;
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .main-container {
        padding: 10px;
    }

    .glass-container {
        padding: 20px 15px;
    }

    .arcade-title--large { 
        font-size: 28px; 
    }
    
    .arcade-btn {
        padding: 12px 15px;
        font-size: 14px;
    }
}