/* Global & Senior Variables */
:root {
    --bg-color: #F9FAFB;
    --card-bg: #FFFFFF;
    --text-primary: #1F2937;
    --text-secondary: #4B5563;
    --primary-color: #0284C7;
    --primary-hover: #0369A1;
    --border-color: #E5E7EB;
    
    /* Huge typography for elderly */
    --base-font: 1.125rem; /* 18px minimum */
    --h1-size: clamp(2rem, 5vw, 3rem);
    --h2-size: clamp(1.5rem, 3vw, 2rem);
    
    --radius: 16px;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-hover: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* Dark Mode Fallback */
@media (prefers-color-scheme: dark) {
    :root {
        --bg-color: #111827;
        --card-bg: #1F2937;
        --text-primary: #F9FAFB;
        --text-secondary: #D1D5DB;
        --border-color: #374151;
        --primary-color: #38BDF8;
        --primary-hover: #0284C7;
    }
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    font-size: var(--base-font);
    background-color: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Button Extravaganza */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius);
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s ease;
    border: none;
    padding: 0.75rem 1.5rem;
    font-size: 1.125rem;
}

.btn:active {
    transform: scale(0.98);
}

.btn-primary {
    background-color: var(--primary-color);
    color: #FFFFFF;
    box-shadow: 0 2px 10px rgba(2, 132, 199, 0.3);
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    box-shadow: 0 4px 14px rgba(2, 132, 199, 0.4);
}

.btn-outline {
    background-color: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-outline:hover {
    background-color: var(--primary-color);
    color: #FFFFFF;
}

.btn-large {
    padding: 1rem 2.5rem;
    font-size: 1.25rem;
}

.btn-full {
    width: 100%;
}

/* Header */
.header {
    background-color: var(--card-bg);
    border-bottom: 2px solid var(--border-color);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.5rem;
    font-weight: 700;
}

.logo-text {
    color: var(--primary-color);
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 4rem 0 3rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.hero-title {
    font-size: var(--h1-size);
    font-weight: 700;
    color: var(--text-primary);
    max-width: 800px;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    max-width: 700px;
}

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

/* Cards */
.game-card {
    background-color: var(--card-bg);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
}

.game-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
}

.game-image-wrapper {
    width: 100%;
    height: 220px;
    overflow: hidden;
    background-color: #E0F2FE; /* Light blue placeholder background */
}

.game-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.game-content {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    gap: 1rem;
}

.game-title {
    font-size: var(--h2-size);
    font-weight: 700;
    color: var(--text-primary);
}

.game-desc {
    color: var(--text-secondary);
    flex-grow: 1;
}

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

/* Accessibility: Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}
