@import url('styles-extra.css');
/* ============================================================
   OTAKU REALM — Manga / Brutalist Aesthetic
   Mobile-First Responsive CSS  (v4.0)
   ============================================================ */

/* ── Variables ─────────────────────────────────────────────── */
:root {
    --black: #050505;
    --white: #fdfdfd;
    --gray-light: #e0e0e0;
    --gray-dark: #333333;
    --border-w: 4px;
    --shadow-offset: 8px;
    --font-main: 'Outfit', sans-serif;
    --font-jp: 'Noto Sans JP', sans-serif;
    --halftone: url('data:image/svg+xml;utf8,<svg width="4" height="4" xmlns="http://www.w3.org/2000/svg"><circle cx="2" cy="2" r="1" fill="%23000"/></svg>');
    --halftone-white: url('data:image/svg+xml;utf8,<svg width="4" height="4" xmlns="http://www.w3.org/2000/svg"><circle cx="2" cy="2" r="1" fill="%23fff"/></svg>');
    --accent: #ff0055;
}

/* ── Skeleton Shimmer ─────────────────────────────────────── */
.skeleton {
    background: var(--gray-light);
    background-image: linear-gradient(
        90deg, 
        rgba(255, 255, 255, 0) 0, 
        rgba(255, 255, 255, 0.2) 20%, 
        rgba(255, 255, 255, 0.5) 60%, 
        rgba(255, 255, 255, 0)
    );
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    100% { background-position: -200% 0; }
}

/* ── Page Transitions ─────────────────────────────────────── */
.page-transition {
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}
.page-transition.loaded {
    opacity: 1;
    transform: translateY(0);
}

/* ── Back to Top ──────────────────────────────────────────── */
#back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    background: var(--black);
    color: var(--white);
    border: var(--border-w) solid var(--black);
    box-shadow: 4px 4px 0 var(--gray-light);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: 0.3s;
    font-weight: 900;
}
#back-to-top.visible {
    opacity: 1;
    visibility: visible;
}
#back-to-top:hover {
    transform: translate(-2px, -2px);
    box-shadow: 6px 6px 0 var(--gray-light);
}

/* ── Reset ─────────────────────────────────────────────────── */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 70px;
    overflow-x: clip;
    max-width: 100vw;
    border: none !important;
    outline: none !important;
}

body {
    border: none !important;
    outline: none !important;
    font-family: var(--font-main);
    background-color: var(--white);
    color: var(--black);
    line-height: 1.6;
    overflow-x: clip;
}

h1, h2, h3, h4 {
    text-transform: uppercase;
    font-weight: 900;
    line-height: 1.1;
    letter-spacing: -0.02em;
}

a {
    color: var(--black);
    text-decoration: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ── Layout Utilities ──────────────────────────────────────── */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.25rem;
}

.section {
    padding: 4rem 0;
    border-bottom: var(--border-w) solid var(--black);
}

.border-top  { border-top: var(--border-w) solid var(--black); }
.bg-dots     { background-image: var(--halftone); }
.center      { text-align: center; }

.text-outline {
    color: var(--white);
    -webkit-text-stroke: 2px var(--black);
}
.px-2 {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
    display: inline-block;
}
.bg-white {
    background-color: var(--white);
    color: var(--black);
}

/* ── Navigation ────────────────────────────────────────────── */
.manga-nav {
    border-bottom: var(--border-w) solid var(--black);
    background: var(--white);
    position: sticky;
    top: 0;
    z-index: 2000;
}

.nav-inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0.75rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    justify-content: space-between;
    flex-wrap: nowrap;
}

/* Logo */
.logo {
    display: flex;
    align-items: baseline;
    gap: 0.4rem;
    font-weight: 900;
    font-size: 1.4rem;
    white-space: nowrap;
    flex-shrink: 0;
}
.logo-accent {
    color: var(--white);
    background: var(--black);
    padding: 0 0.4rem;
}
.logo-jp {
    font-family: var(--font-jp);
    font-size: 0.9rem;
    color: var(--gray-dark);
}

/* Search bar */
.search-bar {
    position: relative;
    flex: 1 1 0;
    min-width: 0;
    margin: 0 2rem;
    max-width: 600px;
}
#search-input {
    width: 100%;
    padding: 0.55rem 0.9rem;
    border: var(--border-w) solid var(--black);
    font-family: var(--font-main);
    font-weight: 700;
    font-size: 0.95rem;
    background: var(--white);
    box-shadow: 4px 4px 0px var(--black);
    transition: transform 0.1s, box-shadow 0.1s;
}
#search-input:focus {
    outline: none;
    transform: translate(2px, 2px);
    box-shadow: 2px 2px 0px var(--black);
}

/* Nav links */
.nav-links {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    list-style: none;
    font-weight: 800;
    font-size: 0.9rem;
    flex-shrink: 0;
}
.nav-links a {
    position: relative;
    white-space: nowrap;
}
.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0%;
    height: 3px;
    background: var(--black);
    transition: width 0.2s ease;
}
.nav-links a:hover::after { width: 100%; }

/* Hamburger button — hidden on desktop */
.nav-hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    background: none;
    border: var(--border-w) solid var(--black);
    cursor: pointer;
    flex-shrink: 0;
    margin-left: auto;
    padding: 6px;
}
.nav-hamburger span {
    display: block;
    width: 100%;
    height: 3px;
    background: var(--black);
    transition: transform 0.25s, opacity 0.25s;
}
.nav-hamburger.open span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; }
.nav-hamburger.open span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* Search results dropdown */
.search-results {
    position: absolute;
    top: calc(100% + 5px);
    left: 0;
    right: 0;
    width: 100%;
    background: var(--white);
    border: 3px solid var(--black);
    box-shadow: 10px 10px 0 var(--black);
    display: none;
    max-height: 500px;
    overflow-y: auto;
    z-index: 1000;
}

@media (max-width: 640px) {
    .search-results {
        width: 100%;
        left: 0;
        box-shadow: 5px 5px 0 var(--black);
    }
}
.search-results.active { display: block; }
.search-result-item {
    padding: 0.9rem 1rem;
    border-bottom: 2px solid var(--black);
    display: block;
    color: var(--black);
}
.search-result-item:last-child { border-bottom: none; }
.search-result-item:hover {
    background: var(--black);
    color: var(--white);
}
.search-result-item:hover h4 { color: var(--white); }

/* ── Hero Section ──────────────────────────────────────────── */
.hero {
    min-height: 70vh;
    display: flex;
    align-items: center;
    border-bottom: var(--border-w) solid var(--black);
    background-image:
        linear-gradient(45deg, #f0f0f0 25%, transparent 25%, transparent 75%, #f0f0f0 75%, #f0f0f0),
        linear-gradient(45deg, #f0f0f0 25%, transparent 25%, transparent 75%, #f0f0f0 75%, #f0f0f0);
    background-size: 40px 40px;
    background-position: 0 0, 20px 20px;
}

.hero-content {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1.25rem;
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 2rem;
    align-items: center;
}

.hero-text-wrap {
    background: var(--white);
    border: var(--border-w) solid var(--black);
    padding: 2.5rem;
    box-shadow: 12px 12px 0px var(--black);
    position: relative;
}
.hero-text-wrap::before {
    content: '';
    position: absolute;
    top: -10px;
    left: -10px;
    width: 40px;
    height: 40px;
    background: var(--black);
    clip-path: polygon(0 0, 100% 0, 0 100%);
}

.hero-tag {
    font-weight: 800;
    font-size: 0.85rem;
    letter-spacing: 2px;
    margin-bottom: 1rem;
}

/* Fluid title: scales from ~2.2rem on smallest phone to 5rem on desktop */
.hero-title {
    font-size: clamp(2.2rem, 8vw, 5rem);
    margin-bottom: 1.5rem;
    line-height: 1;
}

.hero-sub {
    font-size: clamp(0.95rem, 2.5vw, 1.2rem);
    font-weight: 500;
    margin-bottom: 2rem;
}

.hero-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

/* Hero graphic / kanji circle */
.hero-graphic {
    display: flex;
    justify-content: center;
    align-items: center;
}
.halftone-circle {
    width: clamp(200px, 35vw, 340px);
    height: clamp(200px, 35vw, 340px);
    border-radius: 50%;
    background-image: var(--halftone);
    border: var(--border-w) solid var(--black);
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 10px 10px 0px rgba(0,0,0,0.1);
}
.hero-kanji {
    font-family: var(--font-jp);
    font-size: clamp(6rem, 14vw, 13rem);
    font-weight: 900;
    color: var(--black);
    line-height: 1;
    text-shadow: 6px 6px 0px var(--white), 10px 10px 0px var(--black);
}

/* ── Buttons ───────────────────────────────────────────────── */
.btn {
    display: inline-block;
    padding: 0.75rem 1.75rem;
    font-weight: 800;
    text-transform: uppercase;
    font-size: 1rem;
    border: var(--border-w) solid var(--black);
    cursor: pointer;
    transition: transform 0.1s, box-shadow 0.1s;
}
.btn-manga {
    background: var(--black);
    color: var(--white);
    box-shadow: 4px 4px 0px var(--gray-light);
}
.btn-manga:hover {
    transform: translate(2px, 2px);
    box-shadow: 2px 2px 0px var(--gray-light);
}
.btn-manga-alt {
    background: var(--white);
    color: var(--black);
    box-shadow: 4px 4px 0px var(--black);
}
.btn-manga-alt:hover {
    transform: translate(2px, 2px);
    box-shadow: 2px 2px 0px var(--black);
}

/* ── Section Headers ───────────────────────────────────────── */
.manga-header { margin-bottom: 2.5rem; }
.manga-header.center {
    background: var(--white);
    display: inline-block;
    padding: 1rem 2rem;
    border: var(--border-w) solid var(--black);
    box-shadow: var(--shadow-offset) var(--shadow-offset) 0px var(--black);
    margin: 0 auto 2.5rem auto;
}
.section-title {
    font-size: clamp(1.8rem, 5vw, 3rem);
}
.section-title span {
    color: var(--white);
    background: var(--black);
    padding: 0 0.5rem;
}
.header-line {
    height: var(--border-w);
    background: var(--black);
    margin-top: 1rem;
}

/* ── Category Grid ─────────────────────────────────────────── */
.category-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: 200px;
    gap: 1.25rem;
}
.cat-panel {
    border: var(--border-w) solid var(--black);
    background: var(--white);
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-offset) var(--shadow-offset) 0px var(--black);
    transition: transform 0.2s, box-shadow 0.2s;
    overflow: hidden;
    position: relative;
}
.cat-panel:hover {
    transform: translate(-4px, -4px);
    box-shadow: 10px 10px 0px var(--black);
}
.wide-panel { grid-column: span 2; }
.panel-header {
    background: var(--black);
    color: var(--white);
    font-weight: 900;
    padding: 0.2rem 0.5rem;
    border-bottom: var(--border-w) solid var(--black);
}
.panel-content {
    padding: 1.25rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.panel-content h3 {
    font-size: 1.3rem;
    margin-bottom: 0.4rem;
}
.big-kanji {
    font-family: var(--font-jp);
    font-size: 5rem;
    color: var(--gray-light);
    position: absolute;
    bottom: -1rem;
    right: 1rem;
    z-index: 0;
}
.panel-content h3,
.panel-content p {
    position: relative;
    z-index: 1;
}

/* ── Power / Rank Panels ───────────────────────────────────── */
.power-rankings-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    max-width: 900px;
    margin: 0 auto;
    width: 100%;
}
.rank-panel {
    display: flex;
    border: var(--border-w) solid var(--black);
    background: var(--white);
    box-shadow: var(--shadow-offset) var(--shadow-offset) 0px var(--black);
    transition: transform 0.2s;
}
.rank-panel:hover { transform: translateX(-6px); }
.rank-number {
    background: var(--black);
    color: var(--white);
    font-size: 2.5rem;
    font-weight: 900;
    padding: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    writing-mode: vertical-rl;
    text-orientation: mixed;
    border-right: var(--border-w) solid var(--black);
    flex-shrink: 0;
}
.rank-content {
    padding: 1.25rem;
    flex-grow: 1;
    min-width: 0;
}
.rank-content h3 {
    font-size: 1.75rem;
    display: inline-block;
}
.series-tag {
    font-weight: 700;
    background: var(--gray-light);
    padding: 0.2rem 0.5rem;
    margin-left: 0.75rem;
    border: 2px solid var(--black);
    font-size: 0.75rem;
    text-transform: uppercase;
    vertical-align: middle;
}
.manga-power-bar {
    height: 14px;
    border: 2px solid var(--black);
    margin: 0.75rem 0;
    background: var(--halftone);
}
.manga-power-bar .fill {
    height: 100%;
    background: var(--black);
    border-right: 2px solid var(--black);
}

/* ── Genre Masters Grid ────────────────────────────────────── */
.genre-grid-manga {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
    gap: 1.5rem;
}
.genre-panel {
    border: var(--border-w) solid var(--black);
    padding: 2rem;
    box-shadow: var(--shadow-offset) var(--shadow-offset) 0px var(--black);
    position: relative;
    background: var(--white);
}
.genre-panel.dark-panel {
    background: var(--black);
    color: var(--white);
}
.genre-panel.dark-panel p { color: var(--gray-light); }
.genre-panel.striped-bg {
    background-image: repeating-linear-gradient(
        45deg,
        transparent, transparent 10px,
        var(--black) 10px, var(--black) 12px
    );
}
.genre-tag {
    position: absolute;
    top: -15px;
    left: 20px;
    background: var(--black);
    color: var(--white);
    padding: 0.2rem 1rem;
    font-weight: 900;
    border: var(--border-w) solid var(--black);
}
.genre-tag.inverted {
    background: var(--white);
    color: var(--black);
}
.genre-panel h3 {
    font-size: clamp(1.5rem, 4vw, 2rem);
    margin-bottom: 0.75rem;
    margin-top: 0.75rem;
}

/* ── Footer ────────────────────────────────────────────────── */
.manga-footer {
    background: var(--black);
    color: var(--white);
    padding: 3rem 0 1.5rem 0;
    border-top: 10px solid var(--white);
}
.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 2rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}
.footer-content h2 {
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    margin-bottom: 0.5rem;
}
.footer-links {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    text-align: right;
}
.footer-links a {
    color: var(--white);
    font-weight: 800;
    font-size: 1.1rem;
}
.footer-links a:hover { text-decoration: underline; }
.footer-bottom {
    border-top: 2px solid var(--gray-dark);
    padding-top: 1.5rem;
    text-align: center;
    font-weight: 700;
}

/* ── Night / Dark Mode ─────────────────────────────────────── */
body.dark-mode, html.dark-mode body {
    --black: #fdfdfd;
    --white: #050505;
    --gray-light: #333333;
    --gray-dark: #e0e0e0;
    --halftone: url('data:image/svg+xml;utf8,<svg width="4" height="4" xmlns="http://www.w3.org/2000/svg"><circle cx="2" cy="2" r="1" fill="%23fff"/></svg>');
    --halftone-white: url('data:image/svg+xml;utf8,<svg width="4" height="4" xmlns="http://www.w3.org/2000/svg"><circle cx="2" cy="2" r="1" fill="%23000"/></svg>');
}

/* ── Toast Notifications ───────────────────────────────────── */
.toast {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    padding: 1rem 1.5rem;
    border: var(--border-w) solid var(--black);
    font-weight: 800;
    z-index: 9999;
    box-shadow: 4px 4px 0 var(--black);
    animation: slideIn 0.3s ease;
}
.toast.success { background: var(--white); color: var(--black); }
.toast.error   { background: var(--black); color: var(--white); }
@keyframes slideIn {
    from { transform: translateY(60px); opacity: 0; }
    to   { transform: translateY(0);    opacity: 1; }
}

/* ================================================================
   RESPONSIVE BREAKPOINTS
   ================================================================ */

/* ── Tablet  (≤ 900px) ─────────────────────────────────────── */
@media (max-width: 900px) {
    .section { padding: 3rem 0; }

    .hero-content {
        grid-template-columns: 1fr;
    }
    .hero-graphic { display: none; } /* Hide kanji circle on tablet/mobile */

    .category-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-auto-rows: auto;
    }
    .wide-panel { grid-column: span 2; }

    .footer-links { text-align: left; }
}

/* ── Mobile  (≤ 640px) ─────────────────────────────────────── */
@media (max-width: 640px) {

    /* Nav: collapse to hamburger */
    /* Nav: Bulletproof Grid Areas for total control */
    .nav-inner {
        display: grid !important;
        grid-template-areas: 
            "logo burger"
            "search search"
            "links links" !important;
        grid-template-columns: 1fr auto !important;
        gap: 0 !important;
        padding: 0.75rem 1rem !important;
    }

    .logo { 
        grid-area: logo;
        justify-self: start;
    }
    .nav-hamburger { 
        grid-area: burger;
        display: flex;
        justify-self: end;
    }

    /* Search Bar: Layer 2, Full Width */
    .search-bar {
        grid-area: search;
        width: 100% !important;
        margin: 0 !important;
        display: none;
        padding: 0;
        background: var(--white);
        border-bottom: 2px solid var(--gray-light);
        z-index: 100;
    }
    .search-bar.nav-open {
        display: block !important;
        margin-top: 1rem !important;
    }
    #search-input {
        width: 100% !important;
        border: none !important;
        box-shadow: none !important;
        padding: 1.2rem 1rem !important;
        background: var(--white) !important;
        font-size: 1.1rem !important;
        border-radius: 0 !important;
        font-weight: 800 !important;
        height: auto !important;
    }

    /* Nav links: Layer 3, Full Width */
    .nav-links {
        grid-area: links;
        width: 100% !important;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
    }
    .nav-links.open {
        max-height: 600px;
    }
    .nav-links li {
        border-bottom: 2px solid var(--gray-light);
    }
    .nav-links a, .nav-links button {
        display: block;
        padding: 1.2rem 1rem;
        font-size: 1.1rem;
        font-weight: 800;
    }

    /* Hero */
    .hero { min-height: auto; }
    .hero-content { padding: 1.5rem 1rem; }
    .hero-text-wrap {
        padding: 1.5rem;
        box-shadow: 6px 6px 0px var(--black);
    }
    .hero-text-wrap::before { display: none; }
    .hero-title { font-size: clamp(2rem, 9vw, 3rem); }
    .hero-buttons { flex-direction: column; }
    .btn { text-align: center; }

    /* Sections */
    .section { padding: 2.5rem 0; }

    /* Stack grids on small phones */
    .category-grid, .genre-grid-manga {
        grid-template-columns: 1fr !important;
    }
    .wide-panel { grid-column: span 1 !important; }

    /* Category grid: single column */
    .category-grid {
        grid-template-columns: 1fr;
        grid-auto-rows: auto;
    }
    .wide-panel { grid-column: auto; }

    /* Genre grid: single column */
    .genre-grid-manga {
        grid-template-columns: 1fr;
    }

    /* Section title */
    .section-title { font-size: clamp(1.6rem, 7vw, 2.5rem); }

    /* Rank panels: stack vertically */
    .rank-panel { flex-direction: column; }
    .rank-number {
        writing-mode: horizontal-tb;
        border-right: none;
        border-bottom: var(--border-w) solid var(--black);
        padding: 0.6rem 1rem;
        font-size: 1.5rem;
        width: 100%;
        justify-content: flex-start;
        letter-spacing: 2px;
    }
    .rank-content h3 { font-size: 1.3rem; }
    .series-tag { margin-left: 0; display: inline-block; margin-top: 0.5rem; }

    /* Footer */
    .footer-content {
        flex-direction: column;
        gap: 1.5rem;
    }
    .footer-links { text-align: left; }
    .manga-footer { padding: 2rem 0 1rem 0; }

    /* Panel content: keep left-aligned on mobile */
    .panel-content { align-items: flex-start; }
    .cat-panel { text-align: left; }
}

/* ── Very small phones (≤ 380px) ───────────────────────────── */
@media (max-width: 380px) {
    .logo { font-size: 1.1rem; }
    .hero-title { font-size: 1.9rem; }
    .btn { padding: 0.65rem 1.25rem; font-size: 0.9rem; }
}

/* ── Fix inline-style grids on subpages for mobile ─────────── */
/* The character list / manga-vs-anime comparisons use          */
/* style="display:grid; grid-template-columns: 1fr 1fr"         */
/* which can't be targeted with a class selector. We override   */
/* them at 640px using a targeted descendant rule.              */
@media (max-width: 640px) {
    /* Collapse any grid inside .article-body on mobile */
    .article-body [style*="grid-template-columns"],
    .rank-content [style*="grid-template-columns"] {
        display: block !important;
    }
    .article-body [style*="grid-template-columns"] > *,
    .rank-content [style*="grid-template-columns"] > * {
        margin-bottom: 1.25rem;
    }

    /* Subpage hero: override inline font-size on hero-title */
    .hero-title[style*="font-size"] {
        font-size: clamp(2rem, 8vw, 3rem) !important;
    }

    /* Subpage hero: override inline grid on hero-content */
    .hero-content[style*="grid-template-columns"] {
        grid-template-columns: 1fr !important;
    }

    .article-panel .rank-number[style*="font-size"] {
        font-size: 1.4rem !important;
    }
}

/* ============================================================
   OTAKU REALM — NEW ENHANCEMENTS STYLING (Brutalist Theme)
   ============================================================ */

/* ── Tags and Badges ── */
.post-tags-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.6rem;
    margin-bottom: 0.6rem;
}
.post-tag-badge {
    font-size: 0.65rem;
    font-weight: 800;
    text-transform: uppercase;
    background: var(--white);
    color: var(--black);
    padding: 2px 8px;
    border: 2px solid var(--black);
    box-shadow: 2px 2px 0 var(--black);
    display: inline-block;
    letter-spacing: 0.5px;
    transition: transform 0.1s, box-shadow 0.1s;
}
.post-tag-badge:hover {
    transform: translate(-1px, -1px);
    box-shadow: 3px 3px 0 var(--black);
}

/* ── Interactive Tag Filters (Archive Page) ── */
.tag-filters-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 2px dashed var(--black);
}
.tag-filter-btn {
    font-size: 0.72rem;
    font-weight: 900;
    text-transform: uppercase;
    background: var(--white);
    color: var(--black);
    padding: 0.4rem 0.8rem;
    border: 3px solid var(--black);
    box-shadow: 3px 3px 0 var(--black);
    cursor: pointer;
    letter-spacing: 0.5px;
    transition: all 0.15s;
}
.tag-filter-btn:hover {
    transform: translate(-2px, -2px);
    box-shadow: 5px 5px 0 var(--black);
    background: var(--gray-light);
}
.tag-filter-btn.active {
    background: var(--accent);
    color: #fdfdfd;
    transform: translate(1px, 1px);
    box-shadow: 1px 1px 0 var(--black);
}

/* ── Homepage Layout & Popular Sidebar ── */
.daily-layout-wrapper {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2.5rem;
}
@media (min-width: 992px) {
    .daily-layout-wrapper {
        grid-template-columns: 2.1fr 0.9fr;
    }
}
.popular-sidebar {
    border: 4px solid var(--black);
    box-shadow: 6px 6px 0 var(--black);
    background: var(--white);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    height: fit-content;
}
@media (max-width: 991px) {
    .popular-sidebar {
        margin-top: 1.5rem;
    }
}
.sidebar-header {
    font-size: 1.15rem;
    font-weight: 900;
    text-transform: uppercase;
    border-bottom: 4px solid var(--black);
    padding-bottom: 0.5rem;
    margin-bottom: 1.25rem;
    background: var(--accent);
    color: #fdfdfd;
    padding: 0.4rem 0.8rem;
    border: 3px solid var(--black);
    box-shadow: 3px 3px 0 var(--black);
    text-align: center;
    letter-spacing: 1px;
}
.popular-list {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}
.popular-item {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    padding-bottom: 1.25rem;
    border-bottom: 2px dashed var(--gray-light);
}
.popular-item:last-child {
    padding-bottom: 0;
    border-bottom: none;
    margin-bottom: 0;
}
.popular-rank {
    background: var(--black);
    color: var(--white);
    font-weight: 900;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    border: 2px solid var(--black);
    flex-shrink: 0;
    box-shadow: 2px 2px 0 var(--accent);
}
.popular-details {
    flex: 1;
    min-width: 0;
}
.popular-title {
    font-size: 0.92rem;
    font-weight: 900;
    text-transform: uppercase;
    color: var(--black);
    text-decoration: none;
    line-height: 1.25;
    display: block;
    transition: color 0.15s;
    word-wrap: break-word;
}
.popular-title:hover {
    color: var(--accent);
}
.popular-meta {
    font-size: 0.68rem;
    font-weight: 800;
    color: var(--gray-dark);
    margin-top: 0.35rem;
    text-transform: uppercase;
    display: block;
}

/* ── Share Bar & Buttons ── */
.share-bar-container {
    margin: 2.5rem 0;
    border-top: 4px solid var(--black);
    border-bottom: 4px solid var(--black);
    padding: 1.5rem 0;
    background: var(--gray-light);
}
.share-title {
    font-size: 1.1rem;
    font-weight: 900;
    text-transform: uppercase;
    margin-bottom: 1rem;
    letter-spacing: 0.5px;
    color: var(--black);
}
.share-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
}
@media (max-width: 600px) {
    .share-buttons {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0.6rem;
    }
}
.share-btn {
    font-size: 0.75rem;
    font-weight: 900;
    text-transform: uppercase;
    padding: 0.6rem 1.2rem;
    border: 3px solid var(--black);
    box-shadow: 3px 3px 0 var(--black);
    color: #fdfdfd;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    letter-spacing: 0.5px;
    transition: all 0.15s;
}
@media (max-width: 600px) {
    .share-btn {
        width: 100%;
        padding: 0.5rem 0.8rem;
        font-size: 0.7rem;
    }
}
.share-btn:hover {
    transform: translate(-2px, -2px);
    box-shadow: 5px 5px 0 var(--black);
}
.share-btn:active {
    transform: translate(1px, 1px);
    box-shadow: 1px 1px 0 var(--black);
}
.share-btn.whatsapp  { background: #25D366; }
.share-btn.instagram { background: #E1306C; }
.share-btn.telegram  { background: #0088cc; }
.share-btn.twitter   { background: #111111; }
.share-btn.copy      { background: #666666; }

/* ── Related Articles Section ── */
.related-posts-container {
    margin: 3rem 0;
    border-top: 4px solid var(--black);
    padding-top: 2rem;
}
.related-title {
    font-size: 1.6rem;
    font-weight: 900;
    text-transform: uppercase;
    margin-bottom: 1.5rem;
    letter-spacing: 0.5px;
    color: var(--black);
    position: relative;
    display: inline-block;
}
.related-title::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--accent);
    border: 2px solid var(--black);
}
.related-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}
@media (min-width: 768px) {
    .related-grid {
        grid-template-columns: 1fr 1fr;
    }
}

/* ── Dynamic Newsletter signup in single article ── */
.article-newsletter {
    margin: 3rem 0;
    border: 4px solid var(--black);
    box-shadow: 6px 6px 0 var(--black);
    background: var(--white);
    padding: 2rem;
    position: relative;
    overflow: hidden;
}
.article-newsletter::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100px;
    height: 100px;
    background-image: var(--halftone);
    opacity: 0.15;
    pointer-events: none;
}
.article-newsletter-title {
    font-size: 1.35rem;
    font-weight: 900;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
    color: var(--black);
}
.article-newsletter-sub {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--gray-dark);
    margin-bottom: 1.5rem;
    line-height: 1.5;
}
.article-newsletter-form {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
@media(min-width: 600px) {
    .article-newsletter-form {
        flex-direction: row;
    }
}
.article-newsletter-input {
    flex: 1;
    border: 3px solid var(--black);
    padding: 0.8rem 1.2rem;
    font-family: var(--font-main);
    font-weight: 700;
    box-sizing: border-box;
    background: var(--gray-light);
    color: var(--black);
    outline: none;
    font-size: 0.95rem;
}
.article-newsletter-btn {
    border: 3px solid var(--black);
    background: var(--black);
    color: var(--white);
    padding: 0.8rem 1.5rem;
    font-weight: 900;
    text-transform: uppercase;
    cursor: pointer;
    box-shadow: 3px 3px 0 var(--accent);
    transition: all 0.15s;
    font-family: var(--font-main);
    font-size: 0.95rem;
}
.article-newsletter-btn:hover {
    transform: translate(-2px, -2px);
    box-shadow: 5px 5px 0 var(--accent);
}
.article-newsletter-btn:active {
    transform: translate(1px, 1px);
    box-shadow: 1px 1px 0 var(--accent);
}

/* ============================================================
   MOBILE & NIGHT MODE LEGIBILITY CONTRAST FIXES
   ============================================================ */

/* ── 1. Dark Mode Hero Checkerboard Contrast ── */
body.dark-mode .hero {
    background-image:
        linear-gradient(45deg, #151515 25%, transparent 25%, transparent 75%, #151515 75%, #151515),
        linear-gradient(45deg, #151515 25%, transparent 25%, transparent 75%, #151515 75%, #151515) !important;
}

/* ── 2. Dark Mode Badge/Tag Text Color Contrast ── */
body.dark-mode .series-tag,
body.dark-mode .post-tag-badge,
body.dark-mode .tag-filter-btn,
body.dark-mode span[style*="background:"][style*="color: var(--white)"],
body.dark-mode span[style*="background:"][style*="color:var(--white)"],
body.dark-mode a[style*="background:"][style*="color: var(--white)"],
body.dark-mode a[style*="background:"][style*="color:var(--white)"] {
    color: #fdfdfd !important;
}

/* ── 3. Dark Mode Input Fields Placeholder Contrast ── */
::placeholder {
    color: var(--gray-dark) !important;
    opacity: 0.75 !important;
}

/* ── 4. Dynamic Watchlist & Watch Order Relations Badges Contrast ── */
body.dark-mode #watch-order-timeline [style*="color: var(--white)"],
body.dark-mode #watch-order-timeline [style*="color:var(--white)"] {
    color: #fdfdfd !important;
}

/* ── 5. Mobile Navigation Menu Items Alignment (≤ 640px) ── */
@media (max-width: 640px) {
    .nav-links {
        padding: 0 !important;
        margin: 0 !important;
    }
    #nav-auth-btn {
        display: block;
        width: 100%;
    }
    #nav-auth-btn a,
    #nav-auth-btn .nav-user-btn,
    #theme-toggle {
        padding: 1.2rem 1rem !important;
        font-size: 1.1rem !important;
        width: 100% !important;
        text-align: left !important;
        border: none !important;
        box-shadow: none !important;
        background: none !important;
        color: var(--black) !important;
        display: block !important;
    }
    #nav-auth-btn a:hover,
    #nav-auth-btn .nav-user-btn:hover,
    #theme-toggle:hover {
        background: var(--gray-light) !important;
    }
}


