/* Landmark Rush website and admin. Car-type colours: muscle red, balanced blue, sports yellow. */
:root {
    --bg: #0d0f14;
    --panel: #161a22;
    --line: #262c38;
    --text: #e9edf3;
    --muted: #9aa3b2;
    --red: #e5483f;
    --blue: #3d8bfd;
    --yellow: #f5c518;
    --ok: #3ccf8e;
    --radius: 10px;
    --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", sans-serif;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font: 16px/1.65 var(--font);
}

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

code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.9em;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 4px;
    padding: 0.1em 0.35em;
    word-break: break-all;
}

h1, h2, h3 { line-height: 1.25; }

.muted { color: var(--muted); }
.small { font-size: 0.85em; }
.error { color: var(--red); }
.ok { color: var(--ok); }

/* Buttons */
.button {
    display: inline-block;
    background: var(--yellow);
    color: #111;
    border: 1px solid var(--yellow);
    border-radius: 999px;
    padding: 0.6em 1.4em;
    font: 600 1rem/1.2 var(--font);
    cursor: pointer;
    text-decoration: none;
}
.button:hover { filter: brightness(1.08); text-decoration: none; }
.button.ghost { background: transparent; color: var(--text); border-color: var(--line); }
.button.small { padding: 0.35em 0.9em; font-size: 0.85rem; }
.button.danger { color: var(--red); border-color: var(--red); }
button.link { background: none; border: 0; color: var(--muted); cursor: pointer; font: inherit; padding: 0; text-decoration: underline; }
form.inline { display: inline; }

input, select, textarea {
    font: inherit;
    color: var(--text);
    background: #0f1218;
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 0.5em 0.7em;
    max-width: 100%;
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--blue); outline-offset: 1px; }
textarea { width: 100%; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.9rem; }

/* Public site */
.site-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem clamp(1rem, 4vw, 3rem);
    border-bottom: 1px solid var(--line);
    flex-wrap: wrap;
}
.brand { color: var(--text); font-weight: 800; letter-spacing: 0.08em; }
.brand span { color: var(--yellow); }
.brand small { color: var(--muted); font-weight: 500; letter-spacing: 0; margin-left: 0.4em; }
.brand:hover { text-decoration: none; }
.site-header nav { display: flex; align-items: center; gap: 1.2rem; flex-wrap: wrap; }
.site-header nav a:not(.button) { color: var(--text); }
.site-header .lang { color: var(--muted) !important; font-size: 0.9em; }
.player-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5em;
    max-width: 100%;
    padding: 0.2em 0.8em 0.2em 0.2em;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--panel);
}
.player-badge:hover { text-decoration: none; border-color: var(--muted); }
.player-badge img { width: 28px; height: 28px; flex: none; }
.player-badge .player-name { font-weight: 700; max-width: 12em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.player-badge .player-tier { color: var(--muted); font-size: 0.85em; white-space: nowrap; }
.tile strong.tier { display: flex; align-items: center; gap: 0.35em; }
.tile strong.tier img { width: 2.2rem; height: 2.2rem; flex: none; }

.hero {
    position: relative;
    overflow: hidden;
    padding: clamp(4rem, 12vw, 9rem) clamp(1rem, 4vw, 3rem) clamp(3rem, 8vw, 6rem);
    background:
        radial-gradient(1200px 500px at 80% -10%, rgba(61, 139, 253, 0.25), transparent 60%),
        radial-gradient(900px 400px at 0% 110%, rgba(229, 72, 63, 0.22), transparent 60%),
        var(--bg);
    border-bottom: 1px solid var(--line);
}
.hero-inner { position: relative; z-index: 1; max-width: 900px; margin: 0 auto; }
.hero h1 {
    margin: 0;
    font-size: clamp(2.6rem, 9vw, 6rem);
    font-weight: 900;
    letter-spacing: 0.04em;
    font-style: italic;
}
.hero .eyebrow { color: var(--yellow); font-weight: 700; letter-spacing: 0.12em; margin: 0 0 0.5rem; }
.hero .tagline { font-size: clamp(1.1rem, 2.6vw, 1.5rem); color: var(--text); margin: 0.6rem 0 2rem; }
.hero .actions { display: flex; gap: 0.8rem; flex-wrap: wrap; }
.hero-stripes {
    position: absolute;
    right: -10%;
    bottom: 12%;
    width: 70%;
    display: grid;
    gap: 14px;
    transform: skewX(-24deg);
    opacity: 0.85;
}
.hero-stripes span { display: block; height: 14px; border-radius: 3px; }
.hero-stripes .red { background: var(--red); width: 70%; margin-left: 30%; }
.hero-stripes .blue { background: var(--blue); width: 85%; margin-left: 15%; }
.hero-stripes .yellow { background: var(--yellow); }

.content { max-width: 900px; margin: 0 auto; padding: 2.5rem clamp(1rem, 4vw, 2rem); }
.prose h2 { margin-top: 2.2rem; }
.prose ul { padding-left: 1.2rem; }
.prose li { margin: 0.35rem 0; }
.prose img { max-width: 100%; border-radius: var(--radius); }

.news-list { list-style: none; padding: 0; margin: 0; }
.news-list li { display: flex; justify-content: space-between; gap: 1rem; padding: 0.8rem 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.meta { color: var(--muted); font-size: 0.9em; }

.code-form { display: flex; gap: 0.6rem; align-items: center; flex-wrap: wrap; margin: 1rem 0; }
.button.steam { background: #171a21; color: #fff; border-color: #66c0f4; }
.notice { background: rgba(61, 139, 253, 0.12); border: 1px solid var(--blue); border-radius: var(--radius); padding: 0.4rem 1.2rem; margin: 1rem 0; }
details.invite { margin: 1.5rem 0; }
details.invite summary { cursor: pointer; color: var(--muted); }
.code-form input { font-size: 1.2rem; letter-spacing: 0.12em; text-transform: uppercase; width: 26ch; }

.downloads { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1rem; margin: 1.5rem 0; }
.download-card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.2rem 1.4rem; }
.download-card h2 { margin: 0 0 0.3rem; }
.download-card .hash { font-size: 0.75rem; color: var(--muted); margin-top: 1rem; }

.site-footer { color: var(--muted); font-size: 0.85rem; text-align: center; padding: 2rem 1rem 3rem; border-top: 1px solid var(--line); }

/* Admin */
body.admin { background: #10131a; }
.admin-header {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 0.8rem 1.5rem;
    background: var(--panel);
    border-bottom: 1px solid var(--line);
    flex-wrap: wrap;
}
.admin-header nav { display: flex; gap: 1rem; flex-wrap: wrap; flex: 1; }
.admin-header nav a { color: var(--muted); }
.admin-header nav a.active { color: var(--text); font-weight: 700; }
.admin-header .who { display: flex; gap: 0.8rem; align-items: center; font-size: 0.9em; }
.admin-main { max-width: 1200px; margin: 0 auto; padding: 1.5rem; }
.narrow { max-width: 420px; margin: 3rem auto; }
.stack { display: grid; gap: 0.5rem; }
.stack .button { margin-top: 0.6rem; justify-self: start; }

.flash { background: rgba(60, 207, 142, 0.12); border: 1px solid var(--ok); border-radius: 6px; padding: 0.6rem 1rem; }
.warn { background: rgba(245, 197, 24, 0.1); border: 1px solid var(--yellow); border-radius: 6px; padding: 0.6rem 1rem; }
.reveal { background: rgba(61, 139, 253, 0.12); border: 1px solid var(--blue); border-radius: var(--radius); padding: 0.8rem 1.2rem; margin: 1rem 0; }
.big-code code { font-size: 1.3rem; padding: 0.3em 0.6em; user-select: all; }

.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 1rem; margin: 1rem 0 2rem; }
.tile { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.2rem; color: var(--text); display: grid; }
.tile strong { font-size: 2rem; }
.tile span { color: var(--muted); }
.tile:hover { text-decoration: none; border-color: var(--muted); }

table { width: 100%; border-collapse: collapse; margin: 0.5rem 0 2rem; font-size: 0.92rem; }
th, td { text-align: left; padding: 0.55rem 0.6rem; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 600; }
tr.off td { opacity: 0.45; }
td.actions { white-space: nowrap; }
td.actions .button { margin: 0 0.2rem 0.2rem 0; }

.chip { display: inline-block; border-radius: 999px; padding: 0.05em 0.7em; font-size: 0.85em; border: 1px solid var(--line); white-space: nowrap; }
.chip.dev { color: var(--muted); }
.chip.tester { color: var(--blue); border-color: var(--blue); }
.chip.public { color: var(--ok); border-color: var(--ok); }
.chip.player-pending { color: var(--yellow); border-color: var(--yellow); }
.chip.player-approved { color: var(--ok); border-color: var(--ok); }
.chip.player-blocked { color: var(--red); border-color: var(--red); }
.chip.founder { color: var(--yellow); border-color: var(--yellow); font-weight: 700; }
th.num, td.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.mileage { color: var(--yellow); font-variant-numeric: tabular-nums; }

/* Game servers (admin) */
.host { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.2rem; margin: 0 0 1.5rem; }
.host.alert { border-color: var(--red); }
.host-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; flex-wrap: wrap; }
.host-head h2 { margin: 0; }
.host-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 0.8rem; margin: 0.8rem 0; }
.host th { white-space: nowrap; }
.host-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }
.spark { display: block; width: 120px; height: 28px; }
.spark polyline { fill: none; stroke: var(--blue); stroke-width: 1.5; }
.chip.ok { color: var(--ok); border-color: var(--ok); }
.chip.warn { color: var(--yellow); border-color: var(--yellow); }
.chip.bad { color: var(--red); border-color: var(--red); }
td.error, strong.error { color: var(--red); }
pre.log { max-height: 24rem; overflow: auto; font-size: 0.78rem; white-space: pre-wrap; word-break: break-all; }

.row-form, .filters { display: flex; gap: 0.5rem; flex-wrap: wrap; align-items: center; margin: 1rem 0; }
.editor label { display: grid; gap: 0.3rem; margin-bottom: 0.8rem; }
.editor label.check { display: flex; align-items: center; gap: 0.4rem; }
.editor .row { display: flex; gap: 1rem; align-items: end; flex-wrap: wrap; }
.editor .two { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.codes { columns: 2; font-size: 1.05rem; }
.qr { background: #fff; border-radius: 8px; padding: 8px; display: block; margin: 1rem 0; }
.key { font-size: 1rem; }

@media (max-width: 720px) {
    .editor .two { grid-template-columns: 1fr; }
    table { display: block; overflow-x: auto; }
    .hero-stripes { width: 110%; right: -40%; opacity: 0.5; }
}
