/* =====================================================
   GLOBAL RESET & TEMEL AYARLAR
===================================================== */

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: Arial, sans-serif;
}

html, body {
    background-color: #e9e9e9;
    color: #222;
    overflow-x: hidden;
    width: 100%;
}

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

/* =========================
   GENEL BUTON STİLİ
========================= */

button {
    padding: 6px 16px;
    border-radius: 20px;
    border: 1px solid #cfcfcf;
    background-color: #f4f4f4;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s ease;
}

button:hover {
    background-color: #e9e9e9;
}

button a {
    text-decoration: none;
    color: inherit;
    display: block;
}

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

.top-bar {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 24px;
    background-color: #ffffff;
    border-bottom: 1px solid #ddd;
}

.logo {
    font-weight: bold;
    font-size: 20px;
}

.search {
    flex: 1;
    padding: 8px 12px;
    border-radius: 6px;
    border: 1px solid #ccc;
}

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

.top-link {
    padding: 8px 12px;
    background-color: #eee;
    border-radius: 6px;
    transition: background-color 0.2s ease;
}

.top-link:hover {
    background-color: #ddd;
}

/* LOGIN BUTONU */

.top-actions button.login {
    background-color: #e0e0e0;
    border-color: #bbb;
}

.top-actions button.login:hover {
    background-color: #d5d5d5;
}

/* =====================================================
   HEADER SAĞ BUTONLARI
===================================================== */

.top-actions button {
    padding: 6px 14px;
    border-radius: 20px;
    border: 1px solid #ccc;
    background-color: white;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.top-actions button a {
    text-decoration: none;
    color: inherit;
    font-size: 14px;
}

.top-actions button:hover {
    background-color: #f5f5f5;
}

/* =====================================================
   ÜST MENÜ
===================================================== */

.menu-bar {
    display: flex;
    gap: 12px;
    padding: 10px 24px;
    background-color: #fafafa;
    border-bottom: 1px solid #ddd;
    position: relative; /* panel buna göre açılacak */
    z-index: 10;
}

.menu-bar button {
    padding: 6px 14px;
    border-radius: 20px;
    border: 1px solid #ccc;
    background-color: white;
    cursor: pointer;
}

/* =====================================================
   ORTAK KİTAP KARTI
===================================================== */

.book-card {
    display: block;
    background-color: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    color: inherit;
}

.book-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 28px rgba(0,0,0,0.15);
}

.book-card:hover .book-image {
    filter: brightness(1.05);
}

.book-image {
    position: relative;
    width: 100%;
    background-color: #ddd;
}

.book-info {
    padding: 14px;
}

.author {
    font-size: 13px;
    color: #666;
}

.title {
    font-size: 16px;
    font-weight: bold;
    margin: 4px 0;
}

.comments {
    font-size: 13px;
    color: #888;
}

.rating {
    margin-top: 6px;
    font-size: 14px;
}

.fav {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 20px;
    cursor: pointer;
}

/* =====================================================
   PURE CSS 3D BOOK COVER MOCKUP
===================================================== */

.book-cover-container {
    perspective: 1000px;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #f7f7f7;
    height: 260px;
    padding: 10px;
    position: relative;
    border-bottom: 1px solid #eee;
    overflow: hidden;
}

/* Book Card Badges (Sensitive Content Icons) */
.book-badges {
    position: absolute;
    top: 8px;
    left: 8px;
    display: flex;
    flex-direction: row;
    gap: 4px;
    z-index: 10;
}

.book-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    cursor: default;
}

.book-badge img {
    width: 22px;
    height: 22px;
    object-fit: contain;
}

.book-badge.red img {
    filter: brightness(0) saturate(100%) invert(37%) sepia(74%) saturate(4179%) hue-rotate(344deg) brightness(96%) contrast(97%);
}

.book-badge.yellow img {
    filter: brightness(0);
}

html.dark-mode .book-badge.yellow img {
    filter: brightness(0) invert(1);
}

.book-cover-css {
    width: 135px;
    height: 200px;
    position: relative;
    transform-style: preserve-3d;
    transform: rotateY(-20deg) rotateX(6deg) rotateZ(-2deg);
    box-shadow: -8px 8px 18px rgba(0,0,0,0.25);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    border-radius: 2px 6px 6px 2px;
    display: flex;
    color: white;
}

/* 3D hover pop out */
.book-card:hover .book-cover-css {
    transform: rotateY(-10deg) rotateX(3deg) rotateZ(-1deg) scale(1.04);
    box-shadow: -12px 12px 28px rgba(0,0,0,0.3);
}

/* Spine edge shadow */
.book-cover-css::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 10px;
    height: 100%;
    background: rgba(0, 0, 0, 0.28);
    border-radius: 2px 0 0 2px;
    box-shadow: inset -1px 0 3px rgba(0,0,0,0.2);
    z-index: 2;
}

/* Page edges */
.book-cover-css::after {
    content: '';
    position: absolute;
    top: 3px;
    right: -3px;
    width: 3px;
    height: calc(100% - 6px);
    background: #f8fafc;
    box-shadow: 1px 1px 3px rgba(0,0,0,0.15);
    border-radius: 0 2px 2px 0;
    transform: translateZ(-1px);
    z-index: 1;
}

.cover-content {
    flex-grow: 1;
    padding: 18px 12px 12px 18px; /* Extra left padding to clear the spine */
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    text-align: center;
    z-index: 3;
    font-family: 'Outfit', 'Inter', sans-serif;
}

.cover-title {
    font-size: 13px;
    font-weight: 700;
    line-height: 1.35;
    margin-top: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.7);
    word-break: break-word;
}

.cover-author {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0.95;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.7);
    margin-bottom: 5px;
    border-top: 1px solid rgba(255, 255, 255, 0.25);
    padding-top: 5px;
}

/* Cover Color Gradients based on Genre */
.cover-classic-psych {
    background: linear-gradient(135deg, #0f2e22, #0d9488); /* Deep Emerald to Teal */
}

.cover-scifi-dist {
    background: linear-gradient(135deg, #1e1b4b, #6366f1); /* Deep Indigo to Indigo */
}

.cover-romance-drama {
    background: linear-gradient(135deg, #4c0519, #db2777); /* Deep Rose to Pink */
}

.cover-adventure-history {
    background: linear-gradient(135deg, #451a03, #d97706); /* Dark Brown to Amber */
}

.cover-default-gradient {
    background: linear-gradient(135deg, #18181b, #71717a); /* Dark Zinc to Gray */
}

/* Overrides for Book Detail Page (Large display) */
.book-image-large .book-cover-container {
    background: transparent;
    height: 100%;
    width: 100%;
    border: none;
}

.book-image-large .book-cover-css {
    width: 210px;
    height: 310px;
    transform: rotateY(-20deg) rotateX(6deg) rotateZ(-2deg);
    box-shadow: -15px 15px 35px rgba(0,0,0,0.35);
}

.book-image-large .book-cover-css:hover {
    transform: rotateY(-10deg) rotateX(3deg) rotateZ(-1deg) scale(1.05);
    box-shadow: -20px 20px 45px rgba(0,0,0,0.4);
}

.book-image-large .cover-content {
    padding: 24px 18px 18px 24px;
}

.book-image-large .cover-title {
    font-size: 18px;
    margin-top: 25px;
}

.book-image-large .cover-author {
    font-size: 13px;
    margin-bottom: 12px;
    padding-top: 10px;
}

.book-image-large .book-cover-css::before {
    width: 14px;
}

.book-image-large .book-cover-css::after {
    right: -4px;
    width: 4px;
}

/* =====================================================
   RESPONSIVE NAVIGATION
===================================================== */
.mobile-only {
    display: none !important;
}

@media (max-width: 950px) {
    .mobile-only {
        display: flex !important;
    }

    .top-bar {
        display: grid !important;
        grid-template-columns: 1fr auto !important;
        align-items: center !important;
        gap: 12px !important;
        padding: 12px 16px !important;
        position: relative !important;
    }
    
    .logo {
        text-align: left !important;
        grid-column: 1 !important;
    }

    .header-toggles {
        grid-column: 2 !important;
        display: flex !important;
        gap: 8px !important;
        align-items: center !important;
    }
    
    .search {
        grid-column: 1 / -1 !important;
        width: 100% !important;
    }
    
    .top-actions {
        display: none !important;
        flex-direction: column !important;
        position: absolute !important;
        top: 100% !important;
        right: 16px !important;
        background-color: #ffffff !important;
        border: 1px solid #ddd !important;
        border-radius: 12px !important;
        padding: 16px !important;
        box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15) !important;
        z-index: 100 !important;
        gap: 10px !important;
        min-width: 180px !important;
    }

    html.dark-mode .top-actions {
        background-color: #1e293b !important;
        border-color: #334155 !important;
        box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4) !important;
    }

    .top-actions.show-mobile {
        display: flex !important;
    }

    .top-actions button {
        width: 100% !important;
        text-align: center !important;
    }
    
    .menu-bar {
        padding: 10px 16px;
        justify-content: center;
        flex-wrap: wrap;
        gap: 8px;
    }
}

/* =====================================================
   HEADER TOGGLES & BUTTONS (DARK MODE SUPPORT)
   ==================================================== */
.header-toggles {
    display: flex;
    gap: 8px;
    align-items: center;
}

.toggle-btn {
    width: 36px;
    height: 36px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 1px solid #ccc;
    background-color: #f8fafc;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    color: #334155;
    transition: all 0.2s ease;
}

.toggle-btn:hover {
    background-color: #f1f5f9;
    border-color: #cbd5e1;
    transform: scale(1.05);
}

/* =====================================================
   DARK MODE OVERRIDES
   ==================================================== */
html.dark-mode,
html.dark-mode body {
    background-color: #0f172a; /* Slate 900 */
    color: #cbd5e1; /* Slate 300 */
}

/* Header & Navigation */
html.dark-mode .top-bar {
    background-color: #1e293b; /* Slate 800 */
    border-bottom: 1px solid #334155;
}

html.dark-mode .logo a {
    color: #38bdf8; /* Sky 400 */
}

html.dark-mode .search {
    background-color: #334155; /* Slate 700 */
    border-color: #475569;
    color: #f8fafc;
}

html.dark-mode .search::placeholder {
    color: #94a3b8;
}

html.dark-mode .menu-bar {
    background-color: #1e293b;
    border-bottom: 1px solid #334155;
}

/* Toggles & Buttons */
html.dark-mode .toggle-btn {
    background-color: #1e293b;
    border-color: #334155;
    color: #f1f5f9;
}

html.dark-mode .toggle-btn:hover {
    background-color: #334155;
    border-color: #475569;
}

html.dark-mode button {
    background-color: #334155;
    border-color: #475569;
    color: #f8fafc;
}

html.dark-mode button:hover {
    background-color: #475569;
    border-color: #64748b;
}

html.dark-mode button.login {
    background-color: #1e293b;
    border-color: #334155;
    color: #f8fafc;
}

html.dark-mode button.login:hover {
    background-color: #334155;
}

html.dark-mode .top-link {
    background-color: #334155;
    color: #f8fafc;
}

html.dark-mode .top-link:hover {
    background-color: #475569;
}

/* Cards & Section Containers */
html.dark-mode .discover-card {
    background-color: #1e293b;
    border: 1px solid #334155;
    color: #f1f5f9;
}

html.dark-mode .step-card {
    background-color: #1e293b;
    border: 1px solid #334155;
    color: #f1f5f9;
}

html.dark-mode .step-number {
    color: #38bdf8;
}

html.dark-mode .book-card {
    background-color: #1e293b;
    border: 1px solid #334155;
    color: #cbd5e1;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
}

html.dark-mode .book-card .title {
    color: #f8fafc;
}

html.dark-mode .book-card .author {
    color: #94a3b8;
}

html.dark-mode .my-comment-card,
html.dark-mode .comment-card {
    background-color: #1e293b;
    border: 1px solid #334155;
    color: #cbd5e1;
}

html.dark-mode .comment-user {
    color: #38bdf8;
}

html.dark-mode .comment-book a {
    color: #38bdf8;
}

/* Dropdown Overlay Panels (Categories & Filters) */
html.dark-mode .categories-panel,
html.dark-mode .filters-panel {
    background-color: #1e293b;
    border: 1px solid #334155;
    color: #f1f5f9;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.5);
}

html.dark-mode .categories-left {
    background-color: #0f172a;
    border-right: 1px solid #334155;
}

html.dark-mode .category-main {
    background-color: #0f172a;
    color: #94a3b8;
}

html.dark-mode .category-main.active {
    background-color: #1e293b;
    color: #f8fafc;
}

html.dark-mode .category-main:hover {
    background-color: #1e293b;
    color: #f8fafc;
}

html.dark-mode .category-column h3 {
    color: #38bdf8;
    border-bottom: 2px solid #334155;
}

html.dark-mode .category-column a {
    color: #cbd5e1;
}

html.dark-mode .category-column a:hover {
    color: #38bdf8;
}

html.dark-mode .filters-panel h3 {
    border-bottom: 2px solid #334155;
}

html.dark-mode .filter-group {
    border-bottom: 1px solid #334155;
}

html.dark-mode .filter-group-title {
    color: #38bdf8;
}

/* Book Details Page Panels */
html.dark-mode .book-about-panel,
html.dark-mode .book-side-panel,
html.dark-mode .book-info-panel,
html.dark-mode .add-comment-section {
    background-color: #1e293b;
    border: 1px solid #334155;
    color: #cbd5e1;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
}

html.dark-mode .book-about-panel h2,
html.dark-mode .book-info-panel h2,
html.dark-mode .book-side-panel h3,
html.dark-mode .add-comment-section h2 {
    color: #f8fafc;
}

html.dark-mode .rating-label {
    color: #f8fafc;
}

html.dark-mode .rating-percent {
    color: #94a3b8;
}

html.dark-mode .rating-bar {
    background-color: #334155;
}

html.dark-mode .rating-fill {
    background: linear-gradient(90deg, #38bdf8, #0ea5e9);
}

html.dark-mode .warning-row {
    border-bottom: 1px solid #334155;
}

html.dark-mode .warning-label {
    color: #cbd5e1;
}

html.dark-mode .score-box {
    background-color: #0f172a;
    border: 1px solid #334155;
}

html.dark-mode .score-box .label {
    color: #94a3b8;
}

html.dark-mode .score-box .val {
    color: #38bdf8;
}

html.dark-mode .comment-input-area textarea {
    background-color: #334155;
    border-color: #475569;
    color: #f8fafc;
}

/* User Account Settings Dashboard */
html.dark-mode .account-sidebar {
    background-color: #1e293b;
    border-right: 1px solid #334155;
}

html.dark-mode .account-user .username {
    color: #f8fafc;
}

html.dark-mode .account-menu button {
    background-color: #1e293b;
    color: #94a3b8;
}

html.dark-mode .account-menu button:hover {
    background-color: #334155;
    color: #f8fafc;
}

html.dark-mode .account-menu button.active {
    background-color: #0f172a;
    color: #f8fafc;
    border-left: 4px solid #38bdf8;
}

html.dark-mode .info-box {
    background-color: #1e293b;
    border: 1px solid #334155;
}

html.dark-mode .info-box .info-label {
    color: #94a3b8;
}

html.dark-mode .info-box .info-value {
    color: #f8fafc;
}

html.dark-mode .status-badge {
    background-color: #334155;
}

/* Forms & Text Fields (General) */
html.dark-mode input[type="text"],
html.dark-mode input[type="email"],
html.dark-mode input[type="password"],
html.dark-mode select,
html.dark-mode textarea {
    background-color: #334155;
    border: 1px solid #475569;
    color: #f8fafc;
}

html.dark-mode input[type="text"]:focus,
html.dark-mode input[type="email"]:focus,
html.dark-mode input[type="password"]:focus,
html.dark-mode select:focus,
html.dark-mode textarea:focus {
    border-color: #38bdf8;
    outline: none;
}

/* Modals & Dialogs */
html.dark-mode .modal-content {
    background-color: #1e293b;
    border: 1px solid #334155;
    color: #cbd5e1;
}

html.dark-mode .modal-content h3 {
    color: #f8fafc;
}

/* Footer Section */
html.dark-mode .footer {
    background-color: #1e293b;
    border-top: 1px solid #334155;
    color: #94a3b8;
}

html.dark-mode .footer-bottom {
    border-top: 1px solid #334155;
}

/* Admin Panel Specific Styles */
html.dark-mode .admin-sidebar {
    background-color: #1e293b;
    border-right: 1px solid #334155;
}

html.dark-mode .admin-menu button {
    background-color: #1e293b;
    color: #94a3b8;
}

html.dark-mode .admin-menu button:hover {
    background-color: #334155;
    color: #f8fafc;
}

html.dark-mode .admin-menu button.active {
    background-color: #0f172a;
    color: #f8fafc;
    border-left: 4px solid #38bdf8;
}

html.dark-mode .admin-panel-card {
    background-color: #1e293b;
    border: 1px solid #334155;
    color: #cbd5e1;
}

html.dark-mode table th {
    background-color: #0f172a;
    border-bottom: 2px solid #334155;
    color: #94a3b8;
}

html.dark-mode table td {
    border-bottom: 1px solid #334155;
    color: #cbd5e1;
}

html.dark-mode .stat-number {
    color: #38bdf8;
}

html.dark-mode .form-card {
    background-color: #1e293b;
    border: 1px solid #334155;
}

/* Homepage Hero Section */
html.dark-mode .hero-main {
    background-color: #1e293b;
    border: 1px solid #334155;
    color: #cbd5e1;
}

html.dark-mode .hero-badge {
    background-color: #334155;
    color: #38bdf8;
}

html.dark-mode .hero-main p {
    color: #94a3b8;
}

html.dark-mode .hero-btn.primary {
    background-color: #38bdf8;
    color: #0f172a;
    border-color: #38bdf8;
}

html.dark-mode .hero-btn.primary:hover {
    background-color: #0ea5e9;
}

html.dark-mode .hero-btn.secondary {
    background-color: #1e293b;
    color: #cbd5e1;
    border-color: #475569;
}

html.dark-mode .hero-btn.secondary:hover {
    background-color: #334155;
}

html.dark-mode .hero-info-card,
html.dark-mode .hero-mini-card {
    background-color: #1e293b;
    border: 1px solid #334155;
    color: #cbd5e1;
}

html.dark-mode .hero-info-card ul {
    color: #94a3b8;
}

/* Homepage CTA Box & Review Cards */
html.dark-mode .cta-box {
    background-color: #1e293b;
    border: 1px solid #334155;
    color: #f1f5f9;
}

html.dark-mode .cta-box p {
    color: #94a3b8;
}

html.dark-mode .review-card {
    background-color: #1e293b;
    border: 1px solid #334155;
    color: #cbd5e1;
}

html.dark-mode .review-top strong a {
    color: #38bdf8;
}

html.dark-mode .review-text {
    color: #cbd5e1;
}

html.dark-mode .review-user {
    color: #94a3b8;
}

/* Homepage Genre & Warning Tags */
html.dark-mode .warning-tag,
html.dark-mode .genre-tag {
    background-color: #334155;
    border-color: #475569;
    color: #f8fafc;
}

html.dark-mode .warning-tag:hover,
html.dark-mode .genre-tag:hover {
    background-color: #475569;
    border-color: #64748b;
}

/* Section detail text and links */
html.dark-mode .section-head p {
    color: #94a3b8;
}

html.dark-mode .section-link {
    color: #38bdf8;
    border-bottom-color: #38bdf8;
}

/* Book Details Page Overrides */
html.dark-mode .book-title-bar {
    background-color: #1e293b;
    color: #f8fafc;
    border: 1px solid #334155;
}

html.dark-mode .book-title-bar h1 {
    color: #f8fafc;
}

html.dark-mode .book-title-bar p {
    color: #94a3b8;
}

html.dark-mode .book-score {
    background-color: #0f172a;
    border: 1px solid #334155;
}

html.dark-mode .stars {
    color: #eab308; /* Premium golden stars */
}

html.dark-mode .score-number {
    color: #cbd5e1;
}

html.dark-mode .book-gallery {
    background-color: #1e293b;
    border: 1px solid #334155;
}

html.dark-mode .book-image-large {
    background-color: #334155;
    color: #cbd5e1;
}

html.dark-mode .book-summary {
    color: #cbd5e1;
}

html.dark-mode .meta-item {
    background-color: #0f172a;
    border: 1px solid #334155;
}

html.dark-mode .meta-label {
    color: #94a3b8;
}

html.dark-mode .meta-value {
    color: #f8fafc;
}

/* Book Details Page Comment & Rate Section (Overriding inline JS styles) */
html.dark-mode .add-comment-section {
    background-color: #1e293b !important;
    border: 1px solid #334155 !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4) !important;
}

html.dark-mode .add-comment-section h3 {
    color: #f8fafc !important;
}

html.dark-mode .add-comment-section label {
    color: #cbd5e1 !important;
}

html.dark-mode #comment-rating {
    background-color: #334155 !important;
    border-color: #475569 !important;
    color: #f8fafc !important;
}

html.dark-mode #comment-text {
    background-color: #334155 !important;
    border-color: #475569 !important;
    color: #f8fafc !important;
}

html.dark-mode #comment-text:focus {
    border-color: #38bdf8 !important;
}

html.dark-mode #comment-form button[type="submit"] {
    background-color: #38bdf8 !important;
    color: #0f172a !important;
}

html.dark-mode #comment-form button[type="submit"]:hover {
    background-color: #0ea5e9 !important;
}

html.dark-mode .login-prompt {
    background-color: #1e293b !important;
    border: 2px dashed #334155 !important;
}

html.dark-mode .login-prompt p {
    color: #cbd5e1 !important;
}

html.dark-mode .login-prompt a {
    background-color: #38bdf8 !important;
    color: #0f172a !important;
}

html.dark-mode .login-prompt a:hover {
    background-color: #0ea5e9 !important;
}

/* Book Cover Container Dark Mode */
html.dark-mode .book-cover-container {
    background: #334155 !important; /* Slate 700 background matching detail page */
    border-bottom: 1px solid #475569 !important;
}

html.dark-mode .book-image-large .book-cover-container {
    background: transparent !important;
    border: none !important;
}

/* Book Listing Page (kitaplar.html) Dark Mode Overrides */
html.dark-mode .filter-sidebar {
    background: rgba(30, 41, 59, 0.75) !important; /* Slate 800 with opacity */
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3) !important;
}

html.dark-mode .filter-sidebar h3 {
    color: #f8fafc !important;
    border-bottom: 1px solid #334155 !important;
}

html.dark-mode .filter-checkbox {
    color: #cbd5e1 !important;
}

html.dark-mode .filter-checkbox input[type="checkbox"] {
    accent-color: #38bdf8 !important; /* Sky 400 */
}

html.dark-mode .listing-header {
    background: #1e293b !important; /* Slate 800 */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3) !important;
}

html.dark-mode .listing-header-info h1 {
    color: #f8fafc !important;
}

html.dark-mode .listing-header-info p {
    color: #94a3b8 !important;
}

html.dark-mode .sort-select {
    background: #334155 !important;
    border: 1px solid #475569 !important;
    color: #f8fafc !important;
}

html.dark-mode .no-results {
    background: #1e293b !important;
    color: #94a3b8 !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3) !important;
}

/* Favorites Page (favorites.html) Dark Mode Overrides */
html.dark-mode .favorites-page {
    background-color: #1e293b !important; /* Slate 800 container */
}

html.dark-mode .favorites-header {
    background: #0f172a !important; /* Slate 900 header block */
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3) !important;
}

html.dark-mode .favorites-header h2 {
    color: #f8fafc !important;
}

html.dark-mode .favorites-header p {
    color: #94a3b8 !important;
}

/* My Account Page (hesabim.html) and Subcomponents Dark Mode Overrides */
html.dark-mode .account-content {
    background: #1e293b !important; /* Slate 800 */
    border: 1px solid #334155 !important;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.3) !important;
}

html.dark-mode .account-content-card h2,
html.dark-mode .my-comments-component h2,
html.dark-mode .my-ratings-component h2 {
    color: #f8fafc !important;
}

html.dark-mode .account-content-desc,
html.dark-mode .component-desc {
    color: #94a3b8 !important;
}

html.dark-mode .info-group h3,
html.dark-mode .account-section h3 {
    color: #cbd5e1 !important;
}

html.dark-mode .tag-list .tag {
    background: #334155 !important;
    color: #cbd5e1 !important;
}

html.dark-mode .tag-list .tag.warning {
    background: #475569 !important;
    color: #f8fafc !important;
}

html.dark-mode .language-option {
    background: #334155 !important;
    border: 1px solid #475569 !important;
    color: #f1f5f9 !important;
}

html.dark-mode .language-option:hover {
    background: #475569 !important;
    border-color: #64748b !important;
}

html.dark-mode .language-option span {
    color: #f1f5f9 !important;
}

html.dark-mode .language-option input[type="radio"] {
    accent-color: #38bdf8 !important; /* Sky 400 */
}

/* My Comments Component Dark Mode Overrides */
html.dark-mode .my-comment-card {
    background-color: #334155 !important; /* Slate 700 background */
    border: 1px solid #475569 !important;
}

html.dark-mode .comment-date {
    color: #94a3b8 !important;
}

html.dark-mode .my-comment-text {
    color: #e2e8f0 !important;
}

/* My Ratings Component Dark Mode Overrides */
html.dark-mode .my-rating-card {
    background: #334155 !important; /* Slate 700 background */
    border: 1px solid #475569 !important;
}

html.dark-mode .rating-book {
    color: #f8fafc !important;
}

html.dark-mode .rating-date {
    color: #94a3b8 !important;
}

html.dark-mode .rating-stars {
    color: #eab308 !important; /* Premium golden stars */
}

html.dark-mode .rating-number {
    color: #cbd5e1 !important;
}

/* Categories Overlay & Dropdown Panel Dark Mode */
html.dark-mode .categories-overlay {
    background: rgba(0, 0, 0, 0.5) !important;
}

html.dark-mode .categories-panel {
    background-color: #1e293b !important; /* Slate 800 */
    border: 1px solid #334155 !important;
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.5) !important;
}

html.dark-mode .categories-left {
    background-color: #0f172a !important; /* Slate 900 */
    border-right: 1px solid #334155 !important;
}

html.dark-mode .category-main {
    color: #cbd5e1 !important;
}

html.dark-mode .category-main:hover {
    background-color: #1e293b !important;
}

html.dark-mode .category-main.active {
    background-color: #334155 !important;
    color: #f8fafc !important;
}

html.dark-mode .categories-right {
    background: #1e293b !important; /* Slate 800 */
}

html.dark-mode .category-column h3 {
    color: #38bdf8 !important; /* Sky 400 */
}

html.dark-mode .category-column a {
    color: #cbd5e1 !important;
}

html.dark-mode .category-column a:hover {
    color: #38bdf8 !important;
}

/* Filters Overlay & Dropdown Panel Dark Mode */
html.dark-mode .filters-overlay {
    background: rgba(0, 0, 0, 0.5) !important;
}

html.dark-mode .filters-panel {
    background-color: #1e293b !important; /* Slate 800 */
    border: 1px solid #334155 !important;
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.5) !important;
}

html.dark-mode .filters-header {
    background: #1e293b !important;
    border-bottom: 1px solid #334155 !important;
}

html.dark-mode .filters-header h2 {
    color: #f8fafc !important;
}

html.dark-mode .filters-close {
    background: #334155 !important;
    color: #94a3b8 !important;
}

html.dark-mode .filters-close:hover {
    background: #475569 !important;
    color: #f8fafc !important;
}

html.dark-mode .filters-body {
    background: #1e293b !important;
}

html.dark-mode .filter-section {
    background: #0f172a !important; /* Slate 900 */
    border: 1px solid #334155 !important;
}

html.dark-mode .filter-section h3 {
    color: #38bdf8 !important; /* Sky 400 */
}

html.dark-mode .filter-check {
    color: #cbd5e1 !important;
}

html.dark-mode .filter-check input[type="checkbox"] {
    accent-color: #38bdf8 !important; /* Sky 400 */
}

html.dark-mode .filters-footer {
    background: #1e293b !important;
    border-top: 1px solid #334155 !important;
}

html.dark-mode .filters-clear {
    background: #334155 !important;
    border: 1px solid #475569 !important;
    color: #cbd5e1 !important;
}

html.dark-mode .filters-clear:hover {
    background: #475569 !important;
    color: #f8fafc !important;
}

html.dark-mode .filters-apply {
    background: #38bdf8 !important; /* Sky 400 */
    border: 1px solid #38bdf8 !important;
    color: #0f172a !important;
}

html.dark-mode .filters-apply:hover {
    background: #0ea5e9 !important;
    border-color: #0ea5e9 !important;
}

/* Footer & Legal Policy Modals Dark Mode */
html.dark-mode .footer-modal-overlay {
    background: rgba(15, 23, 42, 0.6) !important;
}

html.dark-mode .footer-modal {
    background: rgba(30, 41, 59, 0.9) !important; /* Slate 800 with glass opacity */
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5) !important;
}

html.dark-mode .footer-modal-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
}

html.dark-mode .footer-modal-header h2 {
    color: #f8fafc !important;
}

html.dark-mode .footer-modal-close {
    color: #94a3b8 !important;
}

html.dark-mode .footer-modal-close:hover {
    color: #f8fafc !important;
}

html.dark-mode .footer-modal-content {
    color: #cbd5e1 !important;
}

html.dark-mode .footer-modal-content h1,
html.dark-mode .footer-modal-content h2,
html.dark-mode .footer-modal-content h3,
html.dark-mode .footer-modal-content h4,
html.dark-mode .footer-modal-content p,
html.dark-mode .footer-modal-content li,
html.dark-mode .footer-modal-content span {
    color: #cbd5e1 !important;
}

html.dark-mode .footer-modal-content h1,
html.dark-mode .footer-modal-content h2,
html.dark-mode .footer-modal-content h3,
html.dark-mode .footer-modal-content h4 {
    color: #38bdf8 !important; /* Sky 400 headings */
}

html.dark-mode .footer-modal-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.1) !important;
}

html.dark-mode .footer-modal-btn {
    background: #38bdf8 !important; /* Sky 400 */
    color: #0f172a !important;
}

html.dark-mode .footer-modal-btn:hover {
    background: #0ea5e9 !important;
}

/* FAQ Page (sss.html) Dark Mode Overrides */
html.dark-mode .faq-badge {
    background: #334155 !important;
    color: #cbd5e1 !important;
}

html.dark-mode .faq-hero h1 {
    color: #f8fafc !important;
}

html.dark-mode .faq-hero p {
    color: #94a3b8 !important;
}

html.dark-mode .faq-side-card {
    background: #1e293b !important; /* Slate 800 */
    border: 1px solid #334155 !important;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.3) !important;
}

html.dark-mode .faq-side-card h3 {
    color: #f8fafc !important;
}

html.dark-mode .faq-side-card a {
    color: #cbd5e1 !important;
    border-bottom: 1px solid #334155 !important;
}

html.dark-mode .faq-side-card a:hover {
    color: #38bdf8 !important; /* Sky 400 */
}

html.dark-mode .faq-group {
    background: #1e293b !important; /* Slate 800 */
    border: 1px solid #334155 !important;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.3) !important;
}

html.dark-mode .faq-group h2 {
    color: #f8fafc !important;
}

html.dark-mode .faq-item {
    border-top: 1px solid #334155 !important;
}

html.dark-mode .faq-question {
    color: #f1f5f9 !important;
}

html.dark-mode .faq-question span:last-child {
    color: #94a3b8 !important;
}

html.dark-mode .faq-answer p {
    color: #cbd5e1 !important;
}

html.dark-mode .faq-contact-box {
    background: #1e293b !important; /* Slate 800 */
    border: 1px solid #334155 !important;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.3) !important;
}

html.dark-mode .faq-contact-box h2 {
    color: #f8fafc !important;
}

html.dark-mode .faq-contact-box p {
    color: #cbd5e1 !important;
}

html.dark-mode .faq-btn.primary {
    background: #38bdf8 !important; /* Sky 400 */
    color: #0f172a !important;
    border-color: #38bdf8 !important;
}

html.dark-mode .faq-btn.primary:hover {
    background: #0ea5e9 !important;
    border-color: #0ea5e9 !important;
}

html.dark-mode .faq-btn.secondary {
    background: #334155 !important;
    color: #f1f5f9 !important;
    border-color: #475569 !important;
}

html.dark-mode .faq-btn.secondary:hover {
    background: #475569 !important;
    border-color: #64748b !important;
}

/* Book Details Comment Card Dark Mode Overrides */
html.dark-mode .comment-card {
    background-color: #334155 !important;
    border: 1px solid #475569 !important;
}

html.dark-mode .comment-card .username {
    color: #f8fafc !important;
}

html.dark-mode .comment-card .role {
    color: #94a3b8 !important;
}

html.dark-mode .comment-card .comment-rating span {
    color: #cbd5e1 !important;
}

html.dark-mode .comment-card .comment-text {
    color: #e2e8f0 !important;
}

html.dark-mode .comment-card .avatar-placeholder {
    background-color: #475569 !important;
    color: #f8fafc !important;
}

/* Add Comment Section Dark Mode Overrides */
html.dark-mode .add-comment-section {
    background-color: #1e293b !important;
    background: #1e293b !important;
    border: 1px solid #334155 !important;
    color: #cbd5e1 !important;
}

html.dark-mode .add-comment-section h3 {
    color: #f8fafc !important;
}

html.dark-mode .add-comment-section label {
    color: #cbd5e1 !important;
}