/* Carbon Scans - Main Stylesheet */

/* ========================================
   CSS Variables - Light & Dark Theme
   ======================================== */

:root {
    /* Light mode colors - Grayscale only */
    --primary: #000000;
    --primary-dark: #1a1a1a;
    --primary-light: #333333;

    --secondary: #6b7280;
    --secondary-dark: #4b5563;

    --background: #ffffff;
    --background-secondary: #fafafa;
    --background-tertiary: #f5f5f5;

    --text-primary: #000000;
    --text-secondary: #6b7280;
    --text-tertiary: #9ca3af;

    --border: #e5e7eb;
    --border-dark: #d1d5db;

    --shadow: rgba(0, 0, 0, 0.04);
    --shadow-md: rgba(0, 0, 0, 0.06);
    --shadow-lg: rgba(0, 0, 0, 0.08);

    --success: #4b5563;
    --error: #374151;
    --warning: #6b7280;
    --info: #4b5563;

    /* Typography */
    --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --font-mono: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;

    /* Spacing */
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    --spacing-2xl: 3rem;
    --spacing-3xl: 4rem;

    /* Border radius - Minimalist flat design */
    --radius-sm: 0.125rem;
    --radius-md: 0.25rem;
    --radius-lg: 0.375rem;
    --radius-xl: 0.5rem;

    /* Transitions */
    --transition: 200ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="dark"] {
    --primary: #ffffff;
    --primary-dark: #f5f5f5;
    --primary-light: #e5e5e5;

    --secondary: #9ca3af;
    --secondary-dark: #6b7280;

    --background: #0a0a0a;
    --background-secondary: #151515;
    --background-tertiary: #1f1f1f;

    --text-primary: #ffffff;
    --text-secondary: #a1a1a1;
    --text-tertiary: #6b7280;

    --border: #2a2a2a;
    --border-dark: #3a3a3a;

    --shadow: rgba(0, 0, 0, 0.2);
    --shadow-md: rgba(0, 0, 0, 0.3);
    --shadow-lg: rgba(0, 0, 0, 0.4);
}

/* ========================================
   Reset & Base Styles
   ======================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-sans);
    background-color: var(--background);
    color: var(--text-primary);
    line-height: 1.6;
    transition: background-color var(--transition), color var(--transition);
}

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

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

a:hover {
    color: var(--primary-dark);
}

/* ========================================
   Layout
   ======================================== */

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

.main-content {
    min-height: calc(100vh - 200px);
}

/* ========================================
   Navigation
   ======================================== */

.navbar {
    background-color: var(--background);
    border-bottom: 1px solid var(--border);
    padding: var(--spacing-lg) 0;
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
}

.navbar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--spacing-lg);
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    text-decoration: none;
    letter-spacing: -0.02em;
    display: flex;
    align-items: center;
}

.logo:hover {
    opacity: 0.8;
}

.logo img {
    height: 21px;
    width: auto;
    object-fit: contain;
    transition: opacity var(--transition);
}

.logo-dark {
    display: none;
}

.logo-light {
    display: block;
}

[data-theme="dark"] .logo-light {
    display: none;
}

[data-theme="dark"] .logo-dark {
    display: block;
}

.nav-search {
    flex: 1;
    max-width: 350px;
}

.search-form {
    position: relative;
    display: flex;
}

.search-input {
    flex: 1;
    padding: var(--spacing-sm) var(--spacing-md);
    padding-right: 40px;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background-color: var(--background-secondary);
    color: var(--text-primary);
    font-size: 0.95rem;
    transition: all var(--transition);
}

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

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

.search-btn {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    padding: 0 var(--spacing-md);
    background: transparent;
    border: none;
    color: var(--text-tertiary);
    cursor: pointer;
    transition: color var(--transition);
}

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

.nav-menu {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    list-style: none;
}

.nav-link {
    color: var(--text-primary);
    font-weight: 500;
    font-size: 0.95rem;
    transition: color var(--transition);
}

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

.safe-mode-toggle {
    background: transparent;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
    padding: var(--spacing-sm);
    margin-left: var(--spacing-xs);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: all var(--transition);
}

.safe-mode-toggle:hover {
    background-color: var(--background-secondary);
}

.safe-mode-toggle.active {
    background-color: var(--background-secondary);
    color: var(--primary);
}

.safe-mode-toggle.active .safe-check {
    display: block !important;
}

.discord-link {
    background: transparent;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
    padding: var(--spacing-sm);
    margin-left: var(--spacing-xs);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition);
    text-decoration: none;
}

.discord-link:hover {
    background-color: var(--background-secondary);
    color: var(--text-primary);
}

.theme-toggle {
    background: transparent;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
    padding: var(--spacing-sm);
    margin-left: var(--spacing-xs);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition);
}

.theme-toggle:hover {
    background-color: var(--background-secondary);
}

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: transparent;
    border: none;
    cursor: pointer;
}

.mobile-menu-toggle span {
    width: 24px;
    height: 2px;
    background-color: var(--text-primary);
    transition: all 0.3s;
}

/* Dropdown */
.dropdown {
    position: relative;
}

.dropdown-toggle::after {
    content: '▼';
    font-size: 0.7rem;
    margin-left: 0.3rem;
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 0;
    background-color: var(--background);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: 0 4px 12px var(--shadow-lg);
    min-width: 180px;
    z-index: 1000;
}

/* Bridge the gap between trigger and menu for smooth hover transition */
.dropdown-menu::before {
    content: '';
    position: absolute;
    top: -8px;
    left: 0;
    right: 0;
    height: 8px;
}

.dropdown:hover .dropdown-menu {
    display: block;
}

.dropdown-item {
    display: block;
    padding: var(--spacing-sm) var(--spacing-md);
    color: var(--text-primary);
    border: none;
    background: transparent;
    width: 100%;
    text-align: left;
    cursor: pointer;
    font-size: 0.95rem;
    font-family: inherit;
}

.dropdown-item:hover {
    background-color: var(--background-secondary);
}

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

/* ========================================
   Buttons
   ======================================== */

/* Legacy button styles - keeping for non-admin pages compatibility */
.btn-primary.legacy-btn,
.btn-secondary.legacy-btn {
    display: inline-block;
    padding: var(--spacing-sm) var(--spacing-lg);
    border-radius: var(--radius-lg);
    font-weight: 500;
    text-align: center;
    cursor: pointer;
    border: none;
    transition: all var(--transition);
    font-size: 0.95rem;
}

.btn-primary.legacy-btn {
    background-color: var(--primary);
    color: var(--background);
}

.btn-primary.legacy-btn:hover {
    background-color: var(--primary-dark);
    color: var(--background);
    transform: translateY(-1px);
}

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

.btn-secondary.legacy-btn:hover {
    background-color: var(--background-secondary);
    border-color: var(--border-dark);
}

.btn-lg {
    padding: var(--spacing-md) var(--spacing-xl);
    font-size: 1.1rem;
}

.btn-block {
    display: block;
    width: 100%;
}

.btn-icon {
    padding: var(--spacing-sm);
    background: transparent;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    cursor: pointer;
    color: var(--text-primary);
}

.btn-icon:hover {
    background-color: var(--background-secondary);
}

/* ========================================
   Hero Section
   ======================================== */

.hero {
    background: var(--background);
    color: var(--text-primary);
    padding: var(--spacing-3xl) 0;
    text-align: center;
    border-bottom: 1px solid var(--border);
}

.hero-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: var(--spacing-md);
    letter-spacing: -0.03em;
    line-height: 1.1;
}

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

.hero-actions {
    display: flex;
    gap: var(--spacing-md);
    justify-content: center;
    flex-wrap: wrap;
}

/* ========================================
   Series Grid
   ======================================== */

.section-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: var(--spacing-xl);
    letter-spacing: -0.02em;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-xl);
}

.view-all {
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.95rem;
    transition: color var(--transition);
}

.view-all:hover {
    color: var(--text-primary);
}

.featured-section,
.recently-updated-section,
.popular-section {
    padding: var(--spacing-3xl) 0;
}

.series-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: var(--spacing-xl);
}

.series-card {
    background-color: var(--background);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all var(--transition);
}

.series-card:hover {
    transform: translateY(-2px);
    border-color: var(--border-dark);
    box-shadow: 0 4px 12px var(--shadow-lg);
}

/* Safe mode - hide series with content warnings */
body.safe-mode .series-card[data-has-warnings="true"] {
    display: none;
}

.series-cover {
    position: relative;
    width: 100%;
    overflow: hidden;
    background-color: var(--background-secondary);
}

.series-cover img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

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

.series-cover-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    font-weight: 700;
    color: var(--text-tertiary);
    background-color: var(--background-secondary);
}

.series-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0.7) 0%, transparent 40%);
    opacity: 0;
    transition: opacity var(--transition);
}

.series-card:hover .series-overlay {
    opacity: 1;
}

.series-type {
    position: absolute;
    top: var(--spacing-sm);
    left: var(--spacing-sm);
    background-color: rgba(0, 0, 0, 0.85);
    color: white;
    padding: var(--spacing-xs) var(--spacing-sm);
    border-radius: var(--radius-sm);
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.series-badge {
    position: absolute;
    top: var(--spacing-sm);
    right: var(--spacing-sm);
    background-color: rgba(0, 0, 0, 0.85);
    color: white;
    padding: var(--spacing-xs) var(--spacing-sm);
    border-radius: var(--radius-sm);
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.05em;
}

.series-info {
    padding: var(--spacing-md);
}

.series-title {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: var(--spacing-sm);
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-height: 1.4;
    color: var(--text-primary);
}

.series-meta {
    display: flex;
    gap: var(--spacing-sm);
    flex-wrap: wrap;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.meta-item {
    display: inline-block;
}

/* ========================================
   Series Detail Page
   ======================================== */

.series-detail-backdrop {
    position: relative;
    width: 100%;
    background: #000000;
    overflow: hidden;
}

.series-backdrop-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.3;
    filter: blur(20px);
    transform: scale(1.1);
}

.series-detail {
    position: relative;
    z-index: 1;
    padding: var(--spacing-2xl) 0;
}

.series-detail-backdrop .series-detail {
    padding: var(--spacing-2xl) 0;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.9) 0%, var(--background) 100%);
}

.series-header {
    display: flex;
    gap: var(--spacing-xl);
    margin-bottom: var(--spacing-2xl);
}

.series-detail-backdrop .series-header {
    color: #ffffff;
}

.series-detail-backdrop .series-title-large,
.series-detail-backdrop .meta-label,
.series-detail-backdrop .meta-value,
.series-detail-backdrop .tag {
    color: #ffffff;
}

.series-detail-backdrop .meta-label {
    color: #d1d5db;
}

.series-detail-backdrop .tag {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

.series-cover-large {
    flex-shrink: 0;
    width: 280px;
    height: 420px; /* Portrait ratio for main image */
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}

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

.series-info-main {
    flex: 1;
}

.series-title-large {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: var(--spacing-md);
}

.series-meta-large {
    margin-bottom: var(--spacing-lg);
}

.meta-row {
    display: flex;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-sm);
}

.meta-label {
    font-weight: 600;
    color: var(--text-secondary);
    min-width: 80px;
}

.meta-value {
    color: var(--text-primary);
}

.badge {
    display: inline-block;
    padding: var(--spacing-xs) var(--spacing-sm);
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.badge-ongoing {
    background-color: var(--background-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border);
}

.badge-completed {
    background-color: var(--primary);
    color: var(--background);
}

.badge-hiatus {
    background-color: var(--background-tertiary);
    color: var(--text-secondary);
    border: 1px solid var(--border);
}

.series-tags {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-lg);
}

.tag {
    padding: var(--spacing-xs) var(--spacing-md);
    background-color: var(--background-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    color: var(--text-primary);
}

.tag:hover {
    background-color: var(--background-tertiary);
}

.series-actions {
    display: flex;
    gap: var(--spacing-md);
    flex-wrap: wrap;
}

.bookmark-btn.bookmarked {
    background-color: var(--secondary);
    color: white;
    border-color: var(--secondary);
}

.series-description {
    margin-bottom: var(--spacing-2xl);
    line-height: 1.8;
}

.series-description h2 {
    margin-bottom: var(--spacing-md);
}

.chapters-section h2 {
    margin-bottom: var(--spacing-lg);
}

.chapters-list {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.chapter-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-md);
    background-color: var(--background-secondary);
    border-radius: var(--radius-md);
    transition: all var(--transition);
}

.chapter-item:hover {
    background-color: var(--background-tertiary);
    transform: translateX(4px);
}

.chapter-info {
    flex: 1;
}

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

.chapter-title {
    color: var(--text-secondary);
}

.chapter-meta {
    color: var(--text-tertiary);
    font-size: 0.9rem;
}

.no-chapters {
    padding: var(--spacing-xl);
    text-align: center;
    color: var(--text-secondary);
}

/* ========================================
   Reader
   ======================================== */

.reader-container {
    min-height: 100vh;
    background-color: var(--background-secondary);
}

.reader-header {
    background-color: var(--background);
    border-bottom: 1px solid var(--border);
    padding: var(--spacing-md) 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.reader-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--spacing-md);
}

.btn-back {
    padding: var(--spacing-sm) var(--spacing-md);
    background-color: var(--background-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
}

.reader-title h1 {
    font-size: 1.25rem;
    margin-bottom: var(--spacing-xs);
}

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

.reader-controls {
    display: flex;
    gap: var(--spacing-sm);
}

.chapter-selector {
    padding: var(--spacing-sm) var(--spacing-md);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background-color: var(--background-secondary);
    color: var(--text-primary);
}

.reader-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--spacing-lg) 0;
}

.reader-content.webtoon-mode {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.reader-content.paged-mode {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.reader-page {
    display: flex;
    justify-content: center;
    background-color: var(--background);
}

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

.webtoon-mode .reader-image {
    width: 100%;
}

.reader-footer {
    background-color: var(--background);
    border-top: 1px solid var(--border);
    padding: var(--spacing-xl) 0;
    margin-top: var(--spacing-xl);
}

.chapter-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--spacing-md);
}

.btn-nav {
    padding: var(--spacing-md) var(--spacing-xl);
    border-radius: var(--radius-md);
    background-color: var(--primary);
    color: white;
    font-weight: 500;
}

.btn-nav:hover {
    background-color: var(--primary-dark);
}

.btn-nav.btn-disabled {
    background-color: var(--background-tertiary);
    color: var(--text-tertiary);
    cursor: not-allowed;
}

/* ========================================
   Authentication Pages
   ======================================== */

.auth-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 200px);
    padding: var(--spacing-2xl) 0;
}

.auth-box {
    width: 100%;
    max-width: 400px;
    padding: var(--spacing-2xl);
    background-color: var(--background-secondary);
    border-radius: var(--radius-lg);
    box-shadow: 0 4px 12px var(--shadow-lg);
}

.auth-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: var(--spacing-sm);
    text-align: center;
}

.auth-subtitle {
    color: var(--text-secondary);
    text-align: center;
    margin-bottom: var(--spacing-xl);
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-lg);
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.form-label {
    font-weight: 500;
    color: var(--text-primary);
}

.form-input,
.form-textarea {
    padding: var(--spacing-sm) var(--spacing-md);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background-color: var(--background);
    color: var(--text-primary);
    font-size: 1rem;
}

.form-input:focus,
.form-textarea:focus {
    outline: none;
    border-color: #000000;
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.1);
}

.form-hint {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.form-actions {
    display: flex;
    justify-content: flex-end;
}

.auth-footer {
    margin-top: var(--spacing-lg);
    text-align: center;
    color: var(--text-secondary);
}

.link-primary {
    color: var(--primary);
    font-weight: 500;
}

.link-secondary {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* ========================================
   Alerts
   ======================================== */

.alert {
    padding: var(--spacing-md);
    margin-bottom: var(--spacing-md);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
}

.alert-success {
    background-color: var(--background-secondary);
    color: var(--text-primary);
    border-color: var(--border-dark);
}

.alert-error {
    background-color: var(--background-secondary);
    color: var(--text-primary);
    border-color: var(--text-secondary);
}

[data-theme="dark"] .alert-success {
    background-color: var(--background-tertiary);
    color: var(--text-primary);
    border-color: var(--border-dark);
}

[data-theme="dark"] .alert-error {
    background-color: var(--background-tertiary);
    color: var(--text-primary);
    border-color: var(--text-secondary);
}

.error-list {
    list-style: none;
}

/* ========================================
   Footer
   ======================================== */

.footer {
    background-color: var(--background);
    border-top: 1px solid var(--border);
    padding: var(--spacing-3xl) 0 var(--spacing-xl);
    margin-top: var(--spacing-2xl);
}

.footer-genres {
    margin-bottom: var(--spacing-xl);
}

.footer-genres-columns {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: var(--spacing-md) var(--spacing-xl);
}

@media (max-width: 1024px) {
    .footer-genres-columns {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 768px) {
    .footer-genres-columns {
        grid-template-columns: repeat(3, 1fr);
    }
}

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

.footer-genre-column {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.footer-genre-link {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    color: var(--text-primary);
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    transition: color var(--transition);
}

.footer-genre-link:hover {
    color: var(--text-secondary);
}

.footer-genre-arrow {
    color: var(--text-secondary);
    font-size: 0.8rem;
}

.footer-brand {
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.85rem;
    padding-top: var(--spacing-lg);
}

/* ========================================
   Manga Platform-Style Series Landing Page
   ======================================== */

/* Hero Section with Backdrop and Overlapping Portrait */
.series-landing {
    margin-top: calc(-1 * var(--spacing-lg));
}

.series-hero {
    position: relative;
    width: 100%;
    margin-bottom: 60px;
}

.series-hero-backdrop {
    position: relative;
    width: 100%;
    min-height: 340px;
    overflow: visible;
}

.hero-backdrop-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: blur(1px) brightness(0.5);
    z-index: 0;
}

.hero-backdrop-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1;
    pointer-events: none;
}

[data-theme="dark"] .hero-backdrop-overlay {
    background: rgba(0, 0, 0, 0.65);
}

/* Admin Floating Buttons on Series Hero */
.admin-floating-buttons {
    position: absolute;
    top: var(--spacing-2xl);
    right: var(--spacing-lg);
    z-index: 50;
    display: flex;
    gap: var(--spacing-sm);
}

.admin-float-btn {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-sm) var(--spacing-md);
    background: rgba(255, 255, 255, 0.95);
    color: #000;
    border-radius: var(--radius-md);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    transition: all var(--transition);
    backdrop-filter: blur(4px);
}

.admin-float-btn:hover {
    background: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    color: #000;
}

.admin-float-btn svg {
    flex-shrink: 0;
}

[data-theme="dark"] .admin-float-btn {
    background: rgba(40, 40, 40, 0.95);
    color: #fff;
}

[data-theme="dark"] .admin-float-btn:hover {
    background: rgba(60, 60, 60, 0.98);
    color: #fff;
}

@media (max-width: 768px) {
    .admin-floating-buttons {
        top: var(--spacing-xl);
        right: var(--spacing-md);
        flex-direction: column;
    }

    .admin-float-btn span {
        display: none;
    }

    .admin-float-btn {
        padding: var(--spacing-sm);
    }
}

.series-hero-content {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: flex-end;
    gap: var(--spacing-xl);
    padding-top: var(--spacing-3xl);
    padding-bottom: var(--spacing-lg);
}

/* Portrait - Overlapping and Positioned Left */
.series-portrait {
    position: relative;
    flex-shrink: 0;
    width: 280px;
    height: 400px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border: 2px solid var(--border);
    background-color: var(--background-tertiary);
    transform: translateY(123px);
    z-index: 10;
}

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

.series-portrait-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 6rem;
    font-weight: 700;
    color: var(--text-tertiary);
    background: var(--background-secondary);
}

/* Title Overlay */
.series-hero-titles {
    flex: 1;
}

.title-rating-row {
    display: flex;
    align-items: center;
    gap: var(--spacing-lg);
    flex-wrap: wrap;
}

.series-main-title {
    font-size: 3rem;
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 0;
    letter-spacing: -0.02em;
    color: #ffffff;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.5);
}

.hero-rating-display {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.hero-rating-display.hero-rating-interactive {
    cursor: pointer;
}

.hero-rating-display .rating-stars-inline {
    display: flex;
    gap: 3px;
}

.hero-rating-display .star-inline {
    width: 24px;
    height: 24px;
}

.hero-rating-display .star-filled {
    fill: #FFD700;
}

.hero-star-btn {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    transition: transform var(--transition);
}

.hero-star-btn:disabled {
    cursor: default;
}

.hero-star-btn:not(:disabled):hover {
    transform: scale(1.1);
}

.hero-rating-number {
    font-size: 1.5rem;
    font-weight: 700;
    color: #ffffff;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.series-alt-names {
    font-size: 1.125rem;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
    margin-top: var(--spacing-sm);
    margin-bottom: var(--spacing-md);
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

/* Hero Genre Tags */
.hero-genre-tags {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-sm);
    margin-top: var(--spacing-md);
    margin-bottom: var(--spacing-xs);
}

.hero-stats {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    margin-top: var(--spacing-sm);
}

.hero-stat-count {
    font-size: 0.9rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}

.hero-stat-separator {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.9rem;
}

.hero-genre-tag {
    display: inline-block;
    padding: var(--spacing-xs) var(--spacing-md);
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 99px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #ffffff;
    text-decoration: none;
    transition: all var(--transition);
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}

.hero-genre-tag:hover {
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.hero-genre-tag.demographic-tag {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.25);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.hero-genre-tag.demographic-tag:hover {
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

/* Hero Action Buttons */
.hero-action-buttons {
    margin-left: calc(280px + var(--spacing-xl));
    margin-top: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
}

.hero-action-buttons .action-buttons-row {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

/* Content Wrapper Compact */
.series-content-wrapper-compact {
    padding-top: 0;
}

/* Content Warning Banner */
.content-warning-banner {
    display: flex;
    align-items: flex-start;
    gap: var(--spacing-md);
    padding: var(--spacing-lg);
    margin-bottom: 0;
    background: linear-gradient(135deg, rgba(255, 152, 0, 0.15) 0%, rgba(255, 87, 34, 0.15) 100%);
    border-left: 4px solid #ff9800;
    border-radius: var(--radius-md);
}

.warning-icon-svg {
    flex-shrink: 0;
    color: #ff9800;
}

.warning-content {
    flex: 1;
}

.warning-label {
    font-weight: 700;
    color: #ff9800;
    margin-right: var(--spacing-sm);
}

.warning-text-content {
    color: #ff9800;
}

/* Content Wrapper */
.series-content-wrapper {
    padding-top: calc(60px + var(--spacing-lg));
}

/* Expandable Description */
.series-description-block {
    margin-bottom: var(--spacing-2xl);
    padding: 0;
}

.description-content {
    line-height: 1.8;
    color: var(--text-primary);
}

.description-content.expandable {
    max-height: 120px;
    overflow: hidden;
    position: relative;
}

.description-content.expandable::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: linear-gradient(to bottom, transparent, var(--background));
    pointer-events: none;
}

.description-content.expanded {
    max-height: none;
}

.description-content.expanded::after {
    display: none;
}

.description-toggle {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    margin-top: var(--spacing-md);
    padding: var(--spacing-sm) 0;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition);
}

.description-toggle:hover {
    color: var(--text-primary);
}

.toggle-icon {
    transition: transform var(--transition);
}

/* Two-Column Layout */
.series-layout {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: var(--spacing-2xl);
    align-items: start;
}

/* Left Column: Metadata */
.series-metadata {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xl);
}

.metadata-section {
    padding: 0 0 var(--spacing-xl) 0;
}

.metadata-section:last-child {
    padding-bottom: 0;
}

.metadata-heading {
    font-size: 0.875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
    margin-bottom: var(--spacing-md);
}

/* Pills for Genres, Demographic */
.metadata-pills {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-sm);
}

.pill {
    display: inline-block;
    padding: var(--spacing-xs) var(--spacing-md);
    border-radius: 99px;
    font-size: 0.875rem;
    font-weight: 600;
    transition: all var(--transition);
}

.pill-genre {
    background: var(--background-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border);
}

.pill-genre:hover {
    background: var(--primary);
    color: var(--background);
    border-color: var(--primary);
}

.pill-demographic {
    background: var(--primary);
    color: var(--background);
}

/* Content Warnings */
.content-warnings-box {
    margin-top: var(--spacing-md);
    padding: var(--spacing-md);
    background: rgba(255, 165, 0, 0.1);
    border-left: 3px solid var(--text-secondary);
    border-radius: var(--radius-md);
    display: flex;
    align-items: flex-start;
    gap: var(--spacing-sm);
}

.warning-icon {
    flex-shrink: 0;
    font-size: 1.25rem;
}

.warning-text {
    color: var(--text-primary);
    font-size: 0.9rem;
    line-height: 1.5;
}

/* Metadata Items */
.metadata-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: var(--spacing-sm) 0;
}

.item-label {
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.item-value {
    color: var(--text-primary);
    font-size: 0.9rem;
    text-align: right;
}

.status-badge {
    display: inline-block;
    padding: var(--spacing-xs) var(--spacing-sm);
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.status-ongoing {
    background: var(--background-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border);
}

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

.status-hiatus {
    background: var(--background-tertiary);
    color: var(--text-secondary);
}

/* Release Status Badges - Match Publication Status */
.release-status-ongoing {
    background: var(--background-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border);
}

.release-status-completed {
    background: var(--primary);
    color: var(--background);
}

.release-status-hiatus,
.release-status-dropped,
.release-status-cancelled {
    background: var(--background-tertiary);
    color: var(--text-secondary);
    border: 1px solid var(--border);
}

/* Rating Display */
.rating-display {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.rating-stars {
    display: flex;
    gap: var(--spacing-xs);
}

.star {
    flex-shrink: 0;
}

.star-filled {
    color: var(--primary);
}

.star-empty {
    color: var(--border);
}

.rating-score {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
}

/* Inline Rating (in metadata) */
.rating-inline {
    display: flex !important;
    align-items: center;
    gap: var(--spacing-sm);
}

.rating-stars-inline {
    display: flex;
    gap: 2px;
}

.star-inline {
    flex-shrink: 0;
}

.star-inline.star-filled {
    color: var(--primary);
}

.star-inline.star-empty {
    color: var(--border);
}

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

/* Tags */
.metadata-tags {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-sm);
}

.tag-link {
    padding: var(--spacing-xs) var(--spacing-sm);
    background: var(--background-tertiary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    font-size: 0.85rem;
    color: var(--text-primary);
    transition: all var(--transition);
}

.tag-link:hover {
    background: var(--primary);
    color: var(--background);
    border-color: var(--primary);
}

/* Right Column: User Interaction */
.series-interaction {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xl);
}

/* Action Buttons Row with Icons */
.action-buttons-row {
    display: flex;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-xl);
    padding-bottom: var(--spacing-xl);
    border-bottom: 1px solid var(--border);
}

.btn-icon-action {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-md) var(--spacing-lg);
    min-width: 100px;
    background: var(--background);
    border: 2px solid var(--border);
    border-radius: var(--radius-lg);
    color: var(--text-primary);
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] .btn-icon-action {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.btn-icon-action:hover {
    background: var(--background-tertiary);
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}

[data-theme="dark"] .btn-icon-action:hover {
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
}


.btn-icon-action.btn-bookmark.active {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--background);
}

.btn-icon-action.btn-bookmark.active svg {
    fill: currentColor;
}

/* User Rating Section */
.user-rating-section {
    padding: 0 0 var(--spacing-xl) 0;
    border-bottom: 1px solid var(--border);
    margin-bottom: var(--spacing-xl);
}

.user-rating-section h4 {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: var(--spacing-md);
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.user-rating-stars {
    display: flex;
    gap: var(--spacing-sm);
}

.rating-star-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    transition: transform var(--transition);
}

.rating-star-btn:hover {
    transform: scale(1.15);
}

.rating-star-btn.rated svg path {
    fill: var(--primary);
}

.rating-star-btn svg {
    display: block;
    transition: fill var(--transition);
}

/* Chapter Interface */
.chapters-interface {
    background: transparent;
}

.chapters-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 0 var(--spacing-lg) 0;
}

.chapters-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
}

.chapters-controls {
    display: flex;
    gap: var(--spacing-sm);
}

.control-btn {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-sm) 0;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition);
}

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

/* Chapters List */
.chapters-list {
    display: flex;
    flex-direction: column;
}

/* Volume Section */
.volume-section {
    margin-top: var(--spacing-md);
}

.volume-section:first-child {
    margin-top: 0;
}

.volume-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: var(--spacing-md);
    background: var(--background-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition);
    margin-bottom: var(--spacing-xs);
}

.volume-header:hover {
    color: var(--text-primary);
    background: var(--background-tertiary);
}

.volume-title {
    font-weight: 700;
    font-size: 1rem;
    color: var(--text-primary);
}

.volume-count {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-left: auto;
    margin-right: var(--spacing-md);
}

.volume-toggle-icon {
    transition: transform var(--transition);
    color: var(--text-secondary);
}

.volume-header.collapsed .volume-toggle-icon {
    transform: rotate(-90deg);
}

.volume-chapters {
    display: flex;
    flex-direction: column;
}

.volume-chapters.collapsed {
    display: none;
}

/* Chapter Row */
.chapter-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-md) var(--spacing-md);
    background: transparent;
    border-bottom: 1px solid var(--border);
    transition: all var(--transition);
    text-decoration: none;
}

.chapter-row:hover {
    padding-left: var(--spacing-lg);
}

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

.chapter-row.chapter-read {
    opacity: 0.6;
}

.chapter-row.chapter-read .chapter-row-number {
    color: var(--text-tertiary);
}

.chapter-read-icon {
    flex-shrink: 0;
    color: var(--primary);
}

.chapter-row-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
}

.chapter-row-number {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
}

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

.chapter-row-meta {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.chapter-row-date {
    font-size: 0.85rem;
    color: var(--text-tertiary);
}

.chapter-row-separator {
    font-size: 0.85rem;
    color: var(--text-tertiary);
}

.chapter-row-comments {
    font-size: 0.85rem;
    color: var(--text-tertiary);
}

.chapter-row-btn {
    padding: var(--spacing-xs) var(--spacing-md);
    background: var(--primary);
    color: var(--background);
    border-radius: var(--radius-md);
    font-size: 0.85rem;
    font-weight: 600;
    opacity: 0;
    transition: opacity var(--transition);
}

.chapter-row:hover .chapter-row-btn {
    opacity: 1;
}

.no-chapters {
    padding: var(--spacing-2xl);
    text-align: center;
    color: var(--text-secondary);
}

/* ========================================
   Reviews Section
   ======================================== */

.reviews-section {
    margin-top: var(--spacing-3xl);
    padding-top: var(--spacing-2xl);
    border-top: 2px solid var(--border);
}

.reviews-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-xl);
}

.reviews-section .section-heading {
    font-size: 1.75rem;
    font-weight: 700;
    padding-top: var(--spacing-md);
    margin-bottom: 0;
}

.btn-toggle-review {
    padding: var(--spacing-sm) var(--spacing-lg);
    background: var(--background);
    color: var(--text-primary);
    border: 2px solid var(--border);
    border-radius: var(--radius-lg);
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all var(--transition);
}

.btn-toggle-review:hover {
    background: var(--background-tertiary);
    border-color: var(--primary);
    transform: translateY(-2px);
}

.hidden {
    display: none;
}

/* Write Review Box */
.write-review-box {
    background: var(--background-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--spacing-xl);
    margin-bottom: var(--spacing-2xl);
    transition: all var(--transition);
}

.write-review-box.collapsed {
    max-height: 60px;
    overflow: hidden;
    cursor: pointer;
}

.write-review-box.collapsed .review-form {
    display: none;
}

.write-review-box h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: var(--spacing-lg);
}

.review-form .form-group {
    margin-bottom: var(--spacing-lg);
}

.review-form label {
    display: block;
    font-weight: 600;
    margin-bottom: var(--spacing-sm);
    color: var(--text-secondary);
}

.review-stars {
    display: flex;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-md);
}

.review-star-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    transition: transform var(--transition);
}

.review-star-btn:hover {
    transform: scale(1.1);
}

.review-star-btn.selected svg path {
    fill: var(--primary);
}

.review-form textarea {
    width: 100%;
    padding: var(--spacing-md);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--background);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.95rem;
    line-height: 1.6;
    resize: vertical;
    transition: border-color var(--transition);
}

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

.form-group-checkbox {
    margin-bottom: var(--spacing-lg);
}

.checkbox-label {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-sm);
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    margin: 0;
    cursor: pointer;
    flex-shrink: 0;
}

.checkbox-text {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-xs);
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.checkbox-icon {
    color: #ff9800;
}

.btn-submit-review {
    padding: var(--spacing-md) var(--spacing-xl);
    background: var(--primary);
    color: var(--background);
    border: none;
    border-radius: var(--radius-lg);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all var(--transition);
}

.btn-submit-review:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

/* Reviews List */
.reviews-list {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xl);
}

.review-item {
    padding: var(--spacing-lg);
    background: var(--background-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
}

.review-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-md);
}

.review-user {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.user-avatar-placeholder {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary);
    color: var(--background);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.25rem;
}

.review-user .username {
    font-weight: 600;
    color: var(--text-primary);
}

.review-rating {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.btn-delete-review {
    background: none;
    border: none;
    color: #dc2626;
    cursor: pointer;
    padding: 4px;
    border-radius: var(--radius-sm);
    transition: all var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-delete-review:hover {
    background: #fee2e2;
    color: #b91c1c;
}

[data-theme="dark"] .btn-delete-review:hover {
    background: #7f1d1d;
    color: #fecaca;
}

.review-star {
    width: 14px;
    height: 14px;
}

.review-star.filled {
    color: var(--primary);
}

.review-star:not(.filled) {
    color: var(--border);
}

.review-date {
    font-size: 0.85rem;
    color: var(--text-tertiary);
}

.review-text {
    line-height: 1.8;
    color: var(--text-primary);
}

.review-text.spoiler-hidden {
    display: none;
}

.spoiler-warning {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-md);
    background: rgba(255, 152, 0, 0.1);
    border: 1px solid #ff9800;
    border-radius: var(--radius-md);
    color: #ff9800;
    font-weight: 600;
}

.spoiler-warning svg {
    flex-shrink: 0;
}

.reveal-spoiler-btn {
    margin-left: auto;
    padding: var(--spacing-xs) var(--spacing-md);
    background: #ff9800;
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
}

.reveal-spoiler-btn:hover {
    background: #f57c00;
}

.no-reviews {
    padding: var(--spacing-2xl);
    text-align: center;
    color: var(--text-secondary);
    font-style: italic;
}

/* ========================================
   Series Cards (Universal)
   ======================================== */

.series-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: var(--spacing-xl);
}

@media (max-width: 768px) {
    .series-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: var(--spacing-lg);
    }
}

.series-card {
    background: var(--background);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all var(--transition);
}

.series-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--shadow-lg);
    border-color: var(--border-dark);
}

.series-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.series-card-cover {
    position: relative;
    width: 100%;
    padding-top: 0%;
    background: var(--background-secondary);
    overflow: hidden;
}

.series-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.series-card:hover .series-image {
    transform: scale(1.05);
}

.series-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--background-secondary);
}

.series-initial {
    font-size: 3rem;
    font-weight: 700;
    color: var(--text-tertiary);
    text-transform: uppercase;
}

/* Series Card Tags */
.series-card-tags {
    position: absolute;
    top: var(--spacing-sm);
    right: var(--spacing-sm);
    display: flex;
    flex-direction: row;
    gap: 4px;
    align-items: flex-start;
}

.series-tag {
    padding: 6px 10px;
    border-radius: var(--radius-sm);
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    line-height: 1;
    display: inline-flex;
    align-items: center;
    min-height: 22px;
}

.tag-featured {
    background: #000;
    color: #fff;
    border: 1px solid transparent;
}

.tag-updated {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.series-card-content {
    padding: var(--spacing-md);
}

.series-card-title {
    font-size: 0.95rem;
    font-weight: 600;
    margin: 0 0 var(--spacing-sm) 0;
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    min-height: 2.6em;
    color: var(--text-primary);
}

.series-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-xs);
    align-items: center;
    font-size: 0.8rem;
    margin-bottom: var(--spacing-xs);
}

.meta-badge {
    padding: 2px 8px;
    border-radius: var(--radius-sm);
    font-size: 0.7rem;
    font-weight: 600;
}

.meta-status {
    background: var(--background-tertiary);
    color: var(--text-secondary);
    border: 1px solid var(--border);
}

.meta-text {
    color: var(--text-secondary);
    font-size: 0.8rem;
}

/* Chapter Quick Links */
.series-card-chapters {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-top: var(--spacing-md);
}

.chapter-quick-link {
    padding: 6px 8px;
    background: var(--background-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    color: var(--text-primary);
    transition: all var(--transition);
}

.chapter-quick-link:hover {
    background: var(--primary);
    color: var(--background);
    border-color: var(--primary);
    transform: translateY(-1px);
}

/* ========================================
   Similar Series Section
   ======================================== */

.similar-series-section {
    margin-top: var(--spacing-lg);
    padding-top: var(--spacing-lg);
    border-top: none;
}

.similar-series-section .section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-xl);
}

.similar-series-section .section-heading {
    font-size: 1.75rem;
    font-weight: 700;
    margin: 0;
}

.similar-carousel-wrapper {
    overflow: hidden;
    padding: 4px 0;
    margin: -4px 0;
}

.similar-carousel {
    display: flex;
    gap: var(--spacing-lg);
    transition: transform 0.3s ease;
    will-change: transform;
}

/* Confirmation Toast */
.confirmation-toast {
    position: fixed;
    top: 80px;
    right: 20px;
    background: var(--primary);
    color: var(--background);
    padding: var(--spacing-md) var(--spacing-xl);
    border-radius: var(--radius-lg);
    box-shadow: 0 4px 12px var(--shadow-lg);
    z-index: 9999;
    opacity: 0;
    transform: translateY(-20px);
    transition: all var(--transition);
    font-weight: 600;
}

.confirmation-toast.show {
    opacity: 1;
    transform: translateY(0);
}

.confirmation-toast.error {
    background: #dc2626;
    color: #ffffff;
}

/* ========================================
   Responsive Design
   ======================================== */

@media (max-width: 1024px) {
    /* Series Landing - Tablet */
    .series-layout {
        grid-template-columns: 280px 1fr;
        gap: var(--spacing-lg);
    }

    .series-portrait {
        width: 200px;
        height: 280px;
    }

    .hero-action-buttons {
        margin-left: calc(200px + var(--spacing-xl));
    }

    .series-main-title {
        font-size: 2.5rem;
    }
}

@media (max-width: 768px) {
    .navbar {
        background-color: var(--background);
        backdrop-filter: blur(10px);
    }

    [data-theme="dark"] .navbar {
        background-color: var(--background);
    }

    .nav-search {
        display: none;
    }

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

    .nav-menu {
        display: none;
        position: fixed;
        top: 60px;
        left: 0;
        right: 0;
        background: var(--surface-color);
        flex-direction: column;
        padding: var(--spacing-lg);
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
        z-index: 999;
        max-height: calc(100vh - 60px);
        overflow-y: auto;
    }

    .nav-menu.active {
        display: flex;
        background: var(--background);
    }

    .nav-menu > li {
        width: 100%;
        margin-bottom: var(--spacing-sm);
    }

    .nav-link,
    .user-dropdown .user-button {
        width: 100%;
        justify-content: flex-start;
        padding: var(--spacing-sm) var(--spacing-md);
    }

    .discord-link,
    .safe-mode-toggle,
    .theme-toggle {
        width: 100%;
        justify-content: flex-start;
        padding: var(--spacing-sm) var(--spacing-md);
        margin-left: 0;
    }

    .user-dropdown-menu {
        position: static;
        box-shadow: none;
        margin-top: var(--spacing-xs);
        width: 100%;
    }

    /* Mobile dropdown toggle behavior */
    .dropdown:hover .dropdown-menu {
        display: none;
    }

    .dropdown-menu {
        position: static;
        box-shadow: none;
        margin-top: var(--spacing-xs);
        width: 100%;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
        border: none;
    }

    .dropdown.active .dropdown-menu {
        display: block;
        max-height: 500px;
    }

    .dropdown-toggle {
        cursor: pointer;
        -webkit-tap-highlight-color: transparent;
    }

    .mobile-menu-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

    .mobile-menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .mobile-menu-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -6px);
    }

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

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

    .series-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: var(--spacing-md);
    }

    .series-header {
        flex-direction: column;
    }

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

    .series-title-large {
        font-size: 1.75rem;
    }

    .reader-nav {
        flex-direction: column;
        align-items: flex-start;
    }

    .chapter-navigation {
        flex-direction: column;
    }

    .btn-nav {
        width: 100%;
    }

    /* Series Landing - Mobile */
    .series-hero {
        margin-bottom: calc(40px + var(--spacing-lg));
    }

    .series-hero-backdrop {
        min-height: 320px;
    }

    .series-hero-content {
        flex-direction: column;
        align-items: flex-start;
        padding-top: var(--spacing-xl);
        padding-bottom: var(--spacing-lg);
    }

    .series-portrait {
        width: 160px;
        height: 240px;
        transform: translateY(40px);
        margin-bottom: var(--spacing-xl);
    }

    .hero-action-buttons {
        margin-left: 0;
        margin-top: 0;
        padding-top: var(--spacing-md);
    }

    .title-rating-row {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--spacing-sm);
    }

    .series-main-title {
        font-size: 2rem;
        padding-left: 0;
        padding-right: var(--spacing-md);
    }

    .series-alt-names {
        font-size: 1rem;
        padding-left: 0;
        padding-right: var(--spacing-md);
    }

    .hero-rating-display {
        margin-left: 0;
    }

    .hero-genre-tags {
        margin-left: 0;
        margin-right: var(--spacing-md);
    }

    .hero-stats {
        margin-left: 0;
    }

    .series-content-wrapper {
        padding-top: calc(40px + var(--spacing-md));
    }

    /* Two-column becomes stacked */
    .series-layout {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
    }

    /* Metadata full width */
    .series-metadata {
        order: 2;
    }

    .series-interaction {
        order: 1;
    }

    /* Action buttons compress */
    .action-buttons {
        flex-direction: row;
    }

    .btn-action {
        flex: 1;
        padding: var(--spacing-md);
        font-size: 0.95rem;
    }

    .btn-primary-action {
        min-width: 60%;
    }

    /* Chapter list full width */
    .chapters-header {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--spacing-md);
    }

    .chapters-controls {
        width: 100%;
    }

    .control-btn {
        flex: 1;
        justify-content: center;
    }

    .chapter-row {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--spacing-sm);
    }

    .chapter-row-meta {
        width: 100%;
        justify-content: space-between;
    }

    .chapter-row-btn {
        opacity: 1;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 var(--spacing-sm);
    }

    .hero-actions {
        flex-direction: column;
    }

    .hero-actions .btn-lg {
        width: 100%;
    }

    /* Series Landing - Extra Small Mobile */
    .series-hero {
        margin-bottom: calc(30px + var(--spacing-md));
    }

    .series-hero-backdrop {
        min-height: 280px;
    }

    .series-hero-content {
        padding-top: var(--spacing-md);
        padding-bottom: var(--spacing-md);
    }

    .series-portrait {
        width: 120px;
        height: 180px;
        transform: translateY(30px);
    }

    .series-main-title {
        font-size: 1.75rem;
        padding-left: 0;
        padding-right: var(--spacing-md);
    }

    .series-alt-names {
        font-size: 0.9rem;
        padding-left: 0;
        padding-right: var(--spacing-md);
    }

    .hero-rating-display {
        margin-left: 0;
        transform: scale(0.9);
    }

    .description-content.expandable {
        max-height: 100px;
    }

    .description-content.expanded {
        max-height: none !important;
    }

    .description-toggle {
        padding: var(--spacing-md);
        margin: var(--spacing-sm) calc(var(--spacing-md) * -1);
        -webkit-tap-highlight-color: rgba(0, 0, 0, 0.05);
    }

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

    .btn-action {
        width: 100%;
    }

    .metadata-pills {
        gap: var(--spacing-xs);
    }

    .pill {
        font-size: 0.8rem;
        padding: var(--spacing-xs) var(--spacing-sm);
    }
}

/* ========================================
   Comprehensive Manga Reader
   ======================================== */

/* Reader Container - Full Screen */
.manga-reader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: var(--background);
    z-index: 9999;
    overflow: hidden;
}

/* Reader Top Bar */
.reader-topbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    background-color: var(--background);
    border-bottom: 1px solid var(--border);
    z-index: 1000;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.manga-reader.hide-ui .reader-topbar {
    transform: translateY(-100%);
    opacity: 0;
}

.reader-topbar-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
    padding: 0 var(--spacing-lg);
    gap: var(--spacing-lg);
}

.reader-topbar-left {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    min-width: 200px;
    flex: 1;
}

.btn-back-series {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-sm) var(--spacing-md);
    background-color: var(--background-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-weight: 500;
    font-size: 0.9rem;
    transition: all var(--transition);
    white-space: nowrap;
}

.btn-back-series:hover {
    background-color: var(--background-tertiary);
    border-color: var(--border-dark);
}

.reader-chapter-info {
    flex: 1;
    text-align: center;
    overflow: hidden;
}

.reader-series-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--text-primary);
}

.reader-chapter-subtitle {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.reader-topbar-controls {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: var(--spacing-sm);
    min-width: 200px;
    flex: 1;
}

/* Page Jump Controls in Topbar */
.page-jump-controls-topbar {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
}

.page-jump-controls-topbar .page-jump-label {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-primary);
    white-space: nowrap;
}

.page-jump-controls-topbar input {
    width: 60px;
    padding: var(--spacing-sm) var(--spacing-sm);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background-color: var(--background-secondary);
    color: var(--text-primary);
    font-size: 0.9rem;
    font-weight: 500;
    text-align: center;
}

.page-jump-controls-topbar input:focus {
    outline: none;
    border-color: var(--primary);
}

.page-jump-controls-topbar .btn-jump {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-sm);
    background-color: var(--background-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    cursor: pointer;
    transition: all var(--transition);
}

.page-jump-controls-topbar .btn-jump:hover {
    background-color: var(--background-tertiary);
    border-color: var(--border-dark);
}

.btn-chapter-nav,
.btn-open-sidebar {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    padding: var(--spacing-sm) var(--spacing-md);
    background-color: var(--background-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-weight: 500;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all var(--transition);
    white-space: nowrap;
}

.btn-chapter-nav:hover,
.btn-open-sidebar:hover {
    background-color: var(--background-tertiary);
    border-color: var(--border-dark);
}

.btn-chapter-nav.btn-disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

/* Reader Sidebars */
.reader-sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    width: 100%;
    max-width: 400px;
    z-index: 2000;
    pointer-events: none;
}

.reader-sidebar-left {
    left: 0;
}

.reader-sidebar-right {
    right: 0;
}

.reader-sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.5);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: 1999;
}

.reader-sidebar.active .reader-sidebar-overlay {
    opacity: 1;
    pointer-events: all;
}

.reader-sidebar-content {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 100%;
    max-width: 400px;
    background-color: var(--background);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease;
    pointer-events: all;
    overflow: hidden;
    z-index: 2001;
}

.reader-sidebar-left .reader-sidebar-content {
    left: 0;
    transform: translateX(-100%);
}

.reader-sidebar-left.active .reader-sidebar-content {
    transform: translateX(0);
}

.reader-sidebar-right .reader-sidebar-content {
    right: 0;
    border-right: none;
    border-left: 1px solid var(--border);
    transform: translateX(100%);
}

.reader-sidebar-right.active .reader-sidebar-content {
    transform: translateX(0);
}

.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--spacing-lg);
    border-bottom: 1px solid var(--border);
    background-color: var(--background-secondary);
}

.sidebar-header h2 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.btn-close-sidebar {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    margin-left: var(--spacing-md);
    background: transparent;
    border: none;
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition);
}

.btn-close-sidebar:hover {
    background-color: var(--background-tertiary);
    color: var(--text-primary);
}

.sidebar-body {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: var(--spacing-lg);
}

/* Sidebar Sections */
.sidebar-section {
    margin-bottom: var(--spacing-2xl);
}

.sidebar-section:last-child {
    margin-bottom: 0;
}

.sidebar-section-title {
    font-size: 0.875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
    margin-bottom: var(--spacing-md);
}

/* Collapsible Section Titles */
.sidebar-section-title.collapsible {
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    user-select: none;
    transition: all var(--transition);
    padding: var(--spacing-sm) var(--spacing-md);
    background-color: var(--background-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    margin-bottom: var(--spacing-sm);
}

.sidebar-section-title.collapsible:hover {
    color: var(--text-primary);
    border-color: var(--primary);
    background-color: var(--background-tertiary);
}

.sidebar-section-title .toggle-icon {
    transition: transform var(--transition);
}

.sidebar-section-title.collapsed .toggle-icon {
    transform: rotate(-90deg);
}

.collapsible-content {
    max-height: 1000px;
    overflow: hidden;
    transition: max-height 0.3s ease-out, opacity 0.3s ease-out;
    opacity: 1;
}

.collapsible-content.collapsed {
    max-height: 0;
    opacity: 0;
}

/* Chapter List in Sidebar */
.chapter-list-sidebar {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
}

.chapter-list-item {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
    padding: var(--spacing-sm) var(--spacing-md);
    background-color: var(--background-secondary);
    border-radius: var(--radius-md);
    transition: all var(--transition);
    text-decoration: none;
}

.chapter-list-item:hover {
    background-color: var(--background-tertiary);
}

.chapter-list-item.active {
    background-color: var(--primary);
    color: var(--background);
}

.chapter-list-item.active .chapter-number,
.chapter-list-item.active .chapter-title {
    color: var(--background);
}

.chapter-number {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-primary);
}

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

/* Reading Mode Controls */
.reading-mode-controls {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--spacing-sm);
}

.btn-reading-mode {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-xs);
    padding: var(--spacing-md);
    background-color: var(--background-secondary);
    border: 2px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
}

.btn-reading-mode svg {
    stroke: currentColor;
}

.btn-reading-mode:hover {
    background-color: var(--primary);
    border-color: var(--primary);
    color: var(--background);
}

.btn-reading-mode.active {
    background-color: var(--primary);
    border-color: var(--primary);
    color: var(--background);
}

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

/* Display Settings */
.display-settings {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-lg);
}

.fit-mode-controls {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-sm);
}

.btn-fit-mode {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-xs);
    padding: var(--spacing-sm);
    background-color: var(--background-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
}

.btn-fit-mode:hover {
    background-color: var(--background-tertiary);
}

.btn-fit-mode.active {
    background-color: var(--primary);
    border-color: var(--primary);
    color: var(--background);
}

/* Zoom Controls */
.zoom-controls {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.zoom-controls label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.zoom-buttons {
    display: grid;
    grid-template-columns: auto 1fr auto auto;
    gap: var(--spacing-sm);
    align-items: center;
}

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

.btn-zoom:hover {
    background-color: var(--background-tertiary);
    border-color: var(--border-dark);
}

.zoom-level {
    text-align: center;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-primary);
}

/* Hide zoom controls in fit-height mode */
.reader-canvas-content.fit-height ~ .reader-sidebar .zoom-controls,
body[data-fit-mode="height"] .zoom-controls {
    display: none;
}

/* Theme Toggle Controls */
.theme-toggle-controls {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.theme-toggle-controls label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.theme-toggle-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-sm);
}

.btn-theme {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-xs);
    padding: var(--spacing-sm) var(--spacing-md);
    background-color: var(--background-secondary) !important;
    border: 2px solid var(--border) !important;
    border-radius: var(--radius-md);
    color: var(--text-primary) !important;
    font-weight: 500;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all var(--transition);
}

.btn-theme svg {
    stroke: currentColor;
}

/* Light button - non-active state (shows what light mode looks like) */
[data-theme="light"] .btn-theme[data-theme="light"]:not(.active) {
    background-color: #fafafa !important;
    border-color: #e5e5e5 !important;
    color: #1a1a1a !important;
}

/* Light button - active state (selected, highlighted) */
[data-theme="light"] .btn-theme[data-theme="light"].active {
    background-color: #000000 !important;
    border-color: #000000 !important;
    color: #ffffff !important;
}

/* Dark button - non-active state (shows what dark mode looks like) */
[data-theme="light"] .btn-theme[data-theme="dark"]:not(.active) {
    background-color: #fafafa !important;
    border-color: #e5e5e5 !important;
    color: #1a1a1a !important;
}

/* Dark button - active state when on light mode (selected) */
[data-theme="light"] .btn-theme[data-theme="dark"].active {
    background-color: #000000 !important;
    border-color: #000000 !important;
    color: #ffffff !important;
}

/* Light button - non-active state on dark mode (NOT selected) */
[data-theme="dark"] .btn-theme[data-theme="light"]:not(.active) {
    background-color: #000000 !important;
    border-color: #e5e5e5 !important;
    color: #ffffff !important;
}

/* Light button - active state on dark mode (selected - use white) */
[data-theme="dark"] .btn-theme[data-theme="light"].active {
    background-color: #ffffff !important;
    border-color: #ffffff !important;
    color: #0a0a0a !important;
}

/* Dark button - non-active state on dark mode (NOT selected) */
[data-theme="dark"] .btn-theme[data-theme="dark"]:not(.active) {
    background-color: #000000 !important;
    border-color: #e5e5e5 !important;
    color: #ffffff !important;
}

/* Dark button - active state on dark mode (selected - use white) */
[data-theme="dark"] .btn-theme[data-theme="dark"].active {
    background-color: #ffffff !important;
    border-color: #ffffff !important;
    color: #0a0a0a !important;
}

.btn-theme:hover:not(.active) {
    background-color: var(--background-tertiary) !important;
    border-color: var(--primary) !important;
    color: var(--text-primary) !important;
}

/* Page Jump Controls */
.page-jump-controls {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.page-jump-controls label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.page-jump-input {
    display: flex;
    gap: var(--spacing-sm);
}

.page-jump-input input {
    flex: 1;
    padding: var(--spacing-sm) var(--spacing-md);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background-color: var(--background-secondary);
    color: var(--text-primary);
    font-size: 0.9rem;
}

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

.btn-jump {
    padding: var(--spacing-sm) var(--spacing-lg);
    background-color: var(--primary);
    color: var(--background);
    border: none;
    border-radius: var(--radius-md);
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
}

.btn-jump:hover {
    background-color: var(--primary-dark);
}

/* Comments Section */
.comment-input-section {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-lg);
    padding-bottom: var(--spacing-lg);
    border-bottom: 1px solid var(--border);
}

#commentInput {
    width: 100%;
    padding: var(--spacing-md);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background-color: var(--background-secondary);
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 0.9rem;
    resize: vertical;
    transition: border-color var(--transition);
}

#commentInput:focus {
    outline: none;
    border-color: var(--primary);
}

.btn-submit-comment {
    align-self: flex-end;
    padding: var(--spacing-sm) var(--spacing-lg);
    background-color: var(--primary);
    color: var(--background);
    border: none;
    border-radius: var(--radius-md);
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
}

.btn-submit-comment:hover {
    background-color: var(--primary-dark);
}

.comment-login-prompt {
    padding: var(--spacing-lg);
    text-align: center;
    color: var(--text-secondary);
    background-color: var(--background-secondary);
    border-radius: var(--radius-md);
    margin-bottom: var(--spacing-lg);
}

.comment-login-prompt a {
    color: var(--primary);
    font-weight: 600;
}

.comments-list {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.comments-loading,
.comments-empty {
    padding: var(--spacing-xl);
    text-align: center;
    color: var(--text-secondary);
}

.comment-item {
    padding: var(--spacing-md);
    background-color: var(--background-secondary);
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
}

.comment-header {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-sm);
}

.comment-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: var(--primary);
    color: var(--background);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
}

.comment-user {
    flex: 1;
}

.btn-delete-comment {
    background: none;
    border: none;
    color: #dc2626;
    cursor: pointer;
    padding: 4px;
    border-radius: var(--radius-sm);
    transition: all var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: auto;
}

.btn-delete-comment:hover {
    background: #fee2e2;
    color: #b91c1c;
}

[data-theme="dark"] .btn-delete-comment:hover {
    background: #7f1d1d;
    color: #fecaca;
}

.comment-username {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-primary);
}

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

.comment-text {
    color: var(--text-primary);
    line-height: 1.6;
    font-size: 0.9rem;
}

/* Reader Canvas */
.reader-canvas {
    position: fixed;
    top: 60px;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--background-secondary);
    overflow-y: auto;
    overflow-x: hidden;
}

.manga-reader.hide-ui .reader-canvas {
    top: 0;
}

.reader-canvas-content {
    min-height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: var(--spacing-md) 0;
}

/* Reading Modes */
.reader-canvas-content.mode-longstrip {
    gap: 0;
}

.reader-canvas-content.mode-single,
.reader-canvas-content.mode-double {
    justify-content: center;
    padding: 0;
}

.reader-canvas-content.mode-double {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0;
}

/* RTL (Right to Left) reading direction - reverse the visual order */
.reader-canvas-content.mode-double[data-reading-direction="rtl"] {
    flex-direction: row-reverse;
}

/* Reader Pages */
.reader-page {
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.3s ease;
    margin: 0;
    padding: 0;
    background-color: var(--background-secondary);
}

.reader-canvas-content.mode-longstrip .reader-page {
    width: 100%;
    max-width: 100%;
}

/* Longstrip mode: 60% width on desktop, full width on mobile/tablet */
@media (min-width: 1024px) {
    .reader-canvas-content.mode-longstrip .reader-page {
        width: 60%;
        max-width: 60%;
        margin-left: auto;
        margin-right: auto;
    }
}

.reader-canvas-content.mode-single .reader-page {
    display: none;
}

.reader-canvas-content.mode-single .reader-page.active {
    display: flex;
}

.reader-canvas-content.mode-double .reader-page {
    display: none;
    flex: 0 0 50%;
    max-width: 50%;
    margin: 0;
    padding: 0;
    border: none;
}

.reader-canvas-content.mode-double .reader-page.active {
    display: flex;
}

/* Align pages to meet in the middle with no gap */
.reader-canvas-content.mode-double .reader-page:nth-child(odd) {
    justify-content: flex-end; /* Push image to right edge */
}

.reader-canvas-content.mode-double .reader-page:nth-child(even) {
    justify-content: flex-start; /* Push image to left edge */
}

/* RTL mode - reverse the alignment since flex-direction is reversed */
.reader-canvas-content.mode-double[data-reading-direction="rtl"] .reader-page:nth-child(odd) {
    justify-content: flex-start; /* Push image to left edge */
}

.reader-canvas-content.mode-double[data-reading-direction="rtl"] .reader-page:nth-child(even) {
    justify-content: flex-end; /* Push image to right edge */
}

/* Reader Images */
.reader-image {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 0;
    padding: 0;

    /* Image Protection - Prevent saving, copying, dragging */
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    -webkit-user-drag: none;
    -khtml-user-drag: none;
    -moz-user-drag: none;
    -o-user-drag: none;
    -webkit-touch-callout: none; /* Disable long-press menu on iOS */
    pointer-events: none; /* Prevent right-click and interaction */

    vertical-align: top;

    /* Maximum quality rendering for crisp, clear images */
    image-rendering: high-quality;
    image-rendering: -webkit-optimize-quality;
    image-rendering: -moz-crisp-edges;
    -ms-interpolation-mode: bicubic;

    /* Smooth anti-aliasing */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;

    /* Smooth loading transition without blur */
    opacity: 1;
    transition: opacity 0.3s ease-in-out;
}

/* Lazy loading placeholder state - show clear loading visual */
.reader-image.lazy-image {
    opacity: 0.3;
    transition: opacity 0.4s ease-in-out;
    background: var(--background-secondary);
}

/* Loaded state */
.reader-image.lazy-image.loaded {
    opacity: 1;
    background: none;
}

/* Ultra-minimal loading indicator - simple flat bar */
.reader-page {
    position: relative;
}

/* Image Protection Overlay - Invisible layer to prevent right-click */
.reader-page::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: auto; /* Re-enable pointer events on overlay for navigation clicks */
    cursor: pointer;
}

.reader-page.loading::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 50px;
    height: 3px;
    margin: -1.5px 0 0 -25px;
    background: var(--primary);
    opacity: 0.8;
    animation: loadingPulse 1s ease-in-out infinite;
    z-index: 10;
    border-radius: 2px;
}

@keyframes loadingPulse {
    0%, 100% {
        opacity: 0.4;
        transform: scaleX(0.8);
    }
    50% {
        opacity: 1;
        transform: scaleX(1);
    }
}

/* Single page mode - respects fit mode */
.reader-canvas-content.mode-single .reader-image {
    width: auto;
    max-height: 100vh;
    height: 100vh;
    object-fit: contain;
    object-position: center;
}

.manga-reader.hide-ui .reader-canvas-content.mode-single .reader-image {
    max-height: 100vh;
    height: 100vh;
}

/* Double page mode - ALWAYS fit to height, horizontally centered */
.reader-canvas-content.mode-double .reader-image {
    width: auto !important;
    max-height: 100vh !important;
    height: 100vh !important;
    object-fit: contain !important;
    object-position: center !important;
}

.manga-reader.hide-ui .reader-canvas-content.mode-double .reader-image {
    max-height: 100vh !important;
    height: 100vh !important;
}

/* Fit width mode - only for single page and longstrip */
.reader-canvas-content.mode-single.fit-width .reader-image,
.reader-canvas-content.mode-longstrip.fit-width .reader-image {
    width: 100%;
    height: auto;
    max-height: none;
    object-fit: contain;
    object-position: center;
}

/* Maintain fit-width when UI is hidden - higher specificity to override hide-ui rules */
.manga-reader.hide-ui .reader-canvas-content.mode-single.fit-width .reader-image,
.manga-reader.hide-ui .reader-canvas-content.mode-longstrip.fit-width .reader-image {
    width: 100% !important;
    height: auto !important;
    max-height: none !important;
}

/* Fit height mode - account for top bar when visible */
.reader-canvas-content.fit-height .reader-image {
    width: auto;
    max-height: calc(100vh - 60px);
    height: calc(100vh - 60px);
    object-fit: contain;
    object-position: center;
}

/* Full height when UI is hidden */
.manga-reader.hide-ui .reader-canvas-content.fit-height .reader-image {
    max-height: 100vh;
    height: 100vh;
}

.reader-canvas-content.zoomed .reader-image {
    cursor: move;
}

/* Reader Navigation Arrows */
.reader-arrow {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(0, 0, 0, 0.5);
    border: none;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 100;
}

.reader-arrow:hover {
    background-color: rgba(0, 0, 0, 0.7);
    opacity: 1 !important;
}

.manga-reader:hover .reader-arrow {
    opacity: 0.7;
}

.manga-reader.hide-ui .reader-arrow {
    opacity: 0 !important;
    pointer-events: none;
}

.reader-arrow-left {
    left: var(--spacing-lg);
}

.reader-arrow-right {
    right: var(--spacing-lg);
}

/* End of Chapter Navigation */
.end-of-chapter-nav {
    display: none;
    justify-content: center;
    align-items: center;
    padding: var(--spacing-3xl) var(--spacing-xl);
    margin-top: var(--spacing-2xl);
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

/* In longstrip mode, show at bottom after all pages */
.mode-longstrip .end-of-chapter-nav.visible {
    display: flex;
    opacity: 1;
}

/* In single/double mode, show as full-screen overlay */
.mode-single .end-of-chapter-nav.visible,
.mode-double .end-of-chapter-nav.visible {
    display: flex;
    opacity: 1;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    margin: 0;
    padding: 0;
    background: var(--background);
    z-index: 999;
}

.btn-end-chapter {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-md) var(--spacing-2xl);
    background-color: var(--primary);
    color: var(--background);
    border: none;
    border-radius: var(--radius-lg);
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    transition: all var(--transition);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn-end-chapter:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
    opacity: 0.9;
}

/* Page Indicator */
.reader-page-indicator {
    position: fixed;
    bottom: var(--spacing-lg);
    left: 50%;
    transform: translateX(-50%);
    padding: var(--spacing-sm) var(--spacing-md);
    background-color: rgba(0, 0, 0, 0.7);
    border-radius: var(--radius-lg);
    color: white;
    font-weight: 600;
    font-size: 0.9rem;
    z-index: 100;
    transition: all 0.3s ease;
}

.manga-reader.hide-ui .reader-page-indicator {
    opacity: 0;
    pointer-events: none;
}

/* Comments Toggle Button */
.btn-toggle-comments {
    position: fixed;
    bottom: var(--spacing-lg);
    right: var(--spacing-lg);
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--primary);
    border: none;
    border-radius: 50%;
    color: var(--background);
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    transition: all var(--transition);
    z-index: 100;
}

.btn-toggle-comments:hover {
    background-color: var(--primary-dark);
    transform: scale(1.05);
}

.manga-reader.hide-ui .btn-toggle-comments {
    opacity: 0;
    pointer-events: none;
}

.comments-count {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #ff4444;
    border-radius: 10px;
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0 6px;
}

/* Reader Empty State */
.reader-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-lg);
    padding: var(--spacing-3xl);
    text-align: center;
    color: var(--text-secondary);
}

.reader-empty p {
    font-size: 1.1rem;
}

.reader-empty a {
    color: var(--primary);
    font-weight: 600;
}

/* ========================================
   Responsive Design - Reader
   ======================================== */

@media (max-width: 1024px) {
    .reader-arrow {
        width: 40px;
        height: 40px;
    }

    .reader-sidebar-content {
        max-width: 350px;
    }
}

@media (max-width: 768px) {
    .reader-topbar {
        height: 56px;
    }

    .reader-canvas {
        top: 56px;
    }

    .reader-topbar-left,
    .reader-topbar-controls {
        min-width: auto;
    }

    .btn-back-series span {
        display: none;
    }

    .reader-series-title {
        font-size: 0.95rem;
    }

    .reader-chapter-subtitle {
        font-size: 0.8rem;
    }

    .btn-chapter-nav span {
        display: none;
    }

    /* Hide page jump controls on mobile - use swipe or page indicator instead */
    .page-jump-controls-topbar {
        display: none;
    }

    .reader-sidebar-content {
        max-width: 320px;
    }

    .reader-arrow {
        display: none;
    }

    /* Align images to top on mobile for single/double page modes */
    .reader-canvas-content.mode-single,
    .reader-canvas-content.mode-double {
        justify-content: flex-start;
        padding-top: var(--spacing-md);
    }

    /* Align fit-height images to top on mobile */
    .reader-canvas-content.fit-height .reader-image {
        object-position: top;
    }

    .reading-mode-controls {
        grid-template-columns: repeat(3, 1fr);
    }

    .btn-reading-mode {
        padding: var(--spacing-sm);
        font-size: 0.75rem;
    }
}

@media (max-width: 480px) {
    .reader-topbar-content {
        padding: 0 var(--spacing-sm);
        gap: var(--spacing-sm);
    }

    .reader-chapter-info {
        display: none;
    }

    .reader-sidebar-content {
        max-width: 100%;
    }

    .reader-page-indicator {
        bottom: var(--spacing-md);
        font-size: 0.8rem;
        padding: var(--spacing-xs) var(--spacing-sm);
    }

    .btn-toggle-comments {
        width: 48px;
        height: 48px;
        bottom: var(--spacing-md);
        right: var(--spacing-md);
    }
}


/* ========================================
   Safe Mode - Hide Content with Warnings
   ======================================== */

body.safe-mode .has-content-warning {
    display: none !important;
}

/* ========================================
   Digests Page - Fixed Viewport Layout
   ======================================== */

/* Disable scrolling on digests page */
body:has(.digests-page) {
    overflow: hidden;
}

body:has(.digests-page) .main-content {
    padding-top: 0;
    overflow: hidden;
}

.digests-page {
    position: fixed;
    top: 90px;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Navbar styling for digests */
body:has(.digests-page) .navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 200;
}

/* ----------------------------------------
   Main Content Area
   ---------------------------------------- */

.digests-content {
    flex: 1;
    position: relative;
    height: 100%;
    overflow: hidden;
}

.digest-post {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: var(--spacing-xl) var(--spacing-2xl);
    padding-top: var(--spacing-md);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
    overflow-x: hidden;
    will-change: opacity, transform;
}

.digest-post.active {
    opacity: 1;
    visibility: visible;
    z-index: 1;
}

/* Transition animations - horizontal sliding */
.digest-post.exit-left {
    opacity: 0;
    transform: translateX(-100px) scale(0.95);
    transition: opacity 0.6s cubic-bezier(0.4, 0, 0.6, 1),
                transform 0.6s cubic-bezier(0.4, 0, 0.6, 1);
}

.digest-post.exit-right {
    opacity: 0;
    transform: translateX(100px) scale(0.95);
    transition: opacity 0.6s cubic-bezier(0.4, 0, 0.6, 1),
                transform 0.6s cubic-bezier(0.4, 0, 0.6, 1);
}

.digest-post.enter-left {
    animation: slideInFromLeft 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.digest-post.enter-right {
    animation: slideInFromRight 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes slideInFromLeft {
    0% {
        opacity: 0;
        transform: translateX(-100px) scale(0.95);
    }
    60% {
        opacity: 1;
    }
    100% {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

@keyframes slideInFromRight {
    0% {
        opacity: 0;
        transform: translateX(100px) scale(0.95);
    }
    60% {
        opacity: 1;
    }
    100% {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

.digest-post-inner {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: var(--spacing-2xl);
    max-width: 1300px;
    width: 100%;
    align-items: start;
    min-height: min-content;
}

/* ----------------------------------------
   Left Panel (Images)
   ---------------------------------------- */

.digest-image-panel {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
}

/* ----------------------------------------
   Right Panel (Main Content)
   ---------------------------------------- */

.digest-content-panel {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
    min-height: min-content;
    overflow-wrap: break-word;
    word-wrap: break-word;
    word-break: break-word;
    max-width: 100%;
    min-width: 0;
}

.digest-header {
    margin-bottom: var(--spacing-xs);
}

.digest-username {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
    letter-spacing: -0.02em;
}

.digest-badges {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-xs);
}

.digest-badge {
    font-size: 0.65rem;
    padding: 3px 8px;
    border-radius: var(--radius-sm);
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.badge-translator {
    background: #dbeafe;
    color: #1e40af;
}

[data-theme="dark"] .badge-translator {
    background: #1e3a8a;
    color: #dbeafe;
}

.badge-proofreader {
    background: #d1fae5;
    color: #065f46;
}

[data-theme="dark"] .badge-proofreader {
    background: #064e3b;
    color: #d1fae5;
}

.badge-cleaner {
    background: #e0e7ff;
    color: #3730a3;
}

[data-theme="dark"] .badge-cleaner {
    background: #312e81;
    color: #e0e7ff;
}

.badge-typesetter {
    background: #fce7f3;
    color: #9d174d;
}

[data-theme="dark"] .badge-typesetter {
    background: #831843;
    color: #fce7f3;
}

.badge-qc {
    background: #f3e8ff;
    color: #6b21a8;
}

[data-theme="dark"] .badge-qc {
    background: #581c87;
    color: #f3e8ff;
}

.badge-default {
    background: var(--background-tertiary);
    color: var(--text-secondary);
}

/* ----------------------------------------
   Title Section with Date
   ---------------------------------------- */

.digest-title-section {
    margin-bottom: 6px;
}

.digest-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
    line-height: 1.3;
}

.digest-meta {
    font-size: 0.8rem;
    color: var(--text-tertiary);
}

.digest-content {
    font-size: 0.85rem;
    line-height: 1.6;
    color: var(--text-secondary);
    margin-bottom: var(--spacing-xs);
    overflow-wrap: break-word;
    word-wrap: break-word;
    max-width: 100%;
    min-width: 0;
}

.digest-content p {
    margin-bottom: var(--spacing-sm);
}

.digest-content p:last-child {
    margin-bottom: 0;
}

.digest-content img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-md);
}

/* ----------------------------------------
   Favorite Projects - Carousel Style
   ---------------------------------------- */

.digest-favorites {
    margin-top: auto;
    max-width: 100%;
    overflow: hidden;
}

.digest-favorites-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-sm);
}

.digest-favorites-title {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 0;
}

.digest-favorites-nav {
    display: flex;
    gap: var(--spacing-xs);
}

.digest-favorites-btn {
    width: 28px;
    height: 28px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--background);
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition);
}

.digest-favorites-btn:hover:not(:disabled) {
    background: var(--primary);
    color: var(--background);
    border-color: var(--primary);
}

.digest-favorites-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.digest-favorites-wrapper {
    overflow: hidden;
    width: 100%;
    max-width: 100%;
    position: relative;
}

.digest-favorites-track {
    display: flex;
    gap: 12px;
    transition: transform 0.3s ease;
    flex-wrap: nowrap;
}

.digest-favorite-card {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    background: var(--background-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    transition: all var(--transition);
    flex: 0 0 calc((100% - 36px) / 4);
    width: calc((100% - 36px) / 4);
    text-decoration: none;
}

.digest-favorite-card:hover {
    border-color: var(--primary);
    box-shadow: 0 2px 8px var(--shadow-md);
    text-decoration: none;
}

.digest-favorite-cover {
    width: 32px;
    height: 44px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    flex-shrink: 0;
    background: var(--background-tertiary);
}

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

.digest-favorite-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-tertiary);
    background: var(--background-tertiary);
}

.digest-favorite-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
    min-width: 0;
}

.digest-favorite-title {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.digest-favorite-status {
    font-size: 0.6rem;
    color: var(--text-tertiary);
    text-transform: uppercase;
}

/* ----------------------------------------
   Images - Vertical Stacking Only
   ---------------------------------------- */

.digest-images {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
    flex: 1;
}

.digest-image-wrapper {
    flex: 1;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--background-secondary);
    border: 1px solid var(--border);
    min-height: 0;
}

.digest-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.digest-image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
    color: var(--text-tertiary);
    background: var(--background-tertiary);
}

.digest-image-placeholder svg {
    width: 40px;
    height: 40px;
    opacity: 0.5;
}

.digest-image-placeholder span {
    font-size: 0.8rem;
}

/* ----------------------------------------
   Timeline (Horizontal at Top)
   ---------------------------------------- */

.digests-timeline {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-lg) var(--spacing-xl) var(--spacing-md) var(--spacing-xl);
    gap: var(--spacing-md);
    flex-shrink: 0;
}

.timeline-nav-btn {
    width: 36px;
    height: 36px;
    border: none;
    background: none;
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition);
    flex-shrink: 0;
}

.timeline-nav-btn:hover:not(:disabled) {
    color: var(--primary);
    transform: scale(1.1);
}

.timeline-nav-btn:disabled {
    opacity: 0.2;
    cursor: not-allowed;
}

.timeline-track-wrapper {
    flex: 1;
    overflow: visible;
    max-width: 800px;
}

.timeline-track {
    display: flex;
    flex-direction: row;
    gap: var(--spacing-lg);
    position: relative;
    justify-content: center;
}

.timeline-track::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    height: 1px;
    background: var(--border);
    transform: translateY(-50%);
}

.timeline-marker {
    position: relative;
    cursor: pointer;
    z-index: 1;
}

.timeline-marker:hover {
    z-index: 1000;
}

.timeline-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--background);
    border: 2px solid var(--border);
    transition: all var(--transition);
}

.timeline-marker:hover .timeline-dot,
.timeline-marker.active .timeline-dot {
    background: var(--primary);
    border-color: var(--primary);
    transform: scale(1.3);
}

.timeline-tooltip {
    position: absolute;
    top: calc(100% + var(--spacing-sm));
    left: 50%;
    transform: translateX(-50%);
    background: var(--background);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: var(--spacing-sm) var(--spacing-md);
    width: max-content;
    max-width: 200px;
    box-shadow: 0 4px 12px var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition);
    pointer-events: none;
    text-align: left;
    white-space: nowrap;
    z-index: 1001;
}

.timeline-marker:hover .timeline-tooltip {
    opacity: 1;
    visibility: visible;
}

.timeline-username {
    display: block;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-primary);
    margin-bottom: var(--spacing-xs);
}

.timeline-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-bottom: var(--spacing-xs);
    justify-content: flex-start;
}

.timeline-badge {
    font-size: 0.6rem;
    padding: 2px 6px;
    background: var(--background-tertiary);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    text-transform: uppercase;
    font-weight: 600;
}

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

/* ----------------------------------------
   Responsive Styles
   ---------------------------------------- */

@media (max-width: 1200px) {
    .digest-post-inner {
        grid-template-columns: 240px 1fr;
        gap: var(--spacing-xl);
    }
}

@media (max-width: 1024px) {
    .digests-timeline {
        padding: var(--spacing-xl) var(--spacing-md);
    }

    .timeline-track-wrapper {
        max-width: 600px;
    }

    .timeline-track {
        gap: var(--spacing-md);
    }

    .timeline-nav-btn {
        width: 32px;
        height: 32px;
    }

    .digest-post {
        padding: var(--spacing-lg);
        padding-top: var(--spacing-xs);
    }

    .digest-post-inner {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
    }

    .digest-content-panel {
        order: 1;
    }

    .digest-image-panel {
        order: 2;
    }

    .digest-images {
        flex-direction: row;
        height: auto;
        gap: var(--spacing-sm);
    }

    .digest-image-wrapper {
        flex: 1;
        min-width: 0;
        height: 250px;
    }

    .digest-username {
        font-size: 1.75rem;
    }

    .digest-favorite-card {
        flex: 0 0 calc((100% - 24px) / 3);
        width: calc((100% - 24px) / 3);
    }
}

@media (max-width: 768px) {
    .digests-timeline {
        padding: var(--spacing-lg) var(--spacing-md);
    }

    .timeline-track-wrapper {
        max-width: 400px;
    }

    .timeline-track {
        gap: var(--spacing-sm);
    }

    .timeline-nav-btn {
        width: 28px;
        height: 28px;
    }

    .timeline-dot {
        width: 10px;
        height: 10px;
    }

    .digest-post {
        padding: var(--spacing-md);
        padding-top: 4px;
    }

    .digest-username {
        font-size: 1.5rem;
    }

    .digest-title {
        font-size: 1.2rem;
    }

    .digest-content {
        font-size: 0.9rem;
    }

    .digest-images {
        flex-direction: row;
        height: auto;
        gap: var(--spacing-sm);
    }

    .digest-image-wrapper {
        flex: 1;
        min-width: 0;
        height: 200px;
    }

    .digest-favorite-card {
        flex: 0 0 calc((100% - 12px) / 2);
        width: calc((100% - 12px) / 2);
    }
}

@media (max-width: 480px) {
    .digest-post {
        padding: var(--spacing-sm) var(--spacing-sm);
    }

    .digest-username {
        font-size: 1.25rem;
    }

    .digest-title {
        font-size: 1.1rem;
    }

    .digest-favorites {
        padding: var(--spacing-sm);
    }

    .digest-favorite-card {
        padding: 4px;
    }

    .digest-favorite-cover {
        width: 30px;
        height: 42px;
    }

    .digest-favorite-title {
        max-width: 80px;
    }
}

/* ========================================
   Home Page - Hero Carousel Section
   ======================================== */

.hero-carousel-section {
    background: var(--background);
    padding: var(--spacing-xl) 0 var(--spacing-md) 0;
    margin-bottom: 0;
}

.hero-carousel-wrapper {
    position: relative;
    margin-bottom: var(--spacing-md);
    overflow: hidden;
}

.hero-carousel {
    display: flex;
    gap: var(--spacing-lg);
    padding: var(--spacing-md) 0;
    margin-bottom: var(--spacing-lg);
    transition: transform 0.5s ease-in-out;
}

.hero-carousel-item {
    flex: 0 0 auto;
    width: calc((100% - (var(--spacing-lg) * 3)) / 4);
}

/* Carousel Pagination Dots */
.carousel-dots {
    display: flex;
    justify-content: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-md) 0;
}

.carousel-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--border);
    border: none;
    cursor: pointer;
    transition: all var(--transition);
    padding: 0;
}

.carousel-dot:hover {
    background: var(--text-secondary);
}

.carousel-dot.active {
    background: var(--text-primary);
    width: 24px;
    border-radius: 4px;
}

@media (max-width: 768px) {
    .hero-carousel-item {
        width: calc((100% - var(--spacing-lg)) / 2);
    }
}

/* Hero Card */
.hero-card {
    display: block;
    text-decoration: none;
    color: inherit;
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: transform var(--transition);
    border: 1px solid var(--border);
    background: var(--background);
}

.hero-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px var(--shadow-lg);
}

.hero-card-image {
    position: relative;
    width: 100%;
    padding-top: 140%;
    background: var(--background-secondary);
    overflow: hidden;
}

.hero-card-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

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

.hero-card-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--background-secondary);
}

.hero-card-initial {
    font-size: 3rem;
    font-weight: 700;
    color: var(--text-tertiary);
    text-transform: uppercase;
}

.hero-card-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: var(--spacing-2xl) var(--spacing-md) var(--spacing-md);
    background: linear-gradient(to top, rgba(0, 0, 0, 0.75) 0%, rgba(0, 0, 0, 0.5) 40%, rgba(0, 0, 0, 0.2) 70%, transparent 100%);
}

.hero-card-title {
    font-size: 1rem;
    font-weight: 600;
    margin: 0;
    line-height: 1.3;
    color: #fff;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* ========================================
   Home Page - Two-Panel Layout
   ======================================== */

.main-panels-section {
    padding: 0;
}

.panels-wrapper {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: var(--spacing-3xl);
}

@media (max-width: 1024px) {
    .panels-wrapper {
        grid-template-columns: 1fr;
    }
}

.panel-left,
.panel-right {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-lg);
    min-width: 0;
}

.panel-section {
    background: var(--background);
}

/* Section Headers */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-md);
}

.section-header-right {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.section-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0;
    letter-spacing: -0.02em;
}

.panel-section > .section-title {
    margin-bottom: var(--spacing-lg);
}

.panel-right .panel-section:not(:first-child) {
    margin-top: calc(var(--spacing-lg) * -0.5);
}

.section-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    transition: color var(--transition);
}

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

/* ========================================
   Featured Series Horizontal Carousel
   ======================================== */

.featured-carousel-section .section-header {
    margin-bottom: var(--spacing-lg);
}

.carousel-nav-buttons {
    display: flex;
    gap: var(--spacing-sm);
}

.carousel-nav-btn {
    width: 36px;
    height: 36px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--background);
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition);
}

.carousel-nav-btn:hover {
    background: var(--background-secondary);
    border-color: var(--border-dark);
}

.carousel-nav-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.featured-carousel-wrapper {
    overflow: hidden;
    position: relative;
    width: calc(100% + 16px);
    padding: 8px;
    margin: -8px;
}

.featured-carousel {
    display: flex;
    gap: var(--spacing-lg);
    transition: transform 0.4s ease-in-out;
}

/* Horizontal Series Card */
.series-card-horizontal {
    flex: 0 0 calc((100% - var(--spacing-lg) * 2) / 3);
    min-height: 140px;
    background: var(--background);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all var(--transition);
}

.series-card-horizontal:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--shadow-lg);
    border-color: var(--border-dark);
}

.series-card-horizontal-link {
    display: flex;
    text-decoration: none;
    color: inherit;
    height: 100%;
}

.series-card-horizontal-cover {
    flex: 0 0 110px;
    position: relative;
    background: var(--background-secondary);
    overflow: hidden;
}

.series-horizontal-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
}

.series-horizontal-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--background-secondary);
}

.series-horizontal-initial {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-tertiary);
    text-transform: uppercase;
}

.series-card-horizontal-content {
    flex: 1;
    padding: var(--spacing-md);
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
}

.series-card-horizontal-title {
    font-size: 0.95rem;
    font-weight: 600;
    margin: 0 0 var(--spacing-sm) 0;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    color: var(--text-primary);
}

.series-card-horizontal-meta {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-xs);
    align-items: center;
    font-size: 0.8rem;
    margin-bottom: var(--spacing-sm);
}

.series-card-horizontal-chapters {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-xs);
}

.chapter-tag {
    font-size: 0.7rem;
    padding: 4px 12px;
    background: var(--background);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    min-width: 90px;
    text-align: center;
    transition: all var(--transition);
    cursor: pointer;
}

.chapter-tag:hover {
    background: var(--background-secondary);
    border-color: var(--text-secondary);
    color: var(--text-primary);
}

@media (max-width: 900px) {
    .series-card-horizontal {
        flex: 0 0 calc((100% - var(--spacing-lg)) / 2);
    }
}

@media (max-width: 600px) {
    .series-card-horizontal {
        flex: 0 0 100%;
    }

    .series-card-horizontal-cover {
        flex: 0 0 100px;
    }
}

/* ========================================
   Latest Updates Carousel
   ======================================== */

.latest-carousel-wrapper {
    overflow: hidden;
    position: relative;
    width: calc(100% + 16px);
    padding: 2px 8px;
    margin: -2px -8px;
}

.latest-carousel {
    display: flex;
    gap: var(--spacing-lg);
    transition: transform 0.4s ease-in-out;
}

.latest-carousel .series-card {
    flex: 0 0 150px;
    width: 150px;
}

@media (max-width: 768px) {
    .latest-carousel .series-card {
        flex: 0 0 130px;
        width: 130px;
    }
}

/* Series Card */
.series-card {
    background: var(--background);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all var(--transition);
}

.series-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--shadow-lg);
    border-color: var(--border-dark);
}

.series-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.series-card-cover {
    position: relative;
    width: 100%;
    padding-top: 0%;
    background: var(--background-secondary);
    overflow: hidden;
}

.series-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.series-card:hover .series-image {
    transform: scale(1.05);
}

.series-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--background-secondary);
}

.series-initial {
    font-size: 3rem;
    font-weight: 700;
    color: var(--text-tertiary);
    text-transform: uppercase;
}

.series-card-tags {
    position: absolute;
    top: var(--spacing-sm);
    left: var(--spacing-sm);
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
}

.series-tag {
    padding: 2px 6px;
    border-radius: var(--radius-sm);
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
}

.tag-featured {
    background: rgba(255, 255, 255, 0.95);
    color: #000;
}

.tag-updated {
    background: rgba(0, 0, 0, 0.85);
    color: #fff;
}

.series-card-content {
    padding: var(--spacing-md);
}

.series-card-title {
    font-size: 0.9rem;
    font-weight: 600;
    margin: 0 0 var(--spacing-sm) 0;
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    min-height: 2.6em;
    color: var(--text-primary);
}

.series-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-xs);
    align-items: center;
    font-size: 0.8rem;
}

.meta-badge {
    padding: 2px 8px;
    border-radius: var(--radius-sm);
    font-size: 0.7rem;
    font-weight: 600;
}

.meta-status {
    background: var(--background-tertiary);
    color: var(--text-secondary);
    border: 1px solid var(--border);
}

.meta-text {
    color: var(--text-secondary);
    font-size: 0.8rem;
}

.series-card-chapters {
    margin-top: var(--spacing-sm);
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
}

.chapter-quick-link {
    font-size: 0.7rem;
    padding: 4px 12px;
    background: var(--background);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    min-width: 90px;
    text-align: center;
    text-decoration: none;
    display: inline-block;
    transition: all var(--transition);
}

.chapter-quick-link:hover {
    background: var(--background-secondary);
    border-color: var(--text-secondary);
    color: var(--text-primary);
}

/* ========================================
   Reviews Carousel
   ======================================== */

.reviews-carousel-wrapper {
    overflow: hidden;
    position: relative;
    width: calc(100% + 16px);
    padding: 8px;
    margin: -8px;
}

.reviews-carousel {
    display: flex;
    gap: var(--spacing-lg);
    transition: transform 0.4s ease-in-out;
}

.reviews-carousel .review-card {
    flex: 0 0 calc((100% - var(--spacing-lg) * 2) / 3);
    min-height: 240px;
}

@media (max-width: 992px) {
    .reviews-carousel .review-card {
        flex: 0 0 calc((100% - var(--spacing-lg)) / 2);
        min-height: 230px;
    }
}

@media (max-width: 600px) {
    .reviews-carousel .review-card {
        flex: 0 0 100%;
        min-height: 220px;
    }
}

.review-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: all var(--transition);
    height: 100%;
}

.review-card:hover {
    border-color: var(--border-dark);
    box-shadow: 0 4px 12px var(--shadow-lg);
    transform: translateY(-2px);
}

.review-card-header {
    position: relative;
    height: 110px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-color: var(--background-secondary);
    display: flex;
    align-items: flex-end;
    text-decoration: none;
    overflow: hidden;
    transition: transform 0.3s ease;
}

.review-card:hover .review-card-header {
    transform: scale(1.05);
}

.review-header-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0.3) 0%,
        rgba(0, 0, 0, 0.6) 50%,
        rgba(0, 0, 0, 0.85) 100%
    );
    z-index: 1;
}

.review-header-content {
    position: relative;
    z-index: 2;
    padding: var(--spacing-md);
    width: 100%;
}

.review-series-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: white;
    margin: 0;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
}

.review-card-content {
    padding: var(--spacing-sm) var(--spacing-md);
}

.review-text {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.review-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-sm) var(--spacing-md);
    background: var(--background-secondary);
    border-top: 1px solid var(--border);
    margin-top: auto;
}

.review-author {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    font-size: 0.85rem;
    color: var(--text-primary);
    font-weight: 500;
}

.review-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border);
}

.review-date {
    font-size: 0.8rem;
    color: var(--text-tertiary);
    font-weight: 400;
}

/* ========================================
   Recent Digest Card
   ======================================== */

.recent-digest-section {
    margin-bottom: var(--spacing-lg);
}

.recent-digest-card {
    display: block;
    text-decoration: none;
    color: inherit;
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: transform var(--transition);
}

.recent-digest-card:hover {
    transform: translateY(-2px);
}

.recent-digest-image {
    position: relative;
    width: 100%;
    height: 280px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.recent-digest-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.7));
}

.recent-digest-content {
    position: relative;
    z-index: 1;
    padding: var(--spacing-xl);
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    color: white;
}

.recent-digest-label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: var(--spacing-xs);
    opacity: 0.9;
}

.recent-digest-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: var(--spacing-sm);
    line-height: 1.3;
}

.recent-digest-user {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
}

.recent-digest-username {
    font-size: 0.9rem;
    font-weight: 600;
}

.recent-digest-badges {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-xs);
}

.recent-digest-badge {
    font-size: 0.7rem;
    padding: 2px 8px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-sm);
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.02em;
}

/* ========================================
   Popular List
   ======================================== */

.top10-list {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.top10-item {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    padding: 0 var(--spacing-sm) 0 0;
    text-decoration: none;
    color: inherit;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    transition: all var(--transition);
}

.top10-item:hover {
    background: var(--background-secondary);
    border-color: var(--border-dark);
    transform: translateY(-1px);
}

.top10-rank {
    flex: 0 0 28px;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-secondary);
    background: var(--background-tertiary);
    border-radius: var(--radius-sm);
}

.top10-item:nth-child(1) .top10-rank,
.top10-item:nth-child(2) .top10-rank,
.top10-item:nth-child(3) .top10-rank {
    background: var(--text-primary);
    color: var(--background);
}

.top10-cover {
    position: relative;
    flex: 0 0 50px;
    width: 50px;
    height: 75px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: var(--background-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.top10-placeholder {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-tertiary);
}

.top10-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.top10-title {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.top10-stats {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.top10-stat {
    display: flex;
    align-items: center;
    gap: 3px;
    font-size: 0.7rem;
    color: var(--text-tertiary);
}

.top10-stat svg {
    opacity: 0.7;
}

/* ========================================
   Recent Comments List
   ======================================== */

.comments-list {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.comment-item {
    padding: var(--spacing-md);
    background: var(--background-secondary);
    border-radius: var(--radius-md);
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

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

.comment-author {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-primary);
}

.comment-avatar {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    object-fit: cover;
}

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

.comment-text {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin: 0;
}

.comment-link {
    font-size: 0.8rem;
    color: var(--text-tertiary);
    text-decoration: none;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    transition: color var(--transition);
}

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

/* Comments Carousel (for home page) */
.comments-carousel-wrapper {
    overflow: hidden;
    position: relative;
}

.comments-carousel {
    display: flex;
    gap: var(--spacing-md);
    transition: transform 0.4s ease-in-out;
}

.comments-carousel .comment-item {
    flex: 0 0 calc((100% - var(--spacing-md)) / 2);
}

@media (max-width: 768px) {
    .comments-carousel .comment-item {
        flex: 0 0 100%;
    }
}

/* ========================================
   Browse & Search Page Styles
   ======================================== */

.browse-page,
.search-results-page {
    padding: var(--spacing-2xl) 0;
}

.page-title {
    margin-bottom: var(--spacing-xl);
}

/* Search Bar and Filters Toggle */
.search-filter-bar {
    display: flex;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
    padding-top: var(--spacing-xl);
    align-items: center;
}

.search-bar-wrapper {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
}

.search-bar-input {
    flex: 1;
    padding: var(--spacing-md) var(--spacing-lg);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    font-size: 1rem;
    background: var(--background);
    color: var(--text-primary);
}

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

.search-btn {
    position: static;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-md);
    background: var(--background);
    color: var(--text-primary);
    border: 2px solid var(--border);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition);
    flex-shrink: 0;
}

.search-btn:hover {
    border-color: var(--primary);
    background: var(--background-secondary);
}

.search-btn svg {
    flex-shrink: 0;
}

.filters-toggle-btn {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-md) var(--spacing-xl);
    background: var(--background);
    color: var(--text-primary);
    border: 2px solid var(--border);
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all var(--transition);
    white-space: nowrap;
}

.filters-toggle-btn:hover {
    border-color: var(--primary);
    background: var(--background-secondary);
}

.filters-toggle-btn.active {
    border-color: var(--primary);
    background: var(--primary);
    color: var(--background);
}

.filters-toggle-btn svg {
    flex-shrink: 0;
}

.sort-tabs {
    display: flex;
    align-items: center;
    gap: var(--spacing-lg);
    padding: var(--spacing-sm) 0;
}

.sort-label {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-secondary);
    white-space: nowrap;
}

.sort-tab {
    background: none;
    border: none;
    padding: var(--spacing-sm) 0;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    position: relative;
    transition: color var(--transition);
    white-space: nowrap;
}

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

.sort-tab.active {
    color: var(--text-primary);
    font-weight: 600;
}

.sort-tab.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--text-primary);
}

@media (max-width: 768px) {
    .search-filter-bar {
        flex-wrap: wrap;
    }

    .search-bar-wrapper {
        flex: 1 1 100%;
        min-width: 100%;
    }

    .search-btn {
        display: none;
    }

    .filters-toggle-btn {
        flex: 1 1 100%;
        justify-content: center;
    }

    .results-info {
        flex-direction: column;
        align-items: flex-start;
    }

    .sort-tabs {
        flex: 1;
        justify-content: flex-start;
    }
}

/* Advanced Filters */
.advanced-filters {
    background: var(--background-secondary);
    padding: var(--spacing-xl);
    border-radius: var(--radius-lg);
    margin-bottom: var(--spacing-2xl);
    border: 1px solid var(--border);
}

.filters-form {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-lg);
}

.filter-section {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.filter-section-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0;
    color: var(--text-primary);
}

.filter-search-input {
    width: 100%;
    padding: var(--spacing-md);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    font-size: 1rem;
    background: var(--background);
    color: var(--text-primary);
}

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

/* Genre Grid */
.genre-section {
    background: var(--background);
    padding: var(--spacing-md);
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
}

.genre-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: var(--spacing-md);
}

@media (max-width: 1024px) {
    .genre-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

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

.genre-column {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
}

/* ========================================
   Consistent Checkbox Styles
   ======================================== */

/* Global checkbox label wrapper styling */
.status-checkbox,
.genre-checkbox,
.badge-checkbox,
label.checkbox-wrapper {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    cursor: pointer;
    padding: 4px;
    border-radius: var(--radius-sm);
    transition: background var(--transition);
}

.status-checkbox:hover,
.genre-checkbox:hover,
.badge-checkbox:hover,
label.checkbox-wrapper:hover {
    background: var(--background-tertiary);
}

/* Global checkbox input styling */
input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: #000000;
    flex-shrink: 0;
}

.status-checkbox input[type="checkbox"],
.genre-checkbox input[type="checkbox"],
.badge-checkbox input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: #000000;
}

.checkbox-text {
    font-size: 0.9rem;
    color: var(--text-primary);
    user-select: none;
}

/* Filter Label */
.filter-label {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-primary);
}

/* ========================================
   Consistent Dropdown/Select Styles
   ======================================== */

/* Global select styling - applies to all selects */
select,
.filter-select,
.form-select,
.bulk-select,
.role-select {
    padding: 8px 12px;
    padding-right: calc(12px + 20px);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-family: var(--font-sans);
    font-size: 0.875rem;
    background: var(--background);
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.15s ease;
    min-width: 100px;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23666' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
    background-size: 12px;
}

select:hover,
.filter-select:hover,
.form-select:hover,
.bulk-select:hover,
.role-select:hover {
    border-color: var(--text-secondary);
    background-color: var(--background-tertiary);
}

select option,
.filter-select option,
.form-select option,
.bulk-select option,
.role-select option {
    font-family: var(--font-sans);
    background: var(--background);
    color: var(--text-primary);
}

select:focus,
.filter-select:focus,
.form-select:focus,
.bulk-select:focus,
.role-select:focus {
    outline: none;
    border-color: #000000;
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.1);
}

/* Filter Row */
.filter-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--spacing-md);
}

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

@media (max-width: 768px) {
    .filter-row,
    .filter-row-2col {
        grid-template-columns: 1fr;
    }
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
}

.filter-input {
    padding: var(--spacing-sm) var(--spacing-md);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    font-size: 0.95rem;
    background: var(--background);
    color: var(--text-primary);
}

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

/* Status Checkboxes */
.status-checkboxes {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-md);
}

/* Filter Actions */
.filter-actions {
    display: flex;
    gap: var(--spacing-md);
    justify-content: flex-start;
}

.btn-search {
    padding: var(--spacing-md) var(--spacing-2xl);
    background: #000;
    color: #fff;
    border: none;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all var(--transition);
}

.btn-search:hover {
    background: #333;
    transform: translateY(-2px);
}

.btn-reset {
    padding: var(--spacing-md) var(--spacing-2xl);
    background: var(--background);
    color: var(--text-primary);
    border: 2px solid var(--border);
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all var(--transition);
}

.btn-reset:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
}

[data-theme="dark"] .btn-search {
    background: #fff;
    color: #000;
}

[data-theme="dark"] .btn-search:hover {
    background: #ccc;
}

/* Results Info */
.results-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-xl);
    gap: var(--spacing-md);
}

.results-count {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin: 0;
}

/* No Results */
.no-results {
    text-align: center;
    padding: var(--spacing-3xl);
    color: var(--text-secondary);
}

.no-results p {
    margin-bottom: var(--spacing-lg);
    font-size: 1.1rem;
}

/* Series Grid */
.series-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: var(--spacing-xl);
}

@media (max-width: 768px) {
    .series-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: var(--spacing-lg);
    }

    .btn-search {
        display: none;
    }

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

/* ========================================
   Auth Pages - Bookmarks & History
   ======================================== */

/* Bookmarks Page */
.series-image {
    width: 100%;
    aspect-ratio: 2/3;
    background: var(--background-tertiary);
    position: relative;
    overflow: hidden;
}

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

.series-image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: var(--text-tertiary);
}

.series-info {
    padding: var(--spacing-lg);
}

.series-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: var(--spacing-sm);
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-height: 1.4;
}

.series-meta {
    display: flex;
    gap: var(--spacing-xs);
    margin-bottom: var(--spacing-sm);
}

.series-bookmarked {
    font-size: 0.875rem;
    color: var(--text-tertiary);
    margin: 0;
}

/* History Page */
.history-list {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-lg);
}

.history-item {
    display: grid;
    grid-template-columns: 100px 1fr auto;
    gap: var(--spacing-lg);
    padding: var(--spacing-lg);
    background: var(--background-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    align-items: center;
    transition: all 0.2s ease;
}

.history-item:hover {
    box-shadow: 0 2px 8px var(--shadow);
}

.history-image {
    width: 100px;
    height: 150px;
    background: var(--background-tertiary);
    border-radius: var(--radius-md);
    overflow: hidden;
    display: block;
}

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

.image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--text-tertiary);
}

.history-content {
    min-width: 0;
}

.series-title-link {
    text-decoration: none;
    color: inherit;
}

.series-title-link:hover .series-title {
    color: var(--text-secondary);
}

.chapter-info {
    margin-bottom: var(--spacing-sm);
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.chapter-number {
    font-weight: 600;
}

.chapter-title {
    color: var(--text-tertiary);
}

.progress-info {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
}

.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 600;
}

.status-badge.completed {
    background: #000000;
    color: white;
}

.status-badge.reading {
    background: #6b7280;
    color: white;
}

.read-time {
    font-size: 0.875rem;
    color: var(--text-tertiary);
}

.history-actions {
    display: flex;
    align-items: center;
}

.btn-continue {
    display: inline-block;
    padding: 10px 20px;
    background: var(--background);
    color: var(--text-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.875rem;
    transition: all 0.15s ease;
    white-space: nowrap;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.btn-continue:hover {
    background: var(--background-secondary);
    border-color: var(--text-secondary);
    color: var(--text-primary);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: var(--spacing-3xl) var(--spacing-2xl);
    background: var(--background-secondary);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
}

@media (max-width: 768px) {
    .history-item {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }

    .history-image {
        width: 100%;
        height: 200px;
    }

    .series-title {
        white-space: normal;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
    }

    .history-actions {
        justify-content: stretch;
    }

    .btn-continue {
        width: 100%;
        text-align: center;
    }
}

/* ========================================
   Admin Navigation
   ======================================== */

.admin-nav {
    background: var(--background-secondary);
    border-bottom: 2px solid var(--border);
    box-shadow: 0 2px 4px var(--shadow);
    margin-bottom: var(--spacing-lg);
    position: sticky;
    top: 86px;
    z-index: 99;
}

.admin-nav-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: var(--spacing-xs);
}

.admin-nav-link {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    padding: var(--spacing-md) var(--spacing-lg);
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    border-bottom: 3px solid transparent;
    transition: all 0.2s ease;
    position: relative;
}

.admin-nav-link:hover {
    color: var(--text-primary);
    background: var(--background-tertiary);
    border-bottom-color: var(--text-secondary);
}

.admin-nav-link.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
    background: var(--background);
}

.admin-nav-link svg {
    flex-shrink: 0;
}

.admin-nav-toggle {
    display: none;
}

@media (max-width: 768px) {
    .admin-nav {
        top: 70px;
    }

    .admin-nav-toggle {
        display: flex;
        align-items: center;
        gap: var(--spacing-sm);
        width: 100%;
        padding: var(--spacing-md);
        background: var(--background);
        border: none;
        color: var(--text-primary);
        font-weight: 500;
        font-size: 0.95rem;
        cursor: pointer;
        transition: all 0.2s ease;
    }

    .admin-nav-toggle:hover {
        background: var(--background-tertiary);
    }

    .admin-nav-toggle-icon {
        transition: transform 0.2s ease;
    }

    .admin-nav-toggle.active .admin-nav-toggle-icon {
        transform: rotate(180deg);
    }

    .admin-nav-menu {
        flex-direction: column;
        gap: 0;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
    }

    .admin-nav-menu.active {
        max-height: 500px;
    }

    .admin-nav-link {
        border-bottom: none;
        border-left: 3px solid transparent;
        padding: var(--spacing-sm) var(--spacing-md);
    }

    .admin-nav-link:hover,
    .admin-nav-link.active {
        border-bottom-color: transparent;
        border-left-color: var(--primary);
    }
}

/* ========================================
   Admin Dashboard
   ======================================== */

.admin-dashboard {
    padding: var(--spacing-lg) 0;
}

.admin-dashboard .page-title {
    margin-bottom: var(--spacing-xs);
    font-size: 1.75rem;
}

.page-subtitle {
    font-size: 1rem;
    color: var(--text-secondary);
    margin: var(--spacing-xs) 0 var(--spacing-lg) 0;
    text-align: center;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
}

.stat-card {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    padding: var(--spacing-lg);
    background-color: var(--background-secondary);
    border-radius: var(--radius-md);
    box-shadow: 0 1px 3px var(--shadow);
}

.stat-icon {
    font-size: 2rem;
}

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

.stat-label {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.admin-actions {
    display: flex;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-lg);
    flex-wrap: wrap;
}

/* Removed - using global admin button styles for consistency */

.admin-section {
    background-color: var(--background-secondary);
    padding: var(--spacing-lg);
    border-radius: var(--radius-md);
    margin-bottom: var(--spacing-lg);
}

.admin-section h2 {
    margin-bottom: var(--spacing-md);
    font-size: 1.25rem;
}

.digest-section h3 {
    font-size: 1rem;
    margin: var(--spacing-md) 0 var(--spacing-sm);
    padding-bottom: var(--spacing-xs);
    border-bottom: 1px solid var(--border);
}

.pending-digests {
    margin-bottom: var(--spacing-lg);
    padding: var(--spacing-md);
    background: rgba(255, 193, 7, 0.1);
    border-radius: var(--radius-md);
    border: 1px solid rgba(255, 193, 7, 0.3);
}

.pending-digests h3 {
    color: #856404;
    border-bottom-color: rgba(255, 193, 7, 0.3);
}

.table-responsive {
    overflow-x: auto;
}

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

.admin-table th,
.admin-table td {
    padding: var(--spacing-sm) var(--spacing-md);
    text-align: left;
    border-bottom: 1px solid var(--border);
    font-size: 0.875rem;
}

.admin-table th {
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 0.8rem;
    background: var(--background-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.admin-table tbody tr:hover {
    background-color: var(--background-tertiary);
}

.admin-table code {
    background: var(--background-tertiary);
    padding: 2px 6px;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.admin-table td .btn-small {
    margin-right: var(--spacing-xs);
}

.admin-table td .btn-small:last-child {
    margin-right: 0;
}

.admin-table td form {
    display: inline-block;
    margin: 0;
}

.admin-table td:last-child {
    text-align: right;
}

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

/* ========================================
   Admin Badges
   ======================================== */

.badge {
    display: inline-block;
    padding: 0.25em 0.6em;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: var(--radius-sm);
    text-transform: uppercase;
}

.badge-pending {
    background-color: #ffc107;
    color: #856404;
}

.badge-approved {
    background-color: #28a745;
    color: white;
}

.badge-rejected {
    background-color: #dc3545;
    color: white;
}

.badge-ongoing {
    background-color: #17a2b8;
    color: white;
}

.badge-completed {
    background-color: #28a745;
    color: white;
}

.badge-hiatus {
    background-color: #ffc107;
    color: #856404;
}

.badge-mini {
    display: inline-block;
    padding: 2px 8px;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.badge-type {
    background: #6b7280;
    color: white;
}

.badge-hidden {
    background: #d1d5db;
    color: #1f2937;
}

.badge-featured {
    background: #374151;
    color: white;
}

.badge-cancelled {
    background: #1f2937;
    color: white;
}

.badge-role-1 {
    background: var(--background-tertiary);
    color: var(--text-secondary);
}

.badge-role-2 {
    background: #6b7280;
    color: white;
}

.badge-role-3 {
    background: #374151;
    color: white;
}

.badge-role-4 {
    background: #1e40af;
    color: white;
}

.badge-role-5 {
    background: #000000;
    color: white;
}

/* ========================================
   Admin Pages Common Styles
   ======================================== */

.admin-page {
    padding: var(--spacing-2xl) 0;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-xl);
}

.admin-header h1 {
    font-size: 1.875rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.admin-header-actions {
    display: flex;
    gap: var(--spacing-md);
    align-items: center;
}

.admin-content {
    background: var(--background-secondary);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.admin-form-card {
    background-color: var(--background-secondary);
    padding: var(--spacing-2xl);
    border-radius: var(--radius-lg);
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: var(--spacing-md);
    padding-top: var(--spacing-sm);
    margin-top: var(--spacing-xl);
}

/* Series form specific overrides */
.admin-content:has(.series-form-layout) {
    background: none;
}

/* ========================================
   Admin Form Styles
   ======================================== */

.form-group {
    margin-bottom: var(--spacing-lg);
}

.form-label {
    display: block;
    font-weight: 500;
    font-size: 0.9rem;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.form-input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background-color: var(--background);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.95rem;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-input:focus {
    outline: none;
    border-color: #000000;
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.05);
}

.form-input:hover {
    border-color: var(--text-secondary);
}

.form-textarea {
    padding: var(--spacing-sm) var(--spacing-md);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background-color: var(--background);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 1rem;
    resize: vertical;
    width: 100%;
}

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

.form-select {
    width: 100%;
}

.form-checkbox {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    cursor: pointer;
    padding: 4px;
    border-radius: var(--radius-sm);
    transition: background var(--transition);
}

.form-checkbox:hover {
    background: var(--background-tertiary);
}

.form-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-lg);
}

@media (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr;
    }

    .admin-form-card {
        padding: var(--spacing-lg);
    }
}

.form-hint {
    display: block;
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-top: var(--spacing-xs);
    margin-bottom: var(--spacing-sm);
    line-height: 1.4;
}

.form-label + .form-hint {
    margin-top: 0.25rem;
}

.form-actions {
    display: flex;
    gap: var(--spacing-md);
    margin-top: var(--spacing-xl);
}

.error-message {
    color: var(--error);
    font-size: 0.875rem;
    margin-top: var(--spacing-xs);
}

/* Two-column form layout */
.series-form-layout {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: var(--spacing-2xl);
    align-items: start;
}

.form-main-panel {
    min-width: 0;
}

.form-sidebar-panel {
    /* No sticky positioning - just normal flow */
}

.form-actions-full {
    grid-column: 1 / -1;
    display: flex;
    gap: var(--spacing-md);
    margin-top: var(--spacing-lg);
    padding: var(--spacing-xl) 0;
}

@media (max-width: 1024px) {
    .series-form-layout {
        grid-template-columns: 1fr;
    }

    .form-sidebar-panel {
        position: static;
    }
}

/* ========================================
   Admin Buttons
   ======================================== */

/* ========================================
   ADMIN BUTTON STYLES - CONSISTENT SIZING
   ======================================== */

/* Primary and Secondary Buttons (Main Actions) */
.btn-primary,
.btn-secondary {
    padding: 10px 20px;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: var(--radius-md);
    border: none;
    cursor: pointer;
    transition: all 0.15s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 38px;
    line-height: 1;
    min-width: 120px;
}

.btn-primary {
    background: var(--background);
    color: var(--text-primary);
    border: 1px solid var(--border);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.btn-primary:hover {
    background: var(--background-secondary);
    border-color: var(--text-secondary);
    color: var(--text-primary);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.btn-primary:active {
    background: var(--background-tertiary);
    border-color: var(--text-secondary);
    color: var(--text-primary);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.btn-secondary {
    background: var(--background);
    color: var(--text-primary);
    border: 1px solid var(--border);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.btn-secondary:hover {
    background: var(--background-secondary);
    border-color: var(--text-secondary);
    color: var(--text-primary);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.btn-secondary:active {
    background: var(--background-tertiary);
    border-color: var(--text-secondary);
    color: var(--text-primary);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.05);
}

.btn-secondary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Small Buttons (Table Actions, Inline Actions) */
.btn-small {
    padding: 8px 14px;
    font-size: 0.875rem;
    border-radius: var(--radius-sm);
    background: var(--background);
    border: 1px solid var(--border);
    color: var(--text-primary);
    text-decoration: none;
    display: inline-block;
    cursor: pointer;
    transition: all 0.15s ease;
    font-weight: 500;
    white-space: nowrap;
    min-width: 70px;
    text-align: center;
    height: 34px;
    line-height: 1;
    vertical-align: middle;
}

.btn-small:hover {
    background: var(--background-secondary);
    color: var(--text-primary);
    border-color: var(--text-secondary);
}

.btn-small.btn-success {
    background-color: var(--background);
    color: var(--text-primary);
    border-color: var(--border);
}

.btn-small.btn-success:hover {
    background-color: var(--background-secondary);
    color: var(--text-primary);
    border-color: var(--text-secondary);
}

.btn-small.btn-danger,
.btn-danger {
    color: var(--text-primary);
    border-color: var(--border);
    background: var(--background);
}

.btn-small.btn-danger:hover,
.btn-danger:hover {
    background: var(--background-secondary);
    color: var(--text-primary);
    border-color: var(--text-secondary);
}

.btn-small.btn-clear {
    min-width: 60px;
    padding: 6px 12px;
}

.btn-full-width {
    width: 100%;
    margin-top: var(--spacing-sm);
}

/* Mobile Admin Table and Button Fixes */
@media (max-width: 768px) {
    .admin-table {
        font-size: 0.8rem;
    }

    .admin-table th,
    .admin-table td {
        padding: var(--spacing-xs) var(--spacing-sm);
    }

    .admin-table td[style*="white-space: nowrap"] {
        white-space: normal !important;
    }

    .admin-table td .btn-small {
        display: block;
        width: 100%;
        margin-bottom: var(--spacing-xs);
        margin-right: 0;
        font-size: 0.75rem;
        padding: 6px 10px;
        min-width: unset;
    }

    .admin-table td .btn-small:last-child {
        margin-bottom: 0;
    }

    .admin-table td form {
        display: block;
        margin-bottom: var(--spacing-xs);
    }

    .admin-table td form:last-child {
        margin-bottom: 0;
    }

    .table-responsive {
        overflow-x: visible;
    }

    /* Admin header breadcrumb font size fix */
    .admin-header h1 {
        font-size: 1.5rem;
    }

    .admin-header p {
        font-size: 0.8rem;
    }

    /* Digest favorites navigation buttons - prevent overflow */
    .digest-favorites-nav {
        display: none !important;
    }

    .digest-favorites-wrapper {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .digest-favorites-track {
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
    }

    .digest-favorite-card {
        scroll-snap-align: start;
        min-width: 140px;
    }
}

/* Action Buttons (Series Cards, Medium Actions) */
.btn-action {
    padding: 8px 14px;
    font-size: 0.875rem;
    border-radius: var(--radius-sm);
    background: var(--background);
    border: 1px solid var(--border);
    color: var(--text-primary);
    text-decoration: none;
    display: inline-block;
    cursor: pointer;
    transition: all 0.15s ease;
    font-weight: 500;
    height: 34px;
    line-height: 1;
    vertical-align: middle;
    min-width: 90px;
    text-align: center;
}

.btn-action:hover {
    background: var(--background-secondary);
    color: var(--text-primary);
    border-color: var(--text-secondary);
}

.btn-primary-action {
    background: var(--background);
    color: var(--text-primary);
    border-color: var(--border);
}

.btn-primary-action:hover {
    background: var(--background-secondary);
    color: var(--text-primary);
    border-color: var(--text-secondary);
}

.btn-danger-action {
    background: var(--background);
    color: var(--text-primary);
    border-color: var(--border);
}

.btn-danger-action:hover {
    background: var(--background-secondary);
    color: var(--text-primary);
    border-color: var(--text-secondary);
}

.btn-edit {
    background: var(--background);
    color: var(--text-primary);
    border-color: var(--border);
}

.btn-edit:hover {
    background: var(--background-secondary);
    color: var(--text-primary);
    border-color: var(--text-secondary);
}

.btn-clear {
    background: transparent;
    color: var(--text-secondary);
}

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

/* ========================================
   Admin Series Index
   ======================================== */

.series-cards-grid {
    display: grid;
    gap: var(--spacing-md);
}

.series-card-admin {
    background: var(--background-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
}

.series-card-admin:hover {
    box-shadow: 0 2px 8px var(--shadow-lg);
}

.series-card-checkbox {
    padding: var(--spacing-sm) var(--spacing-md) 0 var(--spacing-md);
}

.series-checkbox {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.series-card-header {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: var(--spacing-md);
    padding: var(--spacing-md);
    align-items: start;
}

.bulk-actions-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-md) var(--spacing-lg);
    background: var(--background-secondary);
    border: 2px solid #000000;
    border-radius: var(--radius-md);
    margin-bottom: var(--spacing-lg);
    box-shadow: 0 2px 8px var(--shadow);
}

.bulk-actions-left {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
}

.bulk-actions-right {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.bulk-selected-count {
    font-weight: 600;
    font-size: 1rem;
}

.bulk-select {
    min-width: 180px;
    height: 38px;
}

.series-images {
    display: flex;
    gap: var(--spacing-sm);
}

.series-thumbnail {
    width: 60px;
    height: 90px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    box-shadow: 0 2px 4px var(--shadow);
}

.series-thumbnail-placeholder {
    width: 60px;
    height: 90px;
    background: var(--background-tertiary);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--text-tertiary);
}

.series-cover-thumb {
    width: 90px;
    height: 60px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    box-shadow: 0 2px 4px var(--shadow);
}

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

.series-title-info h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: var(--spacing-sm);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.series-badges {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-xs);
    margin-bottom: var(--spacing-sm);
}

.series-metadata {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-xs);
}

.meta-tag {
    font-size: 0.85rem;
    color: var(--text-secondary);
    padding: 2px 8px;
    background: var(--background-tertiary);
    border-radius: var(--radius-sm);
}

.series-stats {
    display: flex;
    gap: var(--spacing-lg);
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 70px;
}

.series-card-actions {
    display: flex;
    gap: var(--spacing-sm);
    padding: 0 var(--spacing-md) var(--spacing-md);
    flex-wrap: wrap;
}

.btn-expand-series {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 8px 14px;
    background: var(--background);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-weight: 500;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.15s ease;
    height: 34px;
    line-height: 1;
    min-width: 90px;
}

.btn-expand-series:hover {
    background: var(--background-secondary);
    color: var(--text-primary);
    border-color: var(--text-secondary);
}

.btn-expand-series .expand-icon {
    transition: transform 0.2s ease;
}

.btn-expand-series.expanded .expand-icon {
    transform: rotate(180deg);
}

.chapters-expandable {
    border-top: 1px solid var(--border);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.chapters-expandable.expanded {
    max-height: 2000px;
}

.chapters-container {
    padding: var(--spacing-md);
    background: var(--background-tertiary);
}

.chapters-list-admin {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.chapter-item-admin {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-sm) var(--spacing-md);
    background: var(--background);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
}

.chapter-item-admin:hover {
    background: var(--background-secondary);
}

.chapter-actions-admin {
    display: flex;
    gap: var(--spacing-sm);
}

.chapters-loading {
    color: var(--text-secondary);
    text-align: center;
    padding: var(--spacing-md);
}

.no-series {
    text-align: center;
    padding: var(--spacing-2xl);
    color: var(--text-secondary);
}

.no-series p {
    margin-bottom: var(--spacing-lg);
    font-size: 1.1rem;
}

/* ========================================
   COMPACT SERIES LIST DESIGN
   ======================================== */

/* Filter Bar */
.series-filter-bar {
    background: var(--background-secondary);
    padding: var(--spacing-md);
    border-radius: var(--radius-md);
    margin-bottom: var(--spacing-lg);
    border: 1px solid var(--border);
}

.filter-search {
    position: relative;
    margin-bottom: var(--spacing-sm);
}

.filter-search svg {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    pointer-events: none;
}

.search-input {
    width: 100%;
    padding: 10px 10px 10px 38px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--background);
    color: var(--text-primary);
    font-size: 0.875rem;
    transition: all 0.15s ease;
}

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

.filter-controls {
    display: flex;
    gap: var(--spacing-sm);
    flex-wrap: wrap;
    align-items: center;
}

.filter-select {
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--background);
    color: var(--text-primary);
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.15s ease;
    min-width: 130px;
}

.filter-select:focus {
    outline: none;
    border-color: var(--primary);
}

.select-all-wrapper {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    padding: 8px 12px;
    background: var(--background);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.15s ease;
    height: 38px;
    box-sizing: border-box;
}

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

.select-all-checkbox {
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.select-all-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-primary);
    cursor: pointer;
    margin: 0;
    user-select: none;
}

/* Compact Series List */
.series-list-compact {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.series-item-compact {
    background: var(--background-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: all 0.2s ease;
}

.series-item-compact:hover {
    box-shadow: 0 2px 8px var(--shadow-lg);
}

.series-compact-main {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    padding: var(--spacing-sm) var(--spacing-md);
}

.series-compact-main .series-checkbox {
    width: 18px;
    height: 18px;
    cursor: pointer;
    flex-shrink: 0;
}

/* Compact Images */
.series-images-compact {
    display: flex;
    gap: var(--spacing-sm);
    flex-shrink: 0;
}

.image-wrapper {
    position: relative;
}

.image-label {
    position: absolute;
    top: 2px;
    left: 2px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    font-size: 0.65rem;
    padding: 2px 4px;
    border-radius: 3px;
    font-weight: 500;
    z-index: 1;
}

.series-img-compact {
    width: 50px;
    height: 70px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    box-shadow: 0 1px 3px var(--shadow);
    display: block;
}

.series-img-placeholder {
    width: 50px;
    height: 70px;
    background: var(--background-tertiary);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: var(--text-tertiary);
    font-weight: 600;
}

/* Compact Info */
.series-info-compact {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
}

.series-title-compact {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    flex-wrap: wrap;
}

.series-title-compact h3 {
    font-size: 0.9rem;
    font-weight: 600;
    margin: 0;
    flex: 1;
    min-width: 200px;
}

.series-badges-compact {
    display: flex;
    gap: var(--spacing-xs);
    flex-wrap: wrap;
}

.series-stats-compact {
    display: flex;
    gap: var(--spacing-md);
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.stat-compact {
    display: flex;
    align-items: center;
    gap: 4px;
}

.stat-compact svg {
    flex-shrink: 0;
}

/* Compact Actions */
.series-actions-compact {
    display: flex;
    gap: var(--spacing-xs);
    flex-shrink: 0;
    align-items: center;
}

.btn-icon-compact {
    width: 34px;
    height: 34px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: auto;
}

.btn-icon-compact .expand-icon {
    transition: transform 0.2s ease;
}

.btn-icon-compact.expanded .expand-icon {
    transform: rotate(180deg);
}

.no-results-filter {
    text-align: center;
    padding: var(--spacing-2xl);
    color: var(--text-secondary);
    background: var(--background-secondary);
    border-radius: var(--radius-md);
    border: 1px dashed var(--border);
}

.no-results-filter p {
    font-size: 1rem;
    margin: 0;
}

/* Responsive */
@media (max-width: 768px) {
    .series-compact-main {
        flex-wrap: wrap;
    }

    .series-actions-compact {
        width: 100%;
        justify-content: flex-end;
    }

    .series-title-compact h3 {
        min-width: 150px;
        font-size: 0.9rem;
    }

    .filter-controls {
        flex-direction: column;
    }

    .filter-select {
        width: 100%;
    }
}

@media (max-width: 768px) {
    .series-card-header {
        grid-template-columns: 1fr;
    }

    .series-images {
        justify-content: center;
    }

    .series-stats {
        justify-content: center;
    }

    .series-card-actions {
        flex-direction: column;
    }

    .btn-action {
        width: 100%;
        text-align: center;
    }
}

/* ========================================
   Join Us Page
   ======================================== */

.join-us-container {
    padding: var(--spacing-2xl) 0;
    max-width: 1000px;
}

.join-us-content {
    text-align: center;
}

.join-us-title {
    font-size: 2.25rem;
    font-weight: 700;
    margin-bottom: var(--spacing-xl);
    color: var(--text-primary);
}

.join-us-text {
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--text-secondary);
    margin-bottom: var(--spacing-2xl);
    text-align: left;
}

.join-us-text p {
    margin-bottom: var(--spacing-md);
}

.join-us-text p:last-child {
    margin-bottom: 0;
}

.join-us-text h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-top: var(--spacing-xl);
    margin-bottom: var(--spacing-md);
}

.join-us-text h3:first-child {
    margin-top: 0;
}

.join-us-text ul,
.join-us-text ol {
    margin-bottom: var(--spacing-md);
    padding-left: var(--spacing-2xl);
}

.join-us-text ul {
    list-style-type: disc;
}

.join-us-text ol {
    list-style-type: decimal;
}

.join-us-text li {
    margin-bottom: var(--spacing-xs);
    color: var(--text-secondary);
}

.join-us-text li:last-child {
    margin-bottom: 0;
}

.join-us-text a {
    color: var(--primary);
    text-decoration: underline;
}

.join-us-text a:hover {
    color: var(--accent);
}

.join-us-text hr {
    margin: var(--spacing-xl) 0;
    border: none;
    border-top: 1px solid var(--border);
}

.join-us-text strong {
    font-weight: 600;
    color: var(--text-primary);
}

.join-us-text em {
    font-style: italic;
}

.join-us-actions {
    display: flex;
    justify-content: center;
    margin-top: var(--spacing-2xl);
}

.btn-discord {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-md) var(--spacing-2xl);
    background: var(--background);
    color: var(--text-primary);
    text-decoration: none;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 1.125rem;
    transition: all var(--transition);
    box-shadow: 0 2px 4px var(--shadow);
}

.btn-discord:hover {
    background: var(--background-secondary);
    color: var(--text-primary);
    border-color: var(--text-secondary);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px var(--shadow-lg);
}

.btn-discord svg {
    flex-shrink: 0;
}

@media (max-width: 768px) {
    .join-us-container {
        padding: var(--spacing-2xl) var(--spacing-md);
    }

    .join-us-title {
        font-size: 2rem;
    }

    .join-us-text {
        font-size: 1rem;
    }

    .btn-discord {
        font-size: 1rem;
        padding: var(--spacing-sm) var(--spacing-xl);
    }
}

/* ========================================
   Admin Join Us Edit Page
   ======================================== */

.join-us-edit-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-2xl);
    margin-top: var(--spacing-xl);
}

.join-us-edit-editor {
    position: relative;
}

.join-us-edit-preview {
    position: sticky;
    top: var(--spacing-xl);
    height: fit-content;
    background: var(--background-secondary);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    overflow: hidden;
}

.preview-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--spacing-lg);
    background: var(--background);
    border-bottom: 1px solid var(--border);
}

.preview-header h3 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
}

.preview-badge {
    font-size: 0.75rem;
    padding: var(--spacing-xs) var(--spacing-sm);
    background: var(--accent);
    color: white;
    border-radius: var(--radius-sm);
    font-weight: 600;
}

.preview-content-wrapper {
    padding: var(--spacing-2xl);
    text-align: center;
}

.preview-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: var(--spacing-xl);
    color: var(--text-primary);
}

.preview-text {
    font-size: 1.125rem;
    line-height: 1.8;
    color: var(--text-secondary);
    margin-bottom: var(--spacing-2xl);
    text-align: left;
    white-space: pre-wrap;
}

.preview-actions {
    display: flex;
    justify-content: center;
    margin-top: var(--spacing-2xl);
}

@media (max-width: 1200px) {
    .join-us-edit-layout {
        grid-template-columns: 1fr;
    }

    .join-us-edit-preview {
        position: relative;
        top: 0;
    }

    .preview-title {
        font-size: 1.5rem;
    }

    .preview-text {
        font-size: 1rem;
    }
}

/* Join Us Form (Admin Edit Page) */
.join-us-form {
    max-width: 100%;
}

.join-us-form .form-section {
    background: var(--background-secondary);
    padding: var(--spacing-xl);
    border-radius: var(--radius-lg);
    margin-bottom: var(--spacing-lg);
}

.join-us-form .form-section h2 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: var(--spacing-xs);
    color: var(--text-primary);
}

.join-us-form .section-note {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: var(--spacing-lg);
}

.join-us-form .form-group {
    margin-bottom: var(--spacing-lg);
}

.join-us-form .form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: var(--spacing-xs);
    color: var(--text-primary);
}

.join-us-form textarea {
    width: 100%;
    padding: var(--spacing-sm) var(--spacing-md);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--background);
    color: var(--text-primary);
    font-size: 1rem;
    resize: vertical;
    font-family: inherit;
    line-height: 1.5;
}

.join-us-form textarea:focus {
    outline: none;
    border-color: var(--accent);
}

.join-us-form .form-group small {
    display: block;
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-top: var(--spacing-xs);
}

.join-us-form .form-actions {
    display: flex;
    gap: var(--spacing-md);
    justify-content: flex-start;
}

.join-us-form .editor-toolbar {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: var(--spacing-xs);
    background: var(--background-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    margin-bottom: var(--spacing-xs);
}

.join-us-form .toolbar-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: none;
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition);
}

.join-us-form .toolbar-btn:hover {
    background: var(--background);
    color: var(--text-primary);
}

.join-us-form .toolbar-btn:active {
    background: #000000;
    color: white;
}

.join-us-form .toolbar-divider {
    width: 1px;
    height: 20px;
    background: var(--border);
    margin: 0 4px;
}

/* ========================================
   Admin Chapter Create
   ======================================== */

.folder-item {
    width: 100%;
    text-align: left;
    padding: var(--spacing-md);
    background: var(--background-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: 0.95rem;
    color: var(--text-primary);
    transition: all 0.2s ease;
}

.folder-item:hover {
    background: var(--background-primary);
    border-color: var(--text-secondary);
}

.preview-image-item.dragging {
    opacity: 0.5;
}

.preview-image-item.drag-over {
    border-color: #000000 !important;
    border-width: 3px !important;
}

.delete-preview-btn:hover {
    background: rgba(200, 0, 0, 0.9) !important;
    transform: scale(1.1);
}

/* ========================================
   Admin Digest Management
   ======================================== */

.digest-list-compact {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.digest-item-compact {
    background: var(--background-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: all 0.2s ease;
}

.digest-item-compact:hover {
    box-shadow: 0 2px 8px var(--shadow-lg);
}

.digest-item-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--spacing-md);
    gap: var(--spacing-md);
}

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

.digest-item-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin: 0 0 var(--spacing-xs) 0;
    color: var(--text-primary);
}

.digest-item-meta {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    flex-wrap: wrap;
}

.digest-meta-text {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.digest-item-actions {
    display: flex;
    gap: var(--spacing-xs);
    flex-shrink: 0;
}

/* ========================================
   Admin User Management
   ======================================== */

.user-list-compact {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.user-item-compact {
    background: var(--background-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: all 0.2s ease;
}

.user-item-compact:hover {
    box-shadow: 0 2px 8px var(--shadow-lg);
}

.user-item-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--spacing-md);
    gap: var(--spacing-md);
}

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

.user-item-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin: 0 0 var(--spacing-xs) 0;
    color: var(--text-primary);
}

.user-item-meta {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    flex-wrap: wrap;
}

.user-meta-text {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.user-item-actions {
    display: flex;
    gap: var(--spacing-xs);
    flex-shrink: 0;
    align-items: center;
}

/* ========================================
   Admin Genre Management
   ======================================== */

.genre-form-card {
    background: var(--background-secondary);
    border-radius: var(--radius-md);
    padding: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
}

.genre-form-card h2 {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0 0 var(--spacing-md) 0;
}

.genre-form {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.genre-form .form-group {
    flex: 1;
}

.genre-list-compact {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.genre-item-compact {
    background: var(--background-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: all 0.2s ease;
}

.genre-item-compact:hover {
    box-shadow: 0 2px 8px var(--shadow-lg);
}

.genre-item-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--spacing-md);
    gap: var(--spacing-md);
}

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

.genre-item-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin: 0 0 var(--spacing-xs) 0;
    color: var(--text-primary);
}

.genre-item-meta {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    flex-wrap: wrap;
}

.genre-meta-text {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.genre-item-actions {
    display: flex;
    gap: var(--spacing-xs);
    flex-shrink: 0;
}

.genre-form button {
    align-self: flex-start;
}

/* ========================================
   Admin Chapter Management
   ======================================== */

.chapter-list-compact {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.chapter-item-compact {
    background: var(--background-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: all 0.2s ease;
}

.chapter-item-compact:hover {
    box-shadow: 0 2px 8px var(--shadow-lg);
}

.chapter-item-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--spacing-md);
    gap: var(--spacing-md);
}

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

.chapter-item-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin: 0 0 var(--spacing-xs) 0;
    color: var(--text-primary);
}

.chapter-volume {
    color: var(--primary);
    font-weight: 700;
}

.chapter-title-text {
    font-weight: 400;
    color: var(--text-secondary);
}

.chapter-item-meta {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    flex-wrap: wrap;
}

.chapter-meta-text {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.chapter-item-actions {
    display: flex;
    gap: var(--spacing-xs);
    flex-shrink: 0;
    align-items: center;
}

.edit-form-row {
    background: var(--background-tertiary);
}

.inline-edit-form {
    padding: var(--spacing-md);
}

.inline-edit-form .form-input {
    max-width: 400px;
}

/* ========================================
   Admin Digest Form Styles
   ======================================== */

.digest-form .series-selector {
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: var(--spacing-sm);
}

.digest-form .series-checkbox {
    display: block !important;
    width: 100% !important;
    height: auto !important;
    padding: var(--spacing-xs);
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: background-color 0.15s ease;
}

.digest-form .series-checkbox:hover {
    background: var(--background-tertiary);
}

.digest-form .series-checkbox input[type="checkbox"] {
    display: none;
}

.digest-form .series-checkbox input:checked + .series-label {
    background: #000000;
    color: white;
}

.digest-form .series-label {
    display: flex !important;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-xs) var(--spacing-sm);
    border-radius: var(--radius-sm);
    min-width: 0;
    width: 100%;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.digest-form .series-thumb {
    width: 32px !important;
    min-width: 32px;
    height: 44px !important;
    object-fit: cover;
    border-radius: var(--radius-sm);
    flex-shrink: 0;
    display: block;
}

.digest-form .series-thumb-placeholder {
    width: 32px !important;
    min-width: 32px;
    height: 44px !important;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--background-tertiary);
    border-radius: var(--radius-sm);
    font-weight: bold;
    flex-shrink: 0;
    font-size: 1rem;
}

.digest-form .series-title {
    font-size: 0.9rem !important;
    flex: 1;
    min-width: 0;
    color: var(--text-primary);
    word-wrap: break-word;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: block !important;
}

.digest-form .series-checkbox input:checked + .series-label .series-title {
    color: white;
}

/* Editor Toolbar */
.digest-form .editor-toolbar {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 8px 8px 0 8px;
    background: var(--background-tertiary);
    border: 1px solid var(--border);
    border-bottom: none;
    border-radius: var(--radius-md) var(--radius-md) 0 0;
}

.digest-form .toolbar-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition);
}

.digest-form .toolbar-btn:hover {
    background: var(--background);
    color: var(--text-primary);
}

.digest-form .toolbar-btn:active {
    background: #000000;
    color: white;
}

.digest-form .toolbar-divider {
    width: 1px;
    height: 20px;
    background: var(--border);
    margin: 0 4px;
}

.digest-form textarea#content {
    border-radius: 0 0 var(--radius-md) var(--radius-md);
    margin-top: -8px;
    min-height: 400px;
    max-height: 400px;
}

/* File Input Styling */
.digest-form input[type="file"] {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background-color: var(--background);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.95rem;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    cursor: pointer;
}

.digest-form input[type="file"]:hover {
    border-color: var(--text-secondary);
}

.digest-form input[type="file"]:focus {
    outline: none;
    border-color: #000000;
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.05);
}

/* Date Input Styling */
.digest-form input[type="date"],
.digest-form input[type="datetime-local"] {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background-color: var(--background);
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 0.95rem;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    cursor: pointer;
}

.digest-form input[type="date"]:hover,
.digest-form input[type="datetime-local"]:hover {
    border-color: var(--text-secondary);
}

.digest-form input[type="date"]:focus,
.digest-form input[type="datetime-local"]:focus {
    outline: none;
    border-color: #000000;
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.05);
}

/* Image Previews */
.digest-form .current-images {
    margin-bottom: var(--spacing-lg);
}

.digest-form .current-images label {
    display: block;
    font-weight: 600;
    margin-bottom: var(--spacing-sm);
}

.digest-form .image-preview-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-sm);
}

.digest-form .image-preview {
    aspect-ratio: 1;
    border-radius: var(--radius-md);
    overflow: hidden;
    background: var(--background-tertiary);
}

.digest-form .image-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ========================================
   Flash Messages
   ======================================== */

.flash-message {
    padding: var(--spacing-md);
    border-radius: var(--radius-md);
    margin-bottom: var(--spacing-lg);
    font-weight: 500;
}

.flash-success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #6ee7b7;
}

.flash-error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

/* ========================================
   Pagination
   ======================================== */

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: var(--spacing-sm);
    margin-top: var(--spacing-2xl);
    padding: var(--spacing-lg) 0;
}

.pagination-link,
.pagination-page,
.pagination-current {
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    text-decoration: none;
    font-weight: 500;
    transition: all var(--transition);
    font-size: 0.875rem;
    height: 34px;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.pagination-link,
.pagination-page {
    background: var(--background);
    color: var(--text-primary);
    border: 1px solid var(--border);
}

.pagination-link:hover,
.pagination-page:hover {
    background: var(--background-tertiary);
    border-color: var(--text-secondary);
}

.pagination-current {
    background: #000000;
    color: white;
    border: 1px solid #000000;
}

.pagination-pages {
    display: flex;
    gap: 4px;
}

.pagination-info {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

/* ========================================
   Animations
   ======================================== */

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

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