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

body {
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    font-family: 'Arial', sans-serif;
    color: #ffffff;
}

.page-shell {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    backdrop-filter: blur(6px);
}

.site-header {
    background: rgba(10, 16, 36, 0.55);
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    padding: 20px 32px;
}

.header-inner {
    max-width: 1080px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.header-inner a {
    color: #f8fafc;
    text-decoration: none;
}

.brand {
    font-weight: 700;
    letter-spacing: 0.12em;
    font-size: 18px;
    text-transform: uppercase;
}

.site-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 12px;
    letter-spacing: 0.24em;
    text-transform: uppercase;
    color: rgba(226, 232, 240, 0.75);
}

.site-nav a {
    color: inherit;
    transition: opacity 0.2s ease;
}

.site-nav a:hover {
    opacity: 0.65;
}

.site-main {
    flex: 1;
    max-width: 1080px;
    width: 100%;
    margin: 0 auto;
    padding: 32px 24px 48px;
    display: flex;
    flex-direction: column;
    gap: 48px;
}

.game-hero {
    display: grid;
    gap: 32px;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    align-items: center;
}

.hero-copy {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.eyebrow {
    font-size: 12px;
    letter-spacing: 0.4em;
    text-transform: uppercase;
    color: rgba(148, 197, 255, 0.85);
}

.hero-copy h1 {
    font-size: clamp(32px, 4vw, 48px);
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.lead {
    font-size: 15px;
    line-height: 1.8;
    color: rgba(241, 245, 249, 0.9);
}

.quick-meta {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 12px;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: rgba(226, 232, 240, 0.75);
}

.game-frame {
    display: flex;
    justify-content: center;
    align-items: center;
}

.game-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    background: rgba(15, 23, 42, 0.55);
    border-radius: 24px;
    box-shadow: 0 24px 48px rgba(15, 23, 42, 0.35);
}

#gameCanvas {
    border: 4px solid #ffffff;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.35);
    background: #000000;
    image-rendering: pixelated;
    image-rendering: crisp-edges;
}

.content-section {
    background: rgba(15, 23, 42, 0.55);
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 28px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.28);
}

.content-section h2 {
    font-size: 20px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.content-section h3 {
    font-size: 16px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.content-section ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 14px;
    line-height: 1.6;
}

.split {
    display: grid;
    gap: 24px;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.note {
    font-size: 13px;
    color: rgba(226, 232, 240, 0.75);
    line-height: 1.5;
}

.stat-list {
    display: grid;
    gap: 16px;
}

.stat-list div {
    background: rgba(30, 41, 59, 0.6);
    border-radius: 16px;
    padding: 16px;
}

.stat-list dt {
    font-size: 13px;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: rgba(148, 197, 255, 0.9);
    margin-bottom: 8px;
}

.stat-list dd {
    font-size: 14px;
    line-height: 1.7;
    color: rgba(241, 245, 249, 0.92);
}

.boss-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    line-height: 1.6;
}

.boss-table th,
.boss-table td {
    border: 1px solid rgba(255, 255, 255, 0.12);
    padding: 12px 16px;
    background: rgba(30, 41, 59, 0.55);
}

.boss-table th {
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 12px;
    color: rgba(148, 197, 255, 0.9);
}

.update-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
    font-size: 14px;
    line-height: 1.6;
}

.update-list time {
    display: block;
    font-size: 12px;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: rgba(148, 197, 255, 0.8);
}

#faq details {
    background: rgba(30, 41, 59, 0.65);
    border-radius: 16px;
    padding: 16px 20px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

#faq summary {
    cursor: pointer;
    font-weight: 600;
    letter-spacing: 0.08em;
}

#faq p {
    margin-top: 12px;
    font-size: 14px;
    line-height: 1.7;
}

.site-footer {
    margin-top: auto;
    padding: 24px;
    text-align: center;
    background: rgba(10, 16, 36, 0.6);
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    font-size: 12px;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: rgba(226, 232, 240, 0.75);
}

.site-footer a {
    color: #f8fafc;
    text-decoration: underline;
}

@media (min-width: 769px) {
    .content-section.collapsible-section > details {
        pointer-events: none;
    }

    .content-section.collapsible-section > details > summary {
        cursor: default;
        list-style: none;
    }

    .content-section.collapsible-section > details > summary::-webkit-details-marker {
        display: none;
    }

    .collapsible-content {
        display: flex;
        flex-direction: column;
        gap: 20px;
    }
}

/* Mobile controls shell */
.floating-controls {
    display: none;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 100;
    padding: clamp(12px, 4vw, 24px);
    gap: clamp(16px, 4vw, 48px);
    transition: transform 0.2s ease;
}

.floating-controls.visible {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    background: linear-gradient(180deg, rgba(2, 6, 23, 0), rgba(2, 6, 23, 0.92));
    backdrop-filter: blur(16px);
}

.floating-dpad {
    pointer-events: all;
    flex-shrink: 0;
}

.joystick-container {
    --joystick-size: 184px;
    --joystick-padding: 22px;
    --joystick-thumb-size: 74px;
    position: relative;
    width: var(--joystick-size);
    height: var(--joystick-size);
    border-radius: 50%;
    padding: var(--joystick-padding);
    background: rgba(24, 33, 58, 0.58);
    box-shadow: 0 12px 34px rgba(15, 23, 42, 0.55), inset 0 0 0 2px rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(14px);
    touch-action: none;
}

.joystick-base {
    position: absolute;
    inset: var(--joystick-padding);
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, rgba(56, 189, 248, 0.35), rgba(15, 23, 42, 0.75));
    box-shadow: inset 0 6px 14px rgba(3, 7, 18, 0.7);
    pointer-events: none;
}

.joystick-ring {
    position: absolute;
    inset: 10px;
    border-radius: 50%;
    border: 2px solid rgba(148, 197, 255, 0.25);
    box-shadow: inset 0 0 24px rgba(96, 165, 250, 0.35);
}

.joystick-arrows {
    position: absolute;
    inset: var(--joystick-padding);
    pointer-events: none;
}

.joystick-arrow {
    position: absolute;
    font-size: 20px;
    color: rgba(226, 232, 240, 0.65);
    text-shadow: 0 1px 2px rgba(15, 23, 42, 0.9);
    font-weight: 700;
}

.arrow-up {
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
}

.arrow-right {
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
}

.arrow-down {
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
}

.arrow-left {
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
}

.joystick-thumb {
    --joystick-thumb-x: 0px;
    --joystick-thumb-y: 0px;
    position: absolute;
    top: 50%;
    left: 50%;
    width: var(--joystick-thumb-size);
    height: var(--joystick-thumb-size);
    border-radius: 50%;
    transform: translate(calc(-50% + var(--joystick-thumb-x)), calc(-50% + var(--joystick-thumb-y)));
    background: radial-gradient(circle, rgba(255, 255, 255, 0.76) 0%, rgba(191, 219, 254, 0.4) 58%, rgba(37, 99, 235, 0.4) 100%);
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.55), inset 0 2px 0 rgba(255, 255, 255, 0.35);
    transition: transform 0.08s ease-out, box-shadow 0.12s ease-out;
    pointer-events: none;
    opacity: 0.95;
}

.joystick-container.is-active .joystick-thumb {
    box-shadow: 0 0 0 10px rgba(56, 189, 248, 0.18), inset 0 2px 0 rgba(255, 255, 255, 0.35);
}

.joystick-container.is-active .joystick-ring {
    border-color: rgba(148, 197, 255, 0.45);
    box-shadow: inset 0 0 30px rgba(96, 165, 250, 0.45);
}

.floating-actions {
    display: flex;
    flex-direction: column;
    gap: 14px;
    pointer-events: all;
    align-items: stretch;
    flex-shrink: 0;
}

.action-btn {
    min-width: 110px;
    min-height: 56px;
    padding: 12px 24px;
    border-radius: 18px;
    font-weight: 800;
    letter-spacing: 0.08em;
    font-size: 14px;
    color: rgba(15, 23, 42, 0.95);
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid rgba(255, 255, 255, 0.6);
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.4), inset 0 0 0 2px rgba(255, 255, 255, 0.25);
    touch-action: none;
    user-select: none;
    transition: transform 0.1s ease, box-shadow 0.1s ease;
}

.action-btn.is-active,
.action-btn:active {
    transform: scale(0.94);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.35);
}

/* Mobile header message */
.mobile-only-message {
    display: none;
    text-align: center;
    padding: 8px 16px;
    background: rgba(15, 23, 42, 0.4);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.mobile-only-message p {
    margin: 0;
    font-size: 13px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
}

.mobile-only-message small {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.5);
}

@media (max-width: 768px) {
    body {
        padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 240px);
    }

    .mobile-only-message {
        display: block;
    }

    .site-header {
        padding: 12px 16px;
    }

    .header-inner {
        gap: 8px;
    }

    .brand {
        font-size: 14px;
    }

    .site-nav {
        font-size: 10px;
        gap: 8px;
        letter-spacing: 0.2em;
    }

    .site-main {
        padding: 16px 16px clamp(220px, 32vh, 280px);
        gap: 28px;
    }

    .game-hero {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .game-frame {
        order: 1;
    }

    .hero-copy {
        order: 2;
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .quick-meta {
        align-items: center;
        text-align: center;
    }

    .game-container {
        width: 100%;
        max-width: 420px;
        padding: 12px;
        margin: 0 auto;
    }

    #gameCanvas {
        width: 100%;
        height: auto;
        max-width: 420px;
    }

    .content-section {
        padding: 18px;
        gap: 16px;
    }

    .content-section.collapsible-section {
        margin: 12px 0;
    }

    .content-section.collapsible-section > details {
        background: rgba(15, 23, 42, 0.6);
        border: 1px solid rgba(148, 163, 184, 0.22);
        border-radius: 20px;
        overflow: hidden;
    }

    .content-section.collapsible-section > details + details {
        margin-top: 12px;
    }

    .content-section.collapsible-section summary {
        padding: 16px;
        cursor: pointer;
        list-style: none;
        display: flex;
        align-items: center;
    }

    .content-section.collapsible-section summary::-webkit-details-marker {
        display: none;
    }

    .content-section.collapsible-section summary h2 {
        flex: 1;
        font-size: 14px;
        margin: 0;
    }

    .content-section.collapsible-section summary::after {
        content: '▼';
        font-size: 11px;
        margin-left: 10px;
        transition: transform 0.25s ease;
    }

    .content-section.collapsible-section details[open] summary::after {
        transform: rotate(180deg);
    }

    .collapsible-content {
        padding: 0 16px 16px;
        display: flex;
        flex-direction: column;
        gap: 16px;
    }

    .split {
        gap: 16px;
    }

    .site-footer {
        padding: 18px 16px calc(env(safe-area-inset-bottom, 0px) + 32px);
    }

    .floating-controls.visible {
        padding: 12px clamp(16px, 5vw, 32px) calc(env(safe-area-inset-bottom, 0px) + 16px);
    }

    .joystick-container {
        --joystick-size: clamp(150px, 45vw, 200px);
        --joystick-thumb-size: clamp(56px, 18vw, 72px);
    }

    .action-btn {
        min-width: 96px;
        min-height: 52px;
        font-size: 13px;
    }
}
