:root {
    --cream: #F5F0E1;
    --cream-light: #FAF7EE;
    --cream-dark: #E8E0C8;
    --red: #D42027;
    --red-dark: #B71C1C;
    --red-light: #FF5252;
    --green: #4CAF50;
    --green-dark: #388E3C;
    --text-dark: #2D2D2D;
    --text-muted: #6B6555;
    --shadow-soft: 0 4px 20px rgba(0,0,0,0.08);
    --shadow-card: 0 8px 32px rgba(0,0,0,0.1);
    --shadow-hover: 0 12px 40px rgba(0,0,0,0.16);
    --radius: 20px;
}

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

body {
    font-family: 'Rubik', sans-serif;
    background-color: var(--cream);
    color: var(--text-dark);
    min-height: 100vh;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    top: -50%;
    right: -30%;
    width: 80vw;
    height: 80vw;
    background: radial-gradient(circle, rgba(212,32,39,0.04) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
}

body::after {
    content: '';
    position: fixed;
    bottom: -40%;
    left: -20%;
    width: 60vw;
    height: 60vw;
    background: radial-gradient(circle, rgba(76,175,80,0.04) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
}

/* ===================== */
/* Skip Link             */
/* ===================== */
.skip-link {
    position: absolute;
    top: -100%;
    right: 0;
    background: var(--red);
    color: white;
    padding: 8px 16px;
    z-index: 200;
    font-weight: 600;
    border-radius: 0 0 8px 8px;
    transition: top 0.2s;
    text-decoration: none;
}
.skip-link:focus {
    top: 0;
}

/* ===================== */
/* Header                */
/* ===================== */
.header {
    background: var(--cream-light);
    border-bottom: 1px solid var(--cream-dark);
    padding: 12px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
}

.header-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.header-logo-link {
    display: flex;
    align-items: center;
}

.header-logo-link img {
    height: 44px;
    width: auto;
    transition: opacity 0.2s;
}

.header-logo-link:hover img {
    opacity: 0.8;
}

.header-site-name {
    font-family: 'Secular One', sans-serif;
    font-size: 1.3rem;
    color: var(--red);
    text-decoration: none;
    transition: opacity 0.2s;
}

.header-site-name:hover {
    opacity: 0.7;
}

.header-nav {
    display: flex;
    align-items: center;
    gap: 20px;
}

.header-nav a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.2s;
}

.header-nav a:hover {
    color: var(--red);
}

.header-nav a.active {
    color: var(--red);
    font-weight: 600;
}

/* Focus styles */
.header-nav a:focus-visible,
.header-site-name:focus-visible,
.header-logo-link:focus-visible {
    outline: 2px solid var(--red);
    outline-offset: 3px;
    border-radius: 4px;
}

.footer-links a:focus-visible,
.footer a:focus-visible,
.page-content a:focus-visible {
    outline: 2px solid var(--red);
    outline-offset: 2px;
    border-radius: 2px;
}

/* ===================== */
/* Ad Banners            */
/* ===================== */
.ad-banner {
    position: relative;
    z-index: 1;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
}

.ad-banner-inner {
    min-height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.ad-banner-top {
    margin-top: 20px;
}

.ad-banner-bottom {
    margin-bottom: 20px;
}

/* ===================== */
/* Footer                */
/* ===================== */
.footer {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 40px 24px;
    border-top: 1px solid var(--cream-dark);
    margin-top: 20px;
}

.footer-logo {
    height: 50px;
    width: auto;
    margin-bottom: 12px;
    opacity: 0.7;
}

.footer p {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.8;
}

.footer a {
    color: var(--red);
    text-decoration: none;
    font-weight: 500;
}

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

.footer-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 12px;
    flex-wrap: wrap;
}

.footer-links a {
    color: var(--text-muted);
    font-size: 0.82rem;
}

/* ===================== */
/* Sub-Page Content      */
/* ===================== */
.page-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    margin: 0 auto;
    padding: 50px 24px 60px;
}

.page-hero {
    text-align: center;
    margin-bottom: 40px;
    animation: fadeUp 0.5s ease-out;
}

.page-hero-icon {
    width: 72px;
    height: 72px;
    margin: 0 auto 20px;
    background: white;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-soft);
    font-size: 2rem;
}

.page-hero h1 {
    font-family: 'Secular One', sans-serif;
    font-size: 2.2rem;
    color: var(--text-dark);
    margin-bottom: 10px;
}

.page-hero p {
    font-size: 1.1rem;
    color: var(--text-muted);
    max-width: 500px;
    margin: 0 auto;
    line-height: 1.7;
}

.content-card {
    background: white;
    border-radius: var(--radius);
    padding: 32px;
    margin-bottom: 24px;
    box-shadow: var(--shadow-soft);
    animation: fadeUp 0.5s ease-out both;
}

.content-card:nth-child(2) { animation-delay: 0.1s; }
.content-card:nth-child(3) { animation-delay: 0.2s; }
.content-card:nth-child(4) { animation-delay: 0.3s; }
.content-card:nth-child(5) { animation-delay: 0.4s; }
.content-card:nth-child(6) { animation-delay: 0.5s; }

.content-card h2 {
    font-family: 'Secular One', sans-serif;
    font-size: 1.25rem;
    color: var(--red);
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.content-card h2 .section-icon {
    width: 32px;
    height: 32px;
    background: #FDE8E8;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
}

.content-card p {
    font-size: 1rem;
    line-height: 1.8;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.content-card p:last-child {
    margin-bottom: 0;
}

.content-card ul {
    padding-right: 24px;
    margin-bottom: 12px;
}

.content-card li {
    font-size: 1rem;
    line-height: 1.8;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.content-card a {
    color: var(--red);
    text-decoration: none;
    font-weight: 500;
}

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

/* Game list in about page */
.game-list-item {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 16px;
}

.game-list-item:last-child {
    margin-bottom: 0;
}

.game-list-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
    margin-top: 2px;
}

.game-list-item p {
    margin-bottom: 0;
}

.game-list-item strong {
    color: var(--text-dark);
}

/* Contact box */
.contact-box {
    text-align: center;
    margin: 24px 0 8px;
}

.contact-box .email-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: var(--red);
    color: white;
    padding: 16px 32px;
    border-radius: 14px;
    font-weight: 700;
    font-size: 1.1rem;
    text-decoration: none;
    transition: all 0.25s;
    direction: ltr;
    box-shadow: 0 4px 14px rgba(212, 32, 39, 0.25);
}

.contact-box .email-btn:hover {
    background: var(--red-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(212, 32, 39, 0.35);
    text-decoration: none;
}

/* Last updated badge */
.last-updated {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--cream-light);
    border: 1px solid var(--cream-dark);
    border-radius: 50px;
    padding: 6px 14px;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 8px;
}

/* Legacy page-content styles (fallback) */
.page-content h1 {
    font-family: 'Secular One', sans-serif;
    font-size: 2rem;
    color: var(--text-dark);
    margin-bottom: 24px;
    text-align: center;
}

.page-content h2 {
    font-family: 'Secular One', sans-serif;
    font-size: 1.3rem;
    color: var(--red);
    margin-top: 32px;
    margin-bottom: 12px;
}

.page-content p {
    font-size: 1rem;
    line-height: 1.8;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.page-content ul {
    padding-right: 24px;
    margin-bottom: 16px;
}

.page-content li {
    font-size: 1rem;
    line-height: 1.8;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.page-content a {
    color: var(--red);
    text-decoration: none;
    font-weight: 500;
}

.page-content a:hover {
    text-decoration: underline;
}

/* Legacy contact-info (keep for compat) */
.contact-info {
    background: white;
    border-radius: var(--radius);
    padding: 32px;
    box-shadow: var(--shadow-soft);
    text-align: center;
    margin-top: 24px;
}

.contact-info .email-link {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--red);
    direction: ltr;
    display: inline-block;
}

/* ===================== */
/* Accessibility Widget  */
/* ===================== */
.a11y-fab {
    position: fixed;
    bottom: 24px;
    left: 24px;
    z-index: 150;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
}

.a11y-fab-btn {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: var(--text-dark);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(0,0,0,0.2);
    transition: all 0.25s;
}

.a11y-fab-btn:hover {
    background: var(--red);
    transform: scale(1.08);
}

.a11y-fab-btn:focus-visible {
    outline: 3px solid var(--red);
    outline-offset: 3px;
}

.a11y-fab-btn svg {
    width: 26px;
    height: 26px;
}

.a11y-panel {
    display: none;
    background: white;
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.15);
    min-width: 220px;
    animation: fadeUp 0.25s ease-out;
}

.a11y-panel.open {
    display: block;
}

.a11y-panel h3 {
    font-family: 'Secular One', sans-serif;
    font-size: 1rem;
    color: var(--text-dark);
    margin-bottom: 14px;
    text-align: center;
}

.a11y-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid var(--cream-dark);
    font-size: 0.9rem;
    color: var(--text-muted);
}

.a11y-option:last-child {
    border-bottom: none;
}

.a11y-option button {
    background: var(--cream);
    border: 1px solid var(--cream-dark);
    border-radius: 8px;
    padding: 6px 12px;
    cursor: pointer;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-dark);
    font-family: 'Rubik', sans-serif;
    transition: all 0.2s;
}

.a11y-option button:hover {
    background: var(--red);
    color: white;
    border-color: var(--red);
}

.a11y-option button.active {
    background: var(--red);
    color: white;
    border-color: var(--red);
}

.a11y-reset {
    display: block;
    width: 100%;
    margin-top: 12px;
    padding: 10px;
    background: var(--cream);
    border: 1px solid var(--cream-dark);
    border-radius: 10px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    font-family: 'Rubik', sans-serif;
    transition: all 0.2s;
    text-align: center;
}

.a11y-reset:hover {
    background: var(--cream-dark);
}

/* A11y states */
body.a11y-large-text {
    font-size: 120%;
}

body.a11y-high-contrast {
    --cream: #ffffff;
    --cream-light: #ffffff;
    --cream-dark: #cccccc;
    --text-muted: #333333;
    --text-dark: #000000;
}

body.a11y-high-contrast .header {
    background: #ffffff;
    border-bottom-color: #000;
}

body.a11y-high-contrast .content-card,
body.a11y-high-contrast .a11y-panel {
    border: 2px solid #000;
}

body.a11y-links-underline a {
    text-decoration: underline !important;
}

body.a11y-no-animations *,
body.a11y-no-animations *::before,
body.a11y-no-animations *::after {
    animation: none !important;
    transition: none !important;
}

/* ===================== */
/* Responsive            */
/* ===================== */
@media (max-width: 640px) {
    .header-nav {
        gap: 12px;
    }
    .header-nav a {
        font-size: 0.8rem;
    }
    .header-right {
        gap: 10px;
    }
    .header-site-name {
        font-size: 1.1rem;
    }
    .page-content h1,
    .page-hero h1 {
        font-size: 1.6rem;
    }
    .content-card {
        padding: 24px 20px;
    }
    .a11y-fab {
        bottom: 16px;
        left: 16px;
    }
    .a11y-fab-btn {
        width: 46px;
        height: 46px;
    }
    .a11y-panel {
        min-width: 200px;
    }
}

@media (prefers-reduced-motion: reduce) {
    * {
        animation: none !important;
        transition: none !important;
    }
}

/* ===================== */
/* Entrance animation    */
/* ===================== */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
