/* ========================================
   MangaVerse Styles - Complete
   CSS VARIABLES
   ======================================== */
:root {
    --primary-color: #6366f1;
    --primary-hover: #4f46e5;
    --secondary-color: #8b5cf6;
    --accent-color: #ec4899;
    --success: #10b981;
    --warning: #f59e0b;
    --error: #ef4444;
    --info: #3b82f6;

    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-tertiary: #334155;

    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;

    --border-radius-sm: 6px;
    --border-radius-md: 8px;
    --border-radius-lg: 12px;
    --border-radius-xl: 16px;

    --transition: all 0.2s ease;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

/* ========================================
   RESET & BASE STYLES
   ======================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    -webkit-overflow-scrolling: touch;
    -webkit-tap-highlight-color: transparent;
}

a {
    text-decoration: none;
    color: inherit;
}

ul,
ol {
    list-style: none;
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    outline: none;
}

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

/* ========================================
   UTILITY CLASSES
   ======================================== */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.text-center {
    text-align: center;
}

.mt-1 {
    margin-top: 0.5rem;
}

.mt-2 {
    margin-top: 1rem;
}

.mt-3 {
    margin-top: 1.5rem;
}

.mt-4 {
    margin-top: 2rem;
}

.mb-1 {
    margin-bottom: 0.5rem;
}

.mb-2 {
    margin-bottom: 1rem;
}

.mb-3 {
    margin-bottom: 1.5rem;
}

.mb-4 {
    margin-bottom: 2rem;
}

/* ========================================
   HEADER / NAVBAR
   ======================================== */
.header {
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--bg-tertiary);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

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

.navbar {
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--bg-tertiary);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-menu {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.desktop-nav {
    display: flex;
    gap: 2rem;
}

.nav-link {
    color: var(--text-secondary);
    font-weight: 500;
    transition: var(--transition);
    position: relative;
    padding: 0.5rem 0;
}

.nav-link.active {
    color: var(--text-primary);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: var(--transition);
}

.nav-link.active::after {
    width: 100%;
}

.nav-link:hover {
    color: var(--text-primary);
}

.nav-link:hover::after {
    width: 100%;
}

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-links a {
    color: var(--text-secondary);
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: var(--transition);
}

.nav-links a:hover {
    color: var(--text-primary);
}

.nav-links a:hover::after {
    width: 100%;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.mobile-search-btn {
    display: none;
}

.search-box {
    position: relative;
    width: 250px;
}

.search-box input {
    width: 100%;
    padding: 0.625rem 2.5rem 0.625rem 1rem;
    background: var(--bg-secondary);
    border: 1px solid var(--bg-tertiary);
    border-radius: var(--border-radius-md);
    color: var(--text-primary);
    font-size: 0.875rem;
    transition: var(--transition);
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.search-icon {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
}

.clear-search-btn {
    position: absolute;
    right: 0.35rem;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    padding: 0;
    display: none;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    cursor: pointer;
}

.clear-search {
    font-size: 0.85rem;
    transition: var(--transition);
}

.clear-search-btn:hover .clear-search {
    color: var(--text-primary);
}

.search-results-dropdown {
    position: absolute;
    top: calc(100% + 0.5rem);
    left: 0;
    right: 0;
    background: var(--bg-secondary);
    border: 1px solid var(--bg-tertiary);
    border-radius: var(--border-radius-md);
    max-height: 400px;
    overflow-y: auto;
    box-shadow: var(--shadow-xl);
    z-index: 1000;
}

.search-result-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem;
    cursor: pointer;
    transition: var(--transition);
    border-bottom: 1px solid var(--bg-tertiary);
}

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

.search-result-item:hover {
    background: var(--bg-tertiary);
}

.search-result-cover {
    width: 50px;
    height: 70px;
    object-fit: cover;
    border-radius: var(--border-radius-sm);
}

.search-result-info {
    flex: 1;
}

.search-result-title {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
    font-size: 0.9375rem;
}

.search-result-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.8125rem;
    color: var(--text-muted);
}

.search-loading,
.search-no-results,
.search-error {
    padding: 1rem;
    text-align: center;
    color: var(--text-muted);
}

.search-more-results {
    padding: 0.75rem;
    text-align: center;
    color: var(--primary-color);
    font-weight: 600;
    font-size: 0.875rem;
    border-top: 1px solid var(--bg-tertiary);
}

.btn-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-secondary);
    border: 1px solid var(--bg-tertiary);
    border-radius: var(--border-radius-md);
    color: var(--text-primary);
    transition: var(--transition);
    cursor: pointer;
}

.btn-icon:hover {
    background: var(--bg-tertiary);
    color: var(--primary-color);
}

.back-btn {
    margin-right: auto;
}

.mobile-menu-btn {
    display: none;
}

/* ========================================
   BUTTONS
   ======================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius-md);
    font-weight: 600;
    transition: var(--transition);
    cursor: pointer;
    border: none;
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 1px solid var(--bg-tertiary);
}

.btn-secondary:hover {
    background: var(--bg-tertiary);
}

.btn-outline {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-outline:hover {
    background: var(--primary-color);
    color: white;
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.125rem;
}

.btn-full {
    width: 100%;
    max-width: 300px;
}

/* ========================================
   CARDS
   ======================================== */
.card {
    background: var(--bg-secondary);
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    transition: var(--transition);
    border: 1px solid var(--bg-tertiary);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
    border-color: rgba(99, 102, 241, 0.5);
}

/* ========================================
   HERO SECTION
   ======================================== */
.hero {
    padding: 4rem 0;
    text-align: center;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.15), rgba(37, 99, 235, 0.1));
    border-bottom: 1px solid rgba(148, 163, 184, 0.15);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.hero-content {
    max-width: 1000px;
    margin: 0 auto;

}

.hero-title {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.hero h1 {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero p {
    font-size: 1.25rem;
    color: var(--text-secondary);
    max-width: 100%;
    margin: 0 auto 2rem;
}

/* ========================================
   MANGA GRID
   ======================================== */
.manga-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.5rem;
    padding: 2rem 0;
}

.manga-card {
    position: relative;
    cursor: pointer;
    content-visibility: auto;
    contain: layout paint style;
    contain-intrinsic-size: 320px 460px;
}

@media (hover: hover) and (pointer: fine) {
    .manga-card {
        transition: transform 0.3s ease;
    }
}

@media (hover: hover) and (pointer: fine) {
    .manga-card:hover {
        transform: translateY(-5px);
    }

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

.manga-cover {
    position: relative;
    width: 100%;
    padding-bottom: 142%;
    overflow: hidden;
    border-radius: var(--border-radius-lg);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.manga-cover img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: var(--bg-tertiary);
}

@media (hover: hover) and (pointer: fine) {
    .manga-cover img {
        transition: transform 0.3s ease;
    }
}

.manga-badge {
    position: absolute;
    top: 3rem;
    left: 0.5rem;
    background: rgba(99, 102, 241, 0.9);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    backdrop-filter: blur(10px);
    z-index: 1;
}

.manga-rating {
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
    color: white;
    padding: 0.25rem 0.65rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
    backdrop-filter: blur(10px);
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    background: var(--primary-color);
    box-shadow: var(--accent-color);
}

.manga-rating i {
    font-size: 0.625rem;
    color: white;
}

/* Status badge on cover */
.manga-status-badge {
    position: absolute;
    bottom: 0.5rem;
    left: 0.5rem;
    background: rgba(16, 185, 129, 0.95);
    color: white;
    padding: 0.35rem 0.85rem;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 400;
    backdrop-filter: blur(10px);
    z-index: 1;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.manga-status-badge.completed {
    background: rgba(59, 130, 246, 0.95);
}

/* Views badge on cover */
.manga-views-badge {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: var(--primary-color);
    box-shadow: var(--accent-color);
    color: white;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 600;
    backdrop-filter: blur(10px);
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 0.35rem;

}

.manga-views-badge i {
    font-size: 0.65rem;
}

.manga-title {
    margin-top: 0.75rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
    display: -webkit-box;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.5rem;
}

/* Remove old meta styles */
.manga-meta {
    display: none;
}

/* ========================================
   MANGA DETAIL PAGE
   ======================================== */
.manga-detail {
    padding: 0;
    min-height: 100vh;
}

.manga-detail-header {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.15), rgba(37, 99, 235, 0.1));
    border-bottom: 1px solid rgba(148, 163, 184, 0.15);
    padding: 3rem 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

.manga-detail-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at top right, rgba(99, 102, 241, 0.1), transparent 70%);
    pointer-events: none;
}

.manga-detail-content {
    display: grid;
    grid-template-columns: minmax(0, 280px) minmax(0, 1fr);
    gap: 2.5rem;
    align-items: flex-start;
    position: relative;
    z-index: 1;
}

/* ========================================
   NEW MANGA DETAIL DESIGN
   ======================================== */

/* Cover Wrapper */
.manga-cover-wrapper {
    width: 100%;
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.manga-cover-card {
    position: relative;
    width: 100%;
    aspect-ratio: 2 / 3;
    border-radius: var(--border-radius-xl);
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    background: var(--bg-tertiary);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.manga-cover-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 60px rgba(99, 102, 241, 0.4);
}

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

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

.cover-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.7) 100%);
    pointer-events: none;
}

.manga-rating-badge {
    position: absolute;
    top: 1rem;
    left: 1rem;
    padding: 0.5rem 1rem;
    backdrop-filter: blur(10px);
    border-radius: 999px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
    color: 'white';
    background: var(--primary-color);
    box-shadow: var(--accent-color);

}

.manga-rating-badge i {
    font-size: 0.875rem;
}

/* Quick Actions */
.quick-actions {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
}

.quick-action-btn {
    flex: 1;
    padding: 0.875rem;
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: var(--border-radius-lg);
    color: var(--text-primary);
    font-size: 1.125rem;
    transition: all 0.3s ease;
    cursor: pointer;
}

.quick-action-btn:hover {
    background: rgba(99, 102, 241, 0.2);
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateY(-2px);
}

.quick-action-btn.active {
    background: rgba(99, 102, 241, 0.3);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

/* Manga Info Wrapper */
.manga-info-wrapper {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Title Section */
.manga-title-section h1 {
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.manga-alt-title {
    color: var(--text-muted);
    font-size: 1.125rem;
    font-weight: 500;
}

/* Stats Bar */
.manga-stats-bar {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    padding: 1.25rem;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(148, 163, 184, 0.12);
    border-radius: var(--border-radius-xl);
}

.stat-box {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.stat-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.2), rgba(139, 92, 246, 0.2));
    border-radius: var(--border-radius-lg);
    color: var(--primary-color);
    font-size: 1.25rem;
}

.stat-info {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.stat-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
}

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

/* Categories Wrapper */
.manga-categories-wrapper {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.categories-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.manga-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.manga-categories .category-chip {
    padding: 0.5rem 1rem;
    background: rgba(99, 102, 241, 0.15);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 999px;
    color: var(--primary-color);
    font-weight: 600;
    font-size: 0.875rem;
    transition: all 0.3s ease;
}

.manga-categories .category-chip:hover {
    background: rgba(99, 102, 241, 0.25);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

/* Meta Grid */
.manga-meta-grid {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 1.25rem;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(148, 163, 184, 0.12);
    border-radius: var(--border-radius-xl);
}

.meta-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(148, 163, 184, 0.08);
}

.meta-row:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.meta-row:first-child {
    padding-top: 0;
}

.meta-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-muted);
    font-size: 0.9375rem;
    font-weight: 500;
}

.meta-label i {
    color: var(--primary-color);
    font-size: 0.875rem;
}

.meta-value {
    color: var(--text-primary);
    font-weight: 600;
    font-size: 0.9375rem;
}

.status-badge {
    padding: 0.25rem 0.75rem;
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: 999px;
    color: var(--success);
    font-size: 0.8125rem;
    font-weight: 600;
}

/* Rating Section */
.manga-rating-section {
    position: relative;
    width: 100%;
}

.rating-card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    padding: 1.5rem;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(129, 140, 248, 0.35);
    border-radius: var(--border-radius-xl);
    box-shadow: 0 24px 50px rgba(15, 23, 42, 0.45);
    overflow: hidden;
    backdrop-filter: blur(12px);
    align-items: center;
}

.rating-card::before {
    content: '';
    position: absolute;
    right: -40%;
    bottom: -45%;
    width: 220px;
    height: 220px;
    background: radial-gradient(circle at center, rgba(129, 140, 248, 0.45), transparent 70%);
    opacity: 0.65;
    pointer-events: none;
    z-index: 0;
}

.rating-card>* {
    position: relative;
    z-index: 1;
}

.rating-header {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.rating-title {
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-primary);
}

.rating-subtitle {
    font-size: 0.85rem;
    font-weight: 500;
    color: rgba(226, 232, 240, 0.7);
}

.rating-interactive {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.85rem;
}

.rating-stars-interactive {
    display: flex;
    gap: 0.75rem;
}

.rating-stars-interactive i {
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.45rem;
    color: rgba(226, 232, 240, 0.55);
    background: rgba(15, 23, 42, 0.65);
    border: 1px solid rgba(148, 163, 184, 0.16);
    cursor: pointer;
    transition: transform 0.2s ease, color 0.2s ease, background 0.2s ease, border 0.2s ease, box-shadow 0.2s ease;
}

.rating-stars-interactive i:hover,
.rating-stars-interactive i.fas,
.rating-stars-interactive i.active {
    color: #fbbf24;
    background: rgba(99, 102, 241, 0.28);
    border-color: rgba(129, 140, 248, 0.6);
    box-shadow: 0 16px 32px rgba(99, 102, 241, 0.35);
    transform: translateY(-3px) scale(1.05);
}

.rating-hint {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(226, 232, 240, 0.65);
    transition: color 0.2s ease;
    align-self: center;
}

.rating-hint.confirmed {
    color: #fbbf24;
}

/* Action Buttons */
.manga-action-buttons {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.btn-large {
    padding: 1.25rem 2rem;
    font-size: 1.125rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.btn-large i {
    font-size: 1.5rem;
}

.btn-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
}

.btn-title {
    font-weight: 700;
    font-size: 1.125rem;
}

.btn-subtitle {
    font-size: 0.875rem;
    opacity: 0.8;
    font-weight: 500;
}

.button-group {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
}

.button-group .btn {
    flex: 1;
}

.manga-header {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.manga-poster {
    width: 100%;
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-xl);
    position: relative;
}

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

.info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.info-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.info-label {
    font-size: 0.875rem;
    color: var(--text-muted);
    font-weight: 500;
}

.info-value {
    font-size: 1rem;
    color: var(--text-primary);
    font-weight: 600;
}

.categories {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.category-tag {
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary-color);
    padding: 0.375rem 0.875rem;
    border-radius: 999px;
    font-size: 0.8125rem;
    font-weight: 600;
    border: 1px solid rgba(99, 102, 241, 0.2);
}

.description {
    line-height: 1.7;
    color: var(--text-secondary);
}

.action-buttons {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

/* ========================================
   RATING SECTION
   ======================================== */
.rating-display {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.rating-number {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

.rating-stars {
    display: flex;
    gap: 0.25rem;
}

.star {
    color: #475569;
    font-size: 1.125rem;
    transition: var(--transition);
}

.star.filled {
    color: #8a2be2;
}

.rating-input {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.rating-text {
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.star-rating {
    display: flex;
    gap: 0.25rem;
}

.star-rating .star {
    cursor: pointer;
    font-size: 1.25rem;
    transition: var(--transition);
}

.star-rating .star:hover,
.star-rating .star.hover {
    color: #8a2be2;
    transform: scale(1.1);
}

.star-rating .star.selected {
    color: #8a2be2;
}

/* ========================================
   MANGA DETAIL CONTENT
   ======================================== */
.tab-menu-container {
    background: rgba(15, 23, 42, 0.85);
    border-bottom: 1px solid var(--bg-tertiary);
    box-shadow: var(--shadow-sm);
    backdrop-filter: blur(12px);
}

.tab-menu-container .container {
    display: flex;
    justify-content: center;
}

.manga-description-section,
.chapters-section,
.updates-section-full {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--bg-tertiary);
    border-radius: var(--border-radius-xl);
    padding: 2rem 2.5rem;
    box-shadow: var(--shadow-lg);
}

.manga-description-section {
    margin-bottom: 2rem;
}

.description-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.description-header .btn-icon,
.chapter-sort .btn-icon {
    background: var(--bg-primary);
    border: 1px solid var(--bg-tertiary);
    border-radius: var(--border-radius-md);
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.description-header .btn-icon:hover,
.chapter-sort .btn-icon:hover {
    background: var(--bg-tertiary);
    border-color: rgba(99, 102, 241, 0.5);
    color: var(--primary-color);
}

.manga-description {
    position: relative;
    color: var(--text-secondary);
    line-height: 1.8;
    font-size: 0.95rem;
    transition: max-height 0.3s ease;
}

.manga-description.collapsed {
    max-height: 7.25rem;
    overflow: hidden;
}

.manga-description.collapsed::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 3rem;
    background: linear-gradient(0deg, rgba(15, 23, 42, 0.95), rgba(15, 23, 42, 0));
}

.chapters-section {
    margin-bottom: 2rem;
}

.chapters-section .section-header {
    margin-bottom: 1.5rem;
}

.chapter-count {
    font-size: 1.3rem;
    color: var(--primary-color);
    font-weight: 400;
    margin-left: 0.5rem;
}

.chapter-sort {
    display: flex;
    align-items: center;
}

.chapter-sort .btn-icon {
    margin-left: 0.5rem;
}

.chapter-item-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;

}

.chapter-item-title {
    font-weight: 600;
    font-size: 1rem;
    color: var(--text-primary);
}

.chapter-item-subtitle {
    font-size: 0.8125rem;
    color: var(--text-muted);
}

.chapter-item-meta {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    color: var(--text-muted);
    font-size: 0.875rem;
}

.chapter-item-meta span {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.chapter-item-meta i {
    color: var(--primary-color);
}

.updates-section-full .section-header {
    margin-bottom: 1.5rem;
}

.updates-timeline {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.update-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.75rem;
    background: rgba(99, 102, 241, 0.18);
    border-radius: 999px;
    color: var(--primary-color);
    font-size: 0.75rem;
    font-weight: 600;
}

.news-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    padding: 2rem;
    background: var(--bg-secondary);
    border: 1px solid var(--bg-tertiary);
    border-radius: var(--border-radius-lg);
    color: var(--text-secondary);
    text-align: center;
}

.news-empty i {
    font-size: 2rem;
    color: var(--primary-color);
}


/* ========================================
   TAB MENU
   ======================================== */
.tab-menu {
    display: flex;
    gap: 1rem;
    justify-content: center;
    border-bottom: 2px solid var(--bg-tertiary);
    padding: 0.75rem 0;
    margin: 0;
    width: 100%;
    max-width: 1400px;
}

.tab-link {
    padding: 0.75rem 1.25rem;
    background: transparent;
    color: var(--text-muted);
    font-weight: 600;
    font-size: 1.05rem;
    line-height: 1.4;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    border: none;
    border-bottom: 2px solid transparent;
    border-radius: var(--border-radius-md) var(--border-radius-md) 0 0;
    transition: var(--transition);
    cursor: pointer;
}

.tab-link i {
    font-size: 1.1rem;
}

.tab-link:hover {
    color: var(--text-primary);
    border-bottom-color: rgba(99, 102, 241, 0.35);
}

.tab-link.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.tab-content-wrapper {
    background: var(--bg-primary);
}

.tab-content {
    display: none;
    padding: 2.5rem 0;
    animation: fadeIn 0.3s ease-in-out;
}

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

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

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

/* ========================================
   CHAPTERS LIST
   ======================================== */
.chapters-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.section-title {
    font-size: 1.5rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sort-dropdown {
    position: relative;
}

.sort-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1rem;
    background: var(--bg-secondary);
    border: 1px solid var(--bg-tertiary);
    border-radius: var(--border-radius-md);
    color: var(--text-primary);
    font-weight: 500;
    transition: var(--transition);
}

.sort-btn:hover {
    background: var(--bg-tertiary);
}

.chapters-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.chapter-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    background: var(--bg-secondary);
    border: 1px solid var(--bg-tertiary);
    border-radius: var(--border-radius-md);
    transition: var(--transition);
    cursor: pointer;
    margin-bottom: 1rem;
}

.chapter-item:hover {
    background: var(--bg-tertiary);
    border-color: rgba(99, 102, 241, 0.5);
    transform: translateX(5px);
}

.chapter-title {
    font-weight: 600;
    color: var(--text-primary);
}

.chapter-meta {
    display: flex;
    gap: 1rem;
    align-items: center;
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* ========================================
   CHAPTER READER
   ======================================== */
.reader-body {
    background: radial-gradient(120% 120% at 50% 0%, rgba(99, 102, 241, 0.15) 0%, rgba(15, 23, 42, 1) 55%);
    min-height: 100vh;
    color: var(--text-primary);
}

.reader-wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.glass-panel {
    background: rgba(15, 23, 42, 0.92);
    border: 1px solid rgba(148, 163, 184, 0.15);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.35);
}

.reader-header {
    position: sticky;
    top: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.75rem 1rem;
    background: rgba(15, 23, 42, 0.82);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(148, 163, 184, 0.12);
    transition: opacity 0.25s ease;
    will-change: opacity;
}

.reader-header.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    user-select: none;
}

.reader-back-btn {
    width: 44px;
    height: 44px;
    border-radius: var(--border-radius-lg);
    background: rgba(99, 102, 241, 0.15);
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    transition: var(--transition);
}

.reader-back-btn:hover {
    background: rgba(99, 102, 241, 0.3);
    transform: translateY(-1px);
}

.reader-meta {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.35rem;
    flex: 1;
    min-width: 0;
}

.reader-breadcrumb {
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(148, 163, 184, 0.75);
}

.reader-manga-title {
    font-size: clamp(1.4rem, 1.2rem + 1vw, 2rem);
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.reader-chapter-title {
    font-size: 0.95rem;
    color: var(--text-secondary);
}

.reader-control-btn {
    width: 44px;
    height: 44px;
    border-radius: var(--border-radius-lg);
    border: 1px solid rgba(148, 163, 184, 0.25);
    background: rgba(15, 23, 42, 0.65);
    color: var(--text-primary);
    font-size: 1.05rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.reader-control-btn:hover {
    border-color: rgba(99, 102, 241, 0.7);
    color: var(--primary-color);
    transform: translateY(-1px);
}

.reader-control-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none;
}

.progress-nav-btn {
    pointer-events: auto;
}

.reader-main {
    flex: 1;
    display: flex;
    justify-content: center;
    padding: 0 1.5rem 4rem;
}

.reader-stage {
    width: min(100%, 1040px);
    flex-direction: column;
    display: flex;
}

.reader-pages {
    display: flex;
    flex-direction: column;
    gap: 1.75rem;
    align-items: center;
}

.reader-page {
    width: 100%;
    display: flex;
    justify-content: center;
}

.reader-page img {
    border-radius: var(--border-radius-lg);
    box-shadow: 0 30px 70px rgba(15, 23, 42, 0.45);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    background-color: #0f172a;
}

.reader-page img:hover {
    transform: translateY(-4px);
    box-shadow: 0 25px 60px rgba(99, 102, 241, 0.25);
}

.settings-panel {
    position: fixed;
    inset: 0;
    display: flex;
    justify-content: flex-end;
    padding: 2rem;
    background: rgba(15, 23, 42, 0.5);
    backdrop-filter: blur(6px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 60;
}

.settings-panel.active {
    opacity: 1;
    pointer-events: auto;
}

.settings-content {
    width: min(420px, 100%);
    height: fit-content;
    border-radius: 24px;
    padding: 2rem;
    transform: translateX(40px);
    transition: transform 0.3s ease;
}

.settings-panel.active .settings-content {
    transform: translateX(0);
}

.settings-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 2rem;
}

.settings-header h2 {
    font-size: 1.35rem;
    margin-bottom: 0.35rem;
}

.settings-header p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.settings-close-btn {
    width: 42px;
    height: 42px;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.15);
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.settings-close-btn:hover {
    background: rgba(99, 102, 241, 0.25);
}

.settings-body {
    display: flex;
    flex-direction: column;
    gap: 1.75rem;
}

.settings-section h3 {
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 0.75rem;
    color: rgba(148, 163, 184, 0.85);
}

.setting-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
    gap: 0.75rem;
}

.setting-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 0.4rem;
    padding: 0.85rem;
    border-radius: var(--border-radius-lg);
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid transparent;
    color: var(--text-secondary);
    transition: var(--transition);
    font-size: 0.9rem;
}

.setting-btn i {
    font-size: 1.1rem;
}

.setting-btn:hover {
    border-color: rgba(99, 102, 241, 0.35);
    color: var(--text-primary);
}

.setting-btn.active {
    background: rgba(99, 102, 241, 0.18);
    border-color: rgba(99, 102, 241, 0.6);
    color: var(--primary-color);
    box-shadow: 0 12px 30px rgba(99, 102, 241, 0.25);
}

.page-nav-indicator {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.45);
    color: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
    z-index: 45;
}

.page-nav-indicator.left {
    left: 1.5rem;
}

.page-nav-indicator.right {
    right: 1.5rem;
}

.page-nav-indicator.show {
    opacity: 1;
    transform: translateY(-50%) scale(1.05);
}

.loading-overlay {
    position: fixed;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(12, 20, 38, 0.82);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
    z-index: 70;
}

.loading-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.loading-overlay .spinner {
    width: 48px;
    height: 48px;
    border: 4px solid rgba(148, 163, 184, 0.2);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 0.75s linear infinite;
    margin-bottom: 1rem;
}

.loading-overlay p {
    margin-top: 0.5rem;
    color: var(--text-secondary);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-size: 0.85rem;
}

.reader-progress-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 1rem 1.5rem 1.5rem;
    z-index: 45;
    pointer-events: none;
}

.reader-progress-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    max-width: 640px;
    width: 100%;
    margin: 0 auto;
    pointer-events: auto;
}

.reader-progress-inner {
    pointer-events: auto;
    border-radius: 20px;
    padding: 0.75rem 1.25rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.5rem;
    flex: 1 1 clamp(240px, 60vw, 520px);
    max-width: clamp(240px, 60vw, 520px);
    margin: 0;
}

.reader-progress-text {
    font-size: 0.85rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-secondary);
}

.reader-progress-track {
    width: 100%;
    height: 6px;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.2);
    overflow: hidden;
}

.reader-progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    transition: width 0.2s ease;
}

@media (max-width: 768px) {
    .reader-header {
        padding: 0.6rem 0.75rem;
        gap: 0.75rem;
    }

    .reader-header .reader-back-btn,
    .reader-header .reader-control-btn,
    .reader-progress-wrapper .reader-control-btn {
        width: 40px;
        height: 40px;
    }

    .reader-meta .reader-manga-title {
        font-size: 0.6rem;
    }

    .reader-progress-wrapper {
        gap: 0.5rem;
    }
}

/* ========================================
   ADMIN PANEL
   ======================================== */
.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.admin-header h1 {
    font-size: 2rem;
    font-weight: 700;
}

.admin-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.stat-card {
    background: var(--bg-secondary);
    padding: 1.5rem;
    border-radius: var(--border-radius-lg);
    border: 1px solid var(--bg-tertiary);
}

.stat-card h3 {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-card p {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
}

.form-section {
    background: var(--bg-secondary);
    padding: 2rem;
    border-radius: var(--border-radius-lg);
    border: 1px solid var(--bg-tertiary);
    margin-bottom: 2rem;
}

.form-section h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.75rem;
    background: var(--bg-primary);
    border: 1px solid var(--bg-tertiary);
    border-radius: var(--border-radius-md);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.manga-list {
    background: var(--bg-secondary);
    border-radius: var(--border-radius-lg);
    border: 1px solid var(--bg-tertiary);
    overflow: hidden;
}

.manga-list h2 {
    padding: 1.5rem;
    font-size: 1.5rem;
    font-weight: 700;
    border-bottom: 1px solid var(--bg-tertiary);
}

.manga-list table {
    width: 100%;
    border-collapse: collapse;
}

.manga-list th,
.manga-list td {
    padding: 1rem 1.5rem;
    text-align: left;
}

.manga-list th {
    background: var(--bg-primary);
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.manga-list tr {
    border-bottom: 1px solid var(--bg-tertiary);
}

.manga-list tbody tr:hover {
    background: var(--bg-primary);
}

.manga-list .btn {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

/* ========================================
   ALERTS
   ======================================== */
.alert {
    padding: 1rem 1.5rem;
    border-radius: var(--border-radius-md);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.alert-success {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: var(--success);
}

.alert-error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: var(--error);
}

.alert-info {
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.3);
    color: var(--info);
}

/* ========================================
   COMMENTS SECTION
   ======================================== */
.comments-section {
    background: var(--bg-secondary);
    border-radius: var(--border-radius-lg);
    padding: 2rem;
    border: 1px solid var(--bg-tertiary);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;

}

.comment-sort {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.comments-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1.5rem 0;
    color: var(--text-secondary);
    font-weight: 600;
}

.comments-loading i {
    color: var(--primary-color);
}

.sort-select {
    padding: 0.5rem 1rem;
    background: var(--bg-primary);
    border: 1px solid var(--bg-tertiary);
    border-radius: var(--border-radius-md);
    color: var(--text-primary);
    font-size: 0.875rem;
    cursor: pointer;
    transition: var(--transition);
}

.sort-select:hover {
    border-color: var(--primary-color);
}

.comment-form-card {
    background: var(--bg-primary);
    border: 1px solid var(--bg-tertiary);
    border-radius: var(--border-radius-lg);
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.comment-form-card h3 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.comment-input {
    width: 100%;
    padding: 0.75rem;
    background: var(--bg-secondary);
    border: 1px solid var(--bg-tertiary);
    border-radius: var(--border-radius-md);
    color: var(--text-primary);
    font-size: 0.875rem;
    margin-bottom: 1rem;
    transition: var(--transition);
}

.comment-input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.comment-textarea {
    width: 100%;
    padding: 0.75rem;
    background: var(--bg-secondary);
    border: 1px solid var(--bg-tertiary);
    border-radius: var(--border-radius-md);
    color: var(--text-primary);
    font-size: 0.875rem;
    resize: vertical;
    min-height: 100px;
    margin-bottom: 1rem;
    font-family: inherit;
    transition: var(--transition);
}

.comment-textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.comment-form-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.spoiler-checkbox {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.spoiler-checkbox input[type="checkbox"] {
    cursor: pointer;
}

.spoiler-checkbox input,
.spoiler-checkbox span {
    vertical-align: middle;
}

.comments-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.comment-item {
    background: var(--bg-secondary);
    border: 1px solid var(--bg-tertiary);
    border-radius: 12px;
    padding: 1.25rem;
    transition: var(--transition);
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
}

.comment-item:hover {
    border-color: rgba(99, 102, 241, 0.3);
}

.comment-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.75rem;
}

.comment-author {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.author-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1rem;
}

.author-info {
    display: flex;
    flex-direction: column;
}

.author-name {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.9375rem;
}

.comment-date {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.spoiler-tag {
    background: rgba(239, 68, 68, 0.1);
    color: var(--error);
    padding: 0.25rem 0.625rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.comment-text {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1rem;
    font-size: 0.9375rem;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.comment-spoiler {
    filter: blur(5px);
    cursor: pointer;
    user-select: none;
}

.comment-spoiler.revealed {
    filter: none;
}

.comment-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.comment-vote {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.comment-vote-btn {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.75rem;
    background: transparent;
    border: 1px solid var(--bg-tertiary);
    border-radius: 6px;
    cursor: pointer;
    transition: var(--transition);
    color: var(--text-muted);
    font-size: 0.875rem;
}

.comment-vote-btn:hover {
    background: var(--bg-tertiary);
    color: var(--primary-color);
}

.comment-vote-btn.upvoted {
    background: rgba(34, 197, 94, 0.1);
    border-color: rgb(34, 197, 94);
    color: rgb(34, 197, 94);
}

.comment-vote-btn.downvoted {
    background: rgba(239, 68, 68, 0.1);
    border-color: var(--error);
    color: var(--error);
}

.comment-like-btn,
.comment-reply-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.875rem;
    border-radius: var(--border-radius-sm);
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-muted);
    background: transparent;
    border: 1px solid var(--bg-tertiary);
    transition: var(--transition);
    cursor: pointer;
}

.comment-like-btn i,
.comment-reply-btn i {
    font-size: 0.875rem;
}

.comment-like-btn span {
    font-size: 0.8125rem;
}

.comment-like-btn:hover {
    color: var(--error);
    background: rgba(239, 68, 68, 0.1);
    border-color: var(--error);
    transform: translateY(-1px);
}

.comment-like-btn.liked {
    color: var(--error);
    background: rgba(239, 68, 68, 0.1);
    border-color: var(--error);
}

.comment-like-btn.liked i {
    font-weight: 900;
}

.comment-reply-btn:hover {
    color: var(--primary-color);
    background: rgba(99, 102, 241, 0.1);
    border-color: var(--primary-color);
    transform: translateY(-1px);
}

.btn-link {
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.8125rem;
    padding: 0.375rem 0.75rem;
    border-radius: var(--border-radius-sm);
    transition: var(--transition);
}

.btn-link:hover {
    color: var(--primary-color);
    background: rgba(99, 102, 241, 0.1);
}

/* ========================================
   MODAL
   ======================================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-box {
    background: var(--bg-secondary);
    padding: 2rem;
    border-radius: var(--border-radius-lg);
    max-width: 400px;
    width: 100%;
    text-align: center;
}

.modal-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.modal-text {
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

/* ========================================
   COMMENT REPLIES
   ======================================== */
.comment-replies {
    margin-top: 1rem;
    margin-left: 2rem;
    padding-left: 1rem;
    border-left: 2px solid var(--bg-tertiary);
    display: flex;
    flex-direction: column;
    gap: 1rem;
    width: calc(100% - 2rem);
    box-sizing: border-box;
}

.comment-reply-item {
    background: var(--bg-primary);
    border: 1px solid var(--bg-tertiary);
    border-radius: 8px;
    padding: 1rem;
    box-sizing: border-box;
    width: 100%;
}

.reply-form {
    margin-top: 1rem;
    margin-left: 0;
    padding: 1rem;
    background: var(--bg-primary);
    border-radius: 8px;
    border: 1px solid var(--bg-tertiary);
    box-sizing: border-box;
    width: 100%;
}

.reply-form input {
    width: 100%;
    padding: 0.5rem 0.75rem;
    background: var(--bg-secondary);
    border: 1px solid var(--bg-tertiary);
    border-radius: 6px;
    color: var(--text-primary);
    font-size: 0.875rem;
    margin-bottom: 0.75rem;
    box-sizing: border-box;
    font-family: inherit;
}

.reply-form textarea {
    width: 100%;
    padding: 0.5rem 0.75rem;
    background: var(--bg-secondary);
    border: 1px solid var(--bg-tertiary);
    border-radius: 6px;
    color: var(--text-primary);
    font-size: 0.875rem;
    margin-bottom: 0;
    box-sizing: border-box;
    font-family: inherit;
    resize: vertical;
    min-height: 80px;
}

.reply-form-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0.75rem;
    gap: 1rem;
    flex-wrap: wrap;
}

.reply-form-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.reply-form-actions .btn {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    border: none;
    cursor: pointer;
    border-radius: 6px;
    transition: var(--transition);
    font-weight: 600;
}

.reply-form-actions .btn-primary {
    background: var(--primary-color);
    color: white;
}

.reply-form-actions .btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
}

.reply-form-actions .btn-secondary {
    background: transparent;
    color: var(--text-muted);
    border: 1px solid var(--bg-tertiary);
}

.reply-form-actions .btn-secondary:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.reply-form-container {
    margin-top: 1rem;
}

.empty-comments {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-muted);
}

.empty-comments i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-comments p {
    font-size: 1.125rem;
}

/* ========================================
   CONTENT PAGES (Popular, Latest, etc.)
   ======================================== */
.content-page {
    padding: 3rem 0;
    min-height: calc(100vh - 200px);
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.page-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.page-subtitle {
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 3rem;
    font-size: 1.125rem;
}

.icon-gradient {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.sort-options {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    margin-top: 3rem;
    padding: 2rem 0;
}

.page-info {
    font-weight: 600;
    color: var(--text-primary);
    min-width: 100px;
    text-align: center;
}

.pagination .btn {
    min-width: 120px;
}

.pagination .btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ========================================
   CATEGORIES PAGE
   ======================================== */
.categories-page {
    padding: 3rem 0;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
    margin-top: 3rem;
}

.category-card {
    background: var(--bg-secondary);
    border: 1px solid var(--bg-tertiary);
    border-radius: var(--border-radius-lg);
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
}

.category-card:hover,
.category-card.active {
    background: var(--bg-tertiary);
    border-color: var(--primary-color);
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.category-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: white;
}

.category-name {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.category-count {
    color: var(--text-muted);
    font-size: 0.875rem;
}

.filtered-mangas-section {
    padding: 2rem 0;
}

/* ========================================
   CATEGORIES SECTION
   ======================================== */
.categories-section {
    padding: 2rem 0;
    background: rgba(15, 23, 42, 0.95);
}

.categories-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.categories-scroll {
    display: flex;
    gap: 0.75rem;
    overflow-x: auto;
    padding: 0.5rem 0;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.categories-scroll::-webkit-scrollbar {
    display: none;
}

.category-chip {
    padding: 0.625rem 1.25rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--bg-tertiary);
    border-radius: 999px;
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.875rem;
    white-space: nowrap;
    cursor: pointer;
    transition: var(--transition);
}

.category-chip:hover,
.category-chip.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.category-arrow {
    width: 40px;
    height: 40px;
    background: var(--bg-tertiary);
    border: 1px solid var(--bg-tertiary);
    border-radius: 50%;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    flex-shrink: 0;
}

.category-arrow:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

/* ========================================
   MANGA SECTION
   ======================================== */
.manga-section {
    padding: 1rem 0;
}

.see-all {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary-color);
    font-weight: 600;
    font-size: 0.875rem;
    transition: var(--transition);
}

.see-all:hover {
    gap: 0.75rem;
}

/* ========================================
   CHAPTER LIST
   ======================================== */
.chapter-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 1rem;
}

.chapter-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--bg-secondary);
    border: 1px solid var(--bg-tertiary);
    border-radius: var(--border-radius-lg);
    transition: var(--transition);
    cursor: pointer;
}

.chapter-card:hover {
    background: var(--bg-tertiary);
    border-color: rgba(99, 102, 241, 0.5);
    transform: translateX(5px);
}

.chapter-cover {
    width: 60px;
    height: 80px;
    border-radius: var(--border-radius-sm);
    overflow: hidden;
    flex-shrink: 0;
}

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

.chapter-info {
    flex: 1;
}

.chapter-manga-title {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
}

.chapter-name {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.chapter-date {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* ========================================
   MOBILE TABBAR
   ======================================== */
.mobile-tabbar {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(15, 23, 42, 0.98);
    backdrop-filter: blur(10px);
    border-top: 1px solid var(--bg-tertiary);
    padding: 0.75rem 0;
    z-index: 100;
}

.tab-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    color: var(--text-muted);
    font-size: 0.75rem;
    transition: var(--transition);
    flex: 1;
}

.tab-item i {
    font-size: 1.25rem;
}

.tab-item.active {
    color: var(--primary-color);
}

.tab-item:hover {
    color: var(--text-primary);
}

/* ========================================
   LOADING SPINNER
   ======================================== */
.loading-spinner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(5px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.loading-spinner.active {
    display: flex;
}

.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 3rem;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--bg-tertiary);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ========================================
   SCROLLBAR
   ======================================== */
::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
    background: var(--bg-tertiary);
    border-radius: 6px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color);
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */
@media (max-width: 1024px) {
    .manga-header {
        grid-template-columns: 250px 1fr;
        gap: 1.5rem;
    }

    .manga-detail-content {
        grid-template-columns: minmax(0, 220px) minmax(0, 1fr);
        gap: 2rem;
    }
}

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

    .mobile-menu-btn {
        display: flex;
    }

    .search-box {
        width: 200px;
    }

    .mobile-tabbar {
        display: flex;
    }

    body {
        padding-bottom: 4rem;
    }

    .navbar .container {
        flex-direction: column;
        gap: 1rem;
    }

    .nav-links {
        gap: 1rem;
    }

    .hero-title {
        font-size: 2rem;
    }

    /* Content Pages */
    .page-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .page-title {
        font-size: 1.75rem;
    }

    .content-page {
        padding: 2rem 0;
    }

    .sort-options {
        width: 100%;
    }

    .sort-select {
        width: 100%;
    }

    .pagination {
        gap: 1rem;
        flex-wrap: wrap;
    }

    .pagination .btn {
        min-width: 100px;
        font-size: 0.875rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .hero p {
        font-size: 1rem;
    }

    .btn-full {
        max-width: 100%;
    }

    .manga-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 1rem;
    }

    .manga-header {
        grid-template-columns: 1fr;
    }

    .manga-detail-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .manga-detail-header .container {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 2rem;
    }

    .manga-detail-header {
        padding: 2.5rem 0;
    }

    .manga-detail .manga-cover {
        max-width: 220px;
        margin: 0 auto;
    }

    .manga-info {
        gap: 1.5rem;
    }

    .manga-info h1 {
        font-size: 1.75rem;
    }

    .manga-info-wrapper {
        align-items: center;
        text-align: center;
        width: 100%;
        gap: 1.25rem;
    }

    .manga-meta-grid,
    .manga-rating-section,
    .manga-action-buttons {
        width: 100%;
    }

    .manga-meta-grid {
        padding: 1rem 1.25rem;
    }

    .meta-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.35rem;
    }

    .meta-value {
        font-size: 0.95rem;
    }

    .quick-actions {
        width: 100%;
    }

    .quick-action-btn {
        flex: 1 1 33%;
    }

    .manga-action-buttons .btn,
    .button-group .btn {
        width: 100%;
    }

    .button-group {
        grid-template-columns: 1fr;
    }

    .info-grid {
        grid-template-columns: 1fr;
    }

    .tab-menu {
        overflow-x: auto;
        gap: 0.5rem;
        justify-content: flex-start;
        padding: 0.5rem 0;
    }

    .tab-menu-container .container {
        justify-content: flex-start;
    }

    .tab-link {
        padding: 0.75rem 1rem;
        white-space: nowrap;
    }

    .manga-rating-compact {
        width: 100%;
        justify-content: space-between;
    }

    .manga-actions {
        width: 100%;
        flex-direction: column;
    }

    .manga-actions .btn {
        width: 100%;
        min-width: unset;
    }

    .action-buttons {
        flex-direction: column;
    }

    .chapters-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .manga-description-section,
    .chapters-section,
    .updates-section-full {
        padding: 1.5rem;
    }

    .description-header,
    .chapters-section .section-header {

        align-items: center;
        gap: 0.75rem;
    }

    .chapter-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .chapter-item-meta {
        width: 100%;
        justify-content: flex-start;
    }

    .categories-wrapper {
        margin: 0 -1rem;
        padding: 0 1rem;
    }

    .category-arrow {
        display: none;
    }

    .rating-card {
        padding: 1.25rem;
    }

    .rating-stars-interactive {
        gap: 0.6rem;
    }

    .rating-stars-interactive i {
        width: 2.25rem;
        height: 2.25rem;
        font-size: 1.2rem;
    }

    .comment-replies {
        margin-left: 1rem;
        width: calc(100% - 1rem);
    }

    .reply-form-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }

    .reply-form-actions {
        width: 100%;
        justify-content: flex-end;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 1rem;
    }

    .search-box {
        display: none;
    }

    .mobile-search-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 40px;
        border-radius: var(--border-radius-md);
        background: var(--bg-secondary);
        border: none;
        color: var(--text-primary);
        cursor: pointer;
        transition: var(--transition);
    }

    .mobile-search-btn:hover {
        background: var(--bg-tertiary);
    }

    .header-actions {
        gap: 0.5rem;
    }

    .hero h1 {
        font-size: 1.5rem;
    }

    .hero p {
        font-size: 1rem;
    }

    .manga-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }

    .manga-detail-header {
        padding: 2rem 0;
    }

    .manga-cover-wrapper {
        max-width: 240px;
    }

    .manga-detail .manga-cover {
        max-width: 200px;
    }

    .manga-rating-compact {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .manga-info-wrapper {
        gap: 1rem;
        padding: 0 0.5rem;
    }

    .manga-meta-grid {
        padding: 0.75rem 0.875rem;
    }

    .meta-row {
        padding: 0.5rem 0;
    }

    .meta-label,
    .meta-value {
        font-size: 0.8125rem;
    }

    .meta-label i {
        font-size: 0.75rem;
    }

    .manga-description-section,
    .chapters-section,
    .updates-section-full {
        padding: 1.25rem;
    }

    .tab-link {
        padding: 0.75rem 0.875rem;
    }

    .description-header .btn-icon,
    .chapter-sort .btn-icon {
        width: 38px;
        height: 38px;
    }

    .quick-action-btn {
        padding: 0.7rem;
        font-size: 0.95rem;
    }

    .rating-card {
        padding: 1rem;
    }

    .rating-card::before {
        right: -20%;
        bottom: -35%;
        width: 140px;
        height: 140px;
    }

    .rating-header {
        gap: 0.25rem;
    }

    .rating-title {
        font-size: 0.875rem;
    }

    .rating-subtitle {
        font-size: 0.75rem;
    }

    .rating-interactive {
        align-items: center;
        width: 100%;
        gap: 0.75rem;
    }

    .rating-stars-interactive {
        gap: 0.5rem;
        justify-content: center;
    }

    .rating-stars-interactive i {
        width: 2.25rem;
        height: 2.25rem;
        font-size: 1.125rem;
    }

    .rating-hint {
        font-size: 0.75rem;
        letter-spacing: 0.08em;
        text-align: center;
    }

    .comment-form-card {
        padding: 1rem;
    }

    .comments-section .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }

    .comment-sort {
        width: 100%;
        justify-content: flex-start;
    }

    .comment-sort .sort-select {
        width: 100%;
    }
}

/* ========================================
   WIKI SECTION
   ======================================== */
.wiki-section {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--bg-tertiary);
    border-radius: var(--border-radius-xl);
    padding: 2rem 2.5rem;
    box-shadow: var(--shadow-lg);
}

.wiki-section .section-header {
    margin-bottom: 1.5rem;
}

.wiki-content {
    color: var(--text-secondary);
    line-height: 1.8;
}

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 2rem;
    text-align: center;
    gap: 1rem;
}

.empty-state i {
    font-size: 3rem;
    color: var(--primary-color);
    opacity: 0.5;
}

.empty-state p {
    color: var(--text-muted);
    font-size: 1rem;
}

/* ========================================
   ENHANCED RESPONSIVE IMPROVEMENTS
   ======================================== */
@media (max-width: 1200px) {
    .manga-detail-content {
        grid-template-columns: minmax(0, 240px) minmax(0, 1fr);
        gap: 2rem;
    }

    .manga-title-section h1 {
        font-size: 2.25rem;
    }

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

@media (max-width: 992px) {
    .manga-detail-content {
        grid-template-columns: minmax(0, 220px) minmax(0, 1fr);
        gap: 1.5rem;
    }

    .manga-title-section h1 {
        font-size: 2rem;
    }

    .stat-icon {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    .stat-value {
        font-size: 1.125rem;
    }
}

@media (max-width: 768px) {
    .manga-detail-header {
        padding: 1.5rem 0;
    }

    .manga-detail-content {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .manga-cover-wrapper {
        max-width: 280px;
        margin: 0 auto;
        width: 100%;
    }

    .manga-title-section {
        text-align: center;
    }

    .manga-title-section h1 {
        font-size: 1.75rem;
        line-height: 1.3;
    }

    .manga-alt-title {
        font-size: 0.9375rem;
    }

    .manga-stats-bar {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.625rem;
        padding: 0.875rem;
    }

    .stat-box {
        flex-direction: column;
        text-align: center;
        gap: 0.375rem;
        padding: 0.625rem;
    }

    .stat-icon {
        width: 48px;
        height: 48px;
        font-size: 1.125rem;
        margin: 0 auto;
    }

    .categories-label {
        text-align: center;
        font-size: 0.8125rem;
    }

    .manga-categories {
        justify-content: center;
        gap: 0.375rem;
    }

    .manga-categories .category-chip {
        padding: 0.375rem 0.875rem;
        font-size: 0.8125rem;
    }

    .manga-categories-wrapper {
        gap: 0.5rem;
    }

    .button-group {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .tab-menu {
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        gap: 0.5rem;
        justify-content: flex-start;
        padding: 0.5rem 0;
    }

    .tab-menu::-webkit-scrollbar {
        display: none;
    }

    .tab-link {
        padding: 0.75rem 1.25rem;
        white-space: nowrap;
        font-size: 0.875rem;
        min-width: fit-content;
    }

    .tab-link i {
        font-size: 0.875rem;
    }

    .manga-description-section,
    .chapters-section,
    .updates-section-full,
    .wiki-section {
        padding: 1.5rem;
    }

    .section-title {
        font-size: 1.25rem;
    }
}

@media (max-width: 480px) {
    .manga-detail-header {
        padding: 1.5rem 0;
    }

    .manga-cover-wrapper {
        max-width: 250px;
    }

    .manga-title-section h1 {
        font-size: 1.5rem;
    }

    .manga-alt-title {
        font-size: 0.9375rem;
    }

    .manga-stats-bar {

        gap: 0.5rem;
        padding: 0.75rem;
    }

    .stat-box {
        text-align: left;
        padding: 0.875rem;
        background: rgba(30, 41, 59, 0.5);
        border-radius: var(--border-radius-md);
    }

    .stat-icon {
        width: 40px;
        height: 40px;
        font-size: 1rem;
        flex-shrink: 0;
    }

    .stat-info {
        align-items: center;
    }

    .stat-value {
        font-size: 1.125rem;
    }

    .stat-label {
        font-size: 0.6875rem;
    }

    .quick-actions {
        gap: 0.5rem;
        width: 100%;
    }

    .quick-action-btn {
        padding: 0.875rem;
        font-size: 1.125rem;
        flex: 1;
    }

    .manga-action-buttons {
        gap: 0.875rem;
    }

    .btn-large {
        padding: 1.125rem 1.5rem;
        font-size: 1rem;
        gap: 0.875rem;
    }

    .btn-large i {
        font-size: 1.375rem;
    }

    .btn-title {
        font-size: 1.0625rem;
    }

    .btn-subtitle {
        font-size: 0.8125rem;
    }

    .button-group .btn {
        padding: 1rem 1.25rem;
        font-size: 0.9375rem;
    }

    .button-group .btn i {
        font-size: 1.125rem;
    }

    .manga-description-section,
    .chapters-section,
    .updates-section-full,
    .wiki-section {
        padding: 1.25rem;
        border-radius: var(--border-radius-lg);
    }

    .section-title {
        font-size: 1.125rem;
    }

    .chapter-item {
        padding: 1rem;
    }

    .comment-form-card {
        padding: 1.25rem;
    }
}

/* ========================================
   MOBILE TAB BAR ENHANCEMENTS
   ======================================== */
@media (max-width: 768px) {
    .mobile-tabbar {
        display: flex;
        justify-content: space-around;
    }

    body {
        padding-bottom: 5rem;
    }
}

/* ========================================
   PRINT STYLES
   ======================================== */
@media print {

    .navbar,
    .mobile-tabbar,
    .loading-spinner,
    .btn,
    .header-actions {
        display: none !important;
    }

    .manga-detail-header {
        background: none;
        border: none;
        box-shadow: none;
    }

    .manga-detail-content {
        grid-template-columns: 200px 1fr;
    }
}

/* ========================================
   CHAPTER READ STATUS
   ======================================== */
.chapter-read {
    opacity: 0.6;
    background: rgba(16, 185, 129, 0.05) !important;
}

.chapter-read:hover {
    opacity: 0.8;
}

.chapter-read-icon {
    color: var(--success);
    margin-right: 0.5rem;
    font-size: 0.875rem;
}

.chapter-item-title {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

/* ========================================
   FAVORITES GRID & CARDS
   ======================================== */
.favorites-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    gap: 1.25rem;
    padding: 2rem 0;
}

.favorite-card {
    display: flex;
    align-items: stretch;
    background: var(--bg-secondary);
    border: 1px solid var(--bg-tertiary);
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    height: 180px;
}

.favorite-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(99, 102, 241, 0.15);
    border-color: rgba(99, 102, 241, 0.4);
}

.favorite-card-cover {
    position: relative;
    width: 130px;
    flex-shrink: 0;
    overflow: hidden;
}

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

.favorite-card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent 0%, var(--bg-secondary) 100%);
}

.favorite-card-content {
    flex: 1;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.favorite-card-header {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.favorite-card-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.4;
    display: -webkit-box;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.favorite-card-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.favorite-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.25rem 0.75rem;
    background: rgba(99, 102, 241, 0.15);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--primary-color);
}

.favorite-badge.completed {
    background: rgba(16, 185, 129, 0.15);
    border-color: rgba(16, 185, 129, 0.3);
    color: var(--success);
}

.favorite-badge i {
    font-size: 0.5rem;
}

.favorite-rating {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: #fbbf24;
}

.favorite-rating i {
    font-size: 0.75rem;
}

.favorite-card-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.favorite-info-item {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.8125rem;
    color: var(--text-muted);
}

.favorite-info-item i {
    color: var(--primary-color);
    font-size: 0.75rem;
}

/* Responsive Favorites Grid */
@media (max-width: 1024px) {
    .favorites-grid {
        grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
    }

    .favorite-card {
        height: 160px;
    }

    .favorite-card-cover {
        width: 110px;
    }
}

@media (max-width: 768px) {
    .favorites-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .favorite-card {
        height: 150px;
    }

    .favorite-card-cover {
        width: 100px;
    }

    .favorite-card-content {
        padding: 1rem;
    }

    .favorite-card-title {
        font-size: 1rem;
    }

    .favorite-card-info {
        gap: 0.75rem;
    }
}

@media (max-width: 480px) {
    .favorite-card {
        height: 140px;
    }

    .favorite-card-cover {
        width: 90px;
    }

    .favorite-card-content {
        padding: 0.875rem;
    }

    .favorite-card-title {
        font-size: 0.9375rem;
        line-clamp: 2;
    }

    .favorite-card-meta {
        gap: 0.5rem;
    }

    .favorite-badge {
        font-size: 0.6875rem;
        padding: 0.1875rem 0.625rem;
    }

    .favorite-rating {
        font-size: 0.8125rem;
    }

    .favorite-info-item {
        font-size: 0.75rem;
    }
}

/* ========================================
   SITE FOOTER
   ======================================== */
.site-footer {
    margin-top: 4rem;
    background: linear-gradient(160deg, rgba(15, 23, 42, 0.96), rgba(30, 41, 59, 0.98));
    border-top: 1px solid rgba(148, 163, 184, 0.12);
    position: relative;
    overflow: hidden;
}

.site-footer::before {
    content: "";
    position: absolute;
    inset: -40% -50% 30%;
    background: radial-gradient(circle at top, rgba(99, 102, 241, 0.2) 0%, rgba(15, 23, 42, 0) 70%);
    pointer-events: none;
}

.site-footer .footer-content {
    position: relative;
    display: grid;
    gap: clamp(2rem, 3vw, 3.25rem);
    grid-template-columns: repeat(4, minmax(0, 1fr));
    padding: clamp(2.5rem, 6vw, 4rem) 0;
}

.footer-brand {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

.footer-logo i {
    font-size: 1.875rem;
    color: var(--primary-color);
}

.footer-tagline {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.7;
    max-width: 36ch;
}

.footer-social {
    display: flex;
    gap: 0.75rem;
}

.footer-social a {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: rgba(99, 102, 241, 0.12);
    color: var(--text-primary);
    transition: var(--transition);
}

.footer-social a:hover,
.footer-social a:focus-visible {
    background: rgba(99, 102, 241, 0.28);
    color: #fff;
}

.footer-links h3,
.footer-newsletter h3 {
    font-size: 1.05rem;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.footer-links ul {
    display: grid;
    gap: 0.65rem;
    color: var(--text-secondary);
}

.footer-links a {
    font-size: 0.95rem;
    color: inherit;
    transition: var(--transition);
}

.footer-links a:hover,
.footer-links a:focus-visible {
    color: var(--primary-color);
}

.footer-newsletter {
    color: var(--text-secondary);
    max-width: 320px;
}

.footer-newsletter p {
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.footer-form {
    display: flex;
    gap: 0.75rem;
    background: rgba(15, 23, 42, 0.6);
    padding: 0.5rem;
    border-radius: var(--border-radius-lg);
    border: 1px solid rgba(148, 163, 184, 0.15);
}

.footer-form input {
    width: 70%;
    background: transparent;
    border: none;
    color: var(--text-primary);
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
}

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

.footer-form button {
    padding: 0.7rem 1.4rem;
    background: var(--primary-color);
    color: #fff;
    border-radius: var(--border-radius-md);
    font-weight: 600;
    transition: var(--transition);
}

.footer-form button:hover,
.footer-form button:focus-visible {
    background: var(--primary-hover);
}

.footer-form button:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

.footer-bottom {
    position: relative;
    border-top: 1px solid rgba(148, 163, 184, 0.12);
    padding: 1.2rem 0;
    font-size: 0.875rem;
    color: var(--text-muted);
    background: rgba(15, 23, 42, 0.9);
}

.footer-bottom .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.footer-legal {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
}

.footer-legal a {
    color: inherit;
    transition: var(--transition);
}

.footer-legal a:hover,
.footer-legal a:focus-visible {
    color: var(--primary-color);
}

@media (max-width: 1200px) {
    .site-footer .footer-content {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 768px) {
    .site-footer {
        margin-top: 3rem;
    }

    .site-footer .footer-content {
        grid-template-columns: 1fr;
        padding: 2.5rem 0;
        text-align: center;
    }

    .footer-brand,
    .footer-links,
    .footer-newsletter {
        max-width: 380px;
        margin: 0 auto;
    }

    .footer-social {
        justify-content: center;
    }

    .footer-form {
        flex-direction: column;
        padding: 0.75rem;
    }

    .footer-form input,
    .footer-form button {
        width: 100%;
    }

    .footer-bottom .container {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 0.75rem;
        align-self: center;
    }
}

@media (max-width: 480px) {
    .site-footer {
        border-top-left-radius: var(--border-radius-lg);
        border-top-right-radius: var(--border-radius-lg);
    }

    .footer-logo {
        font-size: 1.35rem;
        align-self: center;
    }

    .footer-social a {
        width: 36px;
        height: 36px;
    }
}

/* ========================================
   LEGAL PAGES
   ======================================== */
.legal-hero {
    padding: clamp(3rem, 6vw, 5rem) 0;
    background: radial-gradient(120% 120% at 50% -20%, rgba(99, 102, 241, 0.18) 0%, rgba(15, 23, 42, 0.92) 60%);
    border-bottom: 1px solid rgba(148, 163, 184, 0.12);
    position: relative;
    overflow: hidden;
}

.legal-hero::after {
    content: '';
    position: absolute;
    inset: -30% -10% 0;
    background: linear-gradient(120deg, rgba(99, 102, 241, 0.14), rgba(99, 102, 241, 0));
    pointer-events: none;
}

.legal-hero .container {
    position: relative;
    display: flex;
    justify-content: center;
    text-align: center;
}

.legal-hero-content {
    max-width: 720px;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.legal-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    align-self: center;
    padding: 0.4rem 0.85rem;
    background: rgba(99, 102, 241, 0.15);
    border: 1px solid rgba(99, 102, 241, 0.35);
    border-radius: 999px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    letter-spacing: 0.01em;
}

.legal-hero h1 {
    font-size: clamp(2rem, 5vw, 2.75rem);
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.01em;
}

.legal-hero p {
    color: var(--text-secondary);
    font-size: clamp(1rem, 2vw, 1.1rem);
    line-height: 1.8;
}

.legal-content {
    padding: clamp(2.75rem, 6vw, 4.5rem) 0 clamp(3.5rem, 6vw, 5rem);
}

.legal-content .container {
    max-width: 960px;
    margin: 0 auto;
    display: grid;
    gap: 2rem;
}

.legal-section {
    background: rgba(15, 23, 42, 0.72);
    border: 1px solid rgba(99, 102, 241, 0.16);
    border-radius: var(--border-radius-xl);
    padding: clamp(1.75rem, 3vw, 2.5rem);
    box-shadow: var(--shadow-lg);
    backdrop-filter: blur(6px);

}

.legal-section h2 {
    font-size: clamp(1.4rem, 2.8vw, 1.75rem);
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.legal-section h3 {
    font-size: clamp(1.1rem, 2.2vw, 1.3rem);
    color: var(--text-primary);
    margin-bottom: 0.75rem;

}

.legal-section p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    line-height: 1.8;
    font-size: 0.98rem;
  
}

.legal-section ul {
    list-style: none;
    margin: 0 0 1.25rem;
    padding: 0;
    display: grid;
    gap: 0.65rem;
}

.legal-section li {
    position: relative;
    padding-left: 1.5rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

.legal-section li::before {
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-size: 1.25rem;
    line-height: 1;
}

.legal-section a {
    color: var(--primary-color);
    text-decoration: underline;
    text-decoration-color: rgba(99, 102, 241, 0.4);
    text-decoration-thickness: 1px;
}

.legal-section a:hover,
.legal-section a:focus-visible {
    text-decoration-color: rgba(99, 102, 241, 0.8);
}

.legal-updated {
    color: var(--text-muted);
    font-size: 0.9rem;
}

@media (max-width: 768px) {
    .legal-hero {
        text-align: left;
    }

    .legal-hero .container {
        text-align: left;
        justify-content: flex-start;
    }

    .legal-hero-content {
        align-items: flex-start;
    }

    .legal-badge {
        align-self: flex-start;
    }
}

@media (max-width: 480px) {
    .legal-section {
        border-radius: var(--border-radius-lg);
        padding: 1.5rem;
    }
}

/* ========================================
   SEO INFO SECTION
   ======================================== */
.seo-info {
    position: relative;
    max-width: min(960px, calc(100% - 3rem));
    margin: 3.5rem auto 2.5rem;
    padding: clamp(1.75rem, 3vw, 3rem);
    background: linear-gradient(145deg, rgba(99, 102, 241, 0.12), rgba(15, 23, 42, 0.82));
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: var(--border-radius-xl);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    text-align: center;
    transition: var(--transition);
    z-index: 0;
}

.seo-info::before {
    content: "";
    position: absolute;
    inset: -40% -30%;
    background: radial-gradient(circle at center, rgba(99, 102, 241, 0.28) 0%, rgba(15, 23, 42, 0) 65%);
    opacity: 0.7;
    pointer-events: none;
    transform: rotate(8deg);
}

.seo-info::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, rgba(99, 102, 241, 0.18), rgba(15, 23, 42, 0.85));
    mix-blend-mode: screen;
    opacity: 0.35;
    pointer-events: none;
}

.seo-info h2 {
    position: relative;
    font-size: clamp(1.5rem, 2.5vw, 2.125rem);
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
    letter-spacing: -0.01em;
    z-index: 1;
}

.seo-info p {
    position: relative;
    max-width: 60ch;
    margin: 0 auto;
    font-size: clamp(1rem, 1.8vw, 1.0625rem);
    line-height: 1.8;
    color: var(--text-secondary);
    z-index: 1;
}

.seo-info:focus-within,
.seo-info:hover {
    border-color: rgba(99, 102, 241, 0.4);
    box-shadow: 0 20px 35px -20px rgba(99, 102, 241, 0.55);
}

@media (max-width: 768px) {
    .seo-info {
        max-width: calc(100% - 2rem);
        margin: 2.5rem auto;
        padding: 1.75rem;
        text-align: left;
    }

    .seo-info h2 {
        font-size: clamp(1.4rem, 6vw, 1.85rem);
        margin-bottom: 0.65rem;
    }

    .seo-info p {
        margin: 0;
        font-size: 0.975rem;
        line-height: 1.7;
    }
}

@media (max-width: 480px) {
    .seo-info {
        border-radius: var(--border-radius-lg);
        padding: 1.5rem;
        margin: 2rem 1rem;
    }
}

/* ========================================
   ACCESSIBILITY UTILITIES
   ======================================== */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

.clear-search-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    color: var(--text-muted);
    transition: color 0.2s ease;
}

.clear-search-btn:hover {
    color: var(--text-primary);
}

/* ========================================
   READING HISTORY GRID
   ======================================== */
.reading-history-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1rem;
    margin-top: 1.5rem;
}

.history-card {
    background: var(--bg-secondary);
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    cursor: pointer;
    transition: var(--transition);
    border: 1px solid var(--bg-tertiary);
}

.history-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.history-card-image {
    position: relative;
    padding-top: 140%;
    overflow: hidden;
    background: var(--bg-tertiary);
}

.history-card-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.history-card-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.9), transparent);
    padding: 0.75rem;
}

.history-card-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: white;
    margin-bottom: 0.25rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.history-card-chapter {
    font-size: 0.75rem;
    color: var(--primary-color);
}

@media (max-width: 768px) {
    .reading-history-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.75rem;
    }
}

@media (max-width: 480px) {
    .reading-history-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
    }
}

.read-badge {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: var(--success);
    color: white;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    box-shadow: var(--shadow-md);
}

.chapter-read {
    opacity: 0.6;
}

.chapter-read-icon {
    color: var(--success);
    margin-right: 0.25rem;
}


/* Reader Comments Section */
.reader-comments {
    margin-top: 3rem;
    margin-bottom: 3rem;
}

.reader-comments .container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 1rem;
}

@media (max-width: 768px) {
    .reader-comments {
        margin-top: 2rem;
        margin-bottom: 2rem;
    }
}

/* ========================================
   MOBILE SEARCH MODAL
   ======================================== */
.mobile-search-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-primary);
    z-index: 10000;
    display: none;
    flex-direction: column;
}

.mobile-search-modal.active {
    display: flex;
}

.mobile-search-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--bg-tertiary);
}

.mobile-search-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: var(--border-radius-md);
    background: transparent;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
    font-size: 1.25rem;
    transition: var(--transition);
}

.mobile-search-close:hover {
    background: var(--bg-tertiary);
}

.mobile-search-input-wrapper {
    flex: 1;
    position: relative;
}

.mobile-search-input-wrapper input {
    width: 100%;
    padding: 0.75rem 2.5rem 0.75rem 1rem;
    background: var(--bg-primary);
    border: 1px solid var(--bg-tertiary);
    border-radius: var(--border-radius-md);
    color: var(--text-primary);
    font-size: 1rem;
}

.mobile-search-input-wrapper input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.mobile-search-input-wrapper i {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
}

.mobile-search-results {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
}

.mobile-search-results .search-loading,
.mobile-search-results .search-no-results,
.mobile-search-results .search-error {
    text-align: center;
    padding: 2rem;
    color: var(--text-secondary);
}

.mobile-search-results .search-result-item {
    margin-bottom: 0.5rem;
}
