/* ==========================================================================
   1. BASE RESET & GENERAL STYLES
   ========================================================================== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background-color: #0b0e14;
    color: #e2e8f0;
    min-height: 100vh;
}

/* App Container Layout */
.app-container {
    display: grid;
    grid-template-areas:
        "header header"
        "sidebar content";
    grid-template-columns: 240px 1fr;
    grid-template-rows: auto 1fr;
    min-height: 100vh;
}

/* ==========================================================================
   2. NAVBAR & HEADER
   ========================================================================== */
.navbar {
    grid-area: header;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #121824;
    padding: 12px 24px;
    border-bottom: 2px solid #1e293b;
    position: sticky;
    top: 0;
    z-index: 80;
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-img {
    height: 36px;
    width: auto;
}

.company-name {
    font-weight: 800;
    font-size: 1.15rem;
    letter-spacing: 1.5px;
    color: #38bdf8;
    text-transform: uppercase;
}

.burger-btn {
    display: none;
    background: transparent;
    border: none;
    color: #ffffff;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 4px 8px;
}

/* Auth Header */
.login-form {
    display: flex;
    align-items: center;
    gap: 12px;
}

.input-group {
    display: flex;
    gap: 8px;
}

.input-group input {
    background-color: #0b0e14;
    border: 1px solid #334155;
    color: #ffffff;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.85rem;
    outline: none;
    transition: border-color 0.2s ease;
}

.input-group input:focus {
    border-color: #38bdf8;
}

.auth-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.btn-login {
    background-color: #0284c7;
    color: #ffffff;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 700;
    font-size: 0.85rem;
    transition: background-color 0.2s ease;
}

.btn-login:hover {
    background-color: #0369a1;
}

.register-link {
    color: #38bdf8;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
}

.register-link:hover {
    text-decoration: underline;
}

/* ==========================================================================
   3. SIDEBAR NAVIGATION
   ========================================================================== */
.sidebar {
    grid-area: sidebar;
    background-color: #0f172a;
    padding: 24px 16px;
    border-right: 1px solid #1e293b;
}

.sidebar-title {
    font-size: 0.75rem;
    font-weight: 700;
    color: #64748b;
    margin-bottom: 16px;
    letter-spacing: 1.5px;
    padding-left: 12px;
}

.tab-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.tab-item {
    background: transparent;
    border: 1px solid transparent;
    color: #94a3b8;
    text-align: left;
    padding: 12px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
    transition: all 0.2s ease;
}

.tab-item:hover {
    background-color: #1e293b;
    color: #f8fafc;
}

.tab-item.active {
    background-color: #1e293b;
    color: #38bdf8;
    border-color: #0284c7;
}

/* Overlay for Mobile */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(4px);
    z-index: 90;
}

.sidebar-overlay.active {
    display: block;
}

/* ==========================================================================
   4. CONTENT WINDOW & TAB PANELS
   ========================================================================== */
.content-window {
    grid-area: content;
    padding: 32px;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.tab-content h2 {
    font-size: 1.5rem;
    letter-spacing: 1px;
    color: #f8fafc;
    margin-bottom: 24px;
}

/* ==========================================================================
   5. GAME CARDS & GRID AESTHETICS
   ========================================================================== */
.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}

.game-card {
    display: flex;
    flex-direction: column;
    background-color: #1e293b;
    border: 1px solid #334155;
    border-radius: 12px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

/* Active Game Card Hover Effects */
.game-card.active-game:hover {
    transform: translateY(-4px);
    border-color: #38bdf8;
    box-shadow: 0 10px 25px -5px rgba(56, 189, 248, 0.25);
}

.game-image {
    position: relative;
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    text-align: center;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    overflow: hidden;
}

/* Void Empire Wallpaper (Clear with subtle gradient to keep text readable) */
.void-empire-bg {
    background-image: 
        linear-gradient(180deg, rgba(15, 23, 42, 0.3) 0%, rgba(15, 23, 42, 0.75) 100%),
        url('void_empire_card.jpeg'); /* Replace with your actual image path */
}

/* Feudal Force Wallpaper (Greyed out, desaturated, and darkened) */
.feudal-force-bg {
    background-image: 
        linear-gradient(180deg, rgba(15, 23, 42, 0.7) 0%, rgba(15, 23, 42, 0.9) 100%),
        url('feudal_force_card.jpeg'); /* Replace with your actual image path */
    filter: grayscale(100%) contrast(90%);
}

/* Text readability over clear images */
.card-art h3 {
    font-size: 1.5rem;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: 1.5px;
    margin-bottom: 6px;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
}

.card-art .sub-tag {
    display: inline-block;
    background-color: rgba(2, 132, 199, 0.85);
    color: #ffffff;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 4px;
    letter-spacing: 1px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
}

.game-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(15, 23, 42, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.25s ease;
}

.game-card:hover .game-overlay {
    opacity: 1;
}

.btn-play {
    background: linear-gradient(90deg, #0284c7 0%, #2563eb 100%);
    color: #ffffff;
    padding: 10px 24px;
    border-radius: 20px;
    font-weight: 800;
    font-size: 0.85rem;
    letter-spacing: 1px;
    box-shadow: 0 4px 14px rgba(2, 132, 199, 0.4);
}

.game-caption {
    padding: 14px 16px;
    font-size: 0.85rem;
    color: #94a3b8;
    background-color: #121824;
    text-align: center;
}

/* Locked Card Overlay styling */
.game-card.locked-game {
    border-style: dashed;
    border-color: #334155;
    opacity: 0.85;
}

.locked-overlay {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    z-index: 2;
}

.locked-overlay h3 {
    font-size: 1.1rem;
    color: #94a3b8;
    letter-spacing: 2px;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.9);
}

.lock-icon {
    font-size: 2rem;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.8));
}
.badge {
    background-color: #334155;
    color: #94a3b8;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 12px;
    letter-spacing: 1px;
}

/* ==========================================================================
   6. PLACEHOLDERS & SUPPORT TAB
   ========================================================================== */
.coming-soon-box {
    background-color: #121824;
    border: 1px dashed #334155;
    border-radius: 12px;
    padding: 60px 20px;
    text-align: center;
}

.coming-soon-box h2 {
    margin-bottom: 0;
    color: #64748b;
}

.support-box {
    background-color: #121824;
    border: 1px solid #1e293b;
    border-radius: 12px;
    padding: 32px;
    max-width: 650px;
}

.support-box p {
    color: #94a3b8;
    margin-bottom: 24px;
    line-height: 1.5;
}

.contact-card {
    background-color: #1e293b;
    border-left: 4px solid #0284c7;
    border-radius: 8px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.contact-card span {
    font-size: 0.9rem;
    color: #cbd5e1;
}

.support-email {
    color: #38bdf8;
    font-size: 1.1rem;
    font-weight: 700;
    text-decoration: none;
    word-break: break-all;
}

.support-email:hover {
    text-decoration: underline;
}

/* ==========================================================================
   7. RESPONSIVE BREAKPOINT (< 768px)
   ========================================================================== */
@media (max-width: 768px) {
    .app-container {
        grid-template-areas:
            "header"
            "content";
        grid-template-columns: 1fr;
    }

    .burger-btn {
        display: block;
    }

    .navbar {
        flex-direction: column;
        align-items: stretch;
        gap: 16px;
        padding: 16px;
    }

    .logo-area {
        justify-content: flex-start;
    }

    .login-form {
        flex-direction: column;
        align-items: stretch;
    }

    .input-group {
        flex-direction: column;
    }

    .auth-actions {
        justify-content: space-between;
    }

    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        height: 100vh;
        width: 260px;
        z-index: 100;
        transform: translateX(-100%);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: 8px 0 24px rgba(0, 0, 0, 0.6);
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .content-window {
        padding: 20px 16px;
    }
}