/* ==========================================================
   Nexora Themes – dark, calm, modern
   No external resources: Inter is self-hosted (public/fonts)
   ========================================================== */
@font-face { font-family: "Inter"; font-weight: 400; font-style: normal; font-display: swap; src: url("../fonts/inter-Regular.woff") format("woff"); }
@font-face { font-family: "Inter"; font-weight: 500; font-style: normal; font-display: swap; src: url("../fonts/inter-Medium.woff") format("woff"); }
@font-face { font-family: "Inter"; font-weight: 600; font-style: normal; font-display: swap; src: url("../fonts/inter-SemiBold.woff") format("woff"); }
@font-face { font-family: "Inter"; font-weight: 700; font-style: normal; font-display: swap; src: url("../fonts/inter-Bold.woff") format("woff"); }
@font-face { font-family: "Inter"; font-weight: 800; font-style: normal; font-display: swap; src: url("../fonts/inter-ExtraBold.woff") format("woff"); }

:root {
    --bg: #050608;
    --panel: #0b0e15;
    --panel-2: #10141e;
    --line: #1a2133;
    --line-2: #262f47;
    --text: #f1f4fa;
    --muted: #8a93a8;
    --blue: #3b6cff;
    --blue-hover: #5b86ff;
    --link: #7ea3ff;
    --danger: #ff6b81;
    --radius: 14px;
    --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

/* ---------- Scrollbar (flat, modern) ---------- */
::-webkit-scrollbar { width: 12px; height: 12px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: #1c2438; border-radius: 12px; border: 3px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: #2b3757; }
@supports not selector(::-webkit-scrollbar) {
    html { scrollbar-width: thin; scrollbar-color: #1c2438 var(--bg); }
}

::selection { background: rgba(59, 108, 255, .4); color: #fff; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font);
    font-feature-settings: "calt", "kern", "liga";
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
h1, h2, h3 { line-height: 1.12; margin: 0; letter-spacing: -.025em; font-weight: 700; }
p { margin: 0; }
button { font-family: inherit; }

.container { width: 100%; max-width: 1140px; margin: 0 auto; padding: 0 22px; }
.container--narrow { max-width: 440px; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.row { display: flex; gap: 10px; align-items: center; }

/* ---------- Navbar ---------- */
.nav {
    position: sticky; top: 0; z-index: 50;
    background: rgba(5, 6, 8, .9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--line);
}
.nav__inner { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 16px; }
.nav__brand { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.nav__brand img { height: 36px; width: auto; }
.nav__brand-sub {
    font-weight: 600; color: var(--muted); font-size: .95rem;
    padding-left: 10px; border-left: 1px solid var(--line);
}
.nav__links { display: flex; align-items: center; gap: 22px; }
.nav__links a:not(.btn) { color: var(--muted); font-weight: 500; font-size: .95rem; transition: color .15s; }
.nav__links a:not(.btn):hover { color: var(--text); }
.nav__user { color: var(--text); font-weight: 500; font-size: .95rem; }
.nav__links form { margin: 0; }

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 11px 22px; border-radius: 10px; border: 1px solid var(--blue); cursor: pointer;
    background: var(--blue); color: #fff; font: inherit; font-weight: 600; font-size: .95rem;
    transition: background-color .15s, border-color .15s;
}
.btn:hover { background: var(--blue-hover); border-color: var(--blue-hover); }
.btn--sm { padding: 7px 15px; border-radius: 9px; font-size: .9rem; }
.btn--block { width: 100%; }
.btn--ghost { background: transparent; color: var(--text); border-color: var(--line-2); }
.btn--ghost:hover { background: var(--panel-2); border-color: #35416a; }

.link { color: var(--link); font-weight: 600; background: none; border: 0; padding: 0; cursor: pointer; font: inherit; font-weight: 600; }
.link:hover { text-decoration: underline; }
.link--danger { color: var(--danger); }

/* ---------- Hero ---------- */
.hero {
    text-align: center; padding: 104px 0 84px;
    background: linear-gradient(180deg, #0a0f1f 0%, var(--bg) 100%);
    border-bottom: 1px solid var(--line);
}
.pill {
    display: inline-block; padding: 5px 14px; border-radius: 999px;
    border: 1px solid var(--line-2); background: var(--panel);
    color: var(--link); font-size: .82rem; font-weight: 600; margin-bottom: 22px;
}
.hero h1 { font-size: clamp(2.2rem, 5.6vw, 3.8rem); font-weight: 800; letter-spacing: -.035em; }
.accent { color: var(--link); }
.hero__sub { max-width: 540px; margin: 22px auto 0; color: var(--muted); font-size: 1.08rem; }
.hero__cta { margin-top: 32px; display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ---------- Sections ---------- */
.section { padding: 56px 0; }
.section__head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 24px; gap: 12px; }
.section__head h2, .h2 { font-size: 1.6rem; font-weight: 700; }
.empty { padding: 56px; text-align: center; color: var(--muted); border: 1px dashed var(--line-2); border-radius: var(--radius); }

/* ---------- Cards ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; }
.card {
    background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
    overflow: hidden; transition: border-color .2s;
}
.card:hover { border-color: var(--line-2); }
.card__thumb { display: block; aspect-ratio: 16 / 10; background: var(--panel-2); overflow: hidden; }
.card__thumb img { width: 100%; height: 100%; object-fit: cover; }
.card__body { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 6px; }
.card__body h3 { font-size: 1.1rem; font-weight: 650; font-weight: 600; letter-spacing: -.015em; }
.card__foot { display: flex; justify-content: space-between; align-items: center; margin-top: 10px; }
.price { font-weight: 700; font-size: 1.05rem; }

.placeholder {
    width: 100%; height: 100%;
    display: grid; place-items: center;
    background: var(--panel-2);
}
.placeholder img { width: 56px; height: 56px; opacity: .9; }
.placeholder--lg { aspect-ratio: 16 / 10; border-radius: var(--radius); border: 1px solid var(--line); }
.placeholder--lg img { width: 88px; height: 88px; }

/* ---------- Theme page ---------- */
.crumbs { margin-bottom: 24px; }
.crumbs a:hover { color: var(--text); }
.detail { display: grid; grid-template-columns: 1.15fr 1fr; gap: 40px; align-items: start; }
.detail__media img { width: 100%; border-radius: var(--radius); border: 1px solid var(--line); }
.detail__info { display: flex; flex-direction: column; gap: 14px; }
.detail__info h1 { font-size: clamp(1.8rem, 4vw, 2.5rem); font-weight: 800; letter-spacing: -.03em; }
.detail__price { font-size: 1.8rem; font-weight: 700; }
.detail__cta { display: flex; gap: 12px; flex-wrap: wrap; margin: 4px 0 10px; }
.prose { color: #c4cad9; border-top: 1px solid var(--line); padding-top: 18px; }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--line); margin-top: 40px; padding: 30px 0; }
.footer__inner { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }

/* ---------- Auth ---------- */
.auth { padding: 72px 0; }
.auth__card { padding: 32px; margin: 0; }
.auth__head { margin-bottom: 6px; }
.auth__head h1 { font-size: 1.7rem; font-weight: 800; letter-spacing: -.03em; }
.auth__head p { margin-top: 6px; }
.auth__alt { margin-top: 20px; text-align: center; color: var(--muted); font-size: .92rem; }
.auth__alt a { color: var(--link); font-weight: 600; }
.auth__alt a:hover { text-decoration: underline; }

/* ---------- Forms / admin ---------- */
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); }
.form { padding: 28px; margin-top: 16px; display: flex; flex-direction: column; gap: 8px; }
.form label { font-size: .86rem; color: var(--muted); font-weight: 500; margin-top: 10px; }
.form input[type=text], .form input[type=email], .form input[type=password], .form input[type=url],
.form input[type=number], .form input:not([type]), .form textarea {
    width: 100%; padding: 11px 14px; border-radius: 10px;
    background: #06080d; border: 1px solid var(--line-2); color: var(--text); font: inherit; font-size: .95rem;
    transition: border-color .15s;
}
.form input::placeholder, .form textarea::placeholder { color: #566079; }
.form input[type=file] { color: var(--muted); font-size: .9rem; }
.form input:focus, .form textarea:focus { outline: none; border-color: var(--blue); }
.form .btn { margin-top: 16px; }
.form .check { display: flex; align-items: center; gap: 10px; color: var(--text); font-size: .92rem; }
.form .check input { accent-color: var(--blue); width: 16px; height: 16px; }
.form__preview { max-width: 220px; border-radius: 10px; border: 1px solid var(--line); }
.error { color: var(--danger); font-size: .85rem; }
.notice { background: rgba(59, 108, 255, .1); border: 1px solid #25376b; color: #bcd0ff; padding: 12px 16px; border-radius: 12px; margin-bottom: 18px; }

.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { padding: 14px 18px; text-align: left; border-bottom: 1px solid var(--line); }
.table th { color: var(--muted); font-size: .76rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }
.table tr:last-child td { border-bottom: 0; }
.actions { display: flex; gap: 16px; justify-content: flex-end; align-items: center; }
.badge { padding: 3px 10px; border-radius: 999px; font-size: .76rem; font-weight: 500; background: var(--panel-2); color: var(--muted); }
.badge--on { background: rgba(59, 108, 255, .14); color: var(--link); }

/* ---------- Responsive ---------- */
@media (max-width: 820px) {
    .detail { grid-template-columns: 1fr; }
    .hero { padding: 76px 0 56px; }
}
@media (max-width: 600px) {
    .nav__brand-sub, .nav__user, .nav__links a.nav__hide { display: none; }
    .nav__links { gap: 12px; }
}
