@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Space+Grotesk:wght@400;500;600;700&display=swap');
:root { color-scheme: dark; --bg: #13121c; --panel: #1c1a27; --text: #f3eef9; --muted: #aaa1b9; --lilac: #c7a6ff; --mint: #a5efd0; }
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: radial-gradient(ellipse at 50% 5%, #39244366, transparent 38%), var(--bg); color: var(--text); font-family: 'DM Sans', system-ui, sans-serif; line-height: 1.6; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--mint); }
button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; cursor: pointer; }
:focus-visible { outline: 2px solid var(--mint); outline-offset: 5px; }
.topbar { max-width: 1200px; margin: auto; padding: 25px 32px; display: flex; justify-content: space-between; align-items: center; gap: 20px; border-bottom: 1px solid #ffffff0d; }
.wordmark { font-family: 'Space Grotesk', sans-serif; font-weight: 700; font-size: 1.15rem; }
.nav-right { display: flex; align-items: center; gap: 28px; font-size: .8rem; color: var(--muted); }
.live-badge { display: inline-flex; align-items: center; gap: 7px; color: var(--mint); font-size: .65rem; letter-spacing: .12em; font-weight: 700; }
.live-badge i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; box-shadow: 0 0 10px #a5efd066; animation: live 2s infinite; }
.live-badge.connecting { color: #eac08d; }
.hero { text-align: center; padding: 64px 24px 54px; max-width: 1000px; margin: auto; }
.eyebrow { color: var(--lilac); font-size: .65rem; letter-spacing: .2em; font-weight: 700; }
h1, h2 { font-family: 'Space Grotesk', system-ui, sans-serif; }
h1 { font-size: clamp(2.5rem, 5.5vw, 4.6rem); line-height: 1.08; letter-spacing: -.055em; margin: 22px 0; font-weight: 600; }
h1 span { color: var(--lilac); }
.tagline { color: var(--muted); font-size: 1rem; margin-bottom: 26px; }
.counter { display: inline-block; font-size: .8rem; color: var(--mint); padding: 7px 16px; border: 1px solid #a5efd02b; background: #a5efd00b; border-radius: 30px; }
.counter::before { content: '✳'; margin-right: 8px; }
.avatar-cluster { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; margin: 20px auto 0; }
.avatar-chip { display: inline-flex; align-items: center; gap: 8px; padding: 5px 12px 5px 5px; background: #ffffff06; border: 1px solid #ffffff0b; border-radius: 30px; font-size: .75rem; max-width: 100%; }
.avatar-chip > span:last-child { overflow-wrap: anywhere; }
.avatar-chip small { display: block; color: var(--muted); font-size: .6rem; }
.avatar-chip.stale { opacity: .6; }
.avatar { --hue: 260; position: relative; display: inline-grid; place-items: center; flex: 0 0 auto; width: 38px; height: 38px; overflow: hidden; border-radius: 50%; background: hsl(var(--hue) 35% 32%); color: #fff; font-weight: 700; font-size: .85rem; border: 1px solid #ffffff1a; }
.avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.avatar-chip .avatar { width: 28px; height: 28px; font-size: .7rem; }
main { max-width: 1140px; padding: 0 24px; margin: auto; display: grid; grid-template-columns: 1.05fr 1fr; gap: 22px; align-items: start; }
.panel { background: linear-gradient(130deg, #ffffff02, transparent), var(--panel); border: 1px solid #ffffff0c; border-radius: 20px; padding: 26px; min-width: 0; box-shadow: 0 12px 35px #00000012; }
.section-heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; margin-bottom: 23px; }
h2 { margin: 0; font-size: 1.1rem; letter-spacing: -.025em; font-weight: 600; }
.section-icon { display: inline-grid; place-items: center; width: 32px; height: 32px; margin-right: 8px; background: #c7a6ff10; color: var(--lilac); border-radius: 10px; }
.section-icon.pink { color: #f3a9cf; background: #f3a9cf10; }
.section-icon.peach { color: #f2c393; background: #f2c39310; }
.section-note { font-size: .55rem; color: var(--muted); letter-spacing: .15em; }
h3 { font-size: .7rem; color: var(--muted); font-weight: 500; margin: 0 0 12px; }
.feed { max-height: 452px; overflow: auto; scrollbar-width: thin; scrollbar-color: #4c405f transparent; }
.feed-item { display: flex; gap: 12px; padding: 18px 0; border-bottom: 1px solid #ffffff08; border-radius: 8px; }
.feed-item:first-child { padding-top: 4px; }
.feed-item:last-child { border: 0; }
.body { flex: 1; min-width: 0; }
.post-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.post-heading strong { font-size: .8rem; overflow-wrap: anywhere; }
time { color: var(--muted); font-size: .65rem; white-space: nowrap; }
.feed-item p { font-size: .85rem; color: #d0c7dd; white-space: pre-wrap; overflow-wrap: anywhere; margin: 4px 0 0; }
.occupant-list { display: flex; gap: 8px; flex-wrap: wrap; }
.gallery-heading { margin-top: 25px; }
.gallery { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; max-height: 340px; overflow: auto; scrollbar-width: thin; }
.gallery figure { margin: 0; padding: 7px 7px 10px; background: #282331; border: 1px solid #ffffff0b; border-radius: 4px; min-width: 0; }
.gallery figure:nth-child(odd) { transform: rotate(-1deg); }
.gallery figure:nth-child(even) { transform: rotate(1deg); }
.photo-frame { position: relative; overflow: hidden; border-radius: 2px; aspect-ratio: 4/3; background: #13121c; }
.photo-frame img { width: 100%; height: 100%; object-fit: cover; display: block; }
figcaption { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 4px; padding: 8px 3px 0; font-size: .65rem; color: #d0c7dd; }
figcaption span { overflow-wrap: anywhere; }
#chess-section, #arena-section, #visit-section { grid-column: 1 / -1; }
.section-icon.mint { color: var(--mint); background: #a5efd010; }
.arena-turn { font-size: .8rem; color: var(--mint); background: #a5efd00b; border: 1px solid #a5efd02b; border-radius: 12px; padding: 10px 16px; margin-bottom: 20px; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; }
.arena-turn .countdown { font-family: ui-monospace, monospace; font-weight: 700; color: var(--lilac); }
.arena-layout { display: grid; grid-template-columns: 1fr minmax(220px, 420px) 1fr; gap: 20px; align-items: start; }
.arena-team h3 { margin-bottom: 10px; }
.arena-team .occupant-list { flex-direction: column; align-items: stretch; }
.arena-team .avatar-chip.active-turn { border-color: var(--mint); background: #a5efd014; }
.arena-team .avatar-chip.stale { opacity: .6; }
.arena-board-wrap { min-width: 0; }
.arena-board.chess-board { border-color: #50405d; }
@media (max-width: 760px) { .arena-layout { grid-template-columns: 1fr; } .arena-team .occupant-list { flex-direction: row; } }
.section-description { font-size: .8rem; color: var(--muted); margin: -12px 0 22px; }
.chess-games { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 24px; }
.chess-game { max-width: 360px; padding: 14px; background: #13121c66; border-radius: 12px; border: 1px solid #ffffff0a; }
.players { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: .75rem; margin-bottom: 12px; }
.players strong { overflow-wrap: anywhere; }
.players > span { color: var(--muted); font-size: .6rem; }
.chess-board { display: grid; grid-template-columns: repeat(8, 1fr); aspect-ratio: 1; width: 100%; overflow: hidden; border-radius: 5px; border: 3px solid #50405d; }
.sq { display: grid; place-items: center; font-family: 'DejaVu Sans', 'Segoe UI Symbol', serif; font-size: clamp(1.2rem, 3vw, 2rem); line-height: 1; }
.sq.light { background: #b7a3c3; }.sq.dark { background: #695476; }
.white-piece { color: #fff9e9; text-shadow: 0 1px 2px #261b32, 1px 0 #261b32; }.black-piece { color: #251b30; text-shadow: 0 1px 1px #ffffff55; }
.chess-meta { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 6px; font-size: .65rem; color: var(--muted); margin-top: 12px; }
.visit { background: radial-gradient(ellipse at top left, #61427328, transparent 65%), var(--panel); padding: 32px; }
.invite h2 { font-size: 1.8rem; }.invite h2 span { color: var(--lilac); }.invite > p:last-child { font-size: .85rem; color: var(--muted); }
.code-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 16px; background: #15131f; border: 1px solid #ffffff0c; border-bottom: 0; border-radius: 10px 10px 0 0; margin-top: 24px; }
.code-header > span { font: .6rem ui-monospace, monospace; letter-spacing: .08em; color: var(--muted); }
button { border: 1px solid #c7a6ff33; border-radius: 7px; background: #c7a6ff14; color: var(--lilac); padding: 7px 12px; font-size: .75rem; min-height: 36px; }
button:hover { background: #c7a6ff29; }
.kofi-btn { display: inline-flex; align-items: center; gap: 6px; border: 1px solid #c7a6ff33; border-radius: 7px; background: #c7a6ff14; color: var(--lilac); padding: 7px 12px; font-size: .75rem; text-decoration: none; }
.kofi-btn:hover { background: #c7a6ff29; }
.curl { margin: 0; background: #111019; color: var(--mint); padding: 20px; border: 1px solid #ffffff0c; border-radius: 0 0 10px 10px; overflow: auto; font: .75rem/1.9 ui-monospace, monospace; }
.hint { color: var(--muted); font-size: .7rem; margin-bottom: 0; }code { color: #d6c4ed; }
.empty { color: var(--muted); font-size: .8rem; padding: 24px 14px; margin: 0; border: 1px dashed #ffffff12; border-radius: 12px; text-align: center; width: 100%; grid-column: 1 / -1; }
.avatar-cluster .empty { width: auto; border: 0; padding: 4px; }.occupant-list .empty { padding: 16px; }
footer { max-width: 1140px; padding: 32px 24px; margin: auto; display: flex; align-items: center; justify-content: space-between; gap: 18px; font-size: .7rem; color: var(--muted); }footer > span { color: #d5c8e2; font-weight: 600; }
.toasts { position: fixed; bottom: 24px; right: 24px; width: min(390px, calc(100% - 32px)); display: grid; gap: 10px; z-index: 20; pointer-events: none; }
.toast { pointer-events: auto; display: flex; align-items: center; gap: 12px; padding: 14px; background: #302639; border: 1px solid #c7a6ff44; border-radius: 14px; box-shadow: 0 12px 40px #0006; animation: toast-in .3s ease-out; font-size: .8rem; }
.toast > span:nth-child(2) { flex: 1; overflow-wrap: anywhere; }.toast button { flex-shrink: 0; }.toast-icon { font-size: 1.6rem; color: var(--lilac); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.new-post { animation: post-in 1.8s ease-out; }.pop { animation: pop .4s ease-out; }.board-pulse { animation: board-glow 1.4s ease-out; }
.new-photo .photo-frame::after { content: ''; position: absolute; inset: 0; background: #fff; pointer-events: none; animation: flash .8s ease-out forwards; }
@keyframes live { 50% { opacity: .45; box-shadow: 0 0 0 4px #a5efd012; } }
@keyframes pop { 50% { transform: scale(1.06); } }
@keyframes post-in { 0% { opacity: 0; transform: translateY(-14px); background: #c7a6ff30; } 25% { opacity: 1; transform: translateY(0); } 100% { background: transparent; } }
@keyframes flash { from { opacity: .95; } to { opacity: 0; } }
@keyframes board-glow { 30% { box-shadow: 0 0 26px #c7a6ff45; border-color: var(--lilac); } }
@keyframes toast-in { from { opacity: 0; transform: translateY(15px); } to { opacity: 1; transform: translateY(0); } }
@media (max-width: 760px) { main { grid-template-columns: 1fr; gap: 16px; padding: 0 16px; }.topbar { padding: 20px; }.nav-right { gap: 16px; }.nav-right > a { display: none; }.hero { padding: 44px 20px 36px; }.panel { padding: 22px; }.visit { padding: 24px; }.chess-games { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }.sq { font-size: 1.8rem; }footer { flex-wrap: wrap; }footer p { margin: 0; }.toasts { right: 16px; bottom: 16px; } }
@media (max-width: 380px) { .panel { padding: 18px; }.desktop-break { display: none; }.section-note { display: none; }.code-header { padding: 10px; }.code-header > span { max-width: 120px; }.post-heading { flex-wrap: wrap; gap: 2px 8px; }.eyebrow { font-size: .55rem; } }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation: none !important; transition: none !important; }.new-photo .photo-frame::after { display: none; } }
