/* =============================================
   Vivicomi – Frontend Light Theme CSS
   Inspired by Vcomycs / vivicomi18.info
   ============================================= */

/* CSS Variables */
:root {
    --bg-body: #eef1f5;
    --bg-card: #ffffff;
    --bg-header: #ffffff;
    --bg-nav: #337ab7;
    --bg-section-header: linear-gradient(135deg, #337ab7, #2c6faa);
    --bg-input: #f4f6f9;
    --border-color: #e2e6ea;
    --border-light: #eef0f3;
    --text-primary: #333333;
    --text-secondary: #666666;
    --text-muted: #999999;
    --text-link: #337ab7;
    --accent: #337ab7;
    --accent-hover: #285e8e;
    --accent-light: rgba(51, 122, 183, 0.1);
    --red: #e74c3c;
    --green: #27ae60;
    --orange: #f39c12;
    --pink: #e91e63;
    --blue-badge: #3498db;
    --radius: 10px;
    --radius-sm: 6px;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-hover: 0 4px 16px rgba(0, 0, 0, 0.12);
    --transition: all 0.25s ease;
    --container: 1200px;
    --header-h: 56px;
    --nav-h: 42px;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg-body);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    /* subtle space pattern */
    background-image:
        radial-gradient(circle at 10% 20%, rgba(51, 122, 183, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 90% 80%, rgba(51, 122, 183, 0.03) 0%, transparent 50%);
}

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

a:hover {
    color: var(--accent-hover);
}

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

.container {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 16px;
}

/* =============================================
   HEADER
   ============================================= */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-top {
    background: var(--bg-header);
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--header-h);
    gap: 16px;
}

.site-logo {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.site-logo:hover {
    opacity: 0.85;
}

.logo-img {
    height: 40px;
    width: auto;
    display: block;
}

/* Search */
.header-search {
    flex: 1;
    max-width: 440px;
    position: relative;
}

.header-search form {
    display: flex;
}

.header-search input {
    width: 100%;
    padding: 9px 14px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius) 0 0 var(--radius);
    color: var(--text-primary);
    font-size: 14px;
    font-family: inherit;
    outline: none;
    transition: var(--transition);
}

.header-search input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-light);
}

.header-search input::placeholder {
    color: var(--text-muted);
}

.header-search button {
    padding: 9px 16px;
    background: var(--accent);
    border: none;
    border-radius: 0 var(--radius) var(--radius) 0;
    color: #fff;
    cursor: pointer;
    font-size: 14px;
    transition: var(--transition);
}

.header-search button:hover {
    background: var(--accent-hover);
}

.mobile-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 22px;
    cursor: pointer;
    padding: 8px;
}

.mobile-search-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 18px;
    cursor: pointer;
    padding: 8px;
}

.mobile-search-bar {
    display: none;
    padding: 0 0 10px 0;
}

.mobile-search-bar.open {
    display: block;
}

.mobile-search-bar form {
    display: flex;
    gap: 0;
}

.mobile-search-bar input {
    flex: 1;
    padding: 10px 14px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-right: none;
    border-radius: var(--radius-sm) 0 0 var(--radius-sm);
    color: var(--text-primary);
    font-size: 14px;
    outline: none;
}

.mobile-search-bar input:focus {
    border-color: var(--accent);
}

.mobile-search-bar button {
    padding: 10px 16px;
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    cursor: pointer;
    font-size: 14px;
}

/* Navigation – Blue Bar */
.main-nav {
    background: var(--bg-nav);
}

.nav-list {
    display: flex;
    list-style: none;
    gap: 0;
    justify-content: center;
}

.nav-list>li>a {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 10px 18px;
    font-size: 13px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    transition: var(--transition);
}

.nav-list>li>a:hover,
.nav-list>li>a.active {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
}

.nav-list>li>a i.fa-chevron-down {
    font-size: 9px;
    margin-left: 2px;
}

/* Mega Dropdown */
.has-dropdown {
    position: relative;
}

.mega-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    min-width: 520px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    box-shadow: var(--shadow-hover);
    padding: 16px;
    z-index: 200;
    animation: fadeInDown 0.2s ease;
}

.has-dropdown:hover .mega-dropdown {
    display: block;
}

.genre-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 4px;
}

.genre-grid a {
    padding: 7px 10px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    color: var(--text-secondary);
    transition: var(--transition);
}

.genre-grid a:hover {
    background: var(--accent-light);
    color: var(--accent);
}

/* =============================================
   LAYOUT
   ============================================= */
.main-content {
    min-height: 60vh;
}

.content-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 20px;
    align-items: start;
    padding: 20px 0;
}

.content-main,
.content-sidebar {
    min-width: 0;
    overflow-x: hidden;
}

.section {
    margin-bottom: 24px;
}

/* Section Header – Pill Style (blue bar) */
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
    background: var(--bg-section-header);
    padding: 10px 18px;
    border-radius: 25px;
    color: #fff;
}

.section-header h2,
.section-header h3 {
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #fff;
}

.section-header h2 i,
.section-header h3 i {
    color: rgba(255, 255, 255, 0.8);
}

.view-all {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.85);
    font-weight: 500;
}

.view-all:hover {
    color: #fff;
    text-decoration: underline;
}

.result-count {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
}

/* =============================================
/* =============================================
   HERO SLIDER
   ============================================= */
.hero-slider-section {
    margin-bottom: 16px;
}

.hero-slider {
    position: relative;
    width: 100%;
    height: 420px;
    overflow: hidden;
    background: #1a1a2e;
}

.slider-track {
    width: 100%;
    height: 100%;
    position: relative;
}

.slider-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.6s ease;
    z-index: 0;
}

.slider-slide.active {
    opacity: 1;
    z-index: 1;
}

.slider-link {
    display: block;
    width: 100%;
    height: 100%;
    position: relative;
    color: #fff;
}

.slider-bg {
    position: absolute;
    inset: -20px;
    background-size: cover;
    background-position: center;
    filter: blur(12px) brightness(0.4);
}

.slider-content {
    position: relative;
    z-index: 2;
    height: 100%;
    display: flex;
    align-items: center;
}

.slider-content .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
}

.slider-info {
    flex: 1;
    padding: 20px 0;
}

.slider-badge {
    display: inline-block;
    padding: 5px 14px;
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 16px;
}

.slider-title {
    font-size: 32px;
    font-weight: 800;
    line-height: 1.3;
    margin-bottom: 12px;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.slider-meta {
    display: flex;
    gap: 16px;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 20px;
}

.slider-meta span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.slider-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 24px;
    background: var(--accent);
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    transition: var(--transition);
}

.slider-link:hover .slider-btn {
    background: var(--accent-hover);
    transform: translateX(4px);
}

.slider-cover {
    width: 220px;
    height: 310px;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
    flex-shrink: 0;
}

.slider-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Slider Arrows */
.slider-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 5;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.slider-arrow:hover {
    background: rgba(255, 255, 255, 0.3);
}

.slider-prev {
    left: 16px;
}

.slider-next {
    right: 16px;
}

/* Slider Dots */
.slider-dots {
    position: absolute;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 5;
    display: flex;
    gap: 8px;
}

.slider-dots .dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.35);
    cursor: pointer;
    transition: var(--transition);
}

.slider-dots .dot.active {
    background: #fff;
    transform: scale(1.2);
}

/* =============================================
   HOT COMICS GRID
   ============================================= */
.hot-section {
    padding: 0 0 8px;
}

.hot-section .section-header {
    margin-bottom: 12px;
}

.hot-slider {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
}

.hot-card {
    border-radius: var(--radius);
    overflow: hidden;
    aspect-ratio: 3/4;
    position: relative;
    box-shadow: var(--shadow);
    background: var(--bg-card);
}

.hot-card-inner {
    display: block;
    width: 100%;
    height: 100%;
    position: relative;
}

.hot-card-inner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.hot-card:hover img {
    transform: scale(1.05);
}

.hot-card-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 40px 12px 12px;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.75));
    color: #fff;
}

.hot-card-overlay h3 {
    font-size: 13px;
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 2px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.hot-card-overlay span {
    font-size: 11px;
    color: #7ecfff;
    font-weight: 500;
}

/* =============================================
   COMIC GRID
   ============================================= */
.comic-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(175px, 1fr));
    gap: 16px;
}

.comic-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

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

.comic-card-thumb {
    display: block;
    position: relative;
    aspect-ratio: 3/4;
    overflow: hidden;
}

.comic-card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.comic-card:hover .comic-card-thumb img {
    transform: scale(1.05);
}

/* Badges */
.card-badge {
    position: absolute;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.3px;
    z-index: 2;
    text-transform: uppercase;
    color: #fff;
}

.badge-hot {
    background: var(--red);
    top: 8px;
    right: 8px;
}

.badge-new {
    background: var(--accent);
    top: 8px;
    left: 8px;
}

.badge-adult {
    background: var(--pink);
    top: 30px;
    right: 8px;
    font-size: 9px;
}

/* Stats overlay at bottom of thumbnail */
.card-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 4px 10px;
    background: rgba(0, 0, 0, 0.55);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.chapter-count {
    font-size: 11px;
    font-weight: 600;
    color: #7ecfff;
}

/* Card Info */
.comic-card-info {
    padding: 10px 12px 12px;
}

.comic-card-title {
    font-size: 13px;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 6px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 36px;
}

.comic-card-title a {
    color: var(--text-primary);
}

.comic-card-title a:hover {
    color: var(--accent);
}

.comic-card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 11px;
    color: var(--text-muted);
    gap: 6px;
}

.comic-card-meta .comic-genres {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100px;
}

.comic-card-meta .comic-views {
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 3px;
}

/* Extra card stats row (views + bookmarks + time) */
.comic-card-stats {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 12px;
    border-top: 1px solid var(--border-light);
    font-size: 11px;
    color: var(--text-muted);
}

.comic-card-stats span {
    display: flex;
    align-items: center;
    gap: 3px;
}

.comic-card-stats .chap-link {
    color: var(--accent);
    font-weight: 600;
}

.comic-card-stats .time-ago {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 3px;
}

/* =============================================
   SIDEBAR
   ============================================= */
.content-sidebar {
    position: sticky;
    top: calc(var(--header-h) + var(--nav-h) + 12px);
    align-self: start;
}

.sidebar-widget {
    background: var(--bg-card);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    margin-bottom: 20px;
}

.widget-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0;
    flex-wrap: wrap;
}

.widget-header h3 {
    background: var(--bg-section-header);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 10px 16px;
    border-radius: 25px;
    margin: 12px 12px 0;
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 1;
}

.widget-header h3 i {
    color: rgba(255, 255, 255, 0.8);
}

.widget-tabs {
    display: flex;
    gap: 0;
    padding: 10px 12px 0;
    border-bottom: 1px solid var(--border-light);
    width: 100%;
}

.tab-btn {
    padding: 8px 16px;
    border: none;
    border-bottom: 2px solid transparent;
    font-size: 13px;
    font-weight: 500;
    font-family: inherit;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    transition: var(--transition);
}

.tab-btn.active,
.tab-btn:hover {
    color: var(--accent);
    border-bottom-color: var(--accent);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.rank-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-bottom: 1px solid var(--border-light);
    transition: var(--transition);
}

.rank-item:last-child {
    border-bottom: none;
}

.rank-item:hover {
    background: var(--bg-input);
}

.rank-number {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    background: var(--bg-input);
    color: var(--text-muted);
    flex-shrink: 0;
}

.rank-1 {
    background: #f59e0b;
    color: #fff;
}

.rank-2 {
    background: #94a3b8;
    color: #fff;
}

.rank-3 {
    background: #cd7f32;
    color: #fff;
}

.rank-thumb {
    width: 40px;
    height: 54px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    flex-shrink: 0;
}

.rank-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.rank-info {
    flex: 1;
    min-width: 0;
}

.rank-title {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rank-title:hover {
    color: var(--accent);
}

.rank-meta {
    display: flex;
    gap: 10px;
    margin-top: 2px;
    font-size: 11px;
    color: var(--text-muted);
}

/* =============================================
   FILTER STRIP
   ============================================= */
.filter-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.filter-chip {
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    background: var(--bg-card);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    transition: var(--transition);
}

.filter-chip:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.filter-chip.active {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

/* Search Form Large */
.search-form-lg {
    display: flex;
    margin-bottom: 16px;
}

.search-form-lg input {
    flex: 1;
    padding: 11px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius) 0 0 var(--radius);
    color: var(--text-primary);
    font-size: 14px;
    font-family: inherit;
    outline: none;
}

.search-form-lg input:focus {
    border-color: var(--accent);
}

.search-form-lg button {
    padding: 11px 22px;
    background: var(--accent);
    border: none;
    border-radius: 0 var(--radius) var(--radius) 0;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* =============================================
   BREADCRUMB
   ============================================= */
.breadcrumb-front {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 14px;
    flex-wrap: wrap;
}

.breadcrumb-front a {
    color: var(--text-secondary);
}

.breadcrumb-front a:hover {
    color: var(--accent);
}

/* =============================================
   COMIC DETAIL
   ============================================= */
.comic-detail {
    display: flex;
    gap: 24px;
    margin-bottom: 20px;
    padding: 20px;
    background: var(--bg-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.comic-detail-cover {
    width: 220px;
    flex-shrink: 0;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-hover);
}

.comic-detail-cover img {
    width: 100%;
    aspect-ratio: 3/4;
    object-fit: cover;
}

.comic-detail-info {
    flex: 1;
}

.comic-title {
    font-size: 22px;
    font-weight: 800;
    line-height: 1.3;
    margin-bottom: 4px;
    color: var(--text-primary);
}

.comic-alt-title {
    font-size: 13px;
    color: var(--text-muted);
    font-style: italic;
    margin-bottom: 14px;
}

.comic-meta-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 14px;
}

.meta-item {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.meta-label {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.meta-label i {
    margin-right: 4px;
    color: var(--accent);
}

.meta-value {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
}

.status-ongoing {
    color: var(--green);
}

.status-completed {
    color: var(--accent);
}

.status-dropped {
    color: var(--red);
}

.comic-genres-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 14px;
}

.genre-tag {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    background: var(--accent-light);
    color: var(--accent);
    border: 1px solid rgba(51, 122, 183, 0.2);
    transition: var(--transition);
}

.genre-tag:hover {
    background: var(--accent);
    color: #fff;
}

.comic-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.btn-action {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 22px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    border: none;
    cursor: pointer;
    transition: var(--transition);
}

.btn-action:hover {
    transform: translateY(-2px);
}

.btn-read {
    background: var(--accent);
    color: #fff;
}

.btn-read:hover {
    background: var(--accent-hover);
    box-shadow: 0 4px 12px var(--accent-light);
    color: #fff;
}

.btn-latest {
    background: rgba(39, 174, 96, 0.1);
    color: var(--green);
    border: 1px solid rgba(39, 174, 96, 0.2);
}

.btn-latest:hover {
    background: var(--green);
    color: #fff;
}

.btn-follow {
    background: rgba(233, 30, 99, 0.1);
    color: var(--pink);
    border: 1px solid rgba(233, 30, 99, 0.2);
}

.btn-follow:hover {
    background: var(--pink);
    color: #fff;
}

.btn-follow.active {
    background: var(--pink);
    color: #fff;
    border-color: var(--pink);
}

.btn-follow.active:hover {
    background: #c2185b;
}

/* Description */
.comic-description {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 18px;
    margin-bottom: 20px;
    box-shadow: var(--shadow);
}

.comic-description h3 {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-primary);
}

.comic-description h3 i {
    color: var(--accent);
}

.desc-content {
    font-size: 14px;
    line-height: 1.7;
    color: var(--text-secondary);
    max-height: 100px;
    overflow: hidden;
    position: relative;
    transition: max-height 0.3s ease;
}

.desc-content.expanded {
    max-height: 2000px;
}

.desc-toggle {
    background: none;
    border: none;
    color: var(--accent);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    margin-top: 4px;
    font-family: inherit;
}

/* Chapter List */
.chapter-list-section {
    background: var(--bg-card);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.chapter-list-section .section-header {
    margin-bottom: 0;
    border-radius: var(--radius) var(--radius) 0 0;
}

.btn-sort-chapters {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: #fff;
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 13px;
    transition: var(--transition);
}

.btn-sort-chapters:hover {
    background: rgba(255, 255, 255, 0.3);
}

.chapter-list {
    max-height: 500px;
    overflow-y: auto;
}

.chapter-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 18px;
    border-bottom: 1px solid var(--border-light);
    color: var(--text-link);
    font-size: 14px;
    transition: var(--transition);
}

.chapter-item:nth-child(even) {
    background: #f9fafb;
}

.chapter-item:last-child {
    border-bottom: none;
}

.chapter-item:hover {
    background: var(--accent-light);
}

.chap-name {
    font-weight: 500;
}

.chap-meta {
    display: flex;
    gap: 14px;
    font-size: 12px;
    color: var(--text-muted);
}

.chap-meta .chap-views {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    background: var(--accent);
    color: #fff;
    padding: 1px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
}

/* =============================================
   CHAPTER READER
   ============================================= */
.reader-nav {
    background: var(--bg-header);
    border-bottom: 1px solid var(--border-color);
    padding: 10px 0;
    position: sticky;
    top: 0;
    z-index: 90;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

.reader-nav-bottom {
    position: static;
    border-top: 1px solid var(--border-color);
    border-bottom: none;
    padding: 20px 0;
    background: var(--bg-card);
}

.reader-nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.reader-back {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
}

.reader-back:hover {
    color: var(--accent);
}

.reader-comic-title {
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.reader-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

.reader-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 14px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
}

.reader-btn:hover {
    background: var(--accent-light);
    color: var(--accent);
    border-color: var(--accent);
}

.reader-btn.disabled {
    opacity: 0.3;
    cursor: not-allowed;
    pointer-events: none;
}

.reader-btn.btn-lg {
    padding: 10px 20px;
    font-size: 14px;
}

.chapter-select {
    padding: 8px 14px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 13px;
    font-family: inherit;
    outline: none;
    cursor: pointer;
    max-width: 260px;
}

.reader-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 16px 0;
    min-height: 50vh;
    background: #fff;
}

.reader-page {
    margin-bottom: 0;
    line-height: 0;
}

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

/* =============================================
   PAGINATION
   ============================================= */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 20px 0;
}

.page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 500;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    transition: var(--transition);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.page-link:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.page-link.active {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

/* =============================================
   EMPTY STATE
   ============================================= */
.empty-state {
    text-align: center;
    padding: 48px 20px;
    color: var(--text-muted);
    background: var(--bg-card);
    border-radius: var(--radius);
}

.empty-state i {
    font-size: 48px;
    margin-bottom: 16px;
    display: block;
    opacity: 0.25;
}

.empty-state p {
    font-size: 14px;
}

/* =============================================
   FOOTER
   ============================================= */
.site-footer {
    background: var(--bg-card);
    border-top: 3px solid var(--accent);
    padding: 36px 0 0;
    margin-top: 32px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 32px;
    margin-bottom: 24px;
}

.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 20px;
    font-weight: 800;
    color: var(--accent);
    margin-bottom: 10px;
}

.footer-about p {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.7;
}

.footer-links h4 {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.footer-links ul {
    list-style: none;
}

.footer-links li {
    margin-bottom: 6px;
}

.footer-links a {
    font-size: 13px;
    color: var(--text-muted);
}

.footer-links a:hover {
    color: var(--accent);
}

.footer-bottom {
    border-top: 1px solid var(--border-color);
    padding: 14px 0;
    text-align: center;
    font-size: 12px;
    color: var(--text-muted);
}

/* Back to Top */
.back-to-top {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--accent);
    color: #fff;
    border: none;
    cursor: pointer;
    font-size: 16px;
    box-shadow: 0 3px 12px rgba(51, 122, 183, 0.3);
    display: none;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    z-index: 50;
}

.back-to-top.visible {
    display: flex;
}

.back-to-top:hover {
    transform: translateY(-4px);
    background: var(--accent-hover);
}

/* =============================================
   ANIMATIONS
   ============================================= */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 1024px) {
    .content-layout {
        grid-template-columns: 1fr;
    }

    .content-sidebar {
        position: static;
    }

    .hot-slider {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .header-search {
        display: none;
    }

    .mobile-toggle {
        display: block;
    }

    .mobile-search-toggle {
        display: flex;
    }

    .main-nav {
        display: none;
    }

    .main-nav.open {
        display: block;
    }

    .nav-list {
        flex-direction: column;
        gap: 0;
    }

    .nav-list>li>a {
        justify-content: center;
    }

    .mega-dropdown {
        position: static;
        min-width: auto;
        transform: none;
        border: none;
        border-radius: 0;
        box-shadow: none;
        padding: 8px 16px;
    }

    .genre-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .hot-slider {
        grid-template-columns: repeat(2, 1fr);
    }

    .comic-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
    }

    .comic-detail {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 16px;
    }

    .comic-detail-cover {
        width: 180px;
    }

    .comic-meta-grid {
        grid-template-columns: 1fr 1fr;
        text-align: left;
    }

    .comic-genres-list {
        justify-content: center;
    }

    .comic-actions {
        justify-content: center;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .reader-comic-title {
        display: none;
    }

    .chapter-select {
        max-width: 150px;
    }

    .section-header {
        padding: 8px 14px;
        border-radius: 20px;
    }

    .section-header h2,
    .section-header h3 {
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .comic-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .hot-slider {
        grid-template-columns: 1fr 1fr;
    }

    .btn-action {
        padding: 8px 16px;
        font-size: 13px;
    }
}

::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a1a1a1;
}

/* =============================================
   AUTH PAGES (LOGIN / REGISTER)
   ============================================= */
.auth-page {
    display: flex;
    justify-content: center;
    padding: 40px 0;
    min-height: 60vh;
}

.auth-card {
    width: 100%;
    max-width: 460px;
    background: var(--bg-card);
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
    padding: 40px;
    animation: fadeIn 0.4s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.auth-header {
    text-align: center;
    margin-bottom: 28px;
}

.auth-header h1 {
    font-size: 24px;
    font-weight: 800;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 6px;
}

.auth-header h1 i {
    color: var(--accent);
    font-size: 22px;
}

.auth-header p {
    font-size: 14px;
    color: var(--text-muted);
}

.auth-form .form-group {
    margin-bottom: 18px;
}

.auth-form label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.auth-form label i {
    color: var(--accent);
    margin-right: 4px;
    font-size: 12px;
}

.auth-form input[type="text"],
.auth-form input[type="email"],
.auth-form input[type="password"] {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-input);
    border: 2px solid var(--border-color);
    border-radius: var(--radius);
    color: var(--text-primary);
    font-size: 14px;
    font-family: inherit;
    outline: none;
    transition: var(--transition);
}

.auth-form input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 4px var(--accent-light);
    background: #fff;
}

.auth-form input::placeholder {
    color: var(--text-muted);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.password-wrapper {
    position: relative;
}

.password-wrapper input {
    padding-right: 44px;
}

.toggle-password {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
    font-size: 14px;
    transition: var(--transition);
}

.toggle-password:hover {
    color: var(--accent);
}

.btn-auth {
    width: 100%;
    padding: 13px 24px;
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-hover) 100%);
    border: none;
    border-radius: var(--radius);
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: var(--transition);
    margin-top: 8px;
}

.btn-auth:hover {
    background: linear-gradient(135deg, var(--accent-hover) 0%, #234d75 100%);
    box-shadow: 0 4px 12px rgba(51, 122, 183, 0.35);
    transform: translateY(-1px);
}

.auth-footer {
    text-align: center;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--border-light);
    font-size: 14px;
    color: var(--text-muted);
}

.auth-footer a {
    color: var(--accent);
    font-weight: 600;
}

.auth-footer a:hover {
    text-decoration: underline;
}

/* =============================================
   ALERTS
   ============================================= */
.alert {
    padding: 12px 18px;
    border-radius: var(--radius);
    font-size: 14px;
    margin-bottom: 18px;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: fadeIn 0.3s ease;
}

.alert i {
    font-size: 16px;
    flex-shrink: 0;
}

.alert-error {
    background: #fdf2f2;
    color: var(--red);
    border: 1px solid #fecaca;
}

.alert-success {
    background: #f0fdf4;
    color: var(--green);
    border: 1px solid #bbf7d0;
}

.alert-info {
    background: #eff6ff;
    color: var(--accent);
    border: 1px solid #bfdbfe;
}

/* =============================================
   USER PAGES (BOOKMARKS / HISTORY)
   ============================================= */
.page-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.page-header h1 {
    font-size: 22px;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 10px;
}

.page-header h1 i {
    color: var(--accent);
}

.badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    background: var(--accent-light);
    color: var(--accent);
}

.btn-clear {
    margin-left: auto;
    padding: 8px 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: #fff;
    color: var(--text-muted);
    font-size: 13px;
    font-family: inherit;
    cursor: pointer;
    transition: var(--transition);
}

.btn-clear:hover {
    border-color: var(--red);
    color: var(--red);
    background: #fdf2f2;
}

.inline-form {
    display: inline;
    margin-left: auto;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.empty-state i {
    font-size: 56px;
    margin-bottom: 16px;
    opacity: 0.3;
    display: block;
}

.empty-state h3 {
    font-size: 18px;
    margin-bottom: 8px;
    color: var(--text-secondary);
}

.empty-state p {
    font-size: 14px;
    margin-bottom: 20px;
}

/* Bookmark card extra */
.comic-card {
    position: relative;
}

.btn-unbookmark {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: none;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    font-size: 12px;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    z-index: 3;
}

.comic-card:hover .btn-unbookmark {
    display: flex;
}

.btn-unbookmark:hover {
    background: var(--red);
}

.comic-card-link {
    display: block;
}

.comic-card-img {
    position: relative;
    aspect-ratio: 3/4;
    overflow: hidden;
}

.comic-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.comic-card:hover .comic-card-img img {
    transform: scale(1.05);
}

.chapter-badge {
    position: absolute;
    bottom: 8px;
    right: 8px;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    background: var(--accent);
    color: #fff;
}

.comic-card-genres {
    font-size: 11px;
    color: var(--text-muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* History List */
.history-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.history-item {
    display: flex;
    align-items: center;
    gap: 16px;
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 14px 18px;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.history-item:hover {
    box-shadow: var(--shadow-hover);
}

.history-thumb {
    width: 56px;
    height: 75px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    flex-shrink: 0;
}

.history-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.history-info {
    flex: 1;
    min-width: 0;
}

.history-info h3 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 6px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.history-info h3 a {
    color: var(--text-primary);
}

.history-info h3 a:hover {
    color: var(--accent);
}

.history-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    font-size: 12px;
    color: var(--text-muted);
}

.history-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.history-chapter a {
    color: var(--accent);
    font-weight: 600;
}

.history-actions {
    flex-shrink: 0;
}

.btn-continue {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--accent-light);
    color: var(--accent);
    font-size: 14px;
    transition: var(--transition);
}

.btn-continue:hover {
    background: var(--accent);
    color: #fff;
}

/* =============================================
   USER MENU (Header dropdown)
   ============================================= */
.user-menu {
    position: relative;
    margin-left: auto;
}

.user-avatar-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    font-family: inherit;
    color: var(--text-primary);
}

.user-avatar-btn:hover {
    background: var(--bg-input);
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--accent-light);
}

.user-avatar-placeholder {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), var(--accent-hover));
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
}

.user-name {
    font-size: 13px;
    font-weight: 600;
    max-width: 100px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 200px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    box-shadow: var(--shadow-hover);
    padding: 6px 0;
    z-index: 200;
    animation: fadeInDown 0.2s ease;
}

.user-menu:hover .user-dropdown,
.user-menu.open .user-dropdown {
    display: block;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-4px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.user-dropdown a,
.user-dropdown button {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 10px 16px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    border: none;
    background: none;
    cursor: pointer;
    font-family: inherit;
    text-align: left;
    transition: var(--transition);
}

.user-dropdown a:hover,
.user-dropdown button:hover {
    background: var(--bg-input);
    color: var(--accent);
}

.user-dropdown i {
    width: 16px;
    text-align: center;
}

.user-dropdown .divider {
    height: 1px;
    background: var(--border-light);
    margin: 4px 0;
}

.user-dropdown .logout-btn {
    color: var(--red);
}

.user-dropdown .logout-btn:hover {
    background: #fdf2f2;
}

/* Auth links in header */
.auth-links {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
}

.btn-login,
.btn-register {
    padding: 7px 16px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 600;
    transition: var(--transition);
}

.btn-login {
    color: var(--accent);
    border: 1px solid var(--accent);
    background: transparent;
}

.btn-login:hover {
    background: var(--accent-light);
}

.btn-register {
    color: #fff;
    background: var(--accent);
    border: 1px solid var(--accent);
}

.btn-register:hover {
    background: var(--accent-hover);
    border-color: var(--accent-hover);
}

/* =============================================
   SEO CONTENT SECTION (Homepage)
   ============================================= */
.seo-content-section {
    padding: 30px 0;
    background: var(--bg-card);
    border-top: 1px solid var(--border-light);
    margin-top: 20px;
}

.seo-content-box {
    max-width: 900px;
    font-size: 14px;
    line-height: 1.8;
    color: var(--text-secondary);
}

.seo-content-box h2 {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.seo-content-box h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 20px 0 8px;
}

.seo-content-box p {
    margin-bottom: 12px;
}

.seo-content-box ul {
    padding-left: 20px;
    margin-bottom: 12px;
}

.seo-content-box li {
    margin-bottom: 6px;
}

.seo-content-box a {
    color: var(--accent);
}

/* Static Page */
.static-page {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 30px;
    box-shadow: var(--shadow);
    margin: 20px 0;
}

.static-page h1 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--text-primary);
    border-bottom: 2px solid var(--accent-light);
    padding-bottom: 12px;
}

.page-content {
    font-size: 15px;
    line-height: 1.8;
    color: var(--text-secondary);
}

.page-content h2,
.page-content h3 {
    color: var(--text-primary);
    margin: 20px 0 10px;
}

.page-content p {
    margin-bottom: 12px;
}

.page-content ul,
.page-content ol {
    padding-left: 20px;
    margin-bottom: 12px;
}

.breadcrumb-front {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-muted);
    padding: 12px 0;
}

.breadcrumb-front a {
    color: var(--accent);
}

.breadcrumb-front a:hover {
    text-decoration: underline;
}

/* =============================================
   RANKING PAGE
   ============================================= */
.ranking-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 16px;
    background: var(--bg-card);
    padding: 4px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.rank-tab {
    flex: 1;
    padding: 10px 16px;
    border: none;
    background: transparent;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
}

.rank-tab:hover {
    background: var(--accent-light);
    color: var(--accent);
}

.rank-tab.active {
    background: var(--accent);
    color: #fff;
}

.rank-panel {
    display: none;
}

.rank-panel.active {
    display: block;
}

.rank-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    background: var(--bg-card);
    border-radius: var(--radius);
    margin-bottom: 8px;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.rank-item:hover {
    box-shadow: var(--shadow-hover);
    transform: translateX(4px);
}

.rank-number {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 14px;
    font-weight: 800;
    color: var(--text-muted);
    background: var(--bg-input);
    flex-shrink: 0;
}

.rank-number.top-1 {
    background: linear-gradient(135deg, #FFD700, #FFA500);
    color: #fff;
    font-size: 16px;
}

.rank-number.top-2 {
    background: linear-gradient(135deg, #C0C0C0, #A0A0A0);
    color: #fff;
}

.rank-number.top-3 {
    background: linear-gradient(135deg, #CD7F32, #A0522D);
    color: #fff;
}

.rank-thumb {
    width: 55px;
    height: 75px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    flex-shrink: 0;
}

.rank-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.rank-info {
    flex: 1;
    min-width: 0;
}

.rank-info h3 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.rank-info h3 a {
    color: var(--text-primary);
}

.rank-info h3 a:hover {
    color: var(--accent);
}

.rank-genres {
    display: block;
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.rank-stats {
    display: flex;
    gap: 12px;
    font-size: 12px;
    color: var(--text-muted);
}

.rank-stats span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.badge-complete {
    color: var(--green);
    font-weight: 600;
}

/* =============================================
   RESPONSIVE - HERO SLIDER
   ============================================= */
@media (max-width: 768px) {
    .hero-slider {
        height: 260px;
    }

    .slider-title {
        font-size: 18px;
        -webkit-line-clamp: 1;
    }

    .slider-cover {
        display: none;
    }

    .slider-content .container {
        gap: 16px;
        padding: 0 16px;
    }

    .slider-info {
        padding: 10px 0;
    }

    .slider-arrow {
        width: 34px;
        height: 34px;
        font-size: 13px;
    }

    .slider-prev {
        left: 8px;
    }

    .slider-next {
        right: 8px;
    }

    .slider-badge {
        font-size: 10px;
        padding: 3px 8px;
        margin-bottom: 10px;
    }

    .slider-meta {
        font-size: 11px;
        gap: 8px;
        flex-wrap: wrap;
        margin-bottom: 12px;
    }

    .slider-btn {
        padding: 7px 14px;
        font-size: 12px;
    }

    .slider-dots .dot {
        width: 8px;
        height: 8px;
    }

    .btn-login,
    .btn-register {
        padding: 2px 6px;
    }
}

@media (max-width: 480px) {
    .hero-slider {
        height: 220px;
    }

    .slider-title {
        font-size: 16px;
    }

    .slider-arrow {
        width: 30px;
        height: 30px;
        font-size: 12px;
    }

    .slider-meta span {
        font-size: 10px;
    }
}

/* =============================================
   RESPONSIVE - AUTH / USER PAGES
   ============================================= */
@media (max-width: 768px) {
    .auth-card {
        padding: 28px 20px;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .auth-header h1 {
        font-size: 20px;
    }

    .history-item {
        padding: 12px;
        gap: 12px;
    }

    .history-meta {
        gap: 8px;
    }

    .user-name {
        display: none;
    }
}

/* =============================================
   404 ERROR PAGE
   ============================================= */
.error-page {
    text-align: center;
    padding: 60px 20px 80px;
    max-width: 560px;
    margin: 0 auto;
}

.error-illustration {
    position: relative;
    margin-bottom: 32px;
}

.error-code {
    font-size: 140px;
    font-weight: 900;
    line-height: 1;
    background: linear-gradient(135deg, var(--accent), #8B5CF6, #EC4899);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    opacity: 0.15;
    user-select: none;
}

.error-ghost {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: ghostFloat 3s ease-in-out infinite;
}

.ghost-body {
    width: 80px;
    height: 90px;
    background: var(--bg-card);
    border-radius: 40px 40px 0 0;
    position: relative;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    border: 2px solid var(--border-color);
}

.ghost-eyes {
    display: flex;
    gap: 14px;
    justify-content: center;
    padding-top: 28px;
}

.eye {
    width: 10px;
    height: 10px;
    background: var(--accent);
    border-radius: 50%;
    animation: blink 4s infinite;
}

.ghost-mouth {
    width: 12px;
    height: 6px;
    border-radius: 0 0 12px 12px;
    background: var(--text-muted);
    margin: 8px auto 0;
}

.ghost-bottom {
    display: flex;
    position: relative;
    top: -2px;
}

.ghost-wave {
    width: 16px;
    height: 12px;
    background: var(--bg-card);
    border-bottom-left-radius: 50%;
    border-bottom-right-radius: 50%;
    border: 2px solid var(--border-color);
    border-top: none;
}

.ghost-wave:nth-child(even) {
    background: transparent;
    border: none;
}

@keyframes ghostFloat {

    0%,
    100% {
        transform: translate(-50%, -50%) translateY(0);
    }

    50% {
        transform: translate(-50%, -50%) translateY(-12px);
    }
}

@keyframes blink {

    0%,
    90%,
    100% {
        transform: scaleY(1);
    }

    95% {
        transform: scaleY(0.1);
    }
}

.error-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.error-message {
    font-size: 15px;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 28px;
}

.error-actions {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 32px;
    flex-wrap: wrap;
}

.btn-error-home,
.btn-error-browse {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 600;
    transition: var(--transition);
}

.btn-error-home {
    background: var(--accent);
    color: #fff;
}

.btn-error-home:hover {
    background: var(--accent-hover);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.btn-error-browse {
    background: var(--bg-card);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-error-browse:hover {
    border-color: var(--accent);
    color: var(--accent);
    transform: translateY(-2px);
}

.error-search p {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.error-search-form {
    display: flex;
    max-width: 400px;
    margin: 0 auto;
}

.error-search-form input {
    flex: 1;
    padding: 12px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-right: none;
    border-radius: var(--radius) 0 0 var(--radius);
    color: var(--text-primary);
    font-size: 14px;
    outline: none;
}

.error-search-form input:focus {
    border-color: var(--accent);
}

.error-search-form button {
    padding: 12px 20px;
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: 0 var(--radius) var(--radius) 0;
    cursor: pointer;
    font-size: 14px;
    transition: var(--transition);
}

.error-search-form button:hover {
    background: var(--accent-hover);
}

@media (max-width: 768px) {
    .error-code {
        font-size: 100px;
    }

    .error-title {
        font-size: 20px;
    }

    .error-page {
        padding: 40px 16px 60px;
    }
}