/*
Theme Name: Manjatak Hybrid
Description: Manga reader theme: the dark red & gold Manjatak design merged with the full Manga Studio toolset (reader, library, ads, SEO, languages) and a Site Control panel to edit everything.
Version: 7.0
License: GPL v2 or later
Text Domain: manga-theme
*/

/* ============================================
   CSS RESET & BASE VARIABLES - Windows 11 Fluent Design
   ============================================ */
:root {
    /* Windows 11 Colors */
    --primary: #0078d4;
    --primary-dark: #106ebe;
    --primary-light: #3b9eff;
    --primary-bg: #deecf9;
    --accent: #0078d4;
    --accent-hover: #106ebe;
    
    /* Mica Effect Colors - Light Mode */
    --mica-bg: rgba(243, 242, 241, 0.85);
    --mica-overlay: rgba(255, 255, 255, 0.5);
    --surface: rgba(255, 255, 255, 0.7);
    --surface-alt: rgba(255, 255, 255, 0.5);
    --card-bg: rgba(255, 255, 255, 0.85);
    --card-border: rgba(0, 0, 0, 0.08);
    
    /* Text Colors */
    --text: #202020;
    --text-light: #605e5c;
    --text-disabled: #a19f9d;
    --white: #ffffff;
    
    /* Shadows - Windows 11 Style */
    --shadow-sm: 0 1.6px 3.6px 0 rgba(0, 0, 0, 0.132), 0 0.3px 0.9px 0 rgba(0, 0, 0, 0.108);
    --shadow-md: 0 3.2px 7.2px 0 rgba(0, 0, 0, 0.132), 0 0.6px 1.8px 0 rgba(0, 0, 0, 0.108);
    --shadow-lg: 0 6.4px 14.4px 0 rgba(0, 0, 0, 0.132), 0 1.2px 3.6px 0 rgba(0, 0, 0, 0.108);
    --shadow-xl: 0 12.8px 28.8px 0 rgba(0, 0, 0, 0.132), 0 2.4px 7.2px 0 rgba(0, 0, 0, 0.108);
    
    /* Radius - Windows 11 Style */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    
    /* Transitions */
    --transition: all 0.2s cubic-bezier(0.2, 0.9, 0.4, 1.1);
    
    /* Backdrop Blur */
    --blur-amount: 24px;
}

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

body {
    font-family: 'Segoe UI', 'Segoe UI Variable', -apple-system, BlinkMacSystemFont, 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.5;
    color: var(--text);
    background: #f3f2f1;
    transition: background 0.3s, color 0.3s;
    position: relative;
}

/* Mica Background Effect - Light Mode */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" opacity="0.03"><path d="M20,20 L80,20 L80,80 L20,80 Z" fill="none" stroke="%230078d4" stroke-width="0.5"/><circle cx="50" cy="50" r="30" fill="none" stroke="%230078d4" stroke-width="0.5"/><path d="M20,50 L80,50 M50,20 L50,80" stroke="%230078d4" stroke-width="0.5" opacity="0.5"/></svg>');
    background-repeat: repeat;
    background-size: 30px 30px;
    z-index: -2;
    pointer-events: none;
}

body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(ellipse at 20% 30%, rgba(0, 120, 212, 0.03), transparent 50%);
    backdrop-filter: blur(0px);
    z-index: -1;
    pointer-events: none;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ============================================
   TYPOGRAPHY - Windows 11 Style
   ============================================ */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.3;
    letter-spacing: -0.01em;
}

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

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

/* ============================================
   DARK MODE - Windows 11 Dark Theme with Mica
   ============================================ */
body.dark-mode {
    --mica-bg: rgba(32, 32, 32, 0.85);
    --mica-overlay: rgba(0, 0, 0, 0.3);
    --surface: rgba(32, 32, 32, 0.7);
    --surface-alt: rgba(32, 32, 32, 0.5);
    --card-bg: rgba(32, 32, 32, 0.85);
    --card-border: rgba(255, 255, 255, 0.08);
    --text: #ffffff;
    --text-light: #d0d0d0;
    --text-disabled: #808080;
    background: #1c1c1c;
}

body.dark-mode::before {
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" opacity="0.02"><path d="M20,20 L80,20 L80,80 L20,80 Z" fill="none" stroke="%230078d4" stroke-width="0.5"/><circle cx="50" cy="50" r="30" fill="none" stroke="%230078d4" stroke-width="0.5"/><path d="M20,50 L80,50 M50,20 L50,80" stroke="%230078d4" stroke-width="0.5" opacity="0.3"/></svg>');
}

body.dark-mode .site-header,
body.dark-mode .main-nav {
    background: rgba(32, 32, 32, 0.85);
    backdrop-filter: blur(var(--blur-amount));
    border-bottom-color: rgba(255, 255, 255, 0.05);
}

body.dark-mode .manga-item,
body.dark-mode .widget,
body.dark-mode .alphabet-filter,
body.dark-mode .single-manga .manga-header,
body.dark-mode .single-manga .chapters-section,
body.dark-mode .chapter-reader,
body.dark-mode .featured-section,
body.dark-mode .pagination a,
body.dark-mode .pagination span,
body.dark-mode .sort-btn,
body.dark-mode .goto-page-container,
body.dark-mode .settings-panel,
body.dark-mode .chapter-card-link {
    background: rgba(32, 32, 32, 0.7);
    backdrop-filter: blur(var(--blur-amount));
    border-color: rgba(255, 255, 255, 0.08);
}

body.dark-mode .search-modal-content,
body.dark-mode .settings-panel {
    background: rgba(32, 32, 32, 0.9);
}

/* ============================================
   SEPIA MODE
   ============================================ */
body.sepia-mode {
    --mica-bg: rgba(250, 240, 225, 0.85);
    --surface: rgba(250, 240, 225, 0.7);
    --card-bg: rgba(250, 240, 225, 0.85);
    --text: #5b4636;
    --text-light: #8b7355;
    background: #f4ecd8;
}

body.sepia-mode .site-header,
body.sepia-mode .main-nav {
    background: rgba(74, 55, 41, 0.9);
}

body.sepia-mode .manga-item,
body.sepia-mode .widget,
body.sepia-mode .alphabet-filter,
body.sepia-mode .single-manga .manga-header,
body.sepia-mode .single-manga .chapters-section,
body.sepia-mode .chapter-reader,
body.sepia-mode .featured-section {
    background: rgba(250, 240, 225, 0.8);
}

/* ============================================
   HEADER - Windows 11 Style
   ============================================ */
.site-header {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(var(--blur-amount));
    padding: 12px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--card-border);
    transition: var(--transition);
}

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

.site-title {
    font-size: 22px;
    font-weight: 600;
    letter-spacing: -0.5px;
}

.site-title a {
    color: var(--text);
    transition: var(--transition);
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.site-description {
    color: var(--text-light);
    font-size: 12px;
    margin-top: 4px;
}

/* Header Actions */
.header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Animated Dark Mode Toggle */
.dark-mode-toggle {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    margin: 0;
    width: 48px;
    height: 28px;
    position: relative;
    transition: var(--transition);
}

.toggle-track {
    width: 48px;
    height: 28px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 34px;
    position: relative;
    transition: all 0.3s cubic-bezier(0.2, 0.9, 0.4, 1.1);
    backdrop-filter: blur(2px);
}

body.dark-mode .toggle-track {
    background: rgba(0, 120, 212, 0.3);
}

.toggle-thumb {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 24px;
    height: 24px;
    background: white;
    border-radius: 50%;
    transition: all 0.3s cubic-bezier(0.2, 0.9, 0.4, 1.1);
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

body.dark-mode .toggle-thumb {
    transform: translateX(20px);
    background: var(--primary);
}

.toggle-thumb svg {
    position: absolute;
    transition: all 0.3s cubic-bezier(0.2, 0.9, 0.4, 1.1);
}

.sun-icon {
    opacity: 1;
    transform: scale(1) rotate(0deg);
    color: #f59e0b;
}

.moon-icon {
    opacity: 0;
    transform: scale(0.5) rotate(-90deg);
    color: white;
}

body.dark-mode .sun-icon {
    opacity: 0;
    transform: scale(0.5) rotate(90deg);
}

body.dark-mode .moon-icon {
    opacity: 1;
    transform: scale(1) rotate(0deg);
}

.dark-mode-toggle:hover .toggle-track {
    background: rgba(0, 0, 0, 0.3);
}

body.dark-mode .dark-mode-toggle:hover .toggle-track {
    background: rgba(0, 120, 212, 0.4);
}

.dark-mode-toggle:hover .toggle-thumb {
    transform: scale(1.05);
}

body.dark-mode .dark-mode-toggle:hover .toggle-thumb {
    transform: translateX(20px) scale(1.05);
}

/* Search Toggle */
.search-toggle {
    background: rgba(0, 0, 0, 0.04);
    border: none;
    color: var(--text);
    cursor: pointer;
    padding: 8px;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-toggle:hover {
    background: rgba(0, 0, 0, 0.08);
    transform: scale(1.02);
}

.search-toggle svg {
    width: 18px;
    height: 18px;
}

.mobile-menu-toggle {
    display: none;
    background: rgba(0, 0, 0, 0.04);
    border: none;
    cursor: pointer;
    flex-direction: column;
    gap: 5px;
    padding: 8px;
    border-radius: var(--radius-sm);
    width: 36px;
    height: 36px;
    align-items: center;
    justify-content: center;
}

.mobile-menu-toggle span {
    width: 18px;
    height: 2px;
    background: var(--text);
    transition: var(--transition);
    border-radius: 2px;
}

/* ============================================
   NAVIGATION - Windows 11 Style
   ============================================ */
.main-nav {
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(var(--blur-amount));
    position: sticky;
    top: 61px;
    z-index: 999;
    border-bottom: 1px solid var(--card-border);
}

.primary-menu {
    list-style: none;
    display: flex;
    gap: 24px;
    padding: 0;
    margin: 0;
}

.primary-menu li {
    position: relative;
}

.primary-menu a {
    color: var(--text);
    padding: 12px 0;
    display: inline-block;
    font-weight: 500;
    font-size: 14px;
    position: relative;
    opacity: 0.8;
    transition: var(--transition);
}

.primary-menu a:hover {
    opacity: 1;
    color: var(--primary);
}

/* Dropdown */
.primary-menu .sub-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--surface);
    backdrop-filter: blur(var(--blur-amount));
    min-width: 200px;
    padding: 8px 0;
    border-radius: var(--radius-md);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: var(--transition);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--card-border);
    z-index: 100;
    list-style: none;
}

.primary-menu li:hover > .sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.primary-menu .sub-menu a {
    padding: 8px 16px;
    display: block;
    font-size: 13px;
}

/* ============================================
   SEARCH MODAL - Windows 11 Style
   ============================================ */
.search-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
}

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

.search-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
}

.search-modal-content {
    position: relative;
    width: 90%;
    max-width: 520px;
    background: var(--card-bg);
    backdrop-filter: blur(var(--blur-amount));
    border-radius: var(--radius-lg);
    padding: 32px;
    z-index: 2001;
    animation: modalSlideIn 0.3s cubic-bezier(0.2, 0.9, 0.4, 1.1);
    border: 1px solid var(--card-border);
    box-shadow: var(--shadow-xl);
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.search-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: none;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 20px;
    transition: var(--transition);
    color: var(--text);
}

.search-modal-close:hover {
    background: rgba(0, 0, 0, 0.05);
}

.search-modal-content h3 {
    margin-bottom: 24px;
    font-size: 24px;
    text-align: center;
    font-weight: 600;
}

.search-form-modal {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
}

.search-input-modal {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid var(--card-border);
    border-radius: var(--radius-md);
    font-size: 16px;
    transition: var(--transition);
    background: var(--surface);
    color: var(--text);
}

.search-input-modal:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(0, 120, 212, 0.2);
}

.search-button-modal {
    padding: 12px 24px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition);
}

.search-button-modal:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

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

.popular-manga-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.popular-manga-list a {
    background: var(--surface);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    transition: var(--transition);
    border: 1px solid var(--card-border);
}

.popular-manga-list a:hover {
    background: var(--primary);
    color: white;
}

/* ============================================
   HERO SECTION - Windows 11 Style
   ============================================ */

.stat-label {
    font-size: 13px;
    opacity: 0.7;
}

/* ============================================
   SECTION HEADER
   ============================================ */

/* ============================================
   MANGA GRID - Windows 11 Cards
   ============================================ */

.no-chapters {
    font-size: 11px;
    color: var(--text-light);
    text-align: center;
    padding: 12px;
}

/* ============================================
   SORT OPTIONS - Windows 11 Buttons
   ============================================ */

/* ============================================
   ALPHABET FILTER - Windows 11 Style
   ============================================ */

/* ============================================
   SIDEBAR - Windows 11 Widgets
   ============================================ */
.sidebar {
    position: sticky;
    top: 100px;
    align-self: start;
}

.widget {
    background: var(--card-bg);
    backdrop-filter: blur(var(--blur-amount));
    border-radius: var(--radius-md);
    padding: 20px;
    margin-bottom: 24px;
    border: 1px solid var(--card-border);
}

.widget h3 {
    font-size: 15px;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--primary);
    display: inline-block;
    font-weight: 600;
}

/* ============================================
   READING STATUS - FIXED VERSION
   ============================================ */
.status-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.status-filter {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    background: var(--surface);
    border-radius: var(--radius-md);
    cursor: pointer !important;
    transition: var(--transition);
    border: 1px solid var(--card-border);
    margin-bottom: 0;
    position: relative;
    overflow: hidden;
}

.status-filter::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    opacity: 0;
    transition: opacity 0.3s cubic-bezier(0.2, 0.9, 0.4, 1.1);
    z-index: 0;
}

.status-filter:hover::before {
    opacity: 0.08;
}

.status-filter:hover {
    transform: translateX(4px);
    border-color: var(--primary);
    box-shadow: var(--shadow-md);
}

.status-filter:hover .status-name {
    color: var(--primary);
    transform: translateX(2px);
}

.status-filter:hover .status-count {
    background: var(--primary);
    color: white;
    transform: scale(1.05);
}

.status-filter.active {
    background: var(--primary);
    border-color: var(--primary);
    box-shadow: var(--shadow-sm);
}

.status-filter.active .status-name {
    color: white;
}

.status-filter.active .status-count {
    background: rgba(255, 255, 255, 0.25);
    color: white;
}

.status-filter.active::before {
    opacity: 0;
}

.status-name {
    font-size: 13px;
    font-weight: 500;
    color: var(--text);
    transition: var(--transition);
    position: relative;
    z-index: 1;
}

.status-count {
    background: rgba(0, 0, 0, 0.08);
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-light);
    transition: var(--transition);
    position: relative;
    z-index: 1;
}

.status-filter[data-status="ongoing"]:hover .status-name {
    color: #10b981;
}

.status-filter[data-status="ongoing"]:hover {
    border-color: #10b981;
}

.status-filter[data-status="ongoing"]:hover::before {
    background: linear-gradient(135deg, #10b981 0%, #34d399 100%);
}

.status-filter[data-status="completed"]:hover .status-name {
    color: var(--primary);
}

.status-filter[data-status="completed"]:hover {
    border-color: var(--primary);
}

.status-filter[data-status="hiatus"]:hover .status-name {
    color: #f59e0b;
}

.status-filter[data-status="hiatus"]:hover {
    border-color: #f59e0b;
}

.status-filter[data-status="hiatus"]:hover::before {
    background: linear-gradient(135deg, #f59e0b 0%, #fbbf24 100%);
}

.status-filter[data-status="cancelled"]:hover .status-name {
    color: #ef4444;
}

.status-filter[data-status="cancelled"]:hover {
    border-color: #ef4444;
}

.status-filter[data-status="cancelled"]:hover::before {
    background: linear-gradient(135deg, #ef4444 0%, #f87171 100%);
}

/* ============================================
   SINGLE MANGA PAGE
   ============================================ */
.single-manga .manga-header {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 32px;
    background: var(--card-bg);
    backdrop-filter: blur(var(--blur-amount));
    border-radius: var(--radius-lg);
    padding: 32px;
    margin: 24px 0;
    border: 1px solid var(--card-border);
}

.single-manga .manga-cover-large {
    width: 100%;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
}

.single-manga .manga-stats {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.single-manga .stat-box {
    background: var(--surface);
    padding: 12px 20px;
    border-radius: var(--radius-md);
    text-align: center;
    min-width: 100px;
    transition: var(--transition);
    border: 1px solid var(--card-border);
}

.single-manga .stat-box:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.single-manga .stat-value {
    font-size: 24px;
    font-weight: 600;
    color: var(--primary);
}

.single-manga .stat-value.status-ongoing { color: #10b981; }
.single-manga .stat-value.status-completed { color: var(--primary); }
.single-manga .stat-value.status-hiatus { color: #f59e0b; }
.single-manga .stat-value.status-cancelled { color: #ef4444; }

.single-manga .stat-label {
    font-size: 12px;
    color: var(--text-light);
    margin-top: 4px;
}

.single-manga .manga-meta {
    margin: 20px 0;
    padding: 16px 0;
    border-top: 1px solid var(--card-border);
    border-bottom: 1px solid var(--card-border);
}

.single-manga .meta-item {
    margin-bottom: 8px;
    font-size: 14px;
}

.single-manga .meta-label {
    font-weight: 600;
    width: 80px;
    display: inline-block;
}

.single-manga .genres {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 20px 0;
}

.single-manga .genre-tag {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    color: white;
}

.single-manga .manga-description {
    line-height: 1.7;
    margin: 20px 0;
    color: var(--text-light);
}

.single-manga .manga-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

.single-manga .chapters-section {
    background: var(--card-bg);
    backdrop-filter: blur(var(--blur-amount));
    border-radius: var(--radius-lg);
    padding: 24px;
    margin: 24px 0;
    border: 1px solid var(--card-border);
}

.single-manga .chapters-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--card-border);
    flex-wrap: wrap;
    gap: 15px;
}

.single-manga .chapters-header h2 {
    font-size: 20px;
    font-weight: 600;
}

.single-manga .chapters-controls {
    display: flex;
    gap: 8px;
}

.single-manga .chapter-sort-btn {
    padding: 5px 14px;
    background: var(--surface);
    border: 1px solid var(--card-border);
    border-radius: 20px;
    cursor: pointer;
    font-size: 12px;
    transition: var(--transition);
    color: var(--text);
}

.single-manga .chapter-sort-btn:hover,
.single-manga .chapter-sort-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.single-manga .chapters-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.single-manga .chapter-card-link {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: var(--surface);
    border-radius: var(--radius-sm);
    transition: var(--transition);
    border: 1px solid transparent;
}

.single-manga .chapter-card-link:hover {
    background: var(--card-bg);
    border-color: var(--primary);
    transform: translateX(4px);
    box-shadow: var(--shadow-sm);
}

.single-manga .chapter-title {
    font-weight: 500;
    font-size: 14px;
}

.single-manga .chapter-date {
    font-size: 12px;
    color: var(--text-light);
}

.single-manga .new-badge {
    background: var(--primary);
    color: white;
    font-size: 10px;
    padding: 2px 8px;
    border-radius: 12px;
    margin-left: 10px;
}

/* ============================================
   MANGA READER - FULLSCREEN READER STYLES
   ============================================ */

/* Manga Reader Container */

/* Top Bar */

/* Progress Bar */

/* Main Content */

/* Pages */
.reader-page {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 20px;
    cursor: pointer;
}

.reader-page:last-child {
    margin-bottom: 0;
}

.reader-page img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
    border-radius: 4px;
    transition: transform 0.2s;
}

/* Long Strip Mode */

/* Navigation Arrows */
.nav-arrow {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    border-radius: 50%;
    padding: 12px;
    cursor: pointer;
    color: white;
    transition: all 0.2s;
    z-index: 100;
    opacity: 0;
}

.nav-arrow:hover {
    background: var(--primary, #0078d4);
}

.nav-arrow-left {
    left: 20px;
}

.nav-arrow-right {
    right: 20px;
}

/* Page Indicator */
.page-indicator {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    padding: 6px 12px;
    border-radius: 20px;
    color: white;
    font-size: 12px;
    z-index: 100;
    pointer-events: none;
}

/* Settings Panel */

/* Zoom Controls */

/* No Images Message */
.no-images-message {
    text-align: center;
    padding: 60px;
    color: white;
}

/* Light Mode Reader Styles */

body:not(.dark-mode) .no-images-message {
    color: #333;
}

/* Sepia Mode Reader Styles */

/* ============================================
   BUTTONS - Windows 11 Style
   ============================================ */
.btn {
    padding: 8px 20px;
    border-radius: var(--radius-sm);
    display: inline-block;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    font-size: 14px;
    text-align: center;
}

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

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

.btn-secondary {
    background: rgba(0, 0, 0, 0.05);
    color: var(--text);
    border: 1px solid var(--card-border);
}

.btn-secondary:hover {
    background: rgba(0, 0, 0, 0.08);
    transform: translateY(-1px);
}

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

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

.btn-large {
    padding: 10px 24px;
    font-size: 15px;
}

/* ============================================
   PAGINATION
   ============================================ */
.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin: 40px 0;
    flex-wrap: wrap;
}

.pagination a,
.pagination span {
    padding: 8px 14px;
    background: var(--surface);
    border-radius: var(--radius-sm);
    border: 1px solid var(--card-border);
    transition: var(--transition);
    min-width: 38px;
    text-align: center;
    color: var(--text);
}

.pagination a:hover,
.pagination .current {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

/* ============================================
   LOADING
   ============================================ */
.loading-container {
    text-align: center;
    padding: 60px;
}

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

.no-results {
    text-align: center;
    padding: 60px;
    color: var(--text-light);
}

/* ============================================
   FOOTER - Windows 11 Style
   ============================================ */
.site-footer {
    background: var(--mica-bg);
    backdrop-filter: blur(var(--blur-amount));
    color: var(--text-light);
    padding: 40px 0 20px;
    margin-top: 60px;
    border-top: 1px solid var(--card-border);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 32px;
}

.footer-section h3 {
    color: var(--text);
    margin-bottom: 16px;
    font-size: 16px;
    font-weight: 600;
}

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

.footer-section a {
    color: var(--text-light);
    line-height: 2;
    font-size: 14px;
}

.footer-section a:hover {
    color: var(--primary);
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid var(--card-border);
    font-size: 12px;
}

/* ============================================
   FEATURED SECTION (HOMEPAGE SLIDER) - Windows 11 Style
   ============================================ */

/* ============================================
   CONTENT WRAPPER LAYOUT
   ============================================ */
.content-wrapper {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 32px;
}

/* ============================================
   ZOOM CONTROLS
   ============================================ */
#zoomControls {
    display: flex;
    gap: 8px;
}

/* ============================================
   RESPONSIVE DESIGN - Windows 11 Style
   ============================================ */
@media (max-width: 992px) {
    .content-wrapper {
        grid-template-columns: 1fr;
    }
    
    .sidebar {
        position: static;
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 16px;
    }
    
    .mobile-menu-toggle {
        display: flex;
    }
    
    .main-nav {
        position: fixed;
        top: 0;
        right: -300px;
        width: 280px;
        height: 100%;
        background: var(--card-bg);
        backdrop-filter: blur(var(--blur-amount));
        transition: right 0.3s cubic-bezier(0.2, 0.9, 0.4, 1.1);
        z-index: 1001;
        padding-top: 70px;
        border-left: 1px solid var(--card-border);
    }
    
    .main-nav.active {
        right: 0;
    }
    
    .primary-menu {
        flex-direction: column;
        gap: 0;
        padding: 0 20px;
    }
    
    .primary-menu a {
        padding: 12px 0;
        display: block;
    }
    
    .primary-menu .sub-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        padding-left: 20px;
        display: none;
        box-shadow: none;
        background: transparent;
    }
    
    .primary-menu li.active .sub-menu {
        display: block;
    }
    
    .single-manga .manga-header {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    
    .single-manga .chapters-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .sidebar {
        grid-template-columns: 1fr;
    }
    
    .status-filter {
        padding: 8px 12px;
    }
    
    .status-filter:hover {
        transform: translateX(2px);
    }
    
    /* Reader responsive */
    
    .nav-arrow {
        opacity: 1;
        padding: 8px;
    }
}

@media (max-width: 480px) {
    
    .search-modal-content {
        padding: 24px;
    }
    
    .search-form-modal {
        flex-direction: column;
    }
    
    #zoomControls {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .status-filter {
        padding: 6px 10px;
    }
    
    .status-name {
        font-size: 12px;
    }
    
    .status-count {
        font-size: 10px;
        padding: 2px 6px;
    }
}

/* Animation for theme switching */
body {
    transition: background-color 0.3s ease, color 0.3s ease;
}

.site-header,
.main-nav,
.manga-item,
.widget,
.chapter-reader,
.featured-section,
.settings-panel {
    transition: background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}
/* 404 */
.mr-404{text-align:center;padding:100px 20px;background:var(--surface,#fff);color:var(--text,inherit);border-radius:8px;margin:40px 0}
.mr-404 .btn{display:inline-block;margin-top:20px}

/* NEW badge, most viewed */
.mr-new{display:inline-block;margin-inline-start:6px;padding:1px 6px;border-radius:6px;background:#e5484d;color:#fff;font-size:10px;font-weight:700;letter-spacing:.3px;vertical-align:middle}
.mr-top{margin-bottom:28px}
.mr-top [hidden]{display:none}
.mr-chip-link{cursor:pointer;font:inherit}
.mr-mature{margin:12px 0;padding:10px 14px;border-radius:10px;background:rgba(229,72,77,.12);border:1px solid rgba(229,72,77,.4)}
.mr-related{margin-top:32px}
.mr-comments{max-width:800px;margin:24px auto;padding:0 16px}
