/* ============================================
   CSS VARIABLES - LIGHT & DARK THEME SYSTEM
   Modern pishgamit Design
   ============================================ */

:root {
    /* Light Mode */
    --bg-primary: #FAFBFC;
    --bg-secondary: #FFFFFF;
    --bg-tertiary: #F1F5F9;
    --text-primary: #1E293B;
    --text-secondary: #64748B;
    --text-muted: #94A3B8;
    --accent-primary: #2563EB;
    --accent-secondary: #3B82F6;
    --accent-gradient: linear-gradient(135deg, #2563EB 0%, #7C3AED 100%);
    --border-color: #E2E8F0;
    --card-shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.06);
    --card-shadow-hover: 0 10px 40px rgba(0, 0, 0, 0.12);

    /* Category Colors */
    --cat-tutorial: #10B981;
    --cat-news: #F59E0B;
    --cat-review: #8B5CF6;
    --cat-tools: #EC4899;
    --cat-mobile: #06B6D4;

    /* Legacy compatibility */
    --primary-color: #2563EB;
    --primary-hover: #1D4ED8;
    --primary-active: #1E40AF;
    --secondary-color: #64748B;
    --success-color: #10B981;
    --danger-color: #EF4444;
    --warning-color: #F59E0B;
    --info-color: #06B6D4;
    --heading-color: #1E293B;
    --link-color: #2563EB;
    --link-hover-color: #1D4ED8;
    --navbar-bg: #FFFFFF;
    --navbar-text: #1E293B;
    --footer-bg: #1E293B;
    --footer-text: #F1F5F9;
    --input-bg: #FFFFFF;
    --input-border: #E2E8F0;
    --input-focus-border: #2563EB;
    --input-focus-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.07);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 10px 40px rgba(0, 0, 0, 0.12);
    --border-light: #F1F5F9;
    --text-light: #94A3B8;
    --bg-overlay: rgba(0, 0, 0, 0.75);
    --transition-speed: 0.3s;
}

[data-theme="dark"] {
    --bg-primary: #0F172A;
    --bg-secondary: #1E293B;
    --bg-tertiary: #334155;
    --text-primary: #F1F5F9;
    --text-secondary: #94A3B8;
    --text-muted: #64748B;
    --border-color: #334155;
    --card-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    --card-shadow-hover: 0 10px 40px rgba(0, 0, 0, 0.4);

    /* Legacy compatibility */
    --primary-color: #3B82F6;
    --primary-hover: #2563EB;
    --primary-active: #1D4ED8;
    --secondary-color: #94A3B8;
    --success-color: #10B981;
    --danger-color: #EF4444;
    --warning-color: #F59E0B;
    --info-color: #06B6D4;
    --heading-color: #F1F5F9;
    --link-color: #3B82F6;
    --link-hover-color: #60A5FA;
    --navbar-bg: #1E293B;
    --navbar-text: #F1F5F9;
    --footer-bg: #0F172A;
    --footer-text: #F1F5F9;
    --input-bg: #334155;
    --input-border: #475569;
    --input-focus-border: #3B82F6;
    --input-focus-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.6);
    --shadow-hover: 0 10px 40px rgba(0, 0, 0, 0.4);
    --border-light: #334155;
    --text-light: #64748B;
    --bg-overlay: rgba(0, 0, 0, 0.85);
}

/* ============================================
   BASE STYLES
   ============================================ */

* {
    font-family: 'Vazirmatn', Arial, sans-serif;
    transition: background-color var(--transition-speed) ease,
        color var(--transition-speed) ease,
        border-color var(--transition-speed) ease;
}

html {
    font-size: 13px;
    position: relative;
    min-height: 100%;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    direction: rtl;
    text-align: right;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.7;
}

.main-content {
    min-height: calc(100vh - 400px);
    padding: 2rem 0;
}

/* ============================================
   TYPOGRAPHY
   ============================================ */

h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 700;
    color: var(--heading-color);
    margin-bottom: 1rem;
}

h1 {
    font-size: 2.5rem;
}

h2 {
    font-size: 2rem;
}

h3 {
    font-size: 1.75rem;
}

h4 {
    font-size: 1.5rem;
}

h5 {
    font-size: 1.25rem;
}

h6 {
    font-size: 1rem;
}

.article-title {
    font-size: 2rem;
    margin-bottom: 1rem;
    line-height: 1.4;
    color: var(--heading-color);
}

.article-summary {
    font-size: 1.1rem;
    color: var(--text-secondary);
    line-height: 1.8;
}

.article-content {
    font-size: 1rem;
    line-height: 1.9;
    color: var(--text-primary);
}

a {
    color: var(--link-color);
    text-decoration: none;
    transition: color var(--transition-speed) ease;
}

a:hover {
    color: var(--link-hover-color);
}

/* ============================================
   NEWS CARD STYLES
   ============================================ */

.news-card {
    transition: transform var(--transition-speed) ease,
        box-shadow var(--transition-speed) ease;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    height: 100%;
    background-color: var(--bg-primary);
}

.news-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-hover);
}

.news-card img {
    height: 200px;
    object-fit: cover;
    transition: transform var(--transition-speed) ease;
}

.news-card:hover img {
    transform: scale(1.05);
}

.news-card-body {
    padding: 1.25rem;
}

.news-card-title {
    font-size: 1.15rem;
    font-weight: 600;
    line-height: 1.5;
    color: var(--heading-color);
    margin-bottom: 0.75rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-card-title:hover {
    color: var(--primary-color);
}

.news-meta {
    font-size: 0.85rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.news-meta a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.2s ease-out;
}

.news-meta a:hover {
    color: var(--accent-primary);
}

.news-meta i {
    margin-left: 5px;
}

.news-excerpt {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 1rem;
}

/* ============================================
   CATEGORY & TAG BADGES
   ============================================ */

.category-badge {
    font-size: 0.75rem;
    padding: 0.35rem 0.65rem;
    border-radius: 6px;
    font-weight: 500;
    transition: all var(--transition-speed) ease;
}

.badge {
    font-weight: 500;
}

/* ============================================
   FEATURED NEWS
   ============================================ */

.featured-news {
    position: relative;
    height: 450px;
    overflow: hidden;
    border-radius: 15px;
    box-shadow: var(--shadow-lg);
    margin-bottom: 2rem;
}

.featured-news img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.featured-news:hover img {
    transform: scale(1.1);
}

.featured-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, var(--bg-overlay), transparent);
    color: white;
    padding: 2.5rem;
}

.featured-overlay h2 {
    color: white;
    margin-bottom: 0.75rem;
    font-size: 2rem;
}

.featured-overlay p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.1rem;
    line-height: 1.6;
}

/* ============================================
   SIDEBAR WIDGETS
   ============================================ */

.sidebar-widget {
    background: var(--bg-primary);
    padding: 1.5rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

.sidebar-widget h4 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 3px solid var(--primary-color);
    color: var(--heading-color);
}

.sidebar-widget ul {
    list-style: none;
    padding: 0;
}

.sidebar-widget ul li {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-light);
}

.sidebar-widget ul li:last-child {
    border-bottom: none;
}

.sidebar-widget ul li a {
    color: var(--text-primary);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sidebar-widget ul li a:hover {
    color: var(--primary-color);
    padding-right: 0.5rem;
}

/* ============================================
   TAG CLOUD
   ============================================ */

.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag-cloud .badge {
    font-size: 0.85rem;
    font-weight: 500;
    padding: 0.5rem 1rem;
    transition: all var(--transition-speed) ease;
    cursor: pointer;
}

.tag-cloud .badge:hover {
    transform: scale(1.1);
    box-shadow: var(--shadow-sm);
}

/* ============================================
   COMMENTS
   ============================================ */

.comment-item {
    background: var(--bg-secondary);
    padding: 1.25rem;
    border-radius: 10px;
    margin-bottom: 1rem;
    border: 1px solid var(--border-color);
}

.comment-author {
    font-weight: 600;
    color: var(--primary-color);
}

.comment-date {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.comment-content {
    margin-top: 0.75rem;
    line-height: 1.8;
    color: var(--text-primary);
}

.comment-reply {
    margin-right: 3rem;
    border-right: 3px solid var(--border-color);
    padding-right: 1rem;
}

/* New comment highlight animation */
.new-comment-highlight {
    animation: commentHighlight 3s ease-out;
}

@keyframes commentHighlight {
    0% {
        background-color: rgba(16, 185, 129, 0.3);
        border-color: var(--success-color);
        box-shadow: 0 0 10px rgba(16, 185, 129, 0.5);
    }

    50% {
        background-color: rgba(16, 185, 129, 0.15);
        border-color: rgba(16, 185, 129, 0.5);
    }

    100% {
        background-color: var(--bg-secondary);
        border-color: var(--border-color);
        box-shadow: none;
    }
}

/* Reply item styling */
.replies {
    border-right: 3px solid var(--border-color);
    padding-right: 1rem;
}

/* ============================================
   PAGINATION - See components.css for main styles
   ============================================ */

.pagination {
    margin-top: 2rem;
}

/* ============================================
   BUTTONS
   ============================================ */

.btn {
    border-radius: 8px;
    padding: 0.6rem 1.5rem;
    font-weight: 500;
    transition: all var(--transition-speed) ease;
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    border-color: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.btn-outline-primary {
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-outline-primary:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

/* ============================================
   NAVBAR
   ============================================ */

.navbar {
    background-color: var(--navbar-bg) !important;
    box-shadow: var(--shadow-md);
    padding: 1rem 0;
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.3rem;
    color: var(--navbar-text) !important;
}

.nav-link {
    color: rgba(255, 255, 255, 0.9) !important;
    font-weight: 500;
    padding: 0.5rem 1rem !important;
    transition: all var(--transition-speed) ease;
}

.nav-link:hover {
    color: white !important;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 6px;
}

.navbar-toggler {
    border-color: rgba(255, 255, 255, 0.3);
}

/* Theme Toggle Button */
.theme-toggle {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    border-radius: 8px;
    padding: 0.5rem 1rem;
    cursor: pointer;
    transition: all var(--transition-speed) ease;
    margin-left: 1rem;
}

.theme-toggle:hover {
    background: rgba(255, 255, 255, 0.3);
}

.theme-toggle i {
    font-size: 1.1rem;
}

/* ============================================
   FOOTER
   ============================================ */

.footer {
    background-color: var(--footer-bg);
    color: var(--footer-text);
}

.footer h5 {
    color: var(--footer-text);
    font-size: 1.2rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.footer a {
    color: var(--text-light);
    text-decoration: none;
    transition: color var(--transition-speed) ease;
}

.footer a:hover {
    color: var(--primary-color) !important;
}

.footer ul {
    padding: 0;
}

.footer ul li {
    margin-bottom: 0.5rem;
}

/* ============================================
   SOCIAL ICONS
   ============================================ */

.social-links a {
    transition: transform var(--transition-speed) ease, color var(--transition-speed) ease;
    display: inline-block;
}

.social-links a:hover {
    transform: scale(1.3);
    color: var(--primary-color) !important;
}

/* ============================================
   BREADCRUMB
   ============================================ */

.breadcrumb {
    background-color: var(--bg-primary);
    padding: 0.75rem 1rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.breadcrumb-item {
    color: var(--text-secondary);
}

.breadcrumb-item.active {
    color: var(--text-primary);
}

.breadcrumb-item a {
    color: var(--link-color);
}

/* ============================================
   FORMS
   ============================================ */

.form-control,
.form-select {
    border-radius: 8px;
    border: 1px solid var(--input-border);
    padding: 0.7rem 1rem;
    background-color: var(--input-bg);
    color: var(--text-primary);
    transition: all var(--transition-speed) ease;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--input-focus-border);
    box-shadow: var(--input-focus-shadow);
    background-color: var(--input-bg);
    color: var(--text-primary);
}

.form-label {
    color: var(--text-primary);
    font-weight: 500;
    margin-bottom: 0.5rem;
}

textarea.form-control {
    min-height: 120px;
}

/* ============================================
   CARDS
   ============================================ */

.card {
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    background-color: var(--bg-primary);
    transition: all var(--transition-speed) ease;
}

.card:hover {
    box-shadow: var(--shadow-md);
}

.card-header {
    background-color: var(--bg-secondary);
    border-bottom: 2px solid var(--primary-color);
    border-radius: 12px 12px 0 0 !important;
    font-weight: 600;
    color: var(--heading-color);
}

.card-body {
    padding: 1.5rem;
    color: var(--text-primary);
}

.card-footer {
    background-color: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
}

/* ============================================
   ALERTS
   ============================================ */

.alert {
    border-radius: 10px;
    border: none;
    padding: 1rem 1.5rem;
}

/* ============================================
   TABLES
   ============================================ */

.table {
    color: var(--text-primary);
}

.table thead th {
    background-color: var(--bg-secondary);
    color: var(--heading-color);
    border-color: var(--border-color);
}

.table tbody td {
    border-color: var(--border-color);
}

.table-striped>tbody>tr:nth-of-type(odd)>* {
    background-color: var(--bg-secondary);
}

.table-hover>tbody>tr:hover>* {
    background-color: var(--bg-tertiary);
}

/* ============================================
   MODALS
   ============================================ */

.modal-content {
    background-color: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
}

.modal-header {
    border-bottom: 1px solid var(--border-color);
}

.modal-footer {
    border-top: 1px solid var(--border-color);
}

.modal-title {
    color: var(--heading-color);
}

/* ============================================
   LOADING SPINNER
   ============================================ */

.spinner-border-sm {
    width: 1rem;
    height: 1rem;
    border-width: 0.15em;
}

/* ============================================
   STATISTICS SECTION
   ============================================ */

.stats-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-hover) 100%);
    color: white;
    padding: 3rem 0;
    margin-bottom: 2rem;
    border-radius: 15px;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    display: block;
}

.stat-label {
    font-size: 1rem;
    opacity: 0.9;
}

/* ============================================
   SECTION HEADERS
   ============================================ */

.section-header {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 3px solid var(--primary-color);
}

.section-header h2 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--heading-color);
    margin: 0;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

@media (max-width: 768px) {
    html {
        font-size: 13px;
    }

    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.75rem;
    }

    h3 {
        font-size: 1.5rem;
    }

    .article-title {
        font-size: 1.5rem;
    }

    .featured-news {
        height: 300px;
    }

    .featured-overlay {
        padding: 1.5rem;
    }

    .featured-overlay h2 {
        font-size: 1.5rem;
    }

    .news-card img {
        height: 150px;
    }

    .stat-number {
        font-size: 2rem;
    }

    .navbar {
        padding: 0.5rem 0;
    }
}

@media (max-width: 576px) {
    .comment-reply {
        margin-right: 1rem;
    }

    .sidebar-widget {
        margin-bottom: 1rem;
    }
}

/* ============================================
   UTILITY CLASSES
   ============================================ */

.text-muted {
    color: var(--text-muted) !important;
}

.bg-light {
    background-color: var(--bg-secondary) !important;
}

/* Removed .bg-dark override to allow Bootstrap's default dark background */

.border {
    border-color: var(--border-color) !important;
}

/* ============================================
   ACCESSIBILITY
   ============================================ */

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* ============================================
   PRINT STYLES
   ============================================ */

@media print {

    .navbar,
    .footer,
    .sidebar-widget,
    .btn,
    .theme-toggle {
        display: none;
    }

    body {
        background-color: white;
        color: black;
    }
}

/* Category Card Styles */
.category-card {
    transition: all 0.3s ease;
    cursor: pointer;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(13, 110, 253, 0.2) !important;
}

.category-card i {
    transition: all 0.3s ease;
}

.category-card:hover i {
    transform: scale(1.1);
    color: #0b5ed7 !important;
}

.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* Tool Icon Box */
.tool-icon-box {
    transition: transform 0.3s ease;
}

/* Footer Styles */
.footer {
    background-color: var(--bg-secondary);
    padding-top: 4rem;
    margin-top: 5rem;
    border-top: 1px solid var(--border-color);
}

.footer-main {
    padding-bottom: 3rem;
}

.footer-brand h3 {
    font-weight: 800;
    margin-bottom: 1rem;
}

.footer-description {
    color: var(--text-secondary);
    line-height: 1.8;
}

.footer-title {
    font-weight: 700;
    margin-bottom: 1.5rem;
    position: relative;
    padding-bottom: 0.5rem;
}

.footer-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 40px;
    height: 3px;
    background: var(--primary-color);
    border-radius: 2px;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 0.8rem;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.2s;
}

.footer-links a:hover {
    color: var(--primary-color);
    padding-right: 5px;
}

.footer-contact {
    list-style: none;
    padding: 0;
}

.footer-contact li {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

.footer-contact i {
    width: 25px;
    color: var(--primary-color);
}

.footer-social {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.social-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--bg-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    transition: all 0.3s;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.social-icon:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-3px);
}

.footer-bottom {
    background: rgba(0, 0, 0, 0.02);
    padding: 1.5rem 0;
    border-top: 1px solid var(--border-color);
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.newsletter-form-footer .input-group {
    background: var(--bg-primary);
    padding: 5px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.newsletter-form-footer input {
    border: none;
    background: transparent;
}

.newsletter-form-footer input:focus {
    box-shadow: none;
}

.tool-icon-box:hover {
    transform: scale(1.05);
}

/* ============================================
   SCROLL TO TOP BUTTON
   ============================================ */

.scroll-to-top {
    position: fixed;
    bottom: 30px;
    left: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.4);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    z-index: 1000;
}

.scroll-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.scroll-to-top:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(37, 99, 235, 0.5);
    background: linear-gradient(135deg, var(--primary-hover), var(--primary-color));
}

.scroll-to-top:active {
    transform: translateY(-2px);
}

.scroll-to-top i {
    transition: transform 0.3s ease;
}

.scroll-to-top:hover i {
    animation: bounceUp 0.6s ease infinite;
}

@keyframes bounceUp {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-3px);
    }
}

/* Dark theme adjustments for scroll-to-top */
[data-theme="dark"] .scroll-to-top {
    box-shadow: 0 4px 15px rgba(96, 165, 250, 0.4);
}

[data-theme="dark"] .scroll-to-top:hover {
    box-shadow: 0 8px 25px rgba(96, 165, 250, 0.5);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .scroll-to-top {
        width: 45px;
        height: 45px;
        bottom: 20px;
        left: 20px;
        font-size: 1.1rem;
    }
}

/* Print styles - hide scroll-to-top */
@media print {
    .scroll-to-top {
        display: none !important;
    }
}

/* ============================================
   READING PROGRESS BAR
   ============================================ */

.reading-progress-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--bg-tertiary);
    z-index: 1050;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.reading-progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg,
            var(--primary-color) 0%,
            #8b5cf6 50%,
            #ec4899 100%);
    border-radius: 0 2px 2px 0;
    transition: width 0.1s ease-out;
    position: relative;
    overflow: hidden;
}

/* Animated shine effect */
.reading-progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
            transparent,
            rgba(255, 255, 255, 0.3),
            transparent);
    animation: progressShine 2s ease-in-out infinite;
}

@keyframes progressShine {
    0% {
        left: -100%;
    }

    100% {
        left: 100%;
    }
}

/* Glow effect when progress is high */
.reading-progress-bar[style*="width: 9"],
.reading-progress-bar[style*="width: 100"] {
    box-shadow: 0 0 10px var(--primary-color),
        0 0 20px rgba(139, 92, 246, 0.5);
}

/* Dark theme adjustments */
[data-theme="dark"] .reading-progress-container {
    background: var(--bg-secondary);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .reading-progress-bar {
    background: linear-gradient(90deg,
            #60a5fa 0%,
            #a78bfa 50%,
            #f472b6 100%);
}

[data-theme="dark"] .reading-progress-bar[style*="width: 9"],
[data-theme="dark"] .reading-progress-bar[style*="width: 100"] {
    box-shadow: 0 0 10px #60a5fa,
        0 0 20px rgba(167, 139, 250, 0.5);
}

/* Print styles - hide reading progress */
@media print {
    .reading-progress-container {
        display: none !important;
    }
}