:root {
    /* Neon Green Palette */
    --neon-green: #39ff14;          
    --neon-glow: rgba(57, 255, 20, 0.6);
    --neon-border: rgba(57, 255, 20, 0.3);
    
    /* Pure Black Backgrounds */
    --bg-black: #000000;            
    --bg-dark: #050505;             
    --surface-dark: #0a0a0a;        
    
    /* Text & Accents */
    --text-main: #ffffff;           
    --text-muted: #888888;          
}

/* Global Reset */
body {
    font-family: 'Segoe UI', system-ui, sans-serif;
    margin: 0;
    background-color: var(--bg-dark);
    color: var(--text-main);
    display: flex;
    height: 100vh;
    width: 100vw;
    overflow: hidden;
}

/* --- Sidebar (Kept exactly as you liked) --- */
.sidebar {
    width: 240px;
    background-color: var(--bg-black);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    border-right: 2px solid var(--neon-green);
    box-shadow: 5px 0 15px rgba(57, 255, 20, 0.2);
    z-index: 20;
}

.logo-area {
    padding: 30px 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-bottom: 1px solid var(--neon-border);
}

.sidebar-logo {
    width: 90%;
    max-width: 190px;
    height: auto;
    filter: drop-shadow(0 0 8px var(--neon-glow));
}

.nav-links { flex: 1; padding: 20px 0; overflow-y: auto; }
.nav-item {
    display: block;
    padding: 15px 25px;
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 600;
    transition: 0.3s;
}
.nav-item:hover, .nav-item.active {
    color: var(--neon-green);
    background: rgba(57, 255, 20, 0.05);
    text-shadow: 0 0 8px var(--neon-glow);
    border-left: 4px solid var(--neon-green);
}

/* --- Main Content Area (Fixed for Grid) --- */
.main-content {
    flex: 1;
    overflow-y: auto;
    padding: 40px;
    /* Removed align-items: center to prevent breaking the grid */
}

/* --- Hero Card (Center Logo Fixed) --- */
.hero-card {
    background: var(--bg-black);
    border-radius: 28px;
    padding: 60px 40px;
    text-align: center;
    border: 2px solid var(--neon-green);
    box-shadow: 0 0 40px rgba(57, 255, 20, 0.15); 
    width: 90%;
    max-width: 850px;
    margin: 0 auto 50px auto; /* Centers the card without breaking the page */
}

.hero-logo {
    width: 320px; /* Large center logo */
    height: auto;
    filter: drop-shadow(0 0 25px var(--neon-glow));
    margin-bottom: 20px;
}

.page-title {
    color: var(--neon-green);
    text-shadow: 0 0 20px var(--neon-glow);
    font-size: 3rem;
    text-align: center;
    margin-bottom: 30px;
}

/* --- THE FIX: Game Grid & Search Styling --- */
.search-container {
    width: 100%;
    max-width: 1000px; 
    margin: 0 auto 40px auto;
    position: sticky;
    top: -40px; /* Sticks to top of scroll */
    background: var(--bg-dark);
    padding: 20px 0;
    z-index: 10;
}

#gameSearch {
    width: 100%;
    padding: 18px 25px;
    border-radius: 12px;
    border: 1px solid var(--neon-border);
    font-size: 1.1rem;
    background-color: var(--surface-dark);
    color: white;
    outline: none;
    box-sizing: border-box; /* Prevents input from overflowing */
}

#gameSearch:focus {
    border-color: var(--neon-green);
    box-shadow: 0 0 15px var(--neon-glow);
}

.letter-section {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto 40px auto;
}

.letter-header {
    font-size: 1.8rem;
    color: var(--neon-green);
    border-bottom: 2px solid var(--neon-border);
    margin-bottom: 20px;
    padding-bottom: 5px;
}

.buttons-container {
    display: grid;
    /* This ensures buttons stay in a grid and don't stack in one column */
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    width: 100%;
}

.game-btn {
    background: var(--surface-dark);
    border: 1px solid var(--neon-border);
    padding: 20px;
    border-radius: 12px;
    color: var(--text-main);
    font-weight: 600;
    text-decoration: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: 0.3s;
}

.game-btn:hover {
    transform: translateY(-3px);
    border-color: var(--neon-green);
    background: var(--bg-black);
    box-shadow: 0 0 15px var(--neon-glow);
}

/* --- Buttons & Auth --- */
.hero-buttons { display: flex; gap: 20px; justify-content: center; }

.btn-primary {
    background: var(--neon-green);
    color: #000;
    padding: 14px 30px;
    border-radius: 10px;
    font-weight: 800;
    text-decoration: none;
    border: none;
    cursor: pointer;
}

.auth-container {
    margin-top: auto;
    padding: 20px;
    border-top: 1px solid var(--neon-border);
}
