/* Midnight Studio Theme */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600;800&display=swap');

:root {
    --bg-color: #0d1117;
    --card-bg: rgba(22, 27, 34, 0.7);
    --accent-color: #58a6ff;
    --accent-glow: rgba(88, 166, 255, 0.3);
    --text-primary: #f0f6fc;
    --text-secondary: #8b949e;
    --border-color: #30363d;
    --card-hover-border: #8b949e;
    --font-main: 'Inter', system-ui, -apple-system, sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: var(--font-main);
    margin: 0;
    padding: 0;
    line-height: 1.6;
    overflow-x: hidden;
}

/* Background Gradient Effect */
body::before {
    content: '';
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at center, #1f293a 0%, var(--bg-color) 70%);
    z-index: -1;
    pointer-events: none;
}

/* Typography */
h1,
h2,
h3 {
    margin: 0;
    font-weight: 800;
    letter-spacing: -0.03em;
}

h1 {
    font-size: 3.5rem;
    background: linear-gradient(120deg, #fff, var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

a {
    color: var(--accent-color);
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    color: #fff;
}

/* Layout */
.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 2rem;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 6rem 1rem;
    animation: fadeInDown 1s ease-out;
}

.hero p {
    font-size: 1.25rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 1rem auto 0;
}

/* Grid System */
.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
    padding-bottom: 4rem;
}

/* Cards (Glassmorphism) */
.game-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 2.5rem;
    backdrop-filter: blur(10px);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1),
        box-shadow 0.3s ease,
        border-color 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.game-card:hover {
    transform: translateY(-8px);
    border-color: var(--card-hover-border);
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.5),
        0 0 20px var(--accent-glow);
}

.game-logo {
    width: 100px;
    height: 100px;
    border-radius: 22px;
    margin-bottom: 1.5rem;
    object-fit: cover;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease;
}

.game-card:hover .game-logo {
    transform: scale(1.05);
}

.game-card h2 {
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
    color: #fff;
}

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

/* Buttons */
.nav-buttons {
    display: flex;
    gap: 1rem;
    width: 100%;
    justify-content: center;
}

.btn {
    padding: 0.75rem 1.25rem;
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    transition: all 0.2s;
}

.btn:hover {
    background: var(--accent-color);
    border-color: var(--accent-color);
    color: #000;
    transform: translateY(-2px);
}

.btn-secondary {
    background: transparent;
    border-color: transparent;
    color: var(--text-secondary);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 2rem;
}

.btn-secondary:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

/* Footer */
footer {
    text-align: center;
    margin-top: auto;
    padding: 2rem 0;
    border-top: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 0.85rem;
}

/* Animations */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsiveness */
@media (max-width: 768px) {
    h1 {
        font-size: 2.5rem;
    }

    .hero {
        padding: 4rem 1rem;
    }

    .game-card {
        padding: 2rem;
    }

    .nav-buttons {
        flex-direction: row;
        /* Keep buttons inline on mobile for cleaner look if space allows, or column if detailed */
        flex-wrap: wrap;
    }
}