/* Палитра совпадает с игровой: docs/style.md
   молочный — игроки, голубой — модераторы, рубин — админ. */
:root {
    --bg: #101216;
    --panel: #181b21;
    --panel-2: #1e222a;
    --line: #262b34;
    --milk: #f2e7d5;
    --milk-dim: #c9bfae;
    --blue: #7fc7e8;
    --ruby: #e0405f;
    --muted: #9a93a8;
    --dim: #6f7480;
    --good: #8fbf7f;
    --warn: #d9a05b;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--milk-dim);
    font: 16px/1.6 "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap { max-width: 880px; margin: 0 auto; padding: 0 20px; }

/* ── шапка ── */
.hero { padding: 64px 0 40px; text-align: center; }
.hero h1 {
    margin: 0 0 6px;
    font-size: 40px;
    letter-spacing: -0.5px;
    color: var(--milk);
    font-weight: 600;
}
.hero .tagline { margin: 0 0 28px; color: var(--muted); }

.status {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 7px 15px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--panel);
    font-size: 14px;
}
.dot { width: 8px; height: 8px; border-radius: 50%; }
.dot.on  { background: var(--good); box-shadow: 0 0 10px rgba(143, 191, 127, 0.7); }
.dot.off { background: var(--ruby); }

/* ── адрес сервера ── */
.address {
    margin: 26px auto 0;
    max-width: 460px;
    display: flex;
    border: 1px solid var(--line);
    border-radius: 10px;
    overflow: hidden;
    background: var(--panel);
}
.address code {
    flex: 1;
    padding: 14px 16px;
    font-size: 17px;
    color: var(--milk);
    font-family: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
}
.address button {
    border: 0;
    border-left: 1px solid var(--line);
    background: var(--panel-2);
    color: var(--muted);
    padding: 0 18px;
    cursor: pointer;
    font-size: 14px;
    font-family: inherit;
}
.address button:hover { color: var(--milk); background: #242832; }

/* ── кнопки ── */
.actions { margin-top: 22px; display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.btn {
    display: inline-block;
    padding: 11px 22px;
    border-radius: 9px;
    border: 1px solid var(--line);
    background: var(--panel);
    color: var(--milk-dim);
    font-size: 15px;
    transition: border-color 0.15s, color 0.15s;
}
.btn:hover { color: var(--milk); border-color: #39404d; text-decoration: none; }
.btn.primary { background: var(--milk); color: #14161a; border-color: var(--milk); font-weight: 500; }
.btn.primary:hover { background: #fff; color: #14161a; }

/* ── секции ── */
section { padding: 40px 0; border-top: 1px solid var(--line); }
h2 {
    margin: 0 0 6px;
    font-size: 13px;
    letter-spacing: 1.6px;
    text-transform: uppercase;
    color: var(--muted);
    font-weight: 600;
}
.section-note { margin: 0 0 26px; color: var(--dim); font-size: 14px; }

/* ── таймлайн ── */
.timeline { position: relative; padding-left: 26px; }
.timeline::before {
    content: "";
    position: absolute;
    left: 5px; top: 8px; bottom: 8px;
    width: 2px;
    background: var(--line);
}
.ms { position: relative; padding: 0 0 26px; }
.ms:last-child { padding-bottom: 0; }
.ms::before {
    content: "";
    position: absolute;
    left: -26px; top: 7px;
    width: 12px; height: 12px;
    border-radius: 50%;
    background: var(--bg);
    border: 2px solid var(--line);
}
.ms.done::before { border-color: var(--dim); background: var(--dim); }
.ms.now::before  { border-color: var(--milk); background: var(--milk); box-shadow: 0 0 0 4px rgba(242, 231, 213, 0.13); }
.ms .day  { font-size: 12px; color: var(--dim); letter-spacing: 0.6px; text-transform: uppercase; }
.ms .name { color: var(--milk-dim); font-size: 18px; margin: 2px 0 3px; }
.ms.now .name { color: var(--milk); font-weight: 600; }
.ms .when { font-size: 14px; color: var(--muted); }
.ms .text { font-size: 14px; color: var(--dim); margin-top: 5px; }
.ms .left {
    display: inline-block;
    margin-top: 7px;
    padding: 3px 10px;
    border-radius: 999px;
    background: var(--panel-2);
    border: 1px solid var(--line);
    font-size: 13px;
    color: var(--blue);
}

/* ── сбор ── */
.meetup {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 22px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    flex-wrap: wrap;
}
.meetup .big { color: var(--milk); font-size: 20px; }
.meetup .sub { color: var(--dim); font-size: 14px; margin-top: 3px; }
.meetup .countdown { color: var(--blue); font-size: 15px; white-space: nowrap; }

/* ── галерея ── */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.shot {
    border: 1px solid var(--line);
    border-radius: 10px;
    overflow: hidden;
    background: var(--panel);
}
figure.shot { margin: 0; }
.shot .cap { padding: 9px 12px; font-size: 13px; color: var(--muted); }
.empty {
    border: 1px dashed var(--line);
    border-radius: 10px;
    padding: 34px;
    text-align: center;
    color: var(--dim);
    font-size: 14px;
}

/* ── как зайти ── */
.steps { counter-reset: step; padding: 0; margin: 0; list-style: none; }
.steps li {
    counter-increment: step;
    position: relative;
    padding: 0 0 14px 34px;
    font-size: 15px;
}
.steps li::before {
    content: counter(step);
    position: absolute;
    left: 0; top: 1px;
    width: 22px; height: 22px;
    border-radius: 50%;
    background: var(--panel-2);
    border: 1px solid var(--line);
    color: var(--muted);
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.steps code {
    background: var(--panel-2);
    border: 1px solid var(--line);
    border-radius: 5px;
    padding: 1px 6px;
    color: var(--milk);
    font-family: ui-monospace, Menlo, monospace;
    font-size: 13px;
}

footer {
    border-top: 1px solid var(--line);
    padding: 26px 0 40px;
    color: var(--dim);
    font-size: 13px;
    display: flex;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

/* ── админка ── */
.admin-head { display: flex; justify-content: space-between; align-items: center; padding: 26px 0; flex-wrap: wrap; gap: 12px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 22px 24px; margin-bottom: 18px; }
label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 6px; }
input[type=text], input[type=password], input[type=file] {
    width: 100%;
    padding: 10px 12px;
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--milk);
    font: inherit;
    font-size: 15px;
    margin-bottom: 14px;
}
input:focus { outline: none; border-color: #3c434f; }
button.action {
    padding: 10px 20px;
    border-radius: 8px;
    border: 1px solid var(--line);
    background: var(--milk);
    color: #14161a;
    font: inherit;
    font-weight: 500;
    cursor: pointer;
}
button.action:hover { background: #fff; }
button.danger { background: transparent; color: var(--ruby); border-color: rgba(224, 64, 95, 0.4); }
button.danger:hover { background: rgba(224, 64, 95, 0.12); }
.msg { padding: 11px 15px; border-radius: 8px; margin-bottom: 18px; font-size: 14px; }
.msg.ok  { background: rgba(143, 191, 127, 0.12); color: var(--good); border: 1px solid rgba(143, 191, 127, 0.3); }
.msg.err { background: rgba(224, 64, 95, 0.1); color: var(--ruby); border: 1px solid rgba(224, 64, 95, 0.3); }
.row { display: flex; gap: 14px; align-items: center; padding: 11px 0; border-bottom: 1px solid var(--line); }
.row:last-child { border-bottom: 0; }
.row img { width: 96px; height: 60px; object-fit: cover; border-radius: 6px; border: 1px solid var(--line); }
.row .grow { flex: 1; }
.row .grow input { margin-bottom: 0; }

@media (max-width: 560px) {
    .hero { padding: 44px 0 30px; }
    .hero h1 { font-size: 30px; }
    .meetup { flex-direction: column; align-items: flex-start; }
}

/* ─────────── Карта фоном ───────────
   Живая карта мира сверху страницы, растворяющаяся в фон. Это оформление:
   кликов не принимает, масштаб задан заранее, на телефоне не грузится вовсе. */
.mapbg {
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 560px;
    overflow: hidden;
    pointer-events: none;
    z-index: 0;
    opacity: 0;
    transition: opacity 1.4s ease;
}
.mapbg.ready { opacity: 0.28; }
.mapbg-frame {
    position: absolute;
    /* растягиваем шире экрана, чтобы панели и кнопки самой карты остались за кадром */
    top: -140px; left: -12%; right: -12%; bottom: -220px;
}
.mapbg-frame iframe {
    width: 100%;
    height: 100%;
    border: 0;
    filter: saturate(0.75) contrast(0.9);
}
.mapbg-fade {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(to bottom, rgba(16,18,22,0.55) 0%, rgba(16,18,22,0.8) 45%, var(--bg) 100%),
        radial-gradient(ellipse at 50% 0%, transparent 30%, var(--bg) 78%);
}
.wrap { position: relative; z-index: 1; }

.status .sep { color: var(--dim); }
.status .accent { color: var(--milk); }
.status .sub { color: var(--dim); }

/* ─────────── Появление блоков ─────────── */
.reveal {
    opacity: 0;
    transform: translateY(14px);
    transition: opacity 0.55s ease, transform 0.55s ease;
}
.reveal.shown { opacity: 1; transform: none; }

/* ─────────── Галерея ─────────── */
.shot .frame {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: var(--ratio, 1.5);
    overflow: hidden;
    background: var(--panel-2);
}
.shot .frame img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
/* размытая миниатюра весом в пару сотен байт — она уже в HTML */
.shot .ph {
    filter: blur(12px);
    transform: scale(1.08);
}
.shot .full {
    opacity: 0;
    transition: opacity 0.45s ease;
}
.shot .full.loaded { opacity: 1; }
.shot { transition: transform 0.25s ease, border-color 0.25s ease; }
.shot:hover { transform: translateY(-3px); border-color: #39404d; }
.shot.extra { display: none; }

@keyframes pop {
    from { opacity: 0; transform: translateY(16px) scale(0.98); }
    to   { opacity: 1; transform: none; }
}
.shot.pop { animation: pop 0.45s ease both; }

/* кнопка «показать ещё» с уходом в темноту — намёк, что снизу есть ещё кадры */
.more-wrap {
    position: relative;
    margin-top: -70px;
    padding-top: 70px;
    text-align: center;
    background: linear-gradient(to bottom, rgba(16,18,22,0) 0%, var(--bg) 62%);
}
.more-btn { cursor: pointer; font-family: inherit; }

/* ─────────── Админка: перетаскивание и вставка ─────────── */
.dropzone {
    position: relative;
    border: 1px dashed var(--line);
    border-radius: 12px;
    padding: 26px 20px;
    text-align: center;
    margin-bottom: 18px;
    transition: border-color 0.2s ease, background 0.2s ease;
}
.dropzone.over { border-color: var(--milk); background: rgba(242,231,213,0.05); }
.dz-title { color: var(--milk-dim); font-size: 15px; }
.dz-sub { color: var(--dim); font-size: 13px; margin-top: 4px; }
.dz-link { color: var(--blue); cursor: pointer; text-decoration: underline; display: inline; }
.dz-overlay {
    position: absolute;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: rgba(16,18,22,0.85);
    color: var(--milk);
    font-size: 16px;
}
.dropzone.over .dz-overlay { display: flex; }

.queue { margin-top: 14px; display: grid; gap: 7px; }
.qitem {
    font-size: 13px;
    padding: 8px 12px;
    border-radius: 7px;
    border: 1px solid var(--line);
    background: var(--panel-2);
    color: var(--muted);
    animation: pop 0.3s ease both;
}
.qitem.err { color: var(--ruby); border-color: rgba(224,64,95,0.35); }

@media (prefers-reduced-motion: reduce) {
    .reveal, .shot, .shot .full { transition: none; }
    .reveal { opacity: 1; transform: none; }
    .shot.pop { animation: none; }
    .mapbg { display: none; }
}
