:root {
    --bg: #000000;
    --surface: #0a0a0b;
    --surface-2: #131316;
    --border: #26262a;
    --border-soft: #1a1a1d;
    --text: #f5f5f7;
    --muted: #9a9aa3;
    --white: #ffffff;
    --good: #d4d4d8;
    --bad: #ff6b6b;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
}

body { padding-bottom: 40px; }

img { max-width: 100%; }

a { color: inherit; }

/* ---------------- nav ---------------- */
.nav {
    position: sticky;
    top: 0;
    z-index: 20;
    background: rgba(0,0,0,0.75);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-soft);
}

.nav-inner {
    max-width: 1120px;
    margin: 0 auto;
    padding: 14px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    font-weight: 700;
    letter-spacing: 0.5px;
    font-size: 14px;
    color: var(--white);
}

.brand-mark {
    width: 30px;
    height: 30px;
    object-fit: contain;
}

.nav-links {
    display: flex;
    gap: 26px;
    font-size: 13.5px;
}

.nav-links a {
    text-decoration: none;
    color: var(--muted);
    padding-bottom: 4px;
    border-bottom: 2px solid transparent;
    transition: color .15s ease, border-color .15s ease;
}

.nav-links a:hover, .nav-links a.active {
    color: var(--white);
    border-color: var(--white);
}

/* ---------------- buttons ---------------- */
.btn-primary, .btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    border-radius: 9px;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    border: 1px solid transparent;
    transition: transform .1s ease, background .15s ease, opacity .15s ease;
}

.btn-primary {
    background: var(--white);
    color: #000;
}
.btn-primary:hover { background: #e2e2e5; }
.btn-primary:active { transform: scale(0.98); }

.btn-secondary {
    background: transparent;
    color: var(--text);
    border-color: var(--border);
}
.btn-secondary:hover { background: var(--surface-2); }

.btn-primary.small, .btn-secondary.small { padding: 9px 16px; font-size: 13px; }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }

/* ---------------- hero ---------------- */
.hero {
    max-width: 1120px;
    margin: 0 auto;
    padding: 64px 24px 40px;
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 40px;
    align-items: center;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: 0.6px;
    color: var(--muted);
    background: var(--surface-2);
    border: 1px solid var(--border);
    padding: 7px 14px;
    border-radius: 30px;
}
.badge .dot {
    width: 6px; height: 6px; border-radius: 50%;
    background: var(--white);
    box-shadow: 0 0 10px var(--white);
}

.hero h1 {
    font-size: 54px;
    line-height: 1.05;
    margin: 18px 0 14px;
    font-weight: 800;
    letter-spacing: -1px;
}

.hero h1 .grad {
    background: linear-gradient(90deg, #ffffff, #7a7a82);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero p {
    color: var(--muted);
    font-size: 15.5px;
    max-width: 440px;
    margin-bottom: 26px;
}

.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }

.hero-art {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 320px;
}

.hero-art .glow {
    position: absolute;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(255,255,255,0.18), rgba(255,255,255,0.02) 60%, transparent 70%);
    filter: blur(10px);
    border-radius: 50%;
}

.hero-art img {
    position: relative;
    width: 160px;
    filter: drop-shadow(0 0 40px rgba(255,255,255,0.25));
}

/* ---------------- feature grid ---------------- */
.features {
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 24px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.feature-card {
    background: var(--surface);
    border: 1px solid var(--border-soft);
    border-radius: 12px;
    padding: 18px;
}

.feature-card .icon {
    width: 34px; height: 34px;
    border-radius: 9px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    display: flex; align-items: center; justify-content: center;
    margin-bottom: 12px;
    color: var(--white);
}

.feature-card h3 { font-size: 14px; margin: 0 0 4px; }
.feature-card p { font-size: 12.5px; color: var(--muted); margin: 0; line-height: 1.5; }

/* ---------------- two-column section (products / market) ---------------- */
.split {
    max-width: 1120px;
    margin: 40px auto 0;
    padding: 0 24px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.panel {
    background: var(--surface);
    border: 1px solid var(--border-soft);
    border-radius: 14px;
    padding: 22px;
}

.panel-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 4px;
}

.panel-head h2 { font-size: 17px; margin: 0; }
.panel-head span.link { font-size: 12.5px; color: var(--muted); }
.panel > p.sub { color: var(--muted); font-size: 12.5px; margin: 0 0 16px; }

.product-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 14px 16px;
    margin-bottom: 10px;
}

.product-row:last-child { margin-bottom: 0; }
.product-row .name { font-weight: 700; font-size: 14px; }
.product-row .status { font-size: 11px; color: var(--muted); }

.tag {
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.4px;
    padding: 3px 9px;
    border-radius: 20px;
    border: 1px solid var(--border);
}
.tag.live { color: var(--good); border-color: #3a3a40; }
.tag.soon { color: var(--muted); }

/* ---------------- auth cards (login/register/dashboard) ---------------- */
.auth-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 24px;
}

.card {
    width: 100%;
    max-width: 380px;
    background: var(--surface);
    border: 1px solid var(--border-soft);
    border-radius: 14px;
    padding: 32px 28px;
    box-shadow: 0 30px 70px rgba(0,0,0,0.55);
}

.card.wide { max-width: 420px; }

.brand-block {
    text-align: center;
    margin-bottom: 22px;
}
.brand-block img { width: 40px; margin-bottom: 10px; filter: drop-shadow(0 0 18px rgba(255,255,255,0.2)); }
.brand-block h1 { font-size: 18px; margin: 0 0 2px; letter-spacing: 0.3px; }
.brand-block p { margin: 0; font-size: 12.5px; color: var(--muted); }

label {
    display: block;
    font-size: 12px;
    color: var(--muted);
    margin: 14px 0 6px;
}

input {
    width: 100%;
    background: #000000;
    border: 1px solid var(--border);
    color: var(--text);
    padding: 11px 12px;
    border-radius: 8px;
    font-size: 14px;
    outline: none;
    transition: border-color .15s ease;
}
input:focus { border-color: var(--white); }

button.btn-primary { width: 100%; margin-top: 20px; border: none; }

.msg {
    margin-top: 14px;
    font-size: 13px;
    text-align: center;
    min-height: 18px;
}
.msg.ok { color: var(--good); }
.msg.err { color: var(--bad); }

.footer-link {
    text-align: center;
    margin-top: 18px;
    font-size: 12.5px;
    color: var(--muted);
}
.footer-link a { color: var(--white); text-decoration: none; font-weight: 600; }
.footer-link a:hover { text-decoration: underline; }

.status-box {
    background: #000000;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 16px;
}
.status-row {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    padding: 6px 0;
}
.status-row span:first-child { color: var(--muted); }
.pill {
    display: inline-block;
    padding: 2px 9px;
    border-radius: 20px;
    font-size: 11.5px;
    font-weight: 700;
    border: 1px solid var(--border);
}
.pill.active { color: var(--good); }
.pill.inactive { color: var(--bad); border-color: #3a2323; }

hr.sep { border: none; border-top: 1px solid var(--border-soft); margin: 22px 0; }
.small-title { font-size: 13px; font-weight: 700; margin-bottom: 4px; }

/* ---------------- admin panel ---------------- */
.admin-page {
    max-width: 1080px;
    margin: 0 auto;
    padding: 32px 24px 60px;
}

.admin-page h1 { font-size: 22px; margin: 0 0 4px; }
.admin-page > p.sub { color: var(--muted); font-size: 13px; margin: 0 0 24px; }

.admin-section {
    background: var(--surface);
    border: 1px solid var(--border-soft);
    border-radius: 14px;
    padding: 20px;
    margin-bottom: 20px;
}

.admin-section h2 {
    font-size: 15px;
    margin: 0 0 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.admin-section h2 .count {
    font-size: 11.5px;
    font-weight: 600;
    color: var(--muted);
    background: var(--surface-2);
    border: 1px solid var(--border);
    padding: 2px 9px;
    border-radius: 20px;
}

.inline-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
    margin-bottom: 14px;
}

.inline-row input {
    width: auto;
    flex: 1;
    min-width: 120px;
}

.inline-row input.small { flex: 0 0 90px; min-width: 70px; }

.inline-row .btn-primary, .inline-row .btn-secondary {
    padding: 10px 16px;
    white-space: nowrap;
}

.gen-output {
    background: #000;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 12px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 12.5px;
    line-height: 1.7;
    color: var(--good);
    white-space: pre-wrap;
    word-break: break-all;
    margin-top: 4px;
}

.table-wrap { overflow-x: auto; }

table.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12.5px;
}

table.admin-table th {
    text-align: left;
    color: var(--muted);
    font-weight: 600;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    padding: 8px 10px;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}

table.admin-table td {
    padding: 10px;
    border-bottom: 1px solid var(--border-soft);
    vertical-align: middle;
    white-space: nowrap;
}

table.admin-table tr:last-child td { border-bottom: none; }

.row-actions {
    display: flex;
    gap: 6px;
    align-items: center;
}

.row-actions input {
    width: 56px;
    padding: 6px 8px;
    font-size: 12px;
}

.btn-mini {
    padding: 6px 10px;
    font-size: 11.5px;
    font-weight: 700;
    border-radius: 6px;
    border: 1px solid var(--border);
    background: var(--surface-2);
    color: var(--text);
    cursor: pointer;
}
.btn-mini:hover { background: #1c1c20; }
.btn-mini.danger { color: var(--bad); }
.btn-mini.active-state { color: var(--good); border-color: #2a3a30; }

.badge-admin {
    font-size: 10px;
    font-weight: 700;
    color: #000;
    background: var(--white);
    padding: 2px 7px;
    border-radius: 20px;
    margin-left: 6px;
}

.empty-row td {
    text-align: center;
    color: var(--muted);
    padding: 24px 10px;
}

.site-footer {
    text-align: center;
    color: var(--muted);
    font-size: 12px;
    padding: 30px 24px 0;
}

/* ---------------- responsive ---------------- */
@media (max-width: 860px) {
    .hero { grid-template-columns: 1fr; padding-top: 40px; }
    .hero h1 { font-size: 38px; }
    .hero-art { height: 180px; }
    .features { grid-template-columns: repeat(2, 1fr); }
    .split { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
    .features { grid-template-columns: 1fr; }
    .nav-links { display: none; }
}
