:root {
    --bg: #0d0f1a;
    --bg-soft: #161a2b;
    --bg-card: #1b2036;
    --text: #e6e8f0;
    --muted: #8a90a8;
    --accent: #ff2e88;
    --accent-2: #25e0d8;
    --border: #2a3050;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
    line-height: 1.5;
}

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

.container { max-width: 1100px; margin: 0 auto; padding: 0 20px; }

/* Header */
.site-header {
    background: linear-gradient(90deg, #12152400, var(--bg-soft));
    border-bottom: 1px solid var(--border);
    position: sticky; top: 0; z-index: 10;
    backdrop-filter: blur(6px);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 60px; }
.brand { font-weight: 800; letter-spacing: 1px; color: var(--text); font-size: 1.3rem; }
.brand:hover { text-decoration: none; }
.brand-dot { color: var(--accent); }
.nav { display: flex; align-items: center; gap: 18px; }
.nav-user { color: var(--muted); }
.inline-form { display: inline; margin: 0; }
.link-btn { background: none; border: none; color: var(--accent-2); cursor: pointer; font-size: 1rem; padding: 0; }

/* Buttons */
.btn-accent, .btn-muted {
    display: inline-block; padding: 9px 16px; border-radius: 8px;
    font-weight: 600; border: none; cursor: pointer; font-size: 0.95rem;
}
.btn-accent { background: var(--accent); color: #fff; }
.btn-accent:hover { background: #ff4f9c; text-decoration: none; }
.btn-muted { background: var(--bg-card); color: var(--muted); border: 1px solid var(--border); }
.btn-muted:hover { text-decoration: none; }

/* Hero */
.hero { padding: 60px 0 30px; text-align: center; }
.hero h1 { font-size: 2.4rem; margin: 0 0 10px; }
.hero p { color: var(--muted); font-size: 1.1rem; margin: 0 0 24px; }

.section-title { margin: 40px 0 18px; border-left: 4px solid var(--accent); padding-left: 12px; }

/* Grid of novels */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 20px; }
.card {
    background: var(--bg-card); border: 1px solid var(--border); border-radius: 12px;
    overflow: hidden; transition: transform .15s, border-color .15s; color: var(--text);
}
.card:hover { transform: translateY(-4px); border-color: var(--accent); text-decoration: none; }
.card-cover { aspect-ratio: 3/4; background: #0a0c16; }
.card-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.no-cover { display: flex; align-items: center; justify-content: center; height: 100%; color: var(--muted); font-size: .85rem; }
.card-body { padding: 12px; }
.card-body h3 { margin: 0 0 8px; font-size: 1rem; }

.badge { display: inline-block; font-size: .75rem; padding: 2px 8px; border-radius: 20px; background: rgba(37,224,216,.12); color: var(--accent-2); }
.badge-muted { background: var(--bg-soft); color: var(--muted); }
.tag { display: inline-block; font-size: .8rem; padding: 2px 10px; margin: 0 4px 4px 0; border: 1px solid var(--border); border-radius: 20px; color: var(--muted); }

/* Filters */
.filters { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 24px; }
.filters input, .filters select {
    background: var(--bg-card); border: 1px solid var(--border); color: var(--text);
    padding: 9px 12px; border-radius: 8px; font-size: .95rem;
}
.filters input[type=search] { flex: 1; min-width: 200px; }

/* Novel detail */
.novel-head { display: flex; gap: 28px; flex-wrap: wrap; margin-bottom: 24px; }
.novel-cover { flex: 0 0 240px; }
.novel-cover img { width: 240px; border-radius: 12px; border: 1px solid var(--border); }
.novel-cover .no-cover { width: 240px; height: 320px; border: 1px solid var(--border); border-radius: 12px; }
.novel-meta { flex: 1; min-width: 260px; }
.novel-meta h1 { margin: 0 0 4px; }
.original-title { color: var(--muted); margin: 0 0 12px; }
.description { background: var(--bg-soft); border: 1px solid var(--border); border-radius: 12px; padding: 18px; }

.shots { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.shots img { width: 100%; border-radius: 10px; border: 1px solid var(--border); }
.shots figcaption { color: var(--muted); font-size: .85rem; margin-top: 6px; }

/* Releases table */
.releases { width: 100%; border-collapse: collapse; margin-top: 12px; }
.releases th, .releases td { text-align: left; padding: 12px; border-bottom: 1px solid var(--border); }
.releases th { color: var(--muted); font-weight: 600; font-size: .9rem; }

/* Auth */
.auth-card { max-width: 420px; margin: 50px auto; background: var(--bg-card); border: 1px solid var(--border); border-radius: 14px; padding: 30px; }
.auth-card h1 { margin-top: 0; }
.auth-card input { width: 100%; background: var(--bg-soft); border: 1px solid var(--border); color: var(--text); padding: 10px; border-radius: 8px; }
.auth-card p { margin: 12px 0; }
.auth-card label { display: block; margin-bottom: 4px; color: var(--muted); }
.auth-card .helptext { color: var(--muted); font-size: .8rem; display: block; }
.auth-card ul { color: var(--muted); font-size: .8rem; }
.auth-alt { text-align: center; color: var(--muted); }

/* Messages */
.message { padding: 12px 16px; border-radius: 8px; margin: 16px 0; border: 1px solid var(--border); }
.message-success { background: rgba(37,224,216,.1); border-color: var(--accent-2); }
.message-error { background: rgba(255,46,136,.12); border-color: var(--accent); }

.empty { color: var(--muted); padding: 30px 0; }

/* Footer */
.site-footer { margin-top: 60px; border-top: 1px solid var(--border); padding: 24px 0; color: var(--muted); font-size: .85rem; }

/* Age gate */
.age-body { display: flex; align-items: center; justify-content: center; min-height: 100vh; }
.age-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: 16px; padding: 40px; max-width: 460px; text-align: center; }
.age-card h1 { color: var(--accent); margin-top: 0; }
.age-buttons { display: flex; gap: 12px; justify-content: center; margin-top: 24px; }

/* ===================== Design polish v2 ===================== */
@font-face {
    font-family: 'Russo One';
    font-style: normal; font-weight: 400; font-display: swap;
    src: url("/static/fonts/russo-one-latin.07eb45e69b3a.woff2") format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
        U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: 'Russo One';
    font-style: normal; font-weight: 400; font-display: swap;
    src: url("/static/fonts/russo-one-cyrillic.78bde15ead87.woff2") format('woff2');
    unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

:root { --display: 'Russo One', 'Segoe UI', system-ui, sans-serif; }

.brand { font-family: var(--display); letter-spacing: 1.5px; }
.brand-dot { color: var(--accent); text-shadow: 0 0 14px rgba(255, 46, 136, .7); }

h1, h2, .section-title, .hero h1 { font-family: var(--display); letter-spacing: .5px; }

/* Hero */
.hero {
    position: relative;
    padding: 80px 20px 44px;
    border-radius: 16px;
    background:
        radial-gradient(60% 130% at 50% -20%, rgba(255, 46, 136, .18), transparent 60%),
        radial-gradient(45% 90% at 85% 0%, rgba(37, 224, 216, .12), transparent 60%);
}
.hero h1 {
    font-size: 2.8rem; line-height: 1.1;
    background: linear-gradient(90deg, var(--accent), var(--accent-2));
    -webkit-background-clip: text; background-clip: text; color: transparent;
}
.eyebrow {
    display: inline-block; margin-bottom: 14px; padding: 4px 14px;
    border: 1px solid var(--border); border-radius: 20px;
    color: var(--muted); font-size: .78rem; letter-spacing: 2px; text-transform: uppercase;
}

/* Genre chips (work as <span> or <a>) */
.tag { transition: border-color .15s, color .15s, background .15s; }
a.tag:hover {
    border-color: var(--accent); color: var(--accent);
    background: rgba(255, 46, 136, .08); text-decoration: none;
}

/* Cards: neon lift on hover */
.card:hover { box-shadow: 0 12px 32px rgba(255, 46, 136, .18); }
.btn-accent:hover { box-shadow: 0 6px 20px rgba(255, 46, 136, .4); }

/* Search autocomplete dropdown */
.search-wrap { position: relative; flex: 1; min-width: 220px; }
.search-wrap input[type=search] { width: 100%; }
.suggest-box {
    position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 30;
    display: none; overflow: hidden;
    background: var(--bg-card); border: 1px solid var(--border); border-radius: 10px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, .45);
}
.suggest-box a { display: block; padding: 10px 14px; color: var(--text); border-bottom: 1px solid var(--border); }
.suggest-box a:last-child { border-bottom: none; }
.suggest-box a:hover { background: var(--bg-soft); color: var(--accent-2); text-decoration: none; }
