:root {
  --bg: #0b1220;
  --panel: #111827;
  --panel-2: #0f172a;
  --text: #e5e7eb;
  --muted: #94a3b8;
  --line: #334155;
  --accent: #38bdf8;
  --good: #22c55e;
  --warn: #f59e0b;
  --bad: #ef4444;
}

* {
  box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
    min-height: 100%;
    line-height: 1.6;
    font-family: Arial, sans-serif, Segoe UI, Helvetica;
    background: linear-gradient(180deg, #020617 0%, #0b1220 100%);
    color: var(--text);
}

body {
  display: flex;
  flex-direction: column;
}

main {
    max-width: 900px;
    margin: 0 auto;
    padding: 24px;
}

.content-wrap {
  margin: 0 auto;
  max-width: 1240px;
  padding: 0 1rem;
  width: 100%;
}

.site-header {
  background: rgba(2, 6, 23, 0.92);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(10px);
}

.nav-row {
  align-items: center;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  min-height: 4.25rem;
}

.brand-block {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.brand-link {
  color: white;
  font-size: 1.15rem;
  font-weight: 700;
  text-decoration: none;
}

.brand-tag {
  color: var(--muted);
  font-size: 0.88rem;
}

.page-body {
  flex: 1;
  padding-bottom: 3rem;
  padding-top: 1.4rem;
}

.site-footer {
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.9rem;
  padding: 1rem 0 1.4rem 0;
}

h1,
h2,
h3 {
  margin-top: 0;
}

.page-lead {
  color: #cbd5e1;
  font-size: 1.05rem;
  margin-bottom: 1rem;
  max-width: 70rem;
}

.note-box {
  background: rgba(15, 23, 42, 0.92);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1rem 1.1rem;
}

.plain-list {
  line-height: 1.7;
}

.boot-screen {
  align-items: center;
  background: radial-gradient(circle at 50% 30%, #14213d 0%, #0f172a 55%, #020617 100%);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.4);
  color: #dbeafe;
  display: flex;
  font-size: 1.2rem;
  font-weight: 700;
  justify-content: center;
  margin-bottom: 1rem;
  min-height: 7rem;
  padding: 1rem;
}

.boot-screen-error {
  color: #fecaca;
}

.wasm-hidden {
  display: none;
}

@media (max-width: 820px) {
  .nav-row {
    align-items: flex-start;
    flex-direction: column;
    padding-bottom: 0.85rem;
    padding-top: 0.85rem;
  }
}


.action-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 18px;
}

.action-button {
    display: inline-block;
    padding: 11px 16px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 700;
    line-height: 1.2;
    border: 1px solid transparent;
}

.action-button-primary {
    background: var(--green);
    color: #052e1b;
    border-color: var(--green-dark);
}

.action-button-primary:hover {
    background: #34d399;
}

.action-button-secondary {
    background: var(--blue);
    color: white;
    border-color: var(--blue-dark);
}

.action-button-secondary:hover {
    background: #60a5fa;
    color: #0b1220;
}

.main-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.main-nav a {
    color: #cbd5e1;
    text-decoration: none;
}

.main-nav a:hover {
    color: white;
}


section {
    margin-top: 28px;
    padding-top: 4px;
    border-top: 1px solid #d0d7de;
}

.section-details {
    margin: 0;
}

.section-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    list-style: none;
    cursor: pointer;
    user-select: none;
    padding: 0;
}

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

.section-title {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.2;
    flex: 1 1 auto;
}

.section-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 0 0 auto;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.section-summary:hover .toggle-button {
    background: #1d4ed8;
    border-color: #1e40af;
}

.section-summary:focus {
    outline: 2px solid #93c5fd;
    outline-offset: 2px;
}

.toggle-hide {
    display: none;
}

.section-details[open] > .section-summary .toggle-show {
    display: none;
}

.section-details[open] > .section-summary .toggle-hide {
    display: inline;
}

.section-content {
    margin-top: 14px;
}

    .section-content p:first-child,
    .section-content details:first-child {
        margin-top: 0;
    }

#game-goals .section-content > details {
    margin-top: 14px;
}

    #game-goals .section-content > details > summary {
        cursor: pointer;
        font-weight: 600;
    }

@@media (max-width: 820px) {
    .section-summary {
        align-items: flex-start;
        flex-direction: column;
    }

    .section-actions {
        width: 100%;
        justify-content: flex-start;
    }
}

.show-game-button {
    display: inline-block;
    padding: 6px 10px;
    border: 1px solid #047857;
    border-radius: 6px;
    background: #059669;
    color: #ffffff;
    font-weight: 600;
    font-size: 0.9rem;
    line-height: 1.2;
    text-decoration: none;
    white-space: nowrap;
}

    .show-game-button:hover {
        background: #047857;
        border-color: #065f46;
    }

    .show-game-button:focus {
        outline: 2px solid #6ee7b7;
        outline-offset: 2px;
    }

.toggle-button {
    display: inline-block;
    padding: 6px 10px;
    border: 1px solid #1d4ed8;
    border-radius: 6px;
    background: #2563eb;
    color: #ffffff;
    font-weight: 600;
    font-size: 0.9rem;
    line-height: 1.2;
    white-space: nowrap;
}

.about-image-right {
    float: right;
    width: 320px;
    max-width: 45%;
    margin: 0 0 1rem 1.5rem;
}

.about-image-right img {
    display: block;
    width: 100%;
    height: auto;
    border: 1px solid #666;
    border-radius: 6px;
}

.about-image-right figcaption {
    margin-top: 0.4rem;
    font-size: 0.9rem;
    color: #ccc;
    line-height: 1.3;
}