:root {
    --bg-body: #f7f8fb;
    --bg-surface: #ffffff;
    --text-primary: #171923;
    --text-muted: #6b7280;
    --brand: #c0265a;
    --brand-dark: #9b1d49;
    --border: #e5e7eb;
    --header-bg: rgba(255, 255, 255, 0.92);
    --card-shadow: 0 10px 30px rgba(23, 25, 35, 0.08);
    --hero-overlay: linear-gradient(135deg, rgba(23, 25, 35, 0.88), rgba(192, 38, 90, 0.55));
}

html[data-theme="dark"] {
    --bg-body: #0f1117;
    --bg-surface: #171923;
    --text-primary: #f3f4f6;
    --text-muted: #9ca3af;
    --brand: #f472b6;
    --brand-dark: #db2777;
    --border: #2d3748;
    --header-bg: rgba(23, 25, 35, 0.95);
    --card-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
    --hero-overlay: linear-gradient(135deg, rgba(15, 17, 23, 0.92), rgba(219, 39, 119, 0.45));
}

html, body {
    height: 100%;
}

body {
    background: var(--bg-body);
    color: var(--text-primary);
    font-family: "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    display: flex;
    flex-direction: column;
}

.bg-surface,
.navbar.bg-surface,
.card,
.newsletter-panel {
    background-color: var(--bg-surface) !important;
}

.text-muted { color: var(--text-muted) !important; }

.site-header .navbar {
    background: var(--header-bg) !important;
    backdrop-filter: blur(8px);
}

.brand-mark {
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--text-primary);
}

.brand-x {
    color: var(--brand);
}

.navbar-light .navbar-nav .nav-link {
    color: var(--text-primary);
    font-weight: 600;
    font-size: 0.92rem;
}

.btn-primary {
    background-color: var(--brand);
    border-color: var(--brand);
}

.btn-primary:hover,
.btn-primary:focus {
    background-color: var(--brand-dark);
    border-color: var(--brand-dark);
}

.section-eyebrow,
.hero-eyebrow {
    color: var(--brand);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.12em;
}

.hero-parallax {
    position: relative;
    min-height: 72vh;
    overflow: hidden;
}

.hero-parallax-bg {
    position: absolute;
    inset: 0;
    background:
        var(--hero-overlay),
        url('https://images.unsplash.com/photo-1517836357463-d25dfeac3438?auto=format&fit=crop&w=1600&q=80') center/cover no-repeat;
    transform: translateZ(0);
    will-change: transform;
}

.hero-visual-frame {
    height: 420px;
    border-radius: 1rem;
    box-shadow: var(--card-shadow);
}

.img-placeholder {
    background-size: cover;
    background-position: center;
}

.img-placeholder-hero {
    background-image: linear-gradient(160deg, #374151, #c0265a);
}

.img-placeholder-1 { background-image: linear-gradient(160deg, #1f2937, #be185d); min-height: 220px; }
.img-placeholder-2 { background-image: linear-gradient(160deg, #312e81, #db2777); min-height: 220px; }
.img-placeholder-3 { background-image: linear-gradient(160deg, #134e4a, #9d174d); min-height: 220px; }

.img-placeholder-gallery-1 { min-height: 360px; background-image: linear-gradient(160deg, #111827, #7c2d12); }
.img-placeholder-gallery-2 { min-height: 360px; background-image: linear-gradient(160deg, #312e81, #be123c); }
.img-placeholder-gallery-3 { min-height: 360px; background-image: linear-gradient(160deg, #164e63, #831843); }

.article-card {
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.article-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--card-shadow);
}

.article-card-media-wrap {
    position: relative;
    display: block;
    overflow: hidden;
}

.article-card-media {
    width: 100%;
    display: block;
    min-height: 220px;
    object-fit: cover;
}

.card-title a,
.footer-links a,
.latest-list a {
    color: inherit;
}

.card-title a:hover,
.footer-links a:hover {
    color: var(--brand);
    text-decoration: none;
}

.card-meta { color: var(--brand); }

.premium-badge,
.nsfw-badge {
    position: absolute;
    top: 12px;
    z-index: 3;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 0.35rem 0.55rem;
    border-radius: 999px;
    color: #fff;
}

.premium-badge {
    left: 12px;
    background: rgba(17, 24, 39, 0.85);
}

.nsfw-badge {
    right: 12px;
    background: rgba(190, 24, 93, 0.9);
}

.nsfw-blurred .article-card-media,
.nsfw-blurred .gallery-slide-inner {
    filter: blur(18px);
    transform: scale(1.05);
}

.nsfw-blur-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(17, 24, 39, 0.35);
    color: #fff;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.8rem;
    z-index: 2;
}

.gallery-slide {
    position: relative;
    margin: 0 10px;
}

.gallery-slide-inner {
    border-radius: 0.75rem;
    width: 100%;
    min-height: 360px;
    object-fit: cover;
    display: block;
}

.article-body p,
.article-body h2 {
    margin-bottom: 1rem;
}

.article-hero {
    position: relative;
    overflow: hidden;
}

.article-hero.nsfw-blurred img {
    filter: blur(18px);
}

.paywall-notice {
    background: var(--bg-body);
}

.gallery-carousel .slick-prev,
.gallery-carousel .slick-next {
    z-index: 2;
}

.site-footer {
    background: var(--bg-surface);
    border-top: 1px solid var(--border);
}

.footer-bottom {
    border-color: var(--border) !important;
}

.footer-links a {
    color: var(--text-muted);
}

.static-page .static-body h2 {
    font-size: 1.25rem;
    margin-top: 1.75rem;
    margin-bottom: 0.75rem;
}

.protected-media {
    user-select: none;
    -webkit-user-drag: none;
}

html[data-theme="dark"] .navbar-light .navbar-toggler-icon {
    filter: invert(1);
}

html[data-theme="dark"] .list-group-item {
    color: var(--text-primary);
    border-color: var(--border);
}

.auth-card {
    background: var(--bg-surface);
}

.auth-form label {
    font-weight: 600;
    font-size: 0.9rem;
}

.page-auth main .alert:last-of-type {
    margin-bottom: 1rem;
}

@media (max-width: 991.98px) {
    .hero-parallax { min-height: 58vh; }
    .display-4 { font-size: 2.2rem; }
}
