/* ===== Ember forum theme: orange & black, dense board layout ===== */
:root {
    --bg: #09090a;
    --surface: #111113;
    --surface-2: #17171a;
    --surface-3: #1e1e22;
    --border: #26262b;
    --text: #ececef;
    --muted: #85858f;
    --orange: #ff7a1a;
    --orange-hot: #ffa040;
    --orange-deep: #e05500;
    --orange-glow: rgba(255, 122, 26, 0.16);
    --radius: 10px;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    background: var(--bg);
    background-image:
        radial-gradient(ellipse 80% 40% at 50% -10%, rgba(255,122,26,0.13), transparent 60%),
        linear-gradient(rgba(255,255,255,0.015) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.015) 1px, transparent 1px);
    background-size: auto, 32px 32px, 32px 32px;
    background-attachment: fixed;
    color: var(--text);
    font: 14px/1.55 "Inter", system-ui, sans-serif;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a { color: inherit; text-decoration: none; }
a:hover { color: var(--orange-hot); }
h1, h2, h3, .logo { font-family: "Space Grotesk", sans-serif; letter-spacing: -0.02em; }
h1 { margin: 0; font-size: 1.7rem; line-height: 1.2; }
.container { width: min(1200px, 94%); margin: 0 auto; }
main.container { flex: 1; padding: 1.5rem 0 4rem; }
.muted { color: var(--muted); font-size: 0.82rem; }
.accent { color: var(--orange); }
.user { color: var(--orange-hot); font-weight: 600; }
.truncate { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 600; }

/* ---- Top bar ---- */
.topbar {
    position: sticky; top: 0; z-index: 10;
    background: rgba(9,9,10,0.88);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
}
.topbar::after {
    content: ""; display: block; height: 2px;
    background: linear-gradient(90deg, transparent 5%, var(--orange) 50%, transparent 95%);
}
.topbar-inner { display: flex; align-items: center; justify-content: space-between; height: 58px; }
.logo { font-weight: 700; font-size: 1.2rem; display: flex; align-items: center; gap: .45rem; }
.logo-mark { color: var(--orange); text-shadow: 0 0 12px var(--orange); }
.logo-dim { color: var(--muted); font-weight: 500; margin-left: -0.35rem; }
.nav { display: flex; align-items: center; gap: 1.4rem; font-weight: 500; }

/* ---- Buttons ---- */
.btn {
    display: inline-block; border: 0; cursor: pointer;
    font: 700 0.88rem "Inter", sans-serif;
    padding: 0.65rem 1.15rem; border-radius: 8px;
    transition: transform .15s, box-shadow .15s;
}
.btn-sm { padding: 0.42rem 0.85rem; font-size: 0.8rem; }
.btn-primary { background: linear-gradient(135deg, var(--orange-hot), var(--orange-deep)); color: #0b0b0b !important; }
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 6px 22px var(--orange-glow), 0 0 0 1px var(--orange); }

/* ---- Welcome bar ---- */
.welcome {
    display: flex; justify-content: space-between; align-items: center; gap: 1.5rem; flex-wrap: wrap;
    background: linear-gradient(120deg, var(--surface-2), var(--surface) 60%);
    border: 1px solid var(--border); border-radius: var(--radius);
    padding: 1.4rem 1.6rem; margin-bottom: 1.25rem;
    position: relative; overflow: hidden;
}
.welcome::before {
    content: ""; position: absolute; right: -60px; top: -60px; width: 220px; height: 220px;
    background: radial-gradient(circle, var(--orange-glow), transparent 70%);
}
.welcome h1 { font-size: 2rem; }
.welcome p { margin: 0.2rem 0 0; }

.search-box { display: flex; gap: 0.5rem; position: relative; }
.search-box input {
    width: 260px; background: var(--bg); color: var(--text);
    border: 1px solid var(--border); border-radius: 8px; padding: 0.5rem 0.8rem; font: inherit;
}
.search-box input:focus { outline: none; border-color: var(--orange); box-shadow: 0 0 0 3px var(--orange-glow); }
.search-box-wide { margin-bottom: 1.25rem; }
.search-box-wide input { flex: 1; width: auto; padding: 0.7rem 1rem; }

/* ---- Blocks (section boxes) ---- */
.block {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius); overflow: hidden; margin-bottom: 1.25rem;
}
.block-head {
    font: 700 0.95rem "Space Grotesk", sans-serif; letter-spacing: 0.01em;
    padding: 0.7rem 1.1rem;
    background: linear-gradient(90deg, rgba(255,122,26,0.22), rgba(255,122,26,0.04) 55%, transparent);
    border-bottom: 1px solid var(--border);
    border-left: 3px solid var(--orange);
}
.grid-head {
    font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted);
    padding: 0.45rem 1.1rem; background: var(--surface-2); border-bottom: 1px solid var(--border);
}
.grid-head span:nth-child(n+3) { text-align: center; }
.grid-head span:last-child { text-align: left; }

.board-grid  { display: grid; grid-template-columns: 46px 1fr 80px 80px 250px; gap: 1rem; align-items: center; }
.thread-grid { display: grid; grid-template-columns: 38px 1fr 80px 80px 170px; gap: 1rem; align-items: center; }

.row { padding: 0.8rem 1.1rem; border-bottom: 1px solid var(--border); transition: background .12s; }
.row:last-child { border-bottom: 0; }
.row:hover { background: var(--surface-2); }
.row-main { min-width: 0; display: flex; flex-direction: column; gap: 0.1rem; }
.row-title { font-weight: 600; font-size: 0.95rem; }
.row-title-line { display: flex; align-items: center; gap: 0.45rem; flex-wrap: wrap; }
.num { text-align: center; font: 600 0.95rem "JetBrains Mono", monospace; }
.last { min-width: 0; display: flex; flex-direction: column; font-size: 0.85rem; border-left: 1px solid var(--border); padding-left: 0.9rem; }
.pinned { background: linear-gradient(90deg, rgba(255,122,26,0.07), transparent 50%); }
.empty { padding: 2rem; text-align: center; color: var(--muted); margin: 0; }

.board-icon {
    width: 46px; height: 46px; border-radius: 9px;
    display: grid; place-items: center;
    background: var(--surface-3); border: 1px solid var(--border);
    color: var(--orange); font: 700 0.8rem "JetBrains Mono", monospace;
    box-shadow: inset 0 -2px 0 var(--orange-deep);
    transition: box-shadow .15s, border-color .15s;
}
.row:hover .board-icon { border-color: var(--orange); box-shadow: inset 0 -2px 0 var(--orange-deep), 0 0 18px var(--orange-glow); }
.board-icon-lg { width: 58px; height: 58px; font-size: 1rem; }

@media (max-width: 860px) {
    .board-grid  { grid-template-columns: 46px 1fr; }
    .thread-grid { grid-template-columns: 38px 1fr; }
    .board-grid .num, .board-grid .last, .thread-grid .num, .thread-grid .last, .grid-head { display: none; }
}

/* ---- Prefixes & badges ---- */
.prefix {
    display: inline-block; padding: 0.08rem 0.45rem; border-radius: 4px;
    font: 700 0.68rem "Inter", sans-serif; text-transform: uppercase; letter-spacing: 0.04em;
    border: 1px solid currentColor; white-space: nowrap;
}
.prefix-lg { font-size: 0.8rem; vertical-align: middle; padding: 0.15rem 0.55rem; }
.prefix-release    { color: var(--orange); background: rgba(255,122,26,0.12); }
.prefix-tutorial   { color: #4ade80; background: rgba(74,222,128,0.1); }
.prefix-question   { color: #60a5fa; background: rgba(96,165,250,0.1); }
.prefix-help       { color: #f87171; background: rgba(248,113,113,0.1); }
.prefix-news       { color: #facc15; background: rgba(250,204,21,0.1); }
.prefix-discussion { color: #a1a1aa; background: rgba(161,161,170,0.08); }
.sticky { font-size: 0.68rem; font-weight: 700; text-transform: uppercase; color: #0b0b0b; background: var(--orange); padding: 0.1rem 0.45rem; border-radius: 4px; }
.tag { background: var(--orange); color: #0b0b0b; font-size: 0.66rem; font-weight: 700; padding: 0.05rem 0.5rem; border-radius: 999px; }

.avatar {
    width: 38px; height: 38px; flex-shrink: 0; border-radius: 9px;
    display: grid; place-items: center; font-weight: 700; color: #0b0b0b;
    background: linear-gradient(135deg, var(--orange-hot), var(--orange-deep));
}
.avatar-lg { width: 72px; height: 72px; font-size: 1.6rem; border-radius: 12px; }

/* ---- Info / stats block ---- */
.info-grid { display: grid; grid-template-columns: 1.6fr 1fr; }
.info-cell { padding: 1rem 1.2rem; }
.info-cell + .info-cell { border-left: 1px solid var(--border); }
.info-cell h3 { margin: 0 0 0.7rem; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--orange); }
.mini-thread { display: flex; align-items: center; gap: 0.5rem; padding: 0.3rem 0; }
.mini-thread a { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 500; }
.stat-nums { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.5rem; margin-bottom: 0.8rem; }
.stat-nums div { background: var(--surface-2); border: 1px solid var(--border); border-radius: 8px; padding: 0.6rem; text-align: center; }
.stat-nums b { display: block; font: 700 1.4rem "Space Grotesk", sans-serif; color: var(--orange); }
.stat-nums span { font-size: 0.72rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; }
@media (max-width: 860px) {
    .info-grid { grid-template-columns: 1fr; }
    .info-cell + .info-cell { border-left: 0; border-top: 1px solid var(--border); }
}

/* ---- Breadcrumbs & page heads ---- */
.crumbs { font-size: 0.85rem; color: var(--muted); margin-bottom: 1rem; }
.crumbs a { color: var(--orange); }
.crumbs span { margin: 0 0.35rem; opacity: 0.6; }
.crumbs b { color: var(--text); font-weight: 500; }
.page-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: 1.25rem; flex-wrap: wrap; }
.page-head-title { display: flex; align-items: center; gap: 1rem; }
.page-head p { margin: 0.2rem 0 0; }
.thread-head { margin-bottom: 1.25rem; }
.thread-head p { margin: 0.4rem 0 0; }

/* ---- Posts ---- */
.post { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 1rem; overflow: hidden; }
.post-op { border-color: rgba(255,122,26,0.55); box-shadow: 0 0 0 1px var(--orange-glow), 0 12px 40px -24px var(--orange); }
.post-top {
    display: flex; justify-content: space-between; padding: 0.4rem 1.1rem;
    background: var(--surface-2); border-bottom: 1px solid var(--border);
    font-size: 0.78rem; color: var(--muted);
}
.post-top a { color: var(--orange); font-weight: 700; }
.post-inner { display: grid; grid-template-columns: 170px 1fr; }
.postbit {
    padding: 1.2rem 1rem; display: flex; flex-direction: column; align-items: center; gap: 0.4rem;
    text-align: center; border-right: 1px solid var(--border); background: var(--surface-2); word-break: break-word;
}
.post-text { padding: 1.2rem 1.4rem; white-space: pre-wrap; word-break: break-word; font-size: 0.95rem; }

.rank { font-size: 0.7rem; font-weight: 700; padding: 0.12rem 0.55rem; border-radius: 4px; text-transform: uppercase; letter-spacing: 0.05em; }
.rank-admin   { background: linear-gradient(135deg, var(--orange-hot), var(--orange-deep)); color: #0b0b0b; box-shadow: 0 0 14px var(--orange-glow); }
.rank-elite   { background: #0b0b0b; color: var(--orange); border: 1px solid var(--orange); }
.rank-veteran { background: rgba(255,122,26,0.15); color: var(--orange-hot); }
.rank-regular { background: var(--surface-3); color: var(--text); }
.rank-member  { background: var(--surface-3); color: #b4b4bc; }
.rank-newbie  { background: transparent; color: var(--muted); border: 1px solid var(--border); }

@media (max-width: 640px) {
    .post-inner { grid-template-columns: 1fr; }
    .postbit { flex-direction: row; flex-wrap: wrap; border-right: 0; border-bottom: 1px solid var(--border); justify-content: flex-start; }
    .avatar-lg { width: 40px; height: 40px; font-size: 1rem; }
}

/* ---- Forms ---- */
.form-body { padding: 1.2rem; display: grid; gap: 1rem; }
.form-row { display: grid; grid-template-columns: 2fr 1fr; gap: 1rem; }
.form label { display: grid; gap: 0.35rem; font-weight: 600; font-size: 0.85rem; }
.form input, .form textarea, .form select {
    background: var(--bg); color: var(--text);
    border: 1px solid var(--border); border-radius: 8px;
    padding: 0.7rem 0.85rem; font: inherit; font-weight: 400; resize: vertical;
}
.form input:focus, .form textarea:focus, .form select:focus { outline: none; border-color: var(--orange); box-shadow: 0 0 0 3px var(--orange-glow); }
.form .btn { justify-self: start; }
.errors ul { margin: 0; padding: 0.7rem 1rem 0.7rem 2rem; background: rgba(248,113,113,0.08); border: 1px solid #f87171; border-radius: 8px; color: #fca5a5; }
.validation-summary-valid { display: none; }

/* ---- Footer ---- */
.footer { border-top: 1px solid var(--border); padding: 1.2rem 0; color: var(--muted); font-size: 0.82rem; }
.footer-inner { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 0.5rem; }

/* ---- Accounts ---- */
.nav-user { display: flex; align-items: center; gap: 0.45rem; padding-left: 1rem; border-left: 1px solid var(--border); }
.avatar-sm { width: 26px; height: 26px; font-size: 0.75rem; border-radius: 7px; }
.inline-form { margin: 0; }
.link-btn { background: none; border: 0; color: var(--muted); font: 500 0.88rem "Inter", sans-serif; cursor: pointer; padding: 0; }
.link-btn:hover { color: var(--orange-hot); }

.auth-wrap { display: grid; grid-template-columns: 1.1fr 1fr; gap: 3rem; align-items: center; min-height: calc(100vh - 220px); max-width: 980px; margin: 0 auto; }
.auth-pitch h1 { font-size: 2.6rem; margin: 1rem 0 0.4rem; }
.auth-pitch > p { color: var(--muted); font-size: 1.05rem; margin: 0 0 1.4rem; }
.auth-points { list-style: none; padding: 0; margin: 0 0 1.4rem; display: grid; gap: 0.6rem; }
.auth-points li { display: flex; gap: 0.6rem; font-weight: 500; }
.auth-points span { color: var(--orange); }
.auth-card { margin: 0; box-shadow: 0 30px 80px -40px var(--orange); }
.btn-block { width: 100%; justify-self: stretch !important; padding: 0.8rem; }
.center { text-align: center; margin: 0; }
.check { display: flex !important; align-items: center; gap: 0.5rem; font-weight: 500 !important; }
.check input { width: 16px; height: 16px; accent-color: var(--orange); }
.hint { font-weight: 400; font-size: 0.75rem; color: var(--muted); }
.notice { background: var(--orange-glow); border: 1px solid rgba(255,122,26,0.5); border-radius: 8px; padding: 0.7rem 0.9rem; font-size: 0.88rem; }
.notice a { color: var(--orange-hot); font-weight: 600; }
.field-validation-error { color: #fca5a5; font-size: 0.78rem; }
@media (max-width: 860px) {
    .auth-wrap { grid-template-columns: 1fr; gap: 1.5rem; min-height: 0; }
    .auth-pitch h1 { font-size: 2rem; }
    .nav-user b { display: none; }
}

/* ---- Logo ---- */
.logo-img { width: 34px; height: 34px; margin-right: 0.15rem; filter: drop-shadow(0 0 10px rgba(255,122,26,0.35)); }
.logo-accent { color: var(--orange); }
.logo-img-sm { width: 18px; height: 18px; vertical-align: -4px; }
.footer-brand { display: inline-flex; align-items: center; gap: 0.4rem; }
.auth-logo { width: 84px; height: 84px; filter: drop-shadow(0 0 24px rgba(255,122,26,0.4)); }
.auth-single { grid-template-columns: minmax(0, 460px); justify-content: center; }

.form-fields { display: grid; gap: 1rem; margin: 0; }

/* ---- Confirm code ---- */
.confirm-top { text-align: center; }
.confirm-top p { margin: 0.6rem 0 0; }
.confirm-logo { width: 56px; height: 56px; filter: drop-shadow(0 0 18px rgba(255,122,26,0.4)); }
.code-input { text-align: center; font: 700 1.8rem "JetBrains Mono", monospace !important; letter-spacing: 0.6em; padding: 0.8rem !important; }
.inline-form.center { display: flex; justify-content: center; gap: 0.35rem; flex-wrap: wrap; align-items: center; font-size: 0.82rem; }
.link-btn.accent { color: var(--orange); font-weight: 600; font-size: 0.82rem; }
