/* ==========================================================================
   1. CORE SETUP & RESET
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #0d0e12;
    color: #f7fafc;
    padding-top: 80px;
}

/* ==========================================================================
   2. HEADER & NAVIGATION
   ========================================================================== */
header {
    background-color: #0f0f14;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 25px;
    position: fixed;
    top: 0; 
    width: 100%; 
    z-index: 100;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.back-btn {
    color: #00adb5;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: transform 0.2s ease;
}

.back-btn:hover { 
    transform: translateX(-3px); 
}

.logo {
    font-size: 1.3rem;
    font-weight: 800;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

.logo span { 
    color: #00adb5; 
    font-weight: 400; 
}

/* ==========================================================================
   3. MAIN LAYOUT & DIRECTORY HERO
   ========================================================================== */
main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

.directory-hero {
    text-align: center;
    margin-bottom: 50px;
}

.directory-hero h1 { 
    font-size: 2.5rem; 
    margin-bottom: 12px; 
}

.directory-hero p { 
    color: #a0aec0; 
    max-width: 600px; 
    margin: 0 auto; 
    line-height: 1.6; 
}

/* ==========================================================================
   4. DYNAMIC GAME CARDS GRID
   ========================================================================== */
.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 30px;
}

.game-card {
    background: linear-gradient(145deg, #16171e, #1f212a);
    border: 1px solid #2d3748;
    border-radius: 14px;
    overflow: hidden;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    
    /* Fallback default colors if style properties are missing in HTML */
    --game-theme: #00adb5;
    --game-theme-glow: rgba(0, 173, 181, 0.4);
    --game-gradient-start: #0f0f14;
    
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), 
                box-shadow 0.3s ease, 
                border-color 0.3s ease;
}

.game-card:hover {
    transform: translateY(-6px);
    border-color: var(--game-theme);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2), 0 0 25px var(--game-theme-glow);
}

.game-thumbnail {
    height: 180px;
    background: linear-gradient(135deg, var(--game-gradient-start) 0%, var(--game-theme) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.4rem;
    letter-spacing: 1px;
    border-bottom: 1px solid #2d3748;
}

.game-info {
    padding: 25px;
    position: relative;
    flex-grow: 1;
}

.game-info h3 { 
    margin-bottom: 8px; 
    font-size: 1.25rem; 
}

.game-info p { 
    color: #a0aec0; 
    font-size: 0.92rem; 
    line-height: 1.5; 
    margin-bottom: 20px; 
}

/* ==========================================================================
   5. STATUS BADGES
   ========================================================================== */
.status-badge {
    position: absolute;
    bottom: 20px; 
    right: 25px;
    font-size: 0.75rem;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.5px;
    padding: 4px 12px;
    border-radius: 12px;
}

.status-badge.online { 
    background: rgba(255, 255, 255, 0.03); 
    border: 1px solid var(--game-theme);
    color: var(--game-theme); 
}

.status-badge.offline { 
    background: rgba(255, 255, 255, 0.05); 
    color: #718096; 
    border: 1px solid transparent;
}

/* ==========================================================================
   6. LOCKED / WORK IN PROGRESS STATE
   ========================================================================== */
.game-card.locked { 
    opacity: 0.6; 
    cursor: not-allowed; 
}

.game-card.locked:hover { 
    transform: none; 
    box-shadow: none; 
    border-color: #2d3748; 
}
