:root {
    --bg-dark: #0b0b0f;
    --bg-panel: #12121a;
    --bg-card: #1a1a26;
    --accent-purple: #7b2cbf;
    --accent-glow: #9d4edd;
    --text-light: #f3f4f6;
    --text-gray: #9ca3af;
    --border-color: #2a2a3a;
}

* { 
    box-sizing: border-box; 
    margin: 0; 
    padding: 0; 
    scroll-behavior: smooth; 
    font-family: 'Poppins', sans-serif;
}

body { 
    background-color: var(--bg-dark); 
    color: var(--text-light); 
    line-height: 1.6; 
    display: flex; 
    flex-direction: column; 
    min-height: 100vh; 
}

/* Header & Navigation Styles */
header { 
    background-color: rgba(18, 18, 26, 0.95); 
    border-bottom: 1px solid var(--border-color); 
    position: fixed; 
    top: 0; 
    width: 100%; 
    z-index: 1000; 
    backdrop-filter: blur(10px); 
}

.nav-container { 
    max-width: 1200px; 
    margin: 0 auto; 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    padding: 1rem 2rem; 
}

.logo { 
    font-size: 1.4rem; 
    font-weight: 700; 
    color: var(--text-light); 
    text-decoration: none; 
    text-transform: uppercase; 
}

nav ul { 
    display: flex; 
    list-style: none; 
    gap: 1.5rem; 
    align-items: center; 
}

nav a { 
    color: var(--text-gray); 
    text-decoration: none; 
    font-size: 0.95rem; 
    font-weight: 600; 
}

nav a:hover, nav a.active { 
    color: var(--accent-glow); 
}

/* Dropdown Menu Styles */
.dropdown { 
    position: relative; 
}

.dropdown-content {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: var(--bg-panel);
    min-width: 180px;
    box-shadow: 0px 8px 16px rgba(0,0,0,0.4);
    z-index: 1000;
    list-style: none;
    padding: 0.5rem 0;
    border: 1px solid var(--border-color);
    border-radius: 6px;
}

.dropdown-content li a { 
    padding: 0.5rem 1rem; 
    display: block; 
    color: var(--text-gray); 
}

.dropdown-content li a:hover { 
    background-color: var(--bg-card); 
    color: var(--accent-glow); 
}

.dropdown:hover .dropdown-content { 
    display: block; 
}

/* Hero Section */
.hero { 
    padding: 10rem 2rem 6rem; 
    text-align: center; 
    background: radial-gradient(circle at top, #240046 0%, var(--bg-dark) 70%); 
    border-bottom: 1px solid var(--border-color); 
}

.hero h1 { 
    font-size: 3.5rem; 
    margin-bottom: 1rem; 
}

/* Main Content Containers & Grids */
.container { 
    max-width: 1100px; 
    margin: 0 auto; 
    padding: 5rem 2rem 2rem; 
    flex: 1; 
}

section { 
    margin-bottom: 3rem; 
}

.games-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); 
    gap: 2rem; 
}

.game-card { 
    background-color: var(--bg-card); 
    border: 1px solid var(--border-color); 
    border-radius: 12px; 
    padding: 2rem; 
    display: flex; 
    flex-direction: column; 
    justify-content: space-between; 
}

.game-card img { 
    width: 100%; 
    height: 220px; 
    object-fit: cover; 
    border-radius: 10px; 
    margin-bottom: 1.5rem; 
    border: 1px solid var(--border-color); 
}

.game-card h3 { 
    margin-bottom: 1rem; 
}

.game-card h3 a { 
    color: var(--accent-glow); 
    text-decoration: none; 
}

.game-card h3 a:hover { 
    text-decoration: underline; 
}

.game-card p { 
    margin-bottom: 1rem; 
    color: var(--text-gray); 
    font-size: 0.95rem; 
}

/* Buttons */
.button-group { 
    display: flex; 
    gap: 10px; 
    margin-top: 1.5rem; 
}

.btn { 
    flex: 1; 
    text-align: center; 
    padding: 0.6rem 1rem; 
    border-radius: 6px; 
    text-decoration: none; 
    font-weight: bold; 
    font-size: 0.9rem; 
}

.play-btn { 
    background: var(--accent-purple); 
    color: white; 
}

.play-btn:hover { 
    background: var(--accent-glow); 
}

.view-btn { 
    background-color: var(--border-color); 
    color: var(--text-light); 
}

.view-btn:hover { 
    background-color: var(--accent-purple); 
}

/* Forms & Cards (Login, Register, Dashboard) */
.card { 
    background-color: var(--bg-card); 
    border: 1px solid var(--border-color); 
    width: 100%; 
    max-width: 440px; 
    padding: 2.5rem; 
    border-radius: 12px; 
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5); 
    margin: 6rem auto 2rem; 
}

.card h2 { 
    color: var(--text-light); 
    margin-bottom: 0.5rem; 
    text-align: center; 
}

.card p.subtitle { 
    color: var(--text-gray); 
    font-size: 0.9rem; 
    margin-bottom: 2rem; 
    text-align: center; 
}

.form-group { 
    margin-bottom: 1.25rem; 
}

label { 
    display: block; 
    font-size: 13px; 
    font-weight: 600; 
    margin-bottom: 8px; 
    color: var(--text-gray); 
}

input[type="text"],
input[type="email"],
input[type="password"],
select,
textarea { 
    width: 100%; 
    padding: 0.75rem; 
    background-color: var(--bg-dark); 
    border: 1px solid var(--border-color); 
    border-radius: 6px; 
    color: var(--text-light); 
    font-size: 0.95rem; 
}

input:focus, select:focus, textarea:focus { 
    outline: none; 
    border-color: var(--accent-glow); 
}

.btn-submit { 
    width: 100%; 
    padding: 0.75rem; 
    background-color: var(--accent-purple); 
    color: white; 
    border: none; 
    border-radius: 6px; 
    font-size: 1rem; 
    font-weight: 700; 
    cursor: pointer; 
    transition: background-color 0.2s; 
    margin-top: 0.5rem; 
}

.btn-submit:hover { 
    background-color: var(--accent-glow); 
}

.redirect-text { 
    text-align: center; 
    margin-top: 1.5rem; 
    font-size: 0.9rem; 
    color: var(--text-gray); 
}

.redirect-text a { 
    color: var(--accent-glow); 
    text-decoration: none; 
}

.redirect-text a:hover { 
    text-decoration: underline; 
}

/* Footer */
footer { 
    text-align: center; 
    padding: 2rem; 
    font-size: 12px; 
    color: var(--text-gray); 
    border-top: 1px solid var(--border-color); 
    background-color: var(--bg-panel); 
}

footer a { 
    color: var(--text-gray); 
    text-decoration: none; 
}

footer a:hover { 
    color: var(--accent-glow); 
}

/* Responsive Header Adjustments for Mobile */
@media (max-width: 768px) {
    .nav-container {
        flex-direction: column;
        padding: 0.75rem 1rem;
        gap: 0.5rem;
    }

    nav ul {
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.75rem 1rem;
    }

    nav a {
        font-size: 0.85rem;
        margin-left: 0;
    }

    /* Adjust main content top padding so it doesn't hide under a taller stacked header */
    .hero {
        padding-top: 12rem;
    }
    
    .main-content {
        padding-top: 10rem;
    }
}

