:root {
    /* Nuova Palette "Ethereal Glass" */
    --bg-dark: #0A0A0A;      /* Deep Space Black */
    --bg-panel: #12122E;     /* Void Blue */
    
    --accent-primary: #00E0E0; /* Softer Cyan (was #00FFFF) */
    --accent-subtle: #80E0E0;  /* New Subtle Cyan */
    --accent-secondary: #9933FF; /* Violets remain deep but distinct */
    --accent-error: #FF5555;   /* Softer Red/Orange */
    
    --text-main: #FFFFFF;    /* Pure White for maximum readability */
    --text-muted: #B0B0B0;   /* Light Grey instead of Dark Grey */
    
    /* Glassmorphism Evoluto - LIGHTER */
    --glass-bg: rgba(255, 255, 255, 0.03); /* Much more transparent, slight white tint */
    --glass-border: rgba(255, 255, 255, 0.1); /* Subtle white border */
    --glass-blur: blur(25px); /* Increased blur for "frosted" look */
    
    /* Typography */
    --font-main: 'Inter', 'Montserrat', sans-serif;
    --font-mono: 'Roboto Mono', 'Fira Code', monospace;
    
    /* Effects - SUBTLE */
    --neon-glow: 0 0 15px rgba(0, 224, 224, 0.3); /* Softer glow */
    --neon-text: 0 0 8px rgba(0, 224, 224, 0.2); /* Reduced text bloom */
}

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

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: var(--font-main);
    height: 100vh;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    /* Deep space gradient background fallback - Darker/Subtle */
    background-image: radial-gradient(circle at 50% 120%, #101025 0%, #000 60%);
}

#app {
    width: 100%;
    max-width: 480px;
    height: 100%;
    position: relative;
    padding: 20px;
    display: flex;
    flex-direction: column;
}

/* --- BACKGROUNDS & GEOMETRY --- */
.bg-glow {
    position: fixed;
    top: 50%; left: 50%;
    width: 200%; height: 200%;
    background: radial-gradient(circle at center, rgba(100, 100, 255, 0.08), transparent 60%); /* Very subtle blue/purple wash */
    transform: translate(-50%,-50%);
    z-index: -1;
    pointer-events: none;
    animation: pulseGlow 8s infinite alternate;
}

.bg-grid {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    /* Extremely subtle grid */
    background-image: 
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    z-index: -2;
    mask-image: radial-gradient(circle at center, black 40%, transparent 90%);
    pointer-events: none;
}

/* --- COMPONENTS --- */

/* Glass Card - LIGHTER */
.card {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: 0 4px 30px rgba(0,0,0,0.3); /* Reduced shadow weight */
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.card::before {
    /* Remove heavy top border, replaced with subtle top highlight */
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    opacity: 0.8;
}

/* Text */
h1 {
    font-size: 2.2rem; /* Slightly smaller for elegance */
    font-weight: 700;
    color: var(--text-main);
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 6px;
    text-shadow: 0 0 10px rgba(255,255,255,0.3); /* White glow instead of heavy cyan */
    margin-bottom: 10px;
}

h2 {
    font-size: 0.8rem;
    letter-spacing: 5px;
    color: var(--accent-subtle); /* Use subtle cyan */
    text-align: center;
    margin-bottom: 30px;
    text-transform: uppercase;
    opacity: 0.8;
}

label {
    display: block;
    font-size: 0.7rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--accent-primary);
    margin-bottom: 8px;
    font-weight: 600;
    opacity: 0.9;
}

p, span, div {
    line-height: 1.5;
}

/* Forms */
/* Forms */
input, select, textarea {
    width: 100%;
    background: rgba(255, 255, 255, 0.05); /* Slight white tint instead of black */
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 16px;
    color: var(--text-main); /* White text */
    font-family: var(--font-mono);
    font-size: 1rem;
    margin-bottom: 15px;
    transition: all 0.3s;
}
input::placeholder { color: var(--text-muted); opacity: 0.5; font-family: var(--font-main); }
input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 10px rgba(0, 224, 224, 0.15);
    background: rgba(0, 224, 224, 0.05);
}

/* Buttons */
.btn {
    width: 100%;
    padding: 18px;
    border-radius: 12px;
    border: 1px solid transparent;
    font-family: var(--font-main);
    font-weight: 700;
    font-size: 0.9rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 15px;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.btn-accent {
    background: rgba(0, 224, 224, 0.15); /* Slightly more transparent */
    color: var(--accent-primary);
    border-color: rgba(0, 224, 224, 0.4);
    box-shadow: 0 0 15px rgba(0, 224, 224, 0.1);
}
.btn-accent:hover {
    background: var(--accent-primary);
    color: #000;
    box-shadow: 0 0 25px rgba(0, 224, 224, 0.4);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.02);
    color: var(--text-main);
    border-color: rgba(255,255,255,0.15);
}
.btn-secondary:hover {
    border-color: var(--text-main);
    background: rgba(255,255,255,0.08);
}

.btn-danger {
    background: rgba(255, 85, 85, 0.1);
    color: var(--accent-error);
    border-color: rgba(255, 85, 85, 0.3);
}
.btn-danger:hover {
    background: var(--accent-error);
    color: #fff;
    box-shadow: 0 0 20px rgba(255, 85, 85, 0.4);
}

.btn:active { transform: scale(0.98); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; filter: grayscale(1); }

/* --- GAME ELEMENTS --- */

.player-badge {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    padding: 10px 14px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
    transition: background 0.2s;
}
.player-badge:hover { background: rgba(255, 255, 255, 0.08); }

.avatar {
    width: 36px; height: 36px;
    border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    background: rgba(0, 224, 224, 0.1);
    color: var(--accent-primary);
    font-weight: 700;
    font-family: var(--font-mono);
    border: 1px solid rgba(0, 224, 224, 0.3);
    box-shadow: 0 0 5px rgba(0, 224, 224, 0.1);
}

.slot {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    padding: 15px;
    border-radius: 12px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
    overflow: hidden;
    color: var(--accent-primary);
}
.slot:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: var(--accent-primary);
    box-shadow: inset 0 0 15px rgba(0, 224, 224, 0.1);
}
.slot.selected {
    background: var(--accent-primary);
    color: #000;
    box-shadow: 0 0 20px rgba(0, 224, 224, 0.4);
}

/* --- UTILS --- */
.hidden { display: none !important; }
.view { display: none; flex-direction: column; height: 100%; opacity: 0; transition: opacity 0.3s ease; }
.view.active { display: flex; opacity: 1; }

.logo-hero {
    width: 140px; height: 140px; margin: 0 auto 20px;
    filter: drop-shadow(0 0 10px rgba(0, 255, 255, 0.3));
    animation: pulseLogo 4s infinite ease-in-out;
}

/* Debug */
#debug-badge {
    position: fixed; bottom: 10px; right: 10px;
    color: var(--text-muted); font-size: 8px; font-family: var(--font-mono);
    opacity: 0.3; pointer-events: none;
}

/* Animations */
@keyframes pulseGlow { from { opacity: 0.5; } to { opacity: 0.8; } }
@keyframes pulseLogo { 0% { opacity: 1; transform: scale(1); } 50% { opacity: 0.8; transform: scale(0.98); } 100% { opacity: 1; transform: scale(1); } }
@keyframes glitch {
    0% { transform: translate(0); }
    20% { transform: translate(-2px, 2px); }
    40% { transform: translate(-2px, -2px); }
    60% { transform: translate(2px, 2px); }
    80% { transform: translate(2px, -2px); }
    100% { transform: translate(0); }
}

/* Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: rgba(0,0,0,0.1); }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.2); border-radius: 3px; }
