/*
Theme Name: ComicsXX
Theme URI: https://comicsxx.example.com
Description: A beautiful, responsive WordPress theme designed exclusively for adult comics websites. Features a 4-column comic grid, age verification gate, SEO optimization, sidebar, and a stylish red-and-white responsive design.
Author: ComicsXX Theme
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 8.0
License: GPL v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: comicsxx
Tags: comics, adult, responsive, red, white, custom-menu, custom-logo, featured-images, post-thumbnails, threaded-comments, translation-ready, sidebar, grid-layout
*/

/* ============================================================
   ROOT VARIABLES & RESET
   ============================================================ */
:root {
    --primary:        #CC0000;
    --primary-dark:   #990000;
    --primary-light:  #FF3333;
    --primary-hover:  #FF0000;
    --bg-dark:        #111111;
    --bg-darker:      #0A0A0A;
    --bg-card:        #FFFFFF;
    --text-dark:      #222222;
    --text-muted:     #666666;
    --text-light:     #FFFFFF;
    --border:         #E8E8E8;
    --border-dark:    #333333;
    --shadow-sm:      0 2px 8px rgba(0,0,0,.12);
    --shadow-md:      0 4px 20px rgba(0,0,0,.18);
    --shadow-lg:      0 8px 40px rgba(0,0,0,.25);
    --shadow-red:     0 4px 20px rgba(204,0,0,.35);
    --radius-sm:      4px;
    --radius-md:      8px;
    --radius-lg:      12px;
    --radius-xl:      20px;
    --transition:     .25s ease;
    --font-body:      'Inter', 'Segoe UI', system-ui, sans-serif;
    --font-heading:   'Bebas Neue', 'Anton', 'Impact', sans-serif;
    --max-width:      1400px;
    --sidebar-width:  300px;
    --header-height:  70px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; font-size: 16px; }

body {
    font-family: var(--font-body);
    background: #F5F5F5;
    color: var(--text-dark);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--primary-light); }
ul, ol { list-style: none; }
button, input, textarea, select { font-family: inherit; }

/* ============================================================
   AGE GATE
   ============================================================ */
#age-gate {
    position: fixed;
    inset: 0;
    background: linear-gradient(135deg, var(--bg-darker) 0%, #1a0000 50%, var(--bg-darker) 100%);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.age-gate__box {
    background: var(--bg-dark);
    border: 2px solid var(--primary);
    border-radius: var(--radius-xl);
    padding: 50px 40px;
    max-width: 480px;
    width: 100%;
    text-align: center;
    box-shadow: 0 0 60px rgba(204,0,0,.4), var(--shadow-lg);
    animation: gateIn .5s ease;
}

@keyframes gateIn {
    from { opacity: 0; transform: scale(.9) translateY(-20px); }
    to   { opacity: 1; transform: scale(1) translateY(0); }
}

.age-gate__icon {
    font-size: 4rem;
    margin-bottom: 15px;
    display: block;
    filter: drop-shadow(0 0 12px var(--primary));
}

.age-gate__title {
    font-family: var(--font-heading);
    font-size: 2.8rem;
    color: var(--primary);
    letter-spacing: 2px;
    margin-bottom: 8px;
}

.age-gate__subtitle {
    font-size: 1.1rem;
    color: var(--text-light);
    margin-bottom: 8px;
    font-weight: 600;
}

.age-gate__text {
    color: #aaa;
    font-size: .9rem;
    margin-bottom: 32px;
    line-height: 1.7;
}

.age-gate__buttons {
    display: flex;
    gap: 14px;
    justify-content: center;
    flex-wrap: wrap;
}

.age-gate__btn {
    padding: 14px 36px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    border: none;
    letter-spacing: .5px;
    transition: all var(--transition);
}

.age-gate__btn--yes {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #fff;
    box-shadow: var(--shadow-red);
}

.age-gate__btn--yes:hover {
    background: linear-gradient(135deg, var(--primary-light), var(--primary));
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(204,0,0,.5);
}

.age-gate__btn--no {
    background: transparent;
    color: #888;
    border: 2px solid #444;
}

.age-gate__btn--no:hover { border-color: #666; color: #aaa; }

.age-gate__legal {
    margin-top: 24px;
    font-size: .78rem;
    color: #555;
    line-height: 1.6;
}

/* ============================================================
   HEADER
   ============================================================ */
#site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: var(--bg-dark);
    border-bottom: 3px solid var(--primary);
    box-shadow: 0 2px 20px rgba(0,0,0,.5);
    height: var(--header-height);
}

.header__inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
    height: 100%;
    display: flex;
    align-items: center;
    gap: 24px;
}

/* Logo */
.site-logo {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-light);
    font-family: var(--font-heading);
    font-size: 1.8rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    transition: opacity var(--transition);
}

.site-logo:hover { opacity: .85; color: var(--text-light); }

.site-logo img {
    height: 42px;
    width: auto;
}

.site-logo__text {
    display: flex;
    flex-direction: column;
    line-height: 1;
}

.site-logo__name {
    color: var(--primary);
    font-size: 1.5rem;
    font-family: var(--font-heading);
    letter-spacing: 3px;
}

.site-logo__tagline {
    font-size: .65rem;
    color: #888;
    font-family: var(--font-body);
    font-weight: 400;
    letter-spacing: 1px;
    text-transform: uppercase;
}

/* Primary Navigation */
.primary-nav {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 4px;
}

.nav-menu > li {
    position: relative;
}

.nav-menu > li > a {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 8px 14px;
    color: #ccc;
    font-weight: 600;
    font-size: .875rem;
    text-transform: uppercase;
    letter-spacing: .8px;
    border-radius: var(--radius-sm);
    transition: all var(--transition);
    white-space: nowrap;
}

.nav-menu > li > a:hover,
.nav-menu > li.current-menu-item > a,
.nav-menu > li.current-menu-parent > a {
    color: var(--text-light);
    background: var(--primary);
}

/* Dropdown */
.nav-menu .sub-menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    min-width: 200px;
    background: var(--bg-dark);
    border: 1px solid var(--border-dark);
    border-top: 3px solid var(--primary);
    border-radius: 0 var(--radius-md) var(--radius-md) var(--radius-md);
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all var(--transition);
    z-index: 100;
}

.nav-menu > li:hover .sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nav-menu .sub-menu li a {
    display: block;
    padding: 10px 18px;
    color: #bbb;
    font-size: .85rem;
    font-weight: 500;
    border-bottom: 1px solid var(--border-dark);
    transition: all var(--transition);
}

.nav-menu .sub-menu li:last-child a { border-bottom: none; }
.nav-menu .sub-menu li a:hover { color: #fff; background: rgba(204,0,0,.25); padding-left: 24px; }

/* Header Search */
.header-search {
    flex-shrink: 0;
    display: flex;
    align-items: center;
}

.header-search--mobile {
    display: none;
}

.header-search__form {
    display: flex;
    align-items: center;
    background: rgba(255,255,255,.08);
    border: 1px solid rgba(255,255,255,.15);
    border-radius: 50px;
    overflow: hidden;
    transition: all var(--transition);
}

.header-search__form:focus-within {
    border-color: var(--primary);
    background: rgba(255,255,255,.12);
    box-shadow: 0 0 0 3px rgba(204,0,0,.2);
}

.header-search__input {
    background: none;
    border: none;
    outline: none;
    color: #fff;
    padding: 9px 16px;
    font-size: .875rem;
    width: 220px;
    transition: width var(--transition);
}

.header-search__input::placeholder { color: #777; }

.header-search__btn {
    background: var(--primary);
    border: none;
    color: #fff;
    padding: 9px 16px;
    cursor: pointer;
    font-size: 1rem;
    transition: background var(--transition);
    display: flex;
    align-items: center;
}

.header-search__btn:hover { background: var(--primary-dark); }

/* Mobile Toggle */
.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 8px;
    background: none;
    border: none;
    margin-left: auto;
}

.nav-toggle__bar {
    width: 26px;
    height: 2.5px;
    background: var(--text-light);
    border-radius: 2px;
    transition: all .3s ease;
    display: block;
}

.nav-toggle.active .nav-toggle__bar:nth-child(1) {
    transform: translateY(7.5px) rotate(45deg);
}
.nav-toggle.active .nav-toggle__bar:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-toggle.active .nav-toggle__bar:nth-child(3) {
    transform: translateY(-7.5px) rotate(-45deg);
}

/* ============================================================
   HERO / BANNER
   ============================================================ */
.hero-banner {
    background: linear-gradient(135deg, var(--bg-darker) 0%, #2a0000 40%, var(--primary-dark) 100%);
    padding: 60px 24px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero-banner::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23CC0000' fill-opacity='0.08'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    pointer-events: none;
}

.hero-banner__content { position: relative; z-index: 1; }

.hero-banner__badge {
    display: inline-block;
    background: var(--primary);
    color: #fff;
    font-size: .75rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    padding: 5px 16px;
    border-radius: 50px;
    margin-bottom: 16px;
}

.hero-banner__title {
    font-family: var(--font-heading);
    font-size: clamp(2.5rem, 6vw, 5rem);
    color: var(--text-light);
    letter-spacing: 3px;
    text-transform: uppercase;
    line-height: 1;
    margin-bottom: 12px;
    text-shadow: 0 0 40px rgba(204,0,0,.6);
}

.hero-banner__title span { color: var(--primary); }

.hero-banner__text {
    color: #bbb;
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
}

/* ============================================================
   LAYOUT
   ============================================================ */
#content-wrapper {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 40px 24px;
    display: grid;
    grid-template-columns: 1fr var(--sidebar-width);
    gap: 32px;
    align-items: start;
}

#primary { min-width: 0; }

/* ============================================================
   SECTION TITLE
   ============================================================ */
.section-title {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 28px;
}

.section-title__text {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    color: var(--text-dark);
    letter-spacing: 2px;
    text-transform: uppercase;
    line-height: 1;
}

.section-title__line {
    flex: 1;
    height: 2px;
    background: linear-gradient(to right, var(--primary), transparent);
}

.section-title__badge {
    background: var(--primary);
    color: #fff;
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    padding: 4px 12px;
    border-radius: 50px;
}

/* ============================================================
   COMICS GRID
   ============================================================ */
.comics-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

/* ============================================================
   COMIC CARD
   ============================================================ */
.comic-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all .3s ease;
    position: relative;
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border);
}

.comic-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-md), 0 0 0 2px var(--primary);
}

.comic-card__thumb {
    position: relative;
    overflow: hidden;
    aspect-ratio: 3/4;
    background: #1a1a1a;
}

.comic-card__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .5s ease;
}

.comic-card:hover .comic-card__thumb img {
    transform: scale(1.07);
}

.comic-card__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, transparent 40%, rgba(0,0,0,.85) 100%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 12px;
    opacity: 0;
    transition: opacity .3s ease;
}

.comic-card:hover .comic-card__overlay { opacity: 1; }

.comic-card__overlay-btn {
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 50px;
    padding: 9px;
    font-weight: 700;
    font-size: .8rem;
    letter-spacing: .5px;
    text-align: center;
    cursor: pointer;
    text-transform: uppercase;
    transition: background var(--transition);
}

.comic-card__overlay-btn:hover { background: var(--primary-dark); color: #fff; }

/* Badges */
.comic-card__badges {
    position: absolute;
    top: 10px;
    left: 10px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    z-index: 2;
}

.comic-badge {
    display: inline-block;
    font-size: .65rem;
    font-weight: 700;
    letter-spacing: .8px;
    text-transform: uppercase;
    padding: 3px 10px;
    border-radius: 50px;
    line-height: 1.4;
}

.comic-badge--new   { background: var(--primary); color: #fff; }
.comic-badge--hot   { background: #FF6B00; color: #fff; }
.comic-badge--adult { background: #111; color: #fff; border: 1px solid #444; }

.comic-card__rating {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0,0,0,.75);
    color: #FFD700;
    font-size: .75rem;
    font-weight: 700;
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    gap: 3px;
    z-index: 2;
    backdrop-filter: blur(4px);
}

.comic-card__body {
    padding: 14px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.comic-card__genre {
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--primary);
}

.comic-card__title {
    font-size: .95rem;
    font-weight: 700;
    color: var(--text-dark);
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.comic-card__title a { color: inherit; }
.comic-card__title a:hover { color: var(--primary); }

.comic-card__meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
    padding-top: 8px;
    border-top: 1px solid var(--border);
    font-size: .75rem;
    color: var(--text-muted);
    gap: 8px;
}

.comic-card__chapters {
    display: flex;
    align-items: center;
    gap: 4px;
    font-weight: 600;
}

.comic-card__date {
    color: #999;
    white-space: nowrap;
}

/* ============================================================
   PAGINATION
   ============================================================ */
.pagination-wrap {
    margin-top: 40px;
    display: flex;
    justify-content: center;
}

.pagination {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    justify-content: center;
}

.page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    height: 42px;
    padding: 0 10px;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: .9rem;
    color: var(--text-dark);
    background: #fff;
    border: 1px solid var(--border);
    transition: all var(--transition);
}

.page-numbers:hover {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

.page-numbers.current {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
    box-shadow: var(--shadow-red);
}

.page-numbers.dots {
    background: none;
    border: none;
    color: #aaa;
    pointer-events: none;
}

.page-numbers.prev,
.page-numbers.next {
    background: var(--bg-dark);
    color: #fff;
    border-color: var(--bg-dark);
    gap: 6px;
    padding: 0 18px;
}

.page-numbers.prev:hover,
.page-numbers.next:hover {
    background: var(--primary);
    border-color: var(--primary);
}

/* ============================================================
   SIDEBAR
   ============================================================ */
#sidebar {
    position: sticky;
    top: calc(var(--header-height) + 20px);
}

.widget {
    background: #fff;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    margin-bottom: 24px;
    border: 1px solid var(--border);
}

.widget__title {
    background: linear-gradient(135deg, var(--bg-dark), #2a0000);
    color: var(--text-light);
    font-family: var(--font-heading);
    font-size: 1rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    padding: 14px 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
}

.widget__title::before {
    content: '';
    width: 4px;
    height: 18px;
    background: var(--primary);
    border-radius: 2px;
    display: block;
}

.widget__body { padding: 20px; }

/* Widget: Search */
.widget-search .search-form {
    display: flex;
    gap: 0;
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 2px solid var(--border);
    transition: border-color var(--transition);
}

.widget-search .search-form:focus-within { border-color: var(--primary); }

.widget-search .search-field {
    flex: 1;
    border: none;
    outline: none;
    padding: 10px 14px;
    font-size: .9rem;
    background: #fafafa;
}

.widget-search .search-submit {
    background: var(--primary);
    color: #fff;
    border: none;
    padding: 10px 16px;
    cursor: pointer;
    font-size: .95rem;
    transition: background var(--transition);
}

.widget-search .search-submit:hover { background: var(--primary-dark); }

/* Widget: Categories/List */
.widget ul li {
    border-bottom: 1px solid var(--border);
    padding: 0;
}

.widget ul li:last-child { border-bottom: none; }

.widget ul li a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0;
    color: var(--text-dark);
    font-size: .9rem;
    font-weight: 500;
    transition: all var(--transition);
}

.widget ul li a:hover { color: var(--primary); padding-left: 6px; }

.widget ul li a .count {
    background: var(--primary);
    color: #fff;
    font-size: .65rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 50px;
    min-width: 26px;
    text-align: center;
}

/* Widget: Recent Comics */
.widget-recent-comic {
    display: flex;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
    align-items: flex-start;
}

.widget-recent-comic:last-child { border-bottom: none; padding-bottom: 0; }
.widget-recent-comic:first-child { padding-top: 0; }

.widget-recent-comic__thumb {
    flex-shrink: 0;
    width: 60px;
    height: 80px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: #eee;
}

.widget-recent-comic__thumb img { width: 100%; height: 100%; object-fit: cover; }

.widget-recent-comic__title {
    font-size: .85rem;
    font-weight: 600;
    color: var(--text-dark);
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color var(--transition);
}

.widget-recent-comic__title:hover { color: var(--primary); }
.widget-recent-comic__meta { font-size: .75rem; color: var(--text-muted); margin-top: 4px; }

/* Widget: Tags Cloud */
.widget-tags { display: flex; flex-wrap: wrap; gap: 8px; }

.widget-tag {
    display: inline-block;
    background: #f3f3f3;
    color: var(--text-dark);
    font-size: .78rem;
    font-weight: 600;
    padding: 5px 12px;
    border-radius: 50px;
    border: 1px solid var(--border);
    transition: all var(--transition);
}

.widget-tag:hover {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

/* ============================================================
   SINGLE COMIC
   ============================================================ */
.single-comic { background: #fff; border-radius: var(--radius-lg); padding: 32px; box-shadow: var(--shadow-sm); }

.single-comic__header { margin-bottom: 28px; }

.single-comic__genres { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }

.single-comic__genre-tag {
    background: var(--primary);
    color: #fff;
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    padding: 4px 14px;
    border-radius: 50px;
}

.single-comic__title {
    font-family: var(--font-heading);
    font-size: clamp(1.8rem, 4vw, 3rem);
    color: var(--text-dark);
    letter-spacing: 1px;
    line-height: 1.1;
    margin-bottom: 16px;
}

.single-comic__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    padding: 16px 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    margin-bottom: 24px;
    font-size: .875rem;
    color: var(--text-muted);
}

.single-comic__meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.single-comic__meta-label { font-weight: 600; color: var(--text-dark); }

.single-comic__layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 32px;
    align-items: start;
}

.single-comic__cover {
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    aspect-ratio: 3/4;
}

.single-comic__cover img { width: 100%; height: 100%; object-fit: cover; }

.single-comic__description {
    font-size: 1rem;
    line-height: 1.8;
    color: #444;
    margin-bottom: 20px;
}

.single-comic__actions { display: flex; gap: 12px; flex-wrap: wrap; }

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    border-radius: 50px;
    font-weight: 700;
    font-size: .9rem;
    text-transform: uppercase;
    letter-spacing: .5px;
    cursor: pointer;
    border: none;
    transition: all var(--transition);
}

.btn--primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #fff;
    box-shadow: var(--shadow-red);
}

.btn--primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(204,0,0,.5);
    color: #fff;
}

.btn--outline {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
}

.btn--outline:hover { background: var(--primary); color: #fff; }

/* ============================================================
   PAGE / STATIC PAGE
   ============================================================ */
.page-content-wrap {
    background: #fff;
    border-radius: var(--radius-lg);
    padding: 36px;
    box-shadow: var(--shadow-sm);
}

.page-title {
    font-family: var(--font-heading);
    font-size: 2.4rem;
    color: var(--text-dark);
    letter-spacing: 1px;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 3px solid var(--primary);
}

.entry-content { line-height: 1.8; color: #444; }
.entry-content h1, .entry-content h2, .entry-content h3,
.entry-content h4, .entry-content h5, .entry-content h6 {
    font-family: var(--font-heading);
    color: var(--text-dark);
    letter-spacing: 1px;
    margin: 24px 0 12px;
}
.entry-content h2 { font-size: 1.8rem; }
.entry-content h3 { font-size: 1.5rem; }
.entry-content p { margin-bottom: 1.2em; }
.entry-content a { color: var(--primary); text-decoration: underline; }
.entry-content ul, .entry-content ol { padding-left: 24px; margin-bottom: 1.2em; list-style: revert; }
.entry-content blockquote {
    border-left: 4px solid var(--primary);
    padding: 14px 20px;
    background: #fff5f5;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    margin: 1.5em 0;
    font-style: italic;
    color: #555;
}

/* ============================================================
   404 PAGE
   ============================================================ */
.error-404-wrap {
    text-align: center;
    padding: 80px 24px;
    background: #fff;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.error-404-wrap .error-number {
    font-family: var(--font-heading);
    font-size: clamp(6rem, 20vw, 14rem);
    color: var(--primary);
    line-height: 1;
    text-shadow: 0 0 60px rgba(204,0,0,.3);
    letter-spacing: 4px;
}

.error-404-wrap .error-title {
    font-family: var(--font-heading);
    font-size: 2rem;
    color: var(--text-dark);
    letter-spacing: 2px;
    margin-bottom: 12px;
}

.error-404-wrap .error-text { color: var(--text-muted); font-size: 1.1rem; margin-bottom: 32px; }

/* ============================================================
   SEARCH RESULTS
   ============================================================ */
.search-header {
    background: #fff;
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 28px;
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.search-header__term {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    color: var(--text-dark);
    letter-spacing: 1px;
}

.search-header__term span { color: var(--primary); }

.search-header__count {
    background: var(--primary);
    color: #fff;
    font-size: .8rem;
    font-weight: 700;
    padding: 4px 14px;
    border-radius: 50px;
}

/* ============================================================
   ARCHIVE HEADER
   ============================================================ */
.archive-header {
    background: linear-gradient(135deg, var(--bg-dark), #2a0000);
    border-radius: var(--radius-lg);
    padding: 30px;
    margin-bottom: 28px;
    position: relative;
    overflow: hidden;
}

.archive-header::after {
    content: '';
    position: absolute;
    right: -30px;
    top: -30px;
    width: 120px;
    height: 120px;
    background: rgba(204,0,0,.15);
    border-radius: 50%;
    pointer-events: none;
}

.archive-header__type {
    font-size: .75rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--primary);
    margin-bottom: 8px;
}

.archive-header__title {
    font-family: var(--font-heading);
    font-size: 2rem;
    color: var(--text-light);
    letter-spacing: 2px;
    text-transform: uppercase;
}

.archive-header__description { color: #aaa; font-size: .9rem; margin-top: 8px; }

/* ============================================================
   FOOTER
   ============================================================ */
#site-footer {
    background: var(--bg-darker);
    margin-top: 60px;
    border-top: 3px solid var(--primary);
}

.footer-widgets {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 50px 24px 40px;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
}

.footer-widget__title {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    color: var(--text-light);
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary);
}

.footer-brand__description {
    color: #777;
    font-size: .875rem;
    line-height: 1.7;
    margin-bottom: 20px;
}

.footer-social {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.footer-social__link {
    width: 38px;
    height: 38px;
    background: rgba(255,255,255,.06);
    border: 1px solid #333;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #888;
    font-size: .9rem;
    transition: all var(--transition);
}

.footer-social__link:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

.footer-links li {
    border-bottom: 1px solid rgba(255,255,255,.06);
    padding: 0;
}

.footer-links li:last-child { border-bottom: none; }

.footer-links li a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 0;
    color: #777;
    font-size: .875rem;
    transition: all var(--transition);
}

.footer-links li a::before {
    content: '›';
    color: var(--primary);
    font-weight: 700;
    font-size: 1rem;
}

.footer-links li a:hover { color: #ccc; padding-left: 6px; }

.footer-bottom {
    border-top: 1px solid #222;
    padding: 20px 24px;
}

.footer-bottom__inner {
    max-width: var(--max-width);
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

.footer-copyright {
    color: #555;
    font-size: .8rem;
}

.footer-copyright a { color: var(--primary); }
.footer-copyright a:hover { color: var(--primary-light); }

.footer-disclaimer {
    color: #444;
    font-size: .75rem;
    text-align: center;
    max-width: 600px;
}

.footer-legal-links {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.footer-legal-links a {
    color: #555;
    font-size: .78rem;
    transition: color var(--transition);
}

.footer-legal-links a:hover { color: #ccc; }

/* ============================================================
   READING PROGRESS BAR
   ============================================================ */
#reading-progress {
    position: fixed;
    top: var(--header-height);
    left: 0;
    height: 3px;
    background: var(--primary);
    z-index: 999;
    width: 0%;
    transition: width .1s linear;
    box-shadow: 0 0 8px rgba(204,0,0,.6);
}

/* ============================================================
   BACK TO TOP
   ============================================================ */
#back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 46px;
    height: 46px;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 50%;
    font-size: 1.1rem;
    cursor: pointer;
    box-shadow: var(--shadow-red);
    transition: all var(--transition);
    opacity: 0;
    pointer-events: none;
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
}

#back-to-top.visible { opacity: 1; pointer-events: auto; }
#back-to-top:hover { background: var(--primary-dark); transform: translateY(-3px); }

/* ============================================================
   NOTICE / ALERT
   ============================================================ */
.alert {
    padding: 14px 20px;
    border-radius: var(--radius-md);
    font-size: .9rem;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.alert--warning {
    background: #fff3cd;
    border-left: 4px solid #ffc107;
    color: #856404;
}

.alert--18 {
    background: #fff0f0;
    border-left: 4px solid var(--primary);
    color: #922;
}

/* ============================================================
   LOADING SKELETON
   ============================================================ */
@keyframes shimmer {
    0%   { background-position: -1000px 0; }
    100% { background-position: 1000px 0; }
}

.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e8e8e8 37%, #f0f0f0 63%);
    background-size: 1000px 100%;
    animation: shimmer 1.4s infinite;
    border-radius: var(--radius-sm);
}

/* ============================================================
   UTILITIES
   ============================================================ */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.container { max-width: var(--max-width); margin: 0 auto; padding: 0 24px; }
.text-center { text-align: center; }
.text-red { color: var(--primary); }
.mb-0 { margin-bottom: 0; }
.mt-4 { margin-top: 1rem; }

/* ============================================================
   RESPONSIVE — TABLET (max 1100px)
   ============================================================ */
@media (max-width: 1100px) {
    :root { --sidebar-width: 260px; }

    .comics-grid { grid-template-columns: repeat(3, 1fr); gap: 16px; }

    .footer-widgets { grid-template-columns: 1fr 1fr; gap: 32px; }

    .header-search__input { width: 170px; }
}

/* ============================================================
   RESPONSIVE — LANDSCAPE MOBILE (max 900px)
   ============================================================ */
@media (max-width: 900px) {
    #content-wrapper {
        grid-template-columns: 1fr;
    }

    #sidebar {
        position: static;
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    #sidebar .widget { margin-bottom: 0; }

    .single-comic__layout {
        grid-template-columns: 200px 1fr;
        gap: 20px;
    }
}

/* ============================================================
   RESPONSIVE — MOBILE (max 768px)
   ============================================================ */
@media (max-width: 768px) {
    :root { --header-height: 60px; }

    .header__inner { gap: 12px; }

    .primary-nav {
        display: none;
        position: fixed;
        top: var(--header-height);
        left: 0;
        right: 0;
        background: var(--bg-dark);
        border-top: 2px solid var(--primary);
        padding: 16px;
        flex-direction: column;
        align-items: stretch;
        max-height: calc(100vh - var(--header-height));
        overflow-y: auto;
        z-index: 999;
        box-shadow: 0 8px 30px rgba(0,0,0,.4);
    }

    .primary-nav.open { display: flex; }

    .nav-menu { flex-direction: column; align-items: stretch; gap: 0; }

    .nav-menu > li > a {
        padding: 13px 16px;
        border-radius: var(--radius-sm);
        font-size: .95rem;
        justify-content: space-between;
        border-bottom: 1px solid rgba(255,255,255,.05);
    }

    .nav-menu .sub-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        border: none;
        border-top: 0;
        box-shadow: none;
        background: rgba(255,255,255,.04);
        border-radius: var(--radius-md);
        margin: 4px 0 4px 16px;
        display: none;
    }

    .nav-menu > li.submenu-open .sub-menu { display: block; }

    .header-search {
        display: none;
    }

    .nav-toggle { display: flex; }

    .header-search--mobile {
        display: flex;
        margin-top: 12px;
    }

    .header-search--mobile .header-search__form {
        width: 100%;
        background: rgba(255,255,255,.1);
    }

    .header-search--mobile .header-search__input {
        width: 100%;
        flex: 1;
    }

    .comics-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }

    #sidebar {
        grid-template-columns: 1fr;
    }

    .footer-widgets { grid-template-columns: 1fr; gap: 28px; }

    .footer-bottom__inner { flex-direction: column; text-align: center; }

    .single-comic__layout { grid-template-columns: 1fr; }

    .single-comic__cover { max-width: 220px; margin: 0 auto; }

    .single-comic { padding: 20px; }

    .page-content-wrap { padding: 20px; }

    #content-wrapper { padding: 20px 16px; }

    /* Pagination mobile */
    .page-numbers { min-width: 38px; height: 38px; font-size: .8rem; }
    .page-numbers.prev, .page-numbers.next { padding: 0 14px; }

    .hero-banner { padding: 40px 16px; }

    .age-gate__box { padding: 36px 24px; }
    .age-gate__buttons { flex-direction: column; }
    .age-gate__btn { width: 100%; }
}

/* ============================================================
   RESPONSIVE — SMALL MOBILE (max 480px)
   ============================================================ */
@media (max-width: 480px) {
    .comics-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .comic-card__body { padding: 10px; }
    .comic-card__title { font-size: .85rem; }

    .age-gate__title { font-size: 2rem; }

    #back-to-top { bottom: 16px; right: 16px; width: 40px; height: 40px; }
}

/* ============================================================
   DEFENSIVE: ONLY SHOW THE COVER THUMBNAIL INSIDE COMIC CARDS
   Hides every <img> inside .comic-card and then explicitly
   re-shows only those that live inside .comic-card__thumb.
   This catches images from post content, plugins, galleries,
   Gutenberg blocks, embeds — regardless of the source.
   ============================================================ */
.comic-card img {
    display: none !important;
    visibility: hidden !important;
}
.comic-card .comic-card__thumb img {
    display: block !important;
    visibility: visible !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
}
/* Also hide block-level wrappers that may carry images */
.comic-card figure,
.comic-card .wp-block-image,
.comic-card .wp-block-gallery,
.comic-card .gallery,
.comic-card .wp-block-embed,
.comic-card .entry-content {
    display: none !important;
}
/* Except the overlay inside the thumb */
.comic-card .comic-card__thumb figure {
    display: block !important;
}

/* ============================================================
   PRINT STYLES
   ============================================================ */
@media print {
    #site-header, #sidebar, #site-footer, #age-gate, #back-to-top { display: none !important; }
    #content-wrapper { grid-template-columns: 1fr; }
}
