:root {
    --bg: #000;
    --fg: #f4f4f4;
    --muted: #8d8d8d;
    --line: #222;
    --panel: #050505;
    --soft: #111;
    --bad: #ff5b5b;
    --good: #8cff9b;
}

* { box-sizing: border-box; }
html { margin: 0; min-height: 100%; background: var(--bg); }
body { margin: 0; width: 100%; min-height: 100vh; background-color: var(--bg); background-repeat: no-repeat; background-position: center center; background-size: cover; background-attachment: fixed; color: var(--fg); font-family: "Segoe UI", Arial, sans-serif; }
body.bg-inside { background-image: linear-gradient(rgba(0,0,0,.48), rgba(0,0,0,.68)), url('inside_xata.png'); }
body.bg-xata { background-image: linear-gradient(rgba(0,0,0,.48), rgba(0,0,0,.68)), url('verblused_xata.png'); }
body.bg-pts { background-image: linear-gradient(rgba(0,0,0,.48), rgba(0,0,0,.68)), url('verblused_pts.png'); }
a { color: inherit; text-decoration: none; }
button, input, textarea { font: inherit; }
textarea { resize: vertical; min-height: 110px; }

.page { width: min(1160px, calc(100% - 32px)); margin: 0 auto; padding: 56px 0 28px; }
.page.narrow { width: min(900px, calc(100% - 32px)); }

.topbar { display: flex; justify-content: center; align-items: center; gap: clamp(42px, 9vw, 118px); min-height: 96px; }
.nav-item { font-size: clamp(31px, 5.8vw, 62px); line-height: 1; letter-spacing: .06em; font-weight: 300; transition: opacity .15s ease, transform .15s ease; }
.nav-item:hover, .nav-item.active { opacity: .72; transform: translateY(-1px); }
.brand-link { font-size: clamp(24px, 4.8vw, 52px); }
.nav-wrap { position: relative; display: inline-flex; justify-content: center; }
.info-menu { position: absolute; top: calc(100% + 14px); left: 50%; transform: translateX(-50%) translateY(-4px); background: #030303; border: 1px solid var(--line); padding: 10px; display: flex; gap: 8px; opacity: 0; visibility: hidden; pointer-events: none; z-index: 5; transition: opacity .15s ease, transform .15s ease, visibility .15s ease; }
.info-menu::before { content: ""; position: absolute; left: 0; right: 0; bottom: 100%; height: 14px; }
.nav-wrap:hover .info-menu, .nav-wrap:focus-within .info-menu, .nav-wrap.info-open .info-menu, .info-menu:hover { opacity: 1; visibility: visible; pointer-events: auto; transform: translateX(-50%) translateY(0); }
.nav-wrap.info-suppressed:hover .info-menu, .nav-wrap.info-suppressed:focus-within .info-menu { opacity: 0; visibility: hidden; pointer-events: none; transform: translateX(-50%) translateY(-4px); }
.info-icon { width: 42px; height: 42px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--line); background: #000; color: var(--fg); font-weight: 800; font-size: 15px; line-height: 1; transition: background .15s ease, border-color .15s ease, transform .15s ease; }
.info-icon:hover { background: var(--soft); border-color: #444; transform: translateY(-1px); }
.info-icon img { width: 24px; height: 24px; display: block; }

.search { display: grid; grid-template-columns: 1fr auto; gap: 10px; margin: 20px auto 34px; max-width: 650px; }
.search input, .chat-form input, .profile-form input, .profile-form textarea { width: 100%; background: #030303; color: var(--fg); border: 1px solid var(--line); outline: 0; padding: 13px 14px; }
.search button, .chat-form button, .profile-form button, .big-button { background: var(--fg); color: #000; border: 0; padding: 0 22px; cursor: pointer; font-weight: 700; letter-spacing: .08em; min-height: 46px; }
.search button:hover, .chat-form button:hover, .profile-form button:hover, .big-button:hover { opacity: .85; }

.camelstone-launch { display: grid; justify-items: center; gap: 8px; margin: -12px auto 28px; }
.camelstone-launch-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: min(520px, 100%);
    min-height: 74px;
    padding: 0 34px;
    border: 1px solid rgba(255, 212, 120, .58);
    background: linear-gradient(180deg, rgba(74, 43, 18, .98), rgba(24, 13, 7, .98));
    color: #ffe3a5;
    letter-spacing: .18em;
    font-size: clamp(28px, 5vw, 52px);
    font-weight: 900;
    text-shadow: 0 2px 0 #000, 0 0 18px rgba(255, 212, 120, .26);
    box-shadow: inset 0 0 0 2px rgba(255,255,255,.05), 0 12px 35px rgba(0,0,0,.28);
}
.camelstone-launch-button:hover { transform: translateY(-1px); border-color: #ffd478; }
.camelstone-token-link { color: var(--muted); font-size: 12px; letter-spacing: .16em; }
.camelstone-token-link:hover { color: var(--fg); }

body.camelstone-page { overflow: hidden; }
.camelstone-web-shell { width: 100vw; height: 100vh; display: grid; grid-template-rows: 72px 1fr auto; background: rgba(0,0,0,.66); }
.camelstone-web-top { display: grid; grid-template-columns: 170px 1fr 170px; align-items: center; border-bottom: 1px solid var(--line); background: rgba(3,3,3,.88); }
.camelstone-web-title { text-align: center; color: #ffe3a5; font-size: clamp(28px, 4vw, 52px); font-weight: 900; letter-spacing: .18em; text-shadow: 0 2px 0 #000, 0 0 18px rgba(255,212,120,.24); }
.camelstone-web-back, .camelstone-web-token { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; margin: 0 14px; border: 1px solid var(--line); background: #030303; color: var(--muted); font-weight: 800; letter-spacing: .12em; }
.camelstone-web-back:hover, .camelstone-web-token:hover { color: var(--fg); border-color: #444; }
.camelstone-web-container { width: min(100vw, 1920px); height: calc(100vh - 112px); min-height: 520px; justify-self: center; align-self: stretch; background: #000; }
.camelstone-web-status { position: fixed; left: 50%; top: 86px; transform: translateX(-50%); z-index: 20; min-width: min(720px, calc(100vw - 32px)); padding: 10px 16px; border: 1px solid rgba(255,255,255,.15); background: rgba(0,0,0,.78); color: #ffe3a5; text-align: center; font-size: 13px; letter-spacing: .08em; }
.camelstone-web-help { padding: 8px 16px; min-height: 40px; color: var(--muted); background: rgba(3,3,3,.88); border-top: 1px solid var(--line); text-align: center; font-size: 12px; }
.camelstone-web-help code { color: #ffe3a5; }
.camelstone-web-message { align-self: center; justify-self: center; width: min(760px, calc(100vw - 32px)); padding: 34px; border: 1px solid var(--line); background: rgba(5,5,5,.86); text-align: center; }
.camelstone-web-message h1 { margin: 0 0 12px; color: #ffe3a5; letter-spacing: .12em; }
.bad-inline { display: inline-block; margin-left: 12px; color: var(--bad); }

.layout { display: grid; grid-template-columns: 1fr 280px; gap: 18px; align-items: start; }
.chat-card, .side, .panel, .profile-card { background: rgba(5,5,5,.82); border: 1px solid var(--line); backdrop-filter: blur(2px); }
.chat-card { min-height: 510px; display: flex; flex-direction: column; }
.card-title { padding: 16px 18px; border-bottom: 1px solid var(--line); color: var(--muted); letter-spacing: .22em; font-size: 13px; text-transform: uppercase; }
.card-title.second { border-top: 1px solid var(--line); }

.chat-window { height: 430px; overflow-y: auto; padding: 18px; }
.chat-line { padding: 8px 0; border-bottom: 1px solid rgba(255,255,255,.05); overflow-wrap: anywhere; }
.nick { color: #fff; font-weight: 600; margin-right: 8px; }
.nick::after { content: ":"; color: var(--muted); }
.text { color: #d8d8d8; }
.chat-form { display: grid; grid-template-columns: 1fr auto; gap: 10px; padding: 14px; border-top: 1px solid var(--line); }
.login-note, .empty { color: var(--muted); padding: 16px 18px; }

.side { min-height: 510px; }
.user-row, .rank-row, .history-row { display: grid; gap: 4px; padding: 12px 16px; border-bottom: 1px solid rgba(255,255,255,.06); }
.user-row:hover, .rank-row:hover { background: var(--soft); }
.user-row small, .history-row small { color: var(--muted); }

.rank-row { grid-template-columns: 70px 1fr 180px 120px; align-items: center; }
.place, .rank-steam { color: var(--muted); }
.rank-name { font-weight: 600; }
.rank-pts { text-align: right; }

.profile-card { padding: 0 0 22px; }
.profile-head { display: flex; gap: 16px; align-items: center; padding: 26px 28px; border-bottom: 1px solid var(--line); }
.avatar { width: 76px; height: 76px; border-radius: 50%; object-fit: cover; border: 1px solid var(--line); }
.profile-name { font-size: clamp(34px, 7vw, 70px); letter-spacing: .06em; font-weight: 300; }
.profile-steam { color: var(--muted); margin-top: 4px; }
.profile-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); border-bottom: 1px solid var(--line); }
.profile-stats-actions { grid-template-columns: repeat(5, minmax(0, 1fr)); align-items: stretch; }
.profile-stats > * { padding: 20px; border-right: 1px solid var(--line); min-height: 86px; }
.profile-stats > *:last-child { border-right: 0; }
.profile-stats b { display: block; font-size: 22px; }
.profile-stats span { display: block; color: var(--muted); font-size: 12px; letter-spacing: .18em; margin-top: 6px; }
.profile-pts-tile { display: flex; align-items: center; }
.profile-pts-tile b { display: block; font-size: 28px; line-height: 1; white-space: nowrap; }
.profile-pts-tile .pts-number { display: inline; color: #d6a739; font-size: inherit; letter-spacing: .04em; margin: 0; }
.profile-pts-tile .pts-label { display: inline; color: var(--muted); font-size: inherit; letter-spacing: .12em; margin: 0; }
.profile-icon-action { display: flex; align-items: center; justify-content: center; padding: 6px; min-height: 72px; }
.profile-icon-action img { width: 52px; height: 52px; display: block; object-fit: contain; }
.profile-case-action img { width: 62px; height: 62px; }
.profile-steam-action { justify-self: stretch; }
.profile-card .profile-stats.profile-stats-actions { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.profile-card .profile-stats.profile-stats-actions .profile-icon-action { width: auto; min-width: 0; min-height: 74px; padding: 4px; overflow: visible; }
.profile-card .profile-stats.profile-stats-actions .profile-icon-action img { width: 58px; height: 58px; max-width: none; }
.profile-card .profile-stats.profile-stats-actions .profile-case-action img { width: 92px; height: 92px; transform: translateY(-7px) scale(1.12); }
.profile-section { padding: 22px 28px; border-bottom: 1px solid var(--line); }
.profile-section p { color: #d8d8d8; line-height: 1.6; margin: 8px 0 0; }
.section-title { color: var(--muted); letter-spacing: .18em; font-size: 12px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.daily-bonus { position: relative; display: grid; grid-template-columns: 1fr; justify-items: center; align-items: center; padding: 22px 28px; border-bottom: 1px solid var(--line); min-height: 180px; overflow: visible; }
.daily-bun-stage { position: relative; z-index: 1; min-height: 132px; display: flex; align-items: center; justify-content: center; overflow: visible; }
.daily-bun-icon { width: calc(96px * var(--bun-scale)); max-width: 126px; min-width: 46px; height: auto; filter: drop-shadow(0 0 22px rgba(255, 199, 76, .2)); transition: transform .18s ease; }
.daily-bonus:hover .daily-bun-icon { transform: translateY(-2px) scale(1.03); }
.daily-bun-form { margin: 0; }
.daily-bun-button { display: flex; align-items: center; justify-content: center; width: auto; min-height: 0; padding: 0; border: 0; background: transparent; cursor: pointer; }
.daily-bun-button:hover .daily-bun-icon, .daily-bun-button:focus-visible .daily-bun-icon { transform: translateY(-2px) scale(1.05); }
.daily-bun-claim { position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%); color: var(--good); font-weight: 800; letter-spacing: .12em; text-shadow: 0 0 18px rgba(134, 255, 154, .28); }
.profile-form { display: grid; gap: 12px; padding: 22px 28px 0; }
.profile-form label { color: var(--muted); font-size: 12px; letter-spacing: .16em; text-transform: uppercase; }
.profile-edit-field { border: 1px solid var(--line); background: rgba(0,0,0,.18); }
.profile-edit-field summary { cursor: pointer; list-style: none; user-select: none; color: var(--muted); font-size: 12px; letter-spacing: .16em; text-transform: uppercase; padding: 14px; }
.profile-edit-field summary::-webkit-details-marker { display: none; }
.profile-edit-field summary::after { content: '>'; float: right; color: var(--fg); letter-spacing: 0; transition: transform .15s ease; }
.profile-edit-field[open] summary::after { transform: rotate(90deg); }
.profile-edit-field input, .profile-edit-field textarea { border-width: 1px 0 0; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.profile-actions, .tabs { display: flex; flex-wrap: wrap; gap: 10px; padding: 18px 28px 0; }
.profile-actions a, .tabs a, .steam-button { display: inline-flex; align-items: center; justify-content: center; min-height: 42px; padding: 0 16px; border: 1px solid var(--line); background: #030303; letter-spacing: .12em; font-weight: 700; font-size: 12px; }
.profile-actions a:hover, .profile-actions a.active, .tabs a:hover, .tabs a.active, .steam-button:hover { background: var(--soft); }

.notice { margin: 14px 18px; border: 1px solid var(--line); padding: 12px 14px; color: var(--fg); background: #030303; }
.notice.good { border-color: rgba(140,255,155,.3); color: var(--good); }
.notice.bad { border-color: rgba(255,91,91,.35); color: var(--bad); }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.center { text-align: center; padding-bottom: 30px; }
.center p { max-width: 620px; margin: 22px auto; color: #d8d8d8; line-height: 1.6; }

.inventory-head { display: grid; grid-template-columns: 1fr 1fr; border-bottom: 1px solid var(--line); }
.inventory-head > div { padding: 20px; border-right: 1px solid var(--line); }
.inventory-head > div:last-child { border-right: 0; }
.inventory-head b { display: block; font-size: 28px; }
.inventory-head span { color: var(--muted); letter-spacing: .14em; font-size: 12px; }
.inventory-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.inventory-item { padding: 18px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.inventory-item b { display: block; margin-bottom: 8px; }
.inventory-item span { color: var(--muted); }
.inventory-summary-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0; border-top: 1px solid var(--line); margin-top: 18px; }
.inventory-summary { display: flex; align-items: center; justify-content: space-between; padding: 20px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); background: #030303; }
.inventory-summary:last-child { border-right: 0; }
.inventory-summary:hover { background: var(--soft); }
.inventory-summary span { color: var(--muted); letter-spacing: .16em; font-size: 12px; }
.inventory-summary b { font-size: 28px; }

.case-box { padding: 26px 28px; }
.case-panel-title { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.case-panel-title span:last-child { color: var(--muted); font-size: 13px; letter-spacing: .14em; text-align: right; white-space: nowrap; }
.case-title { font-size: clamp(34px, 7vw, 64px); font-weight: 300; letter-spacing: .08em; }
.case-status { display: flex; gap: 16px; flex-wrap: wrap; color: var(--muted); margin: 16px 0; }
.case-box > p, .case-box .case-status { display: none; }
.case-status b { color: var(--fg); }
.big-button { width: 100%; margin-top: 14px; }
.case-stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); }
.case-stats-grid > div { padding: 18px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); background: rgba(0,0,0,.18); }
.case-stats-grid > div:nth-child(3n) { border-right: 0; }
.case-stats-grid b { display: block; font-size: 28px; line-height: 1; }
.case-stats-grid span { display: block; margin-top: 8px; color: var(--muted); font-size: 12px; letter-spacing: .14em; }
.case-history summary { cursor: pointer; list-style: none; user-select: none; }
.case-history summary::-webkit-details-marker { display: none; }
.case-history summary::after { content: '>'; float: right; color: var(--fg); letter-spacing: 0; transition: transform .15s ease; }
.case-history[open] summary::after { transform: rotate(90deg); }
.roulette-result { border: 1px solid var(--line); background: #020202; padding: 20px; text-align: center; font-size: 28px; letter-spacing: .06em; margin: 14px 0; }
.roulette-result.pending { display: none; }
.roulette-result.pending.shown { display: block; }
.case-hud { position: fixed; inset: 0; z-index: 20; display: grid; place-items: center; pointer-events: none; background: rgba(0,0,0,.92); overflow: hidden; padding: 0 20px; }
.case-hud-finished { animation: hudFade 5.8s ease forwards; }
.case-hud-slots { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(3, minmax(0, 220px)); gap: 18px; width: min(760px, calc(100vw - 32px)); align-items: center; }
.case-hud-slot { display: flex; align-items: center; justify-content: center; min-height: 78px; padding: 12px 16px; border: 1px solid rgba(255,215,0,.55); background: #050505; color: #ffd700; font-weight: 700; text-align: center; letter-spacing: .04em; overflow-wrap: anywhere; transition: transform .08s ease, border-color .08s ease, background .08s ease, color .08s ease; }
.case-hud-slot.target { min-height: 92px; border-color: rgba(255,0,0,1); background: rgba(255,0,0,0.12); color: #ffffff; transform: scale(1.08); box-shadow: 0 0 24px rgba(255, 0, 0, 0.35); }
.case-hud-finished .case-hud-slot { transition-duration: .18s; }
.case-hud-finished .case-hud-slot.target { transform: scale(1.14); box-shadow: 0 0 34px rgba(255, 0, 0, 0.52); }
.case-hud-winner { position: absolute; top: 32%; left: 50%; transform: translateX(-50%) scale(.92); color: #ff3131; font-size: clamp(34px, 7vw, 76px); font-weight: 800; text-align: center; text-shadow: 0 0 20px rgba(255,0,0,.65); opacity: 0; z-index: 2; max-width: calc(100vw - 32px); overflow-wrap: anywhere; }
.case-hud-finished .case-hud-winner { animation: hudWinner 5.5s ease forwards; }
.case-toast { position: fixed; left: 50%; top: 22%; z-index: 30; transform: translate(-50%, -10px); color: #ff3131; font-size: clamp(28px, 6vw, 64px); font-weight: 800; text-align: center; text-shadow: 0 0 18px rgba(255,0,0,.75), 0 2px 0 #000; letter-spacing: .08em; pointer-events: none; animation: caseToast 2.5s ease forwards; width: min(920px, calc(100vw - 24px)); overflow-wrap: anywhere; }
@keyframes hudWinner { 0% { opacity: 0; transform: translateX(-50%) scale(.92); } 12%, 90% { opacity: 1; transform: translateX(-50%) scale(1); } 100% { opacity: 0; transform: translateX(-50%) scale(1.04); } }
@keyframes hudFade { 0%, 88% { opacity: 1; } 100% { opacity: 0; visibility: hidden; } }
@keyframes caseToast { 0% { opacity: 0; transform: translate(-50%, -18px) scale(.96); } 12%, 78% { opacity: 1; transform: translate(-50%, 0) scale(1); } 100% { opacity: 0; transform: translate(-50%, -10px) scale(1.02); visibility: hidden; } }
.spaced { margin-top: 18px; }

.pts-graph-panel { overflow: hidden; }
.pts-chart-wrap { position: relative; padding: 92px 18px 24px; min-height: 560px; overflow: visible; }
.pts-chart { display: block; width: 100%; height: min(62vw, 500px); min-height: 390px; background: rgba(0,0,0,.28); }
.pts-grid line { stroke: rgba(255,255,255,.08); stroke-width: 1; }
.pts-labels text { fill: var(--muted); font-size: 13px; letter-spacing: .08em; }
.pts-line { fill: none; stroke: #d6a739; stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; filter: drop-shadow(0 0 8px rgba(214,167,57,.22)); }
.pts-points circle { stroke: #050505; stroke-width: 3; cursor: pointer; }
.pts-points circle.up { fill: var(--good); }
.pts-points circle.down { fill: var(--bad); }
.pts-points circle.flat { fill: #d6a739; }
.pts-tooltip { position: absolute; transform: translate(-50%, 0); min-width: 190px; max-width: min(340px, calc(100% - 32px)); padding: 12px 14px; border: 1px solid var(--line); background: rgba(2,2,2,.96); pointer-events: none; text-align: center; box-shadow: 0 10px 28px rgba(0,0,0,.35); overflow-wrap: anywhere; z-index: 3; }
.pts-tooltip b, .pts-tooltip span, .pts-tooltip small { display: block; }
.pts-tooltip b { color: #d6a739; font-size: 18px; }
.pts-tooltip span { margin-top: 5px; color: var(--fg); }
.pts-tooltip small { margin-top: 5px; color: var(--muted); }

.message-row { padding: 16px 18px; border-bottom: 1px solid rgba(255,255,255,.06); }
.message-row small { color: var(--muted); display: block; margin-top: 6px; }
.message-row p { color: #ddd; line-height: 1.55; margin-bottom: 0; }

body.motd .page { width: calc(100% - 16px); padding: 12px 0; }
body.motd .topbar { min-height: 56px; gap: 22px; }
body.motd .nav-item { font-size: 30px; }
body.motd .brand-link { font-size: 24px; }
body.motd .layout { grid-template-columns: 1fr; }
body.motd .side { display: none; }
body.motd .chat-card { min-height: 360px; }
body.motd .chat-window { height: 285px; }
body.motd .search { margin: 8px auto 12px; }
body.motd .profile-name, body.motd .case-title { font-size: 34px; }
body.motd .daily-bonus { grid-template-columns: 1fr; min-height: 120px; padding: 14px; }
body.motd .daily-bun-stage { min-height: 92px; }
body.motd .daily-bun-icon { width: calc(110px * var(--bun-scale)); }

@media (max-width: 760px) {
    body { background-attachment: scroll; }
    .layout { grid-template-columns: 1fr; }
    .rank-row { grid-template-columns: 50px 1fr; }
    .rank-steam, .rank-pts { grid-column: 2; text-align: left; }
    .grid2, .form-grid, .inventory-head, .inventory-summary-grid, .case-stats-grid { grid-template-columns: 1fr; }
    .profile-stats-actions { grid-template-columns: repeat(5, minmax(96px, 1fr)); overflow-x: auto; }
    .profile-card .profile-stats.profile-stats-actions { grid-template-columns: repeat(5, minmax(96px, 1fr)); }
    .profile-stats-actions > * { border-bottom: 1px solid var(--line); }
    .profile-steam-action { grid-column: auto; }
    .case-panel-title { align-items: flex-start; flex-direction: column; gap: 8px; }
    .case-panel-title span:last-child { text-align: left; white-space: normal; }
    .case-stats-grid > div { border-right: 0; }
    .daily-bonus { grid-template-columns: 1fr; justify-items: center; text-align: center; }
    .inventory-summary { border-right: 0; }
    .case-hud-slots { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; width: calc(100vw - 20px); }
    .case-hud-slot { min-height: 64px; padding: 8px 10px; font-size: 12px; }
    .case-hud-slot.target { min-height: 74px; }
    .topbar { gap: 24px; }
    .brand-link { font-size: 25px; }
    .info-menu { top: calc(100% + 10px); padding: 8px; }
    .info-icon { width: 38px; height: 38px; }
}

.info-icon-updates { width: auto; min-width: 86px; padding: 0 12px; font-size: 11px; letter-spacing: .12em; }

body.updates-page {
    width: 100vw;
    min-height: 100vh;
    overflow-x: hidden;
    background-color: #050805;
    background-image: url('updates-bg.png');
    background-position: center center;
    background-repeat: no-repeat;
    background-attachment: scroll;
    color: #fff;
}
body.motd.updates-page {
    background-image: url('updates-bg-motd.jpg');
    background-position: center center;
    background-repeat: no-repeat;
    background-attachment: scroll;
}
body.updates-page::before {
    content: "";
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.38);
    backdrop-filter: blur(2px);
    pointer-events: none;
}
.updates-stage {
    position: relative;
    z-index: 1;
    width: min(1600px, 100vw);
    min-height: 800px;
    margin: 0 auto;
    padding: 42px 0 34px;
}
.updates-back {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 820px;
    max-width: calc(100% - 40px);
    height: 108px;
    margin: 0 auto 14px;
    border: 1px solid #ffd400;
    background: rgba(9,15,12,.72);
    color: #f2f2f2;
    font-size: 52px;
    line-height: 1;
    font-weight: 800;
    letter-spacing: .13em;
    text-transform: uppercase;
}
.updates-shell {
    width: 820px;
    max-width: calc(100% - 40px);
    margin: 0 auto;
    border: 1px solid #ffd400;
    background: rgba(10,13,12,.86);
    padding: 16px 22px 20px;
    box-shadow: 0 20px 80px rgba(0,0,0,.45);
}
.updates-title {
    color: #ffd400;
    text-align: center;
    font-weight: 800;
    letter-spacing: .08em;
    font-size: 14px;
    margin-bottom: 10px;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 28px;
}
.updates-title::before,
.updates-title::after,
.updates-date::before,
.updates-date::after {
    content: "";
    height: 2px;
    background: rgba(255,255,255,.15);
}
.updates-admin {
    display: grid;
    grid-template-columns: 180px 1fr auto;
    gap: 10px;
    margin: 10px 0 16px;
}
.updates-admin input,
.updates-admin textarea {
    background: rgba(0,0,0,.55);
    border: 1px solid rgba(255,212,0,.38);
    color: #fff;
    outline: none;
    padding: 11px 12px;
}
.updates-admin textarea { min-height: 46px; max-height: 140px; resize: vertical; }
.updates-admin button {
    border: 0;
    background: #ffd400;
    color: #080808;
    font-weight: 900;
    letter-spacing: .08em;
    padding: 0 16px;
    cursor: pointer;
}
.updates-cancel {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 120px;
    padding: 0 16px;
    color: #fff;
    border: 1px solid rgba(255,255,255,.3);
    text-decoration: none;
    background: rgba(0,0,0,.35);
}
.updates-cancel:hover { border-color: #ffd400; color: #ffd400; }
.updates-notice { margin: 10px 0; padding: 10px 12px; border: 1px solid rgba(255,255,255,.16); background: rgba(0,0,0,.45); }
.updates-notice.good { color: var(--good); }
.updates-notice.bad { color: var(--bad); }
.updates-list { border: 1px solid rgba(255,255,255,.10); }
.updates-entry + .updates-entry { border-top: 1px solid rgba(255,255,255,.12); }
.updates-date {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 28px;
    padding: 12px 0;
    color: #ffd400;
    font-weight: 900;
    font-size: 13px;
    letter-spacing: .05em;
}
.updates-item {
    display: grid;
    grid-template-columns: 18px 1fr;
    gap: 12px;
    min-height: 100px;
    padding: 14px 14px 20px;
    background: rgba(15,17,17,.82);
}
.updates-entry:first-child .updates-item { background: rgba(65,65,65,.78); }
.updates-bullet {
    width: 17px;
    height: 17px;
    margin-top: 2px;
    background: #ffd400;
    display: block;
}
.updates-item h2 {
    margin: 0 0 7px;
    color: #fff;
    font-size: 18px;
    line-height: 1;
    font-weight: 900;
    letter-spacing: .02em;
    text-transform: uppercase;
}
.updates-item p {
    margin: 3px 0;
    color: #f4f4f4;
    font-size: 16px;
    line-height: 1.35;
}
.updates-entry-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    align-items: center;
}
.updates-action,
.updates-entry-actions button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255,255,255,.3);
    color: #fff;
    background: rgba(0,0,0,.25);
    padding: 8px 12px;
    text-transform: uppercase;
    letter-spacing: .08em;
    font-size: 12px;
    cursor: pointer;
    text-decoration: none;
}
.updates-entry-actions button { border-radius: 4px; }
.updates-action:hover,
.updates-entry-actions button:hover { border-color: #ffd400; color: #ffd400; }
.updates-action.danger,
.updates-entry-actions button.danger { border-color: rgba(255,93,82,.7); color: #ff5d52; }
.updates-action.danger:hover,
.updates-entry-actions button.danger:hover { border-color: #ff5d52; color: #ff5d52; }
.updates-inline-form { margin: 0; }
.updates-pagination {
    margin: 18px 0 0;
    display: flex;
    justify-content: center;
    gap: 10px;
}
.updates-pagination-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 140px;
    padding: 10px 14px;
    border: 1px solid rgba(255,255,255,.22);
    color: #ffd400;
    background: rgba(0,0,0,.35);
    text-decoration: none;
    font-size: 13px;
    letter-spacing: .08em;
}
.updates-pagination-link:hover {
    border-color: #ffd400;
    color: #fff;
    background: rgba(255,212,0,.12);
}
body.motd.updates-page .updates-stage {
    width: 100%;
    max-width: 763px;
    min-height: auto;
    overflow: hidden;
    padding: 12px 10px 10px;
    box-sizing: border-box;
    margin: 0 auto;
}
body.motd.updates-page .updates-shell,
body.motd.updates-page .updates-back {
    width: 100%;
    max-width: 763px;
    margin: 0 auto 12px;
    box-sizing: border-box;
}
body.motd.updates-page .updates-back {
    height: 78px;
    font-size: 34px;
}
body.motd.updates-page .updates-admin { grid-template-columns: 1fr; gap: 10px; }
body.motd.updates-page .updates-admin button { min-height: 44px; }
body.motd.updates-page { overflow: hidden; }

@media (max-width: 900px) {
    .updates-back, .updates-shell { width: calc(100% - 24px); max-width: none; }
    .updates-back { height: 84px; font-size: 34px; }
    .updates-admin { grid-template-columns: 1fr; }
    .updates-admin button { min-height: 44px; }
}
