        * { box-sizing: border-box; }
        html, body {
            margin: 0;
            padding: 0;
            width: 100%;
            min-height: 100%;
            overflow-x: hidden;
            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
            user-select: none;
            transition: background-color 0.4s, color 0.4s;
        }

        body {
            display: flex;
            flex-direction: column;
            align-items: center;
        }

        .page-wrapper {
            display: flex;
            flex-direction: column;
            align-items: center;
            width: 100vw;
            height: 100vh;
            padding: 12px;
            box-sizing: border-box;
            gap: 12px;
        }

        .main-content {
            display: flex;
            width: 100%;
            max-width: 1600px;
            justify-content: center;
            align-items: stretch;
            gap: 16px;
            flex: 1;
            min-height: 0;
        }

        #game-container {
            position: relative;
            flex: 1;
            height: 100%;
            border-radius: 12px;
            overflow: hidden !important;
            box-shadow: 0 10px 25px rgba(0,0,0,0.25);
            display: flex;
            flex-direction: column;
        }

        .ad-space {
            background: rgba(0,0,0,0.04);
            border: 2px dashed #a0a0a0;
            border-radius: 8px;
            display: flex;
            align-items: center;
            justify-content: center;
            color: #666;
            font-size: 13px;
            font-weight: bold;
            text-align: center;
            padding: 5px;
            flex-shrink: 0;
        }

        .ad-top { width: 100%; max-width: 970px; height: 90px; }
        .ad-sidebar { width: 160px; height: 100%; }

        #screen-too-small-msg {
            display: none;
            text-align: center;
            padding: 40px 20px;
            border: 2px dashed #e11d48;
            border-radius: 12px;
            background: rgba(225, 29, 72, 0.05);
            margin: auto;
            max-width: 450px;
        }

        #screen-too-small-msg h2 { margin-top: 0; color: #e11d48; font-size: 20px; }
        #screen-too-small-msg p { margin-bottom: 0; font-size: 14px; opacity: 0.85; }

        @media (max-width: 1024px) {
            .ad-sidebar { display: none !important; }
        }

        @media (max-height: 500px) {
            .ad-top { display: none !important; }
        }

        @media (max-width: 600px) and (max-height: 500px) {
            #game-container { display: none !important; }
            #screen-too-small-msg { display: block !important; }
        }

        body.theme-modern.mode-light { background-color: #f1f5f9; color: #0f172a; }
        body.theme-modern.mode-light #game-container { background-color: #ffffff; border: 2px solid #0284c7; }
        body.theme-modern.mode-light #header { background-color: #f8fafc; color: #0284c7; border-bottom: 2px solid #e2e8f0; }
        body.theme-modern.mode-light .overlay { background: rgba(255, 255, 255, 0.95); }
        body.theme-modern.mode-light button { background: linear-gradient(135deg, #0284c7, #0369a1); color: white; border-radius: 8px; }

        body.theme-modern.mode-dark { background-color: #0f172a; color: #f8fafc; }
        body.theme-modern.mode-dark #game-container { background-color: #1e293b; border: 2px solid #38bdf8; }
        body.theme-modern.mode-dark #header { background-color: #0f172a; color: #38bdf8; border-bottom: 2px solid #334155; }
        body.theme-modern.mode-dark .overlay { background: rgba(15, 23, 42, 0.95); }
        body.theme-modern.mode-dark button { background: linear-gradient(135deg, #38bdf8, #0284c7); color: white; border-radius: 8px; }

        body.theme-classic.mode-light { background-color: #f7f4ed; color: #1a1a1a; font-family: 'Courier New', Courier, monospace; }
        body.theme-classic.mode-light #game-container { background-color: #faf8f5; border: 3px solid #1a1a1a; background-image: radial-gradient(#e0dcd3 1px, transparent 0); background-size: 16px 16px; }
        body.theme-classic.mode-light #header { background-color: #faf8f5; color: #1a1a1a; border-bottom: 3px solid #1a1a1a; }
        body.theme-classic.mode-light .overlay { background: rgba(250, 248, 245, 0.97); color: #1a1a1a; }
        body.theme-classic.mode-light button { background-color: #faf8f5; color: #1a1a1a; border: 2px solid #1a1a1a; border-radius: 0px; box-shadow: 3px 3px 0px #1a1a1a; }
        body.theme-classic.mode-light button:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0px #1a1a1a; }
        body.theme-classic.mode-light .fly-svg { stroke: #1a1a1a; fill: none; }

        body.theme-classic.mode-dark { background-color: #121212; color: #f7f4ed; font-family: 'Courier New', Courier, monospace; }
        body.theme-classic.mode-dark #game-container { background-color: #1e1e1e; border: 3px solid #f7f4ed; background-image: radial-gradient(#333333 1px, transparent 0); background-size: 16px 16px; }
        body.theme-classic.mode-dark #header { background-color: #1e1e1e; color: #f7f4ed; border-bottom: 3px solid #f7f4ed; }
        body.theme-classic.mode-dark .overlay { background: rgba(30, 30, 30, 0.97); color: #f7f4ed; }
        body.theme-classic.mode-dark button { background-color: #1e1e1e; color: #f7f4ed; border: 2px solid #f7f4ed; border-radius: 0px; box-shadow: 3px 3px 0px #f7f4ed; }
        body.theme-classic.mode-dark button:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0px #f7f4ed; }
        body.theme-classic.mode-dark .fly-svg { stroke: #f7f4ed; fill: none; }

        select option { background-color: #ffffff; color: #0f172a; }
        body.theme-modern.mode-dark select option { background-color: #1e293b; color: #f8fafc; }
        body.theme-classic.mode-light select option { background-color: #faf8f5; color: #1a1a1a; }
        body.theme-classic.mode-dark select option { background-color: #1e1e1e; color: #f7f4ed; }

        .switch-row { display: flex; justify-content: space-between; align-items: center; width: 100%; margin-bottom: 4px; }
        .switch-row .title-label { font-weight: bold; font-size: 13px; margin: 0; }
        .switch { position: relative; display: inline-block; width: 58px; height: 28px; }
        .switch input { opacity: 0; width: 0; height: 0; }
        .slider { position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background-color: #cbd5e1; transition: .3s; border-radius: 28px; border: 1px solid rgba(0,0,0,0.2); display: flex; justify-content: space-between; align-items: center; padding: 0 5px; font-size: 11px; }
        .slider .bg-icon-left, .slider .bg-icon-right { display: flex; align-items: center; justify-content: center; width: 18px; height: 18px; opacity: 0.35; pointer-events: none; }
        .knob { position: absolute; height: 22px; width: 22px; left: 3px; bottom: 2px; background-color: #ffffff; transition: transform .3s cubic-bezier(0.175, 0.885, 0.32, 1.275), background-color .3s; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 12px; box-shadow: 0 2px 5px rgba(0,0,0,0.3); z-index: 2; color: #0f172a; }
        input:checked + .slider .knob { transform: translateX(28px); }
        body.mode-dark .slider { background-color: #334155; }
        input:checked + .slider { background-color: #0284c7; }
        #set-mode:checked + .slider .knob { background-color: #0f172a; color: #f8fafc; }
        
        body.theme-classic.mode-light .slider { background-color: #e0dcd3; border-color: #1a1a1a; }
        body.theme-classic.mode-light input:checked + .slider { background-color: #1a1a1a; }
        body.theme-classic.mode-light .knob { background-color: #faf8f5; color: #1a1a1a; border: 1px solid #1a1a1a; }
        
        body.theme-classic.mode-dark .slider { background-color: #2b2b2b; border-color: #f7f4ed; }
        body.theme-classic.mode-dark input:checked + .slider { background-color: #f7f4ed; }
        body.theme-classic.mode-dark .knob { background-color: #1e1e1e; color: #f7f4ed; border: 1px solid #f7f4ed; }

        #header { display: flex; justify-content: space-between; align-items: center; padding: 8px 15px; font-size: 15px; font-weight: bold; z-index: 2; }
        .header-btn { padding: 4px 10px !important; font-size: 13px !important; margin: 0 !important; cursor: pointer; }
        #game-area { position: relative; flex: 1; width: 100%; }
        .fly { position: absolute; width: 50px; height: 50px; cursor: pointer; transition: transform 0.05s; display: flex; align-items: center; justify-content: center; font-size: 42px; }
        .fly:active { transform: scale(0.7); }
        .fly-svg { width: 100%; height: 100%; stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; }

        .overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; display: flex; flex-direction: column; justify-content: center; align-items: center; z-index: 10; padding: 10px; overflow: hidden !important; }
        .settings-group { margin-bottom: 6px; display: flex; flex-direction: column; align-items: center; font-size: 13px; width: 85%; max-width: 320px; }
        .settings-group label { margin-bottom: 2px; font-weight: bold; }
        .range-container { display: flex; align-items: center; width: 100%; gap: 10px; }
        .range-container input[type=range] { flex: 1; cursor: pointer; }
        .range-value { font-weight: bold; min-width: 65px; text-align: right; }
        .settings-group select { padding: 3px; font-size: 13px; border-radius: 4px; border: 1px solid #aaa; width: 100%; text-align: center; background-color: transparent; color: inherit; }

        button { padding: 8px 24px; font-size: 15px; cursor: pointer; border: none; font-weight: bold; margin-top: 4px; }
        #game-over-screen { display: none; }

        .legal-footer { font-size: 11px; margin-top: 8px; opacity: 0.8; }
        .legal-footer a { color: inherit; text-decoration: underline; cursor: pointer; }
        
        #legal-modal-content {
            padding: 20px;
            border-radius: 10px;
            max-width: 550px;
            width: 90%;
            max-height: 80vh;
            overflow-y: auto;
            text-align: left;
            box-shadow: 0 10px 25px rgba(0,0,0,0.5);
            border: 1px solid rgba(150,150,150,0.3);
        }

        .site-content {
            width: 100%;
            max-width: 760px;
            margin: 0 auto;
            padding: 8px 20px 40px;
            box-sizing: border-box;
            line-height: 1.65;
            font-size: 15px;
        }

        .site-content h1 {
            font-size: 26px;
            margin: 30px 0 4px;
        }

        .site-content .tagline {
            font-size: 15px;
            opacity: 0.8;
            margin: 0 0 20px;
        }

        .quick-links {
            display: flex;
            flex-wrap: wrap;
            gap: 6px 14px;
            padding: 12px 0;
            margin-bottom: 20px;
            border-top: 1px solid rgba(128,128,128,0.3);
            border-bottom: 1px solid rgba(128,128,128,0.3);
            font-size: 13px;
        }

        .quick-links a { color: inherit; text-decoration: underline; }

        .site-content section { margin: 32px 0; }
        .site-content h2 { font-size: 19px; margin-bottom: 10px; }
        .site-content h3 { font-size: 16px; margin: 16px 0 6px; }
        .site-content p { margin: 0 0 12px; }
        .site-content ul, .site-content ol { margin: 0 0 12px; padding-left: 22px; }
        .site-content li { margin-bottom: 6px; }

        .faq-item {
            border: 1px solid rgba(128,128,128,0.3);
            border-radius: 8px;
            padding: 10px 14px;
            margin-bottom: 10px;
        }
        .faq-item summary { cursor: pointer; font-weight: bold; }
        .faq-item p { margin: 10px 0 2px; opacity: 0.9; }

        .site-footer {
            width: 100%;
            text-align: center;
            font-size: 12px;
            opacity: 0.75;
            padding: 18px 12px 26px;
        }
        .site-footer a { color: inherit; }
/* ---- Shared site chrome (nav bar + footer) used on every page ---- */
.site-nav {
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 16px 20px;
    box-sizing: border-box;
}
.site-nav .brand {
    font-weight: bold;
    font-size: 17px;
    text-decoration: none;
    color: inherit;
}
.site-nav .brand span { opacity: 0.6; font-weight: normal; }
.site-nav .nav-links { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 14px; }
.site-nav .nav-links a { color: inherit; text-decoration: none; opacity: 0.85; }
.site-nav .nav-links a:hover { text-decoration: underline; opacity: 1; }
.site-nav .nav-links a.play-btn {
    padding: 5px 14px;
    border-radius: 6px;
    font-weight: bold;
    opacity: 1;
}
body.theme-classic.mode-light .site-nav .nav-links a.play-btn,
body.theme-modern.mode-light .site-nav .nav-links a.play-btn { background: #0284c7; color: #fff; }
body.theme-classic.mode-dark .site-nav .nav-links a.play-btn,
body.theme-modern.mode-dark .site-nav .nav-links a.play-btn { background: #38bdf8; color: #0f172a; }

.simple-page { min-height: 100vh; display: flex; flex-direction: column; }

/* Blog index cards */
.blog-list { list-style: none; margin: 0; padding: 0; }
.blog-list li {
    border: 1px solid rgba(128,128,128,0.3);
    border-radius: 10px;
    padding: 16px 18px;
    margin-bottom: 14px;
}
.blog-list a { color: inherit; text-decoration: none; font-size: 18px; font-weight: bold; }
.blog-list a:hover { text-decoration: underline; }
.blog-list .post-date { font-size: 12px; opacity: 0.65; margin: 4px 0 8px; }
.blog-list .post-excerpt { font-size: 14px; opacity: 0.85; margin: 0; }

.post-meta { font-size: 13px; opacity: 0.7; margin: -10px 0 24px; }
