/* ============================================
   WEBBUFF - WEBSITE TRUYEN CHU CSS
   Dark Theme - Novel/Literature Style
   ============================================ */

:root {
    /* Dark theme - Novel vibes */
    --wb-primary: #c9a84c;
    --wb-primary-dark: #b8922f;
    --wb-primary-light: #e8d48b;
    --wb-primary-glow: rgba(201, 168, 76, .25);
    --wb-secondary: #e67e22;
    --wb-success: #27ae60;
    --wb-danger: #e74c3c;
    --wb-warning: #f39c12;
    --wb-info: #3498db;

    /* Background layers */
    --wb-bg-deep: #0a0e17;
    --wb-bg: #101827;
    --wb-bg-surface: #1a2332;
    --wb-bg-elevated: #1f2b3d;
    --wb-bg-hover: #253347;

    /* Card & Borders */
    --wb-card: #182230;
    --wb-card-hover: #1f2d40;
    --wb-border: rgba(255,255,255,.06);
    --wb-border-light: rgba(255,255,255,.1);

    /* Text */
    --wb-text: #c8cdd3;
    --wb-text-bright: #e8ecf1;
    --wb-text-muted: #7a8694;
    --wb-text-dim: #4f5b69;

    /* Utility */
    --wb-radius: 12px;
    --wb-radius-sm: 8px;
    --wb-radius-xs: 6px;
    --wb-shadow: 0 2px 8px rgba(0,0,0,.3);
    --wb-shadow-md: 0 4px 16px rgba(0,0,0,.35);
    --wb-shadow-lg: 0 8px 32px rgba(0,0,0,.45);
    --wb-transition: .25s ease;
}

/* ---- BASE OVERRIDES ---- */
body {
    background: var(--wb-bg) !important;
    color: var(--wb-text) !important;
}
.wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
}

/* ---- HEADER ---- */
.wb-header {
    background: linear-gradient(180deg, rgba(10,14,23,.98) 0%, rgba(16,24,39,.95) 100%);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--wb-border);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 0;
}
.wb-header .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
}
.wb-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
    gap: 20px;
}
.wb-header__brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    flex-shrink: 0;
}
.wb-header__logo {
    width: 36px;
    height: 36px;
    border-radius: 8px;
}
.wb-header__name {
    font-size: 22px;
    font-weight: 800;
    color: var(--wb-primary);
    letter-spacing: -0.5px;
}
.wb-header__name span {
    color: var(--wb-text-bright);
    font-weight: 400;
}

/* Nav */
.wb-nav {
    display: flex;
    align-items: center;
    gap: 4px;
    list-style: none;
    margin: 0;
    padding: 0;
}
.wb-nav a {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    color: var(--wb-text-muted);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    border-radius: var(--wb-radius-xs);
    transition: all var(--wb-transition);
}
.wb-nav a:hover,
.wb-nav a.active {
    color: var(--wb-primary);
    background: var(--wb-primary-glow);
}
.wb-nav a i {
    font-size: 13px;
}

/* Search */
.wb-header__search {
    position: relative;
    flex: 0 1 280px;
}
.wb-header__search input {
    width: 100%;
    padding: 8px 14px 8px 36px;
    background: var(--wb-bg-surface);
    border: 1px solid var(--wb-border-light);
    border-radius: 20px;
    color: var(--wb-text);
    font-size: 13px;
    outline: none;
    transition: all var(--wb-transition);
}
.wb-header__search input::placeholder {
    color: var(--wb-text-dim);
}
.wb-header__search input:focus {
    border-color: var(--wb-primary);
    box-shadow: 0 0 0 3px var(--wb-primary-glow);
}
.wb-header__search i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--wb-text-dim);
    font-size: 13px;
}

/* Mobile toggle */
.wb-header__toggle {
    display: none;
    background: none;
    border: none;
    color: var(--wb-text);
    font-size: 22px;
    cursor: pointer;
    padding: 4px;
}

/* ---- HERO SLIDER ---- */
.hero-section {
    margin-bottom: 36px;
    border-radius: var(--wb-radius);
    overflow: hidden;
    position: relative;
    border: 1px solid var(--wb-border);
}
.hero-slider {
    position: relative;
    min-height: 380px;
    background: var(--wb-bg-deep);
}
.hero-slide {
    display: none;
    position: absolute;
    inset: 0;
}
.hero-slide.active {
    display: block;
    position: relative;
    animation: heroFadeIn .6s ease;
}
@keyframes heroFadeIn { from{opacity:0;transform:scale(1.02)} to{opacity:1;transform:scale(1)} }

.hero-slide__bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    filter: blur(30px) brightness(.3) saturate(.7);
    transform: scale(1.1);
    z-index: 0;
}
.hero-slide__content {
    position: relative;
    z-index: 1;
    display: flex;
    gap: 32px;
    padding: 40px;
    align-items: center;
    min-height: 380px;
}
.hero-slide__cover {
    flex-shrink: 0;
}
.hero-slide__cover img {
    width: 200px;
    height: auto;
    border-radius: var(--wb-radius);
    box-shadow: 0 8px 32px rgba(0,0,0,.5);
    border: 2px solid rgba(255,255,255,.08);
}
.hero-slide__info {
    color: #fff;
    flex: 1;
}
.hero-slide__title {
    font-size: 26px;
    font-weight: 700;
    margin: 0 0 10px;
    line-height: 1.3;
}
.hero-slide__title a {
    color: #fff;
    text-decoration: none;
    transition: color var(--wb-transition);
}
.hero-slide__title a:hover {
    color: var(--wb-primary);
}
.hero-slide__rating {
    margin-bottom: 10px;
}
.hero-slide__rating .stars {
    color: var(--wb-primary);
    font-size: 16px;
    margin-right: 6px;
    letter-spacing: 2px;
}
.hero-slide__tags {
    display: flex;
    gap: 6px;
    margin-bottom: 14px;
    flex-wrap: wrap;
}
.hero-slide__tags .truyen-tag {
    background: rgba(201,168,76,.15);
    color: var(--wb-primary-light);
    border: 1px solid rgba(201,168,76,.2);
}
.hero-slide__desc {
    font-size: 14px;
    line-height: 1.7;
    opacity: .8;
    margin-bottom: 20px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    color: rgba(255,255,255,.75);
}
.hero-slider__controls {
    position: absolute;
    bottom: 20px;
    right: 24px;
    display: flex;
    align-items: center;
    gap: 8px;
    z-index: 5;
}
.hero-btn {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,.2);
    background: rgba(0,0,0,.4);
    color: #fff;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--wb-transition);
}
.hero-btn:hover {
    background: var(--wb-primary);
    border-color: var(--wb-primary);
}
.hero-dots {
    display: flex;
    gap: 6px;
}
.hero-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255,255,255,.25);
    cursor: pointer;
    transition: all var(--wb-transition);
}
.hero-dot.active {
    background: var(--wb-primary);
    width: 22px;
    border-radius: 4px;
}

/* ---- TRUYEN GRID ---- */
.truyen-grid {
    display: grid;
    gap: 16px;
}
.truyen-grid--4col { grid-template-columns: repeat(4, 1fr); }
.truyen-grid--3col { grid-template-columns: repeat(3, 1fr); }
.truyen-grid--2col { grid-template-columns: repeat(2, 1fr); }

/* ---- TRUYEN CARD ---- */
.truyen-card {
    background: var(--wb-card);
    border-radius: var(--wb-radius);
    overflow: hidden;
    border: 1px solid var(--wb-border);
    transition: all var(--wb-transition);
    position: relative;
}
.truyen-card:hover {
    border-color: rgba(201,168,76,.2);
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0,0,0,.3);
}
.truyen-card__link {
    display: block;
    text-decoration: none;
}
.truyen-card__img {
    position: relative;
    aspect-ratio: 3/4;
    overflow: hidden;
    background: var(--wb-bg-surface);
}
.truyen-card__img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .4s ease;
}
.truyen-card:hover .truyen-card__img img {
    transform: scale(1.06);
}
.truyen-card__img::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(transparent, rgba(0,0,0,.5));
    pointer-events: none;
}
.truyen-card__badge {
    position: absolute;
    top: 8px;
    left: 8px;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    color: #fff;
    z-index: 2;
    backdrop-filter: blur(4px);
}
.badge-featured {
    background: linear-gradient(135deg, #c9a84c, #e8d48b);
    color: #1a1a2e;
    top: 8px;
    right: 8px;
    left: auto;
}
.badge-ongoing { background: rgba(52,152,219,.85); }
.badge-complete { background: rgba(39,174,96,.85); }
.badge-paused { background: rgba(122,134,148,.85); }

.truyen-card__body {
    padding: 12px;
}
.truyen-card__title {
    font-size: 14px;
    font-weight: 600;
    margin: 0 0 4px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.truyen-card__title a {
    color: var(--wb-text-bright);
    text-decoration: none;
    transition: color var(--wb-transition);
}
.truyen-card__title a:hover {
    color: var(--wb-primary);
}
.truyen-card__author {
    font-size: 12px;
    color: var(--wb-text-muted);
    margin: 0 0 8px;
}
.truyen-card__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-bottom: 8px;
}
.truyen-tag {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    background: rgba(201,168,76,.1);
    color: var(--wb-primary);
    font-weight: 500;
    border: 1px solid rgba(201,168,76,.15);
    transition: all var(--wb-transition);
}
.truyen-tag--link {
    text-decoration: none;
}
.truyen-tag--link:hover {
    background: var(--wb-primary);
    color: var(--wb-bg-deep);
    border-color: var(--wb-primary);
}
.truyen-card__stats {
    display: flex;
    gap: 12px;
    align-items: center;
}
.stat-item {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: var(--wb-text-muted);
}
.stat-rating {
    color: var(--wb-primary);
}

/* ---- SECTIONS ---- */
.section-truyen {
    margin-bottom: 40px;
}
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 8px;
}
.section-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--wb-text-bright);
    margin: 0;
    position: relative;
    padding-left: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.section-title::before {
    content: '';
    position: absolute;
    left: 0;
    top: 3px;
    bottom: 3px;
    width: 3px;
    border-radius: 2px;
    background: var(--wb-primary);
}
.section-link {
    color: var(--wb-primary);
    font-size: 13px;
    text-decoration: none;
    font-weight: 500;
    transition: color var(--wb-transition);
}
.section-link:hover {
    color: var(--wb-primary-light);
    text-decoration: underline;
}

/* ---- RANKING ---- */
.truyen-ranking {
    background: var(--wb-card);
    border-radius: var(--wb-radius);
    padding: 4px 16px;
    border: 1px solid var(--wb-border);
}
.ranking-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--wb-border);
    transition: background var(--wb-transition);
}
.ranking-item:last-child { border-bottom: none; }
.ranking-item:hover {
    background: var(--wb-bg-hover);
    margin: 0 -16px;
    padding: 12px 16px;
    border-radius: var(--wb-radius-xs);
}
.ranking-num {
    font-size: 16px;
    font-weight: 800;
    width: 28px;
    text-align: center;
    color: var(--wb-text-dim);
    flex-shrink: 0;
}
.ranking-num--top {
    color: var(--wb-primary);
    font-size: 20px;
    text-shadow: 0 0 12px var(--wb-primary-glow);
}
.ranking-cover img {
    width: 48px;
    height: 66px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid var(--wb-border);
}
.ranking-info {
    flex: 1;
    min-width: 0;
}
.ranking-title {
    font-size: 14px;
    margin: 0 0 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.ranking-title a {
    color: var(--wb-text-bright);
    text-decoration: none;
    transition: color var(--wb-transition);
}
.ranking-title a:hover {
    color: var(--wb-primary);
}
.ranking-meta {
    font-size: 12px;
    color: var(--wb-text-muted);
}

/* ---- DETAIL PAGE ---- */
.truyen-detail { margin-bottom: 40px; }
.truyen-detail__header {
    display: flex;
    gap: 30px;
    background: var(--wb-card);
    border-radius: var(--wb-radius);
    padding: 24px;
    border: 1px solid var(--wb-border);
    margin-bottom: 24px;
}
.truyen-detail__cover { flex-shrink: 0; }
.truyen-detail__cover img {
    width: 260px;
    height: auto;
    border-radius: var(--wb-radius-sm);
    box-shadow: var(--wb-shadow-md);
    border: 2px solid var(--wb-border-light);
}
.truyen-detail__info { flex: 1; }
.truyen-detail__title {
    font-size: 24px;
    font-weight: 700;
    margin: 0 0 16px;
    color: var(--wb-text-bright);
}
.truyen-detail__meta-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 16px;
}
.meta-item {
    display: flex;
    gap: 8px;
    align-items: center;
}
.meta-label {
    font-size: 13px;
    color: var(--wb-text-muted);
    font-weight: 500;
}
.meta-value {
    font-size: 14px;
    color: var(--wb-text-bright);
    font-weight: 600;
}
.badge-status {
    padding: 2px 10px;
    border-radius: 4px;
    color: #fff;
    font-size: 12px;
}
.star-rating { letter-spacing: 2px; }
.star { color: var(--wb-text-dim); }
.star--filled { color: var(--wb-primary); }
.truyen-detail__tags {
    margin-bottom: 16px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}
.truyen-detail__actions {
    display: flex;
    gap: 16px;
    align-items: center;
    flex-wrap: wrap;
    margin-top: 20px;
}
.truyen-detail__share {
    display: flex;
    gap: 8px;
    align-items: center;
}
.share-label {
    font-size: 13px;
    color: var(--wb-text-muted);
}
.share-btn {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: transform var(--wb-transition);
    font-size: 14px;
}
.share-btn:hover { transform: scale(1.1); }
.share-btn--fb { background: #1877f2; color: #fff; }
.share-btn--tw { background: #1da1f2; color: #fff; }
.share-btn--tg { background: #0088cc; color: #fff; }
.truyen-detail__content {
    background: var(--wb-card);
    border-radius: var(--wb-radius);
    padding: 24px;
    border: 1px solid var(--wb-border);
}
.truyen-detail__content h2 {
    font-size: 18px;
    margin: 0 0 16px;
    color: var(--wb-text-bright);
}
.truyen-detail__desc {
    font-size: 15px;
    line-height: 1.8;
    color: var(--wb-text);
    white-space: pre-line;
}
.truyen-detail__full-desc {
    font-size: 15px;
    line-height: 1.8;
    color: var(--wb-text);
    margin-top: 16px;
}

/* ---- BUTTONS ---- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 22px;
    border-radius: var(--wb-radius-sm);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all var(--wb-transition);
}
.btn-read {
    background: linear-gradient(135deg, var(--wb-primary), var(--wb-primary-dark));
    color: var(--wb-bg-deep);
    font-size: 16px;
    padding: 14px 32px;
    box-shadow: 0 4px 16px var(--wb-primary-glow);
}
.btn-read:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(201,168,76,.4);
}
.btn-primary {
    background: var(--wb-primary);
    color: var(--wb-bg-deep);
}
.btn-primary:hover {
    background: var(--wb-primary-dark);
}
.btn-outline {
    background: transparent;
    color: var(--wb-primary);
    border: 1px solid var(--wb-primary);
}
.btn-outline:hover {
    background: var(--wb-primary);
    color: var(--wb-bg-deep);
}
.btn-danger { background: var(--wb-danger); color: #fff; }
.btn-danger:hover { background: #c0392b; }
.btn-sm { padding: 6px 14px; font-size: 13px; }
.btn-xs { padding: 4px 10px; font-size: 12px; }
.btn-lg { padding: 14px 32px; font-size: 16px; }
.btn-login {
    width: 100%;
    padding: 14px;
    font-size: 16px;
    background: linear-gradient(135deg, var(--wb-primary), var(--wb-primary-dark));
    color: var(--wb-bg-deep);
    border: none;
    border-radius: var(--wb-radius-sm);
    cursor: pointer;
    font-weight: 700;
}
.btn-login:hover {
    box-shadow: 0 4px 16px var(--wb-primary-glow);
}

/* ---- BREADCRUMB ---- */
.breadcrumb-nav { margin-bottom: 20px; }
.breadcrumb-list {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    padding: 0;
    margin: 0;
    font-size: 13px;
}
.breadcrumb-item {
    display: flex;
    align-items: center;
}
.breadcrumb-item::after {
    content: '›';
    margin-left: 8px;
    color: var(--wb-text-dim);
}
.breadcrumb-item:last-child::after { display: none; }
.breadcrumb-item a {
    color: var(--wb-primary);
    text-decoration: none;
}
.breadcrumb-item a:hover { text-decoration: underline; }
.breadcrumb-item.active span { color: var(--wb-text-muted); }

/* ---- PAGINATION ---- */
.pagination {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 30px;
    flex-wrap: wrap;
}
.page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    border-radius: var(--wb-radius-xs);
    font-size: 14px;
    color: var(--wb-text);
    background: var(--wb-card);
    border: 1px solid var(--wb-border);
    text-decoration: none;
    transition: all var(--wb-transition);
}
.page-link:hover {
    background: var(--wb-primary);
    color: var(--wb-bg-deep);
    border-color: var(--wb-primary);
}
.page-current {
    background: var(--wb-primary);
    color: var(--wb-bg-deep);
    border-color: var(--wb-primary);
}
.page-dots {
    display: flex;
    align-items: center;
    color: var(--wb-text-dim);
}

/* ---- FILTERS ---- */
.truyen-filters {
    background: var(--wb-card);
    border-radius: var(--wb-radius);
    padding: 16px 20px;
    margin-bottom: 20px;
    border: 1px solid var(--wb-border);
}
.filter-form {
    display: flex;
    gap: 16px;
    align-items: center;
    flex-wrap: wrap;
}
.filter-group {
    display: flex;
    align-items: center;
    gap: 8px;
}
.filter-group label {
    font-size: 13px;
    color: var(--wb-text-muted);
    font-weight: 500;
    white-space: nowrap;
}
.filter-group select {
    padding: 6px 12px;
    border: 1px solid var(--wb-border-light);
    border-radius: var(--wb-radius-xs);
    font-size: 13px;
    background: var(--wb-bg-surface);
    color: var(--wb-text);
}
.filter-keyword { font-size: 13px; color: var(--wb-text); }
.clear-filter { color: var(--wb-danger); text-decoration: none; margin-left: 4px; }

/* ---- EMPTY STATE ---- */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--wb-text-muted);
    background: var(--wb-card);
    border-radius: var(--wb-radius);
    border: 1px dashed var(--wb-border-light);
}

/* ---- ADMIN LOGIN ---- */
.admin-login-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 60vh;
    padding: 40px 20px;
}
.admin-login-card {
    background: var(--wb-card);
    border-radius: var(--wb-radius);
    padding: 40px;
    width: 100%;
    max-width: 420px;
    border: 1px solid var(--wb-border);
    box-shadow: var(--wb-shadow-lg);
}
.admin-login-header {
    text-align: center;
    margin-bottom: 24px;
}
.admin-login-header h1 {
    font-size: 22px;
    color: var(--wb-text-bright);
    margin: 0 0 8px;
}
.admin-login-header p {
    color: var(--wb-text-muted);
    font-size: 14px;
    margin: 0;
}
.admin-login-footer {
    text-align: center;
    margin-top: 20px;
}
.admin-login-footer a {
    color: var(--wb-primary);
    text-decoration: none;
    font-size: 14px;
}

/* ---- ADMIN DASHBOARD ---- */
.admin-dashboard { max-width: 1200px; margin: 0 auto; }
.admin-topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 12px;
}
.admin-topbar h1 {
    font-size: 22px;
    color: var(--wb-text-bright);
    margin: 0;
}
.admin-topbar__actions {
    display: flex;
    gap: 12px;
    align-items: center;
}
.admin-user {
    font-size: 14px;
    color: var(--wb-text-muted);
}

.admin-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}
.stat-card {
    background: var(--wb-card);
    border-radius: var(--wb-radius);
    padding: 20px;
    text-align: center;
    border: 1px solid var(--wb-border);
}
.stat-card__num {
    display: block;
    font-size: 28px;
    font-weight: 700;
    color: var(--wb-primary);
}
.stat-card__label {
    font-size: 13px;
    color: var(--wb-text-muted);
}

.admin-toolbar { display: flex; gap: 12px; margin-bottom: 20px; }

.admin-table-wrap {
    background: var(--wb-card);
    border-radius: var(--wb-radius);
    overflow: hidden;
    border: 1px solid var(--wb-border);
}
.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
.admin-table th {
    background: var(--wb-bg-surface);
    padding: 12px;
    text-align: left;
    font-weight: 600;
    color: var(--wb-text-bright);
    border-bottom: 2px solid var(--wb-border);
}
.admin-table td {
    padding: 12px;
    border-bottom: 1px solid var(--wb-border);
    vertical-align: middle;
    color: var(--wb-text);
}
.admin-table tr:hover td {
    background: var(--wb-bg-hover);
}
.admin-table a {
    color: var(--wb-primary);
    text-decoration: none;
}
.badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    color: #fff;
}
.badge-sm { padding: 2px 8px; font-size: 11px; }
.text-center { text-align: center; }
.text-muted { color: var(--wb-text-muted); }

/* ---- ADMIN FORM ---- */
.admin-form-wrap {
    background: var(--wb-card);
    border-radius: var(--wb-radius);
    padding: 24px;
    border: 1px solid var(--wb-border);
}
.form-row { display: flex; gap: 24px; }
.form-col-8 { flex: 2; }
.form-col-4 { flex: 1; }
.form-group { margin-bottom: 16px; }
.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--wb-text-bright);
    margin-bottom: 6px;
}
.form-group input[type="text"],
.form-group input[type="url"],
.form-group input[type="number"],
.form-group input[type="password"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--wb-border-light);
    border-radius: var(--wb-radius-xs);
    font-size: 14px;
    font-family: inherit;
    background: var(--wb-bg-surface);
    color: var(--wb-text);
    transition: border-color var(--wb-transition);
    box-sizing: border-box;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--wb-primary);
    outline: none;
    box-shadow: 0 0 0 3px var(--wb-primary-glow);
}
.form-group textarea { resize: vertical; }
.form-help { font-size: 12px; color: var(--wb-text-muted); margin-top: 4px; display: block; }
.required { color: var(--wb-danger); }
.upload-preview {
    width: 100%;
    aspect-ratio: 3/4;
    border: 2px dashed var(--wb-border-light);
    border-radius: var(--wb-radius-sm);
    overflow: hidden;
    margin-bottom: 8px;
    background: var(--wb-bg-surface);
}
.upload-preview img { width: 100%; height: 100%; object-fit: cover; }
.form-details { margin-top: 16px; }
.form-details summary {
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    color: var(--wb-primary);
    padding: 8px 0;
}

/* ---- ADMIN SEO SCORE (readability on dark theme) ---- */
.admin-form-wrap .table {
    color: var(--wb-text);
    background: transparent;
}
.admin-form-wrap .table td,
.admin-form-wrap .table th {
    color: var(--wb-text);
    border-color: var(--wb-border);
    background: transparent;
}
.admin-form-wrap .seo-status {
    color: var(--wb-text-bright);
    font-weight: 600;
}
.admin-form-wrap .form-help strong {
    color: var(--wb-text-bright);
}
.admin-form-wrap .form-help a {
    color: var(--wb-primary);
    text-decoration: none;
}
.admin-form-wrap .form-help a:hover {
    text-decoration: underline;
}
.form-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--wb-border);
}
.form-message {
    padding: 12px 16px;
    border-radius: var(--wb-radius-xs);
    font-size: 14px;
    margin-top: 16px;
}
.form-message--success {
    background: rgba(39,174,96,.1);
    color: #27ae60;
    border: 1px solid rgba(39,174,96,.2);
}
.form-message--success a { color: var(--wb-primary); }
.form-message--error {
    background: rgba(231,76,60,.1);
    color: #e74c3c;
    border: 1px solid rgba(231,76,60,.2);
}

/* ---- ALERT ---- */
.alert {
    padding: 12px 16px;
    border-radius: var(--wb-radius-xs);
    font-size: 14px;
    margin-bottom: 16px;
}
.alert-error {
    background: rgba(231,76,60,.1);
    color: #e74c3c;
    border: 1px solid rgba(231,76,60,.2);
}

/* ---- FOOTER ---- */
.wb-footer {
    background: var(--wb-bg-deep);
    border-top: 1px solid var(--wb-border);
    padding: 40px 0 0;
    margin-top: 60px;
}
.wb-footer .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
}
.wb-footer__grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 32px;
    padding-bottom: 32px;
}
.wb-footer__brand-name {
    font-size: 22px;
    font-weight: 800;
    color: var(--wb-primary);
    margin-bottom: 12px;
}
.wb-footer__brand-name span {
    color: var(--wb-text-bright);
    font-weight: 400;
}
.wb-footer__desc {
    font-size: 14px;
    color: var(--wb-text-muted);
    line-height: 1.7;
    margin-bottom: 16px;
}
.wb-footer__social {
    display: flex;
    gap: 10px;
}
.wb-footer__social a {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--wb-bg-surface);
    border: 1px solid var(--wb-border);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--wb-text-muted);
    text-decoration: none;
    font-size: 14px;
    transition: all var(--wb-transition);
}
.wb-footer__social a:hover {
    color: var(--wb-primary);
    border-color: var(--wb-primary);
    background: var(--wb-primary-glow);
}
.wb-footer__heading {
    font-size: 15px;
    font-weight: 700;
    color: var(--wb-text-bright);
    margin-bottom: 16px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.wb-footer__links {
    list-style: none;
    padding: 0;
    margin: 0;
}
.wb-footer__links li {
    margin-bottom: 8px;
}
.wb-footer__links a {
    color: var(--wb-text-muted);
    text-decoration: none;
    font-size: 14px;
    transition: color var(--wb-transition);
}
.wb-footer__links a:hover {
    color: var(--wb-primary);
}
.wb-footer__bottom {
    border-top: 1px solid var(--wb-border);
    padding: 16px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    color: var(--wb-text-dim);
}
.wb-footer__bottom a {
    color: var(--wb-primary);
    text-decoration: none;
}

/* ---- RESPONSIVE ---- */
@media (max-width: 1024px) {
    .truyen-grid--4col { grid-template-columns: repeat(3, 1fr); }
    .admin-stats { grid-template-columns: repeat(2, 1fr); }
    .wb-footer__grid { grid-template-columns: 1fr 1fr; gap: 24px; }
}
@media (max-width: 768px) {
    .truyen-grid--4col { grid-template-columns: repeat(2, 1fr); }
    .truyen-grid--3col { grid-template-columns: repeat(2, 1fr); }
    .hero-slide__content { flex-direction: column; padding: 20px; min-height: 280px; }
    .hero-slide__cover img { width: 140px; }
    .hero-slide__title { font-size: 20px; }
    .truyen-detail__header { flex-direction: column; }
    .truyen-detail__cover img { width: 180px; }
    .truyen-detail__meta-grid { grid-template-columns: 1fr; }
    .form-row { flex-direction: column; }
    .admin-stats { grid-template-columns: repeat(2, 1fr); }
    .admin-table { font-size: 12px; }

    /* Header responsive */
    .wb-header__toggle { display: block; }
    .wb-nav {
        display: none;
        position: absolute;
        top: 64px;
        left: 0;
        right: 0;
        background: var(--wb-bg-surface);
        border-bottom: 1px solid var(--wb-border);
        flex-direction: column;
        padding: 8px;
    }
    .wb-nav.open { display: flex; }
    .wb-header__search {
        display: none;
        position: absolute;
        top: 64px;
        left: 0;
        right: 0;
        padding: 12px;
        background: var(--wb-bg-surface);
        border-bottom: 1px solid var(--wb-border);
        flex: none;
    }
    .wb-header__search.open { display: block; }

    .wb-footer__grid { grid-template-columns: 1fr; gap: 24px; }
    .wb-footer__bottom { flex-direction: column; gap: 8px; text-align: center; }
}
@media (max-width: 480px) {
    .truyen-grid--4col,
    .truyen-grid--3col,
    .truyen-grid--2col {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    .truyen-card__body { padding: 8px; }
    .truyen-card__title { font-size: 13px; }
    .section-title { font-size: 17px; }
    .hero-slide__content { padding: 16px; }
}
