/* ============================================
   CUSTOM CSS - Consolidated Styles
   ============================================ */

/* ============================================
   Article Content - Georgia Font
   ============================================ */

/* Article title in page header */
.page-title h1,
.blog-details .page-title h1 {
    font-family: Georgia, 'Times New Roman', serif !important;
}

/* Article main content */
.blog-details .content,
.blog-details article .content,
#article-main-content {
    font-family: Georgia, 'Times New Roman', serif !important;
    line-height: 1.8;
}

/* Article content headings */
.blog-details .content h1,
.blog-details .content h2,
.blog-details .content h3,
.blog-details .content h4,
.blog-details .content h5,
.blog-details .content h6 {
    font-family: Georgia, 'Times New Roman', serif !important;
}

/* Article sections */
.article-sections-container,
.article-section-card,
.section-content {
    font-family: Georgia, 'Times New Roman', serif !important;
}

.article-section-card .accordion-header,
.article-section-card .fw-bold {
    font-family: Georgia, 'Times New Roman', serif !important;
}

/* Infobox */
.infobox-widget {
    font-family: Georgia, 'Times New Roman', serif !important;
}

.infobox-widget h4,
.infobox-widget h5,
.infobox-section-title,
.infobox-widget .card-title {
    font-family: Georgia, 'Times New Roman', serif !important;
}

/* References section */
.wiki-references-section,
.wiki-references-title,
.wiki-references-list {
    font-family: Georgia, 'Times New Roman', serif !important;
}

/* Categories section */
.wiki-categories-section {
    font-family: Georgia, 'Times New Roman', serif !important;
}

/* ============================================
   Accessibility Styles
   ============================================ */

/* Skip to main content link */
.skip-to-main {
    position: absolute;
    left: -9999px;
    z-index: 999;
    padding: 1em;
    background-color: #000;
    color: #fff;
    text-decoration: none;
    border-radius: 0 0 4px 0;
}

.skip-to-main:focus {
    left: 0;
    top: 0;
}

/* Screen reader only content */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

.sr-only-focusable:active,
.sr-only-focusable:focus {
    position: static;
    width: auto;
    height: auto;
    overflow: visible;
    clip: auto;
    white-space: normal;
}

/* ============================================
   Language Switcher Styles
   ============================================ */

.language-switcher {
    margin-left: 4px;
    padding-left: 4px;
    border-left: 1px solid rgba(0, 0, 0, 0.1);
}

.language-switcher .language-form {
    margin: 0;
    padding: 0;
}

.language-switcher .language-select {
    background: transparent;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 4px;
    padding: 4px 8px;
    font-size: 12px;
    color: var(--text-color, #333);
    cursor: pointer;
    transition: all 0.3s ease;
    outline: none;
}

.language-switcher .language-select:hover {
    background: rgba(0, 0, 0, 0.05);
    border-color: rgba(0, 0, 0, 0.2);
}

.language-switcher .language-select:focus {
    outline: 2px solid #4A90E2;
    outline-offset: 2px;
}

/* Responsive language switcher */
@media (max-width: 768px) {
    .language-switcher {
        margin-left: 2px;
        padding-left: 2px;
    }
    
    .language-switcher .language-select {
        font-size: 11px;
        padding: 3px 6px;
    }
}

@media (max-width: 480px) {
    .language-switcher .language-select {
        font-size: 10px;
        padding: 2px 4px;
    }
}

/* Mobile Navigation Toggle - Inside navmenu */
.mobile-nav-toggle {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

/* Mobile Navigation - Dropdown Style (not full-screen) */
@media (max-width: 1199px) {
    .navmenu {
        position: relative;
    }
    
    .mobile-nav-active .navmenu {
        position: relative;
    }
    
    .mobile-nav-active .navmenu ul {
        display: block !important;
        position: absolute;
        top: calc(100% + 10px);
        right: 0;
        left: auto;
        width: auto;
        min-width: 250px;
        max-width: 90vw;
        max-height: 80vh;
        overflow-y: auto;
        background-color: var(--nav-mobile-background-color);
        border-radius: 6px;
        box-shadow: 0px 5px 20px rgba(0, 0, 0, 0.2);
        z-index: 9999;
    }
    
    /* Remove full-screen overlay */
    .mobile-nav-active .navmenu::before {
        display: none;
    }
}

/* ============================================
   Accessibility Controls Styles
   ============================================ */

.accessibility-controls {
    position: fixed;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1000;
    background: var(--background-color, #fff);
    border: 1px solid var(--border-color, #ddd);
    border-radius: 8px;
    padding: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.accessibility-controls > div {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 5px 0;
    border-bottom: 1px solid var(--border-color, #eee);
}

.accessibility-controls > div:last-child {
    border-bottom: none;
}

.a11y-btn {
    background: var(--button-bg, #f8f9fa);
    border: 1px solid var(--border-color, #ddd);
    border-radius: 6px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 18px;
    color: var(--text-color, #333);
}

.a11y-btn:hover {
    background: var(--button-hover-bg, #e9ecef);
    transform: scale(1.05);
}

.a11y-btn:focus {
    outline: 3px solid #4A90E2;
    outline-offset: 2px;
}

.a11y-btn:active {
    transform: scale(0.95);
}

@media (max-width: 768px) {
    .accessibility-controls {
        right: 10px;
        padding: 8px;
    }
    
    .a11y-btn {
        width: 35px;
        height: 35px;
        font-size: 16px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .a11y-btn,
    .accessibility-controls {
        transition: none;
    }
}

/* ============================================
   Profile Page Styles
   ============================================ */

/* Profile Tabs Styling - Match main site colors */
.nav-tabs {
    border-bottom: 2px solid color-mix(in srgb, var(--default-color), transparent 90%);
    margin-bottom: 1.5rem;
}

.nav-tabs .nav-link {
    color: var(--nav-color);
    border: none;
    border-bottom: 3px solid transparent;
    padding: 14px 24px;
    font-weight: 500;
    transition: all 0.3s ease;
    background: transparent;
    position: relative;
    margin-bottom: -2px;
    border-radius: 0;
}

.nav-tabs .nav-link:hover {
    color: var(--accent-color);
    border-bottom-color: color-mix(in srgb, var(--accent-color), transparent 60%);
    background: color-mix(in srgb, var(--accent-color), transparent 98%);
}

.nav-tabs .nav-link.active {
    color: var(--accent-color);
    background: transparent;
    border-bottom-color: var(--accent-color);
    font-weight: 600;
}

.nav-tabs .nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 3px;
    background-color: var(--accent-color);
}

.nav-tabs .nav-link .badge {
    margin-left: 8px;
    background-color: var(--accent-color) !important;
    color: var(--contrast-color) !important;
    font-size: 0.75rem;
    padding: 0.25em 0.5em;
    border-radius: 12px;
    font-weight: 600;
}

.nav-tabs .nav-link.active .badge {
    background-color: var(--accent-color) !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.nav-tabs .nav-link i {
    margin-right: 6px;
    font-size: 1rem;
}

/* Profile Avatar Styles */
.profile-avatar-large {
    width: 120px;
    height: 120px;
    font-size: 3rem;
    font-weight: 600;
}

.profile-avatar-medium {
    width: 150px;
    height: 150px;
    font-size: 4rem;
    font-weight: 700;
}

.profile-avatar-small {
    width: 40px;
    height: 40px;
}

.profile-icon-circle {
    width: 40px;
    height: 40px;
}

.profile-avatar-img {
    max-width: 150px;
    max-height: 150px;
    object-fit: cover;
}

/* Profile Empty State Icons */
.profile-empty-icon {
    font-size: 3rem;
    color: #ccc;
}

/* ============================================
   Alert Styling - Ensure error messages are visible
   ============================================ */

.alert-danger,
.alert-error {
    background-color: #f8d7da !important;
    border-color: #f5c2c7 !important;
    color: #842029 !important;
    border: 1px solid #f5c2c7 !important;
    border-radius: 0.375rem;
}

.alert-success {
    background-color: #d1e7dd;
    border-color: #badbcc;
    color: #0f5132;
}

.alert-warning {
    background-color: #fff3cd;
    border-color: #ffecb5;
    color: #664d03;
}

.alert-info {
    background-color: #cff4fc;
    border-color: #b6effb;
    color: #055160;
}

/* ============================================
   About Page Styles
   ============================================ */

.about-intro-text {
    font-size: 1.1rem;
    line-height: 1.8;
}

.about-feature-icon {
    color: var(--accent-color);
    font-size: 1.2rem;
}

.about-feature-text {
    font-size: 1rem;
    line-height: 1.6;
}

.about-image-container {
    object-fit: cover;
    padding: 2px;
}

.about-image-grid {
    gap: 2px;
}

.about-image-small {
    object-fit: cover;
    flex: 1;
    padding: 2px;
}

.team-avatar-large {
    width: 150px;
    height: 150px;
    font-size: 4rem;
    font-weight: 700;
}

.team-avatar-medium {
    width: 120px;
    height: 120px;
    font-size: 3rem;
    font-weight: 700;
}

/* ============================================
   Article Detail Styles
   ============================================ */

.inline-form {
    display: inline;
}

/* ============================================
   Dark Mode Styles
   ============================================ */

body.dark-mode {
    --background-color: #1a1a1a;
    --text-color: #e0e0e0;
    --border-color: #444;
    --button-bg: #2a2a2a;
    --button-hover-bg: #3a3a3a;
    --link-color: #6db3f2;
    --card-bg: #242424;
    --heading-color: #ffffff;
}

body.dark-mode {
    background-color: #1a1a1a !important;
    color: #e0e0e0 !important;
}

body.dark-mode,
body.dark-mode * {
    color: #e0e0e0 !important;
}

body.dark-mode h1,
body.dark-mode h2,
body.dark-mode h3,
body.dark-mode h4,
body.dark-mode h5,
body.dark-mode h6 {
    color: #ffffff !important;
}

body.dark-mode a {
    color: #6db3f2 !important;
}

body.dark-mode a:hover {
    color: #8fc5f4 !important;
}

body.dark-mode .header,
body.dark-mode .footer {
    background-color: #242424 !important;
    border-color: #444 !important;
}

body.dark-mode .light-background {
    background-color: #242424 !important;
}

body.dark-mode .dark-background {
    background-color: #0d0d0d !important;
}

body.dark-mode .post-entry,
body.dark-mode .team-member,
body.dark-mode .pricing-card,
body.dark-mode .testimonial-card,
body.dark-mode .service-item,
body.dark-mode .info-card,
body.dark-mode .post-entry-1,
body.dark-mode .card,
body.dark-mode .info-item {
    background-color: #242424 !important;
    border-color: #444 !important;
}

/* Profile Info Item Dark Mode */
body.dark-mode .info-item.bg-white {
    background-color: #242424 !important;
}

body.dark-mode .info-item .bg-light {
    background-color: #2a2a2a !important;
}

body.dark-mode .info-item .border-top {
    border-color: #444 !important;
}

body.dark-mode .info-item .text-muted {
    color: #adb5bd !important;
}

body.dark-mode .info-item h3,
body.dark-mode .info-item h4,
body.dark-mode .info-item h5 {
    color: #ffffff !important;
}

body.dark-mode .info-item .fw-semibold {
    color: #e0e0e0 !important;
}

body.dark-mode .info-item.shadow-sm {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3) !important;
}

/* TinyMCE Editor Dark Mode */
body.dark-mode .tox-tinymce,
body.dark-mode .tox .tox-toolbar,
body.dark-mode .tox .tox-toolbar__group,
body.dark-mode .tox .tox-edit-area__iframe {
    background-color: #2a2a2a !important;
    border-color: #444 !important;
}

body.dark-mode .tox .tox-toolbar,
body.dark-mode .tox .tox-toolbar__overflow,
body.dark-mode .tox .tox-toolbar__primary {
    background-color: #2a2a2a !important;
}

body.dark-mode .tox .tox-button,
body.dark-mode .tox .tox-button--enabled,
body.dark-mode .tox .tox-button:hover {
    background-color: #3a3a3a !important;
    color: #e0e0e0 !important;
}

body.dark-mode .tox .tox-button:focus {
    background-color: #4a4a4a !important;
}

body.dark-mode .tox .tox-menu,
body.dark-mode .tox .tox-collection,
body.dark-mode .tox .tox-collection__item {
    background-color: #2a2a2a !important;
    color: #e0e0e0 !important;
}

body.dark-mode .tox .tox-collection__item:hover,
body.dark-mode .tox .tox-collection__item--active {
    background-color: #3a3a3a !important;
}

body.dark-mode .tox .tox-edit-area__iframe {
    background-color: #1e1e1e !important;
}

/* TinyMCE Content Body Dark Mode */
body.dark-mode .mce-content-body {
    background-color: #1e1e1e !important;
    color: #e0e0e0 !important;
}

body.dark-mode .mce-content-body p,
body.dark-mode .mce-content-body div,
body.dark-mode .mce-content-body span {
    color: #e0e0e0 !important;
}

body.dark-mode .mce-content-body a {
    color: #6db3f2 !important;
}

body.dark-mode .mce-content-body h1,
body.dark-mode .mce-content-body h2,
body.dark-mode .mce-content-body h3,
body.dark-mode .mce-content-body h4,
body.dark-mode .mce-content-body h5,
body.dark-mode .mce-content-body h6 {
    color: #ffffff !important;
}

body.dark-mode .mce-content-body table,
body.dark-mode .mce-content-body td,
body.dark-mode .mce-content-body th {
    border-color: #444 !important;
}

/* Ensure no extra space after footer */
.footer .copyright > *:last-child {
    margin-bottom: 0 !important;
}

.footer .copyright {
    padding-bottom: 20px;
}

body.dark-mode input,
body.dark-mode textarea,
body.dark-mode select,
body.dark-mode .form-control {
    background-color: #2a2a2a !important;
    color: #e0e0e0 !important;
    border-color: #444 !important;
}

body.dark-mode input::placeholder,
body.dark-mode textarea::placeholder {
    color: #999 !important;
}

body.dark-mode button,
body.dark-mode .btn {
    background-color: #2a2a2a !important;
    color: #e0e0e0 !important;
    border-color: #444 !important;
}

body.dark-mode button:hover,
body.dark-mode .btn:hover {
    background-color: #3a3a3a !important;
}

/* Button Get Started Dark Mode */
body.dark-mode .btn-get-started {
    background-color: var(--accent-color, #4154f1) !important;
    color: var(--contrast-color, #ffffff) !important;
    border-color: var(--accent-color, #4154f1) !important;
}

body.dark-mode .btn-get-started:hover {
    background-color: color-mix(in srgb, var(--accent-color, #4154f1) 80%, transparent) !important;
    color: var(--contrast-color, #ffffff) !important;
    border-color: color-mix(in srgb, var(--accent-color, #4154f1) 80%, transparent) !important;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(65, 84, 241, 0.3);
}

body.dark-mode .btn-get-started:focus {
    background-color: var(--accent-color, #4154f1) !important;
    color: var(--contrast-color, #ffffff) !important;
    box-shadow: 0 0 0 3px rgba(65, 84, 241, 0.25);
}

body.dark-mode .btn-get-started:active {
    background-color: color-mix(in srgb, var(--accent-color, #4154f1) 70%, transparent) !important;
    transform: translateY(0);
}

/* Secondary/Cancel Button Dark Mode */
body.dark-mode .btn-get-started.btn-secondary,
body.dark-mode .btn-get-started.btn-cancel {
    background-color: #3a3a3a !important;
    color: #e0e0e0 !important;
    border-color: #555 !important;
}

body.dark-mode .btn-get-started.btn-secondary:hover,
body.dark-mode .btn-get-started.btn-cancel:hover {
    background-color: #4a4a4a !important;
    color: #ffffff !important;
    border-color: #666 !important;
}

/* Danger Button Dark Mode */
body.dark-mode .btn-get-started.btn-danger {
    background-color: #dc3545 !important;
    color: #ffffff !important;
    border-color: #dc3545 !important;
}

body.dark-mode .btn-get-started.btn-danger:hover {
    background-color: #c82333 !important;
    border-color: #c82333 !important;
    box-shadow: 0 2px 8px rgba(220, 53, 69, 0.3);
}

/* Footer Button Dark Mode */
body.dark-mode footer .btn-get-started {
    background-color: var(--accent-color, #4154f1) !important;
    color: var(--contrast-color, #ffffff) !important;
}

body.dark-mode footer .btn-get-started:hover {
    background-color: color-mix(in srgb, var(--accent-color, #4154f1) 80%, transparent) !important;
    color: var(--contrast-color, #ffffff) !important;
}

body.dark-mode .navmenu a {
    color: #e0e0e0 !important;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
}

body.dark-mode .navmenu a:hover,
body.dark-mode .navmenu a.active,
body.dark-mode .navmenu a.active:focus {
    color: #ffffff !important;
    border: none !important;
    border-top: none !important;
    border-bottom: none !important;
    border-left: none !important;
    border-right: none !important;
    outline: none !important;
    box-shadow: none !important;
}

/* Remove borders from navigation links */
.navmenu a,
.navmenu a:focus,
.navmenu a:hover,
.navmenu a.active,
.navmenu a.active:focus {
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
}

body.dark-mode .section {
    background-color: #1a1a1a !important;
}

body.dark-mode .breadcrumbs,
body.dark-mode .breadcrumbs a {
    color: #999 !important;
}

body.dark-mode .page-title {
    background-color: #242424 !important;
}

body.dark-mode .post-meta,
body.dark-mode .post-meta span {
    color: #999 !important;
}

body.dark-mode i {
    opacity: 0.9;
}

body.dark-mode .dark-icon {
    display: none !important;
}

body.dark-mode .light-icon {
    display: inline-block !important;
}

/* Dark mode for language switcher */
body.dark-mode .language-switcher {
    border-left-color: rgba(255, 255, 255, 0.2);
}

body.dark-mode .language-switcher .language-select {
    border-color: rgba(255, 255, 255, 0.2);
    color: #e0e0e0;
    background: transparent;
}

body.dark-mode .language-switcher .language-select:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
}

/* Dark mode tabs */
body.dark-mode .nav-tabs {
    border-bottom-color: color-mix(in srgb, var(--default-color), transparent 80%);
}

body.dark-mode .nav-tabs .nav-link {
    color: #e0e0e0;
}

body.dark-mode .nav-tabs .nav-link:hover {
    color: var(--accent-color);
    background: color-mix(in srgb, var(--accent-color), transparent 95%);
    border-bottom-color: color-mix(in srgb, var(--accent-color), transparent 60%);
}

body.dark-mode .nav-tabs .nav-link.active {
    color: var(--accent-color);
    border-bottom-color: var(--accent-color);
}

body.dark-mode .nav-tabs .nav-link.active::after {
    background-color: var(--accent-color);
}

body.dark-mode .nav-tabs .nav-link .badge {
    background-color: var(--accent-color) !important;
    color: var(--contrast-color) !important;
}

/* Dark mode alerts */
body.dark-mode .alert-danger,
body.dark-mode .alert-error {
    background-color: #3d1f1f !important;
    border-color: #5c2a2a !important;
    color: #ff6b6b !important;
    border: 1px solid #5c2a2a !important;
}

body.dark-mode .alert-success {
    background-color: #1f3d1f;
    border-color: #2a5c2a;
    color: #6bff6b;
}

body.dark-mode .alert-warning {
    background-color: #3d3d1f;
    border-color: #5c5c2a;
    color: #ffff6b;
}

body.dark-mode .alert-info {
    background-color: #1f2f3d;
    border-color: #2a3f5c;
    color: #6bb5ff;
}

/* ============================================
   High Contrast Mode
   ============================================ */

body.high-contrast {
    --background-color: #000;
    --text-color: #ffff00;
    --link-color: #00ff00;
    --border-color: #fff;
    --button-bg: #000;
    --button-hover-bg: #333;
}

body.high-contrast * {
    border-color: var(--border-color) !important;
}

body.high-contrast a {
    color: var(--link-color) !important;
    text-decoration: underline;
}

body.high-contrast .btn,
body.high-contrast button {
    background: #000 !important;
    color: #ffff00 !important;
    border: 2px solid #fff !important;
}

/* ============================================
   Focus Indicators - OFF by default, can be toggled ON
   ============================================ */

body:not(.show-focus) a:focus,
body:not(.show-focus) button:focus,
body:not(.show-focus) input:focus,
body:not(.show-focus) textarea:focus,
body:not(.show-focus) select:focus {
    outline: none;
}

body.show-focus a:focus,
body.show-focus button:focus,
body.show-focus input:focus,
body.show-focus textarea:focus,
body.show-focus select:focus {
    outline: 3px solid #4A90E2 !important;
    outline-offset: 2px !important;
}

/* ============================================
   Font Size Classes
   ============================================ */

body.font-small {
    font-size: 14px;
}

body.font-medium {
    font-size: 16px; /* Default */
}

body.font-large {
    font-size: 18px;
}

body.font-xlarge {
    font-size: 20px;
}

body.font-xxlarge {
    font-size: 22px;
}

/* ============================================
   Sidebar Styles - Set minimum width, some padding, always right side
   ============================================ */

.blog-details .row {
    display: flex;
    flex-wrap: wrap;
}

.blog-details .row > .col-lg-9 {
    order: 1;
    padding-right: 15px;
}

.blog-details .row > .col-lg-3 {
    padding-left: 15px;
    padding-right: 0 !important;
    margin: 0 !important;
    min-width: 250px;
    order: 2;
}

/* On mobile, move sidebar to bottom */
@media (max-width: 991px) {
    .blog-details .row > .col-lg-9 {
        order: 1;
        width: 100%;
    }
    
    .blog-details .row > .col-lg-3 {
        order: 2;
        width: 100%;
        padding-left: 0;
        padding-top: 20px;
    }
}

.widgets-container {
    padding: 0;
    margin: 0;
}

.widget-item {
    margin-bottom: 0;
    padding: 15px;
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 8px;
}

.widget-item:not(:last-child) {
    margin-bottom: 20px;
}

.widget-title {
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e9ecef;
}

/* Site Settings Widget Styles - Accordion (matching article-info style) */
.site-settings-widget,
.recent-changes-widget {
    margin-bottom: 1.5rem;
}

.site-settings-widget .accordion,
.recent-changes-widget .accordion {
    background: transparent;
}

.site-settings-widget .accordion-item,
.recent-changes-widget .accordion-item {
    border: 1px solid #e9ecef;
    border-radius: 12px;
    overflow: hidden;
    background-color: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.site-settings-widget .accordion-item:hover,
.recent-changes-widget .accordion-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.site-settings-widget .accordion-header,
.recent-changes-widget .accordion-header {
    margin-bottom: 0;
}

.site-settings-widget .accordion-header h3,
.recent-changes-widget .accordion-header h3 {
    margin: 0;
    padding: 0;
}

.site-settings-widget .accordion-button,
.recent-changes-widget .accordion-button {
    background-color: #f8f9fa;
    border: none;
    color: var(--heading-color);
    font-weight: 600;
    padding: 1rem 1.25rem;
    box-shadow: none;
    border-radius: 12px 12px 0 0;
    display: flex;
    align-items: center;
    width: 100%;
    position: relative;
    margin-bottom: 0;
    text-decoration: none !important;
    cursor: pointer;
    pointer-events: auto;
}

.site-settings-widget .accordion-button span,
.recent-changes-widget .accordion-button span,
.site-settings-widget .accordion-button,
.recent-changes-widget .accordion-button,
.site-settings-widget .accordion-button *,
.recent-changes-widget .accordion-button * {
    text-decoration: none !important;
    border-bottom: none !important;
}

.site-settings-widget .accordion-button:hover,
.recent-changes-widget .accordion-button:hover {
    text-decoration: none !important;
}

.site-settings-widget .accordion-button:hover span,
.recent-changes-widget .accordion-button:hover span {
    text-decoration: none !important;
}

.site-settings-widget .accordion-button:not(.collapsed),
.recent-changes-widget .accordion-button:not(.collapsed) {
    background-color: #f8f9fa;
    color: var(--heading-color);
    box-shadow: none;
    border-radius: 12px 12px 0 0;
    text-decoration: none !important;
}

.site-settings-widget .accordion-button.collapsed,
.recent-changes-widget .accordion-button.collapsed {
    border-radius: 12px;
}

.site-settings-widget .accordion-button:hover,
.recent-changes-widget .accordion-button:hover {
    background-color: #f8f9fa;
    color: var(--heading-color);
}

.site-settings-widget .accordion-button:focus,
.recent-changes-widget .accordion-button:focus {
    box-shadow: none !important;
    border-color: transparent;
    outline: none !important;
    outline-offset: 0;
}

.site-settings-widget .accordion-button::after,
.recent-changes-widget .accordion-button::after,
.article-info-accordion .accordion-button::after {
    display: none;
}

.site-settings-widget .accordion-button .accordion-gear-icon,
.site-settings-widget .accordion-button i.bi-gear-fill,
.recent-changes-widget .accordion-button .accordion-gear-icon,
.recent-changes-widget .accordion-button i.bi-clock-history {
    font-size: 18px;
    color: #495057;
    transition: transform 0.3s ease, color 0.2s ease;
    vertical-align: middle;
}

.site-settings-widget .accordion-button:hover .accordion-gear-icon,
.site-settings-widget .accordion-button:hover i.bi-gear-fill,
.recent-changes-widget .accordion-button:hover .accordion-gear-icon,
.recent-changes-widget .accordion-button:hover i.bi-clock-history {
    color: #212529;
    transform: rotate(15deg);
}

.site-settings-widget .accordion-button:not(.collapsed) .accordion-gear-icon,
.site-settings-widget .accordion-button:not(.collapsed) i.bi-gear-fill,
.recent-changes-widget .accordion-button:not(.collapsed) .accordion-gear-icon,
.recent-changes-widget .accordion-button:not(.collapsed) i.bi-clock-history {
    color: #212529;
}

.site-settings-widget .accordion-icon,
.recent-changes-widget .accordion-icon,
.article-info-accordion .accordion-icon {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), color 0.2s ease;
    font-size: 18px;
    color: #6c757d;
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: transparent;
}

.site-settings-widget .accordion-button:hover .accordion-icon,
.recent-changes-widget .accordion-button:hover .accordion-icon,
.article-info-accordion .accordion-button:hover .accordion-icon {
    color: #212529;
    background: #f8f9fa;
}

.site-settings-widget .accordion-button:not(.collapsed) .accordion-icon,
.recent-changes-widget .accordion-button:not(.collapsed) .accordion-icon,
.article-info-accordion .accordion-button:not(.collapsed) .accordion-icon {
    transform: rotate(180deg);
    color: #212529;
    background: #f8f9fa;
}

.site-settings-widget .accordion-collapse,
.recent-changes-widget .accordion-collapse {
    border: none;
}

.site-settings-widget .accordion-collapse.collapse,
.recent-changes-widget .accordion-collapse.collapse {
    transition: height 0.35s ease;
}

.site-settings-widget .accordion-collapse.collapsing,
.recent-changes-widget .accordion-collapse.collapsing {
    height: 0;
    overflow: hidden;
    transition: height 0.35s ease;
}

.site-settings-widget .accordion-collapse.show,
.recent-changes-widget .accordion-collapse.show {
    height: auto;
}

.site-settings-widget .accordion-body,
.recent-changes-widget .accordion-body {
    background-color: #fff;
    color: var(--default-color);
    padding: 1.5rem;
}

.site-settings-widget .accordion-button:hover,
.recent-changes-widget .accordion-button:hover {
    color: #212529;
}

.site-settings-widget .accordion-button:not(.collapsed):hover,
.recent-changes-widget .accordion-button:not(.collapsed):hover {
    color: #212529;
}

.site-settings-widget .settings-section {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e9ecef;
}

.site-settings-widget .settings-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.site-settings-widget .settings-section-title {
    font-size: 13px;
    font-weight: 600;
    color: #495057;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.text-size-controls-widget {
    display: flex;
    gap: 4px;
    justify-content: space-between;
}

.text-size-controls-widget .a11y-btn-widget {
    padding: 6px 10px;
    font-size: 12px;
    min-width: auto;
    flex: 1;
}

.a11y-btn-widget {
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    padding: 10px 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 14px;
    color: #495057;
    flex: 1;
    width: 100%;
}

.a11y-btn-widget.full-width {
    width: 100%;
    justify-content: flex-start;
}

.a11y-btn-widget:hover {
    background: #e9ecef;
    border-color: #adb5bd;
}

.a11y-btn-widget:focus {
    outline: 2px solid #4A90E2;
    outline-offset: 2px;
}

.a11y-btn-widget i {
    font-size: 16px;
    transition: transform 0.2s ease, color 0.2s ease;
}

.a11y-btn-widget:hover i {
    transform: scale(1.1);
}

.a11y-btn-widget:active i {
    transform: scale(0.95);
}

/* Text size control icons */
.text-size-controls-widget .a11y-btn-widget i {
    font-size: 18px;
}

.text-size-controls-widget .a11y-btn-widget:hover i {
    color: #4154f1;
}

/* Theme toggle icons */
#theme-toggle i.dark-icon,
#theme-toggle i.light-icon {
    font-size: 18px;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

#theme-toggle:hover i.dark-icon,
#theme-toggle:hover i.light-icon {
    transform: scale(1.15);
}

/* Contrast and focus icons */
#contrast-toggle i,
#focus-toggle i {
    font-size: 18px;
}

#contrast-toggle:hover i,
#focus-toggle:hover i {
    color: #4154f1;
    transform: scale(1.1);
}

/* Dark mode for widget (matching article-info style) */
body.dark-mode .site-settings-widget .accordion-item,
body.dark-mode .recent-changes-widget .accordion-item {
    border-color: #3a3a3a;
    background-color: #2a2a2a;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

body.dark-mode .site-settings-widget .accordion-item:hover,
body.dark-mode .recent-changes-widget .accordion-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

body.dark-mode .site-settings-widget .accordion-button,
body.dark-mode .recent-changes-widget .accordion-button {
    background-color: #2a2a2a;
    color: #e0e0e0;
}

body.dark-mode .site-settings-widget .accordion-button:hover,
body.dark-mode .recent-changes-widget .accordion-button:hover {
    background-color: #2a2a2a;
    color: #e0e0e0;
}

body.dark-mode .site-settings-widget .accordion-button:not(.collapsed),
body.dark-mode .recent-changes-widget .accordion-button:not(.collapsed) {
    background-color: #2a2a2a;
    color: #e0e0e0;
}

body.dark-mode .site-settings-widget .accordion-body,
body.dark-mode .recent-changes-widget .accordion-body {
    background-color: #2a2a2a;
    color: #e0e0e0;
}

body.dark-mode .site-settings-widget .accordion-button .accordion-gear-icon,
body.dark-mode .site-settings-widget .accordion-button i.bi-gear-fill,
body.dark-mode .recent-changes-widget .accordion-button .accordion-gear-icon,
body.dark-mode .recent-changes-widget .accordion-button i.bi-clock-history {
    color: #adb5bd;
}

body.dark-mode .site-settings-widget .accordion-button:hover .accordion-gear-icon,
body.dark-mode .site-settings-widget .accordion-button:hover i.bi-gear-fill,
body.dark-mode .recent-changes-widget .accordion-button:hover .accordion-gear-icon,
body.dark-mode .recent-changes-widget .accordion-button:hover i.bi-clock-history {
    color: #e0e0e0;
}

body.dark-mode .site-settings-widget .accordion-button:not(.collapsed) .accordion-gear-icon,
body.dark-mode .site-settings-widget .accordion-button:not(.collapsed) i.bi-gear-fill,
body.dark-mode .recent-changes-widget .accordion-button:not(.collapsed) .accordion-gear-icon,
body.dark-mode .recent-changes-widget .accordion-button:not(.collapsed) i.bi-clock-history {
    color: #e0e0e0;
}

body.dark-mode .site-settings-widget .accordion-icon,
body.dark-mode .recent-changes-widget .accordion-icon,
body.dark-mode .article-info-accordion .accordion-icon {
    color: #adb5bd;
}

body.dark-mode .site-settings-widget .accordion-button:hover .accordion-icon,
body.dark-mode .recent-changes-widget .accordion-button:hover .accordion-icon,
body.dark-mode .article-info-accordion .accordion-button:hover .accordion-icon {
    color: #e0e0e0;
    background: #2a2a2a;
}

body.dark-mode .site-settings-widget .accordion-button:not(.collapsed) .accordion-icon,
body.dark-mode .recent-changes-widget .accordion-button:not(.collapsed) .accordion-icon,
body.dark-mode .article-info-accordion .accordion-button:not(.collapsed) .accordion-icon {
    color: #e0e0e0;
    background: #2a2a2a;
}

body.dark-mode .site-settings-widget .accordion-button:focus,
body.dark-mode .recent-changes-widget .accordion-button:focus {
    box-shadow: none !important;
    outline: none !important;
}

body.dark-mode .site-settings-widget .settings-section {
    border-bottom-color: #444;
}

body.dark-mode .site-settings-widget .settings-section-title {
    color: #adb5bd;
}

body.dark-mode .a11y-btn-widget {
    background: #2a2a2a;
    border-color: #444;
    color: #e0e0e0;
}

body.dark-mode .a11y-btn-widget:hover {
    background: #3a3a3a;
    border-color: #555;
}

body.dark-mode .a11y-btn-widget:hover i {
    color: #6c9eff;
}

body.dark-mode .text-size-controls-widget .a11y-btn-widget:hover i {
    color: #6c9eff;
}

body.dark-mode #contrast-toggle:hover i,
body.dark-mode #focus-toggle:hover i {
    color: #6c9eff;
}

/* ============================================
   Home Page - Wikipedia Style
   ============================================ */

/* Welcome Section - Encyclopedia Style */
.welcome-section {
    padding: 50px 0 40px;
    background: #fff;
    border-bottom: 1px solid #e9ecef;
}

.encyclopedia-title {
    font-size: 3rem;
    font-weight: 700;
    color: var(--nav-color, #212529);
    letter-spacing: -0.02em;
    margin-bottom: 0.5rem;
}

.encyclopedia-subtitle {
    font-size: 1.25rem;
    color: #6c757d;
    font-weight: 400;
    margin-bottom: 2rem;
}

.encyclopedia-section-title {
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--nav-color, #212529);
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--accent-color, #4154f1);
    display: inline-block;
}

/* Portal Links Section - Encyclopedia Style */
.portal-links-section {
    padding: 50px 0;
}

.encyclopedia-portal-card {
    display: block;
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 4px;
    padding: 16px 12px;
    text-decoration: none;
    transition: all 0.2s ease;
    height: 100%;
    text-align: center;
}

.encyclopedia-portal-card:hover {
    border-color: var(--accent-color, #4154f1);
    background: #f8f9fa;
    text-decoration: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.encyclopedia-portal-card .portal-title {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--nav-color, #212529);
    margin-bottom: 6px;
    line-height: 1.4;
}

.encyclopedia-portal-card .portal-count {
    font-size: 0.8rem;
    color: #6c757d;
    font-weight: 400;
}

.encyclopedia-portal-card:hover .portal-title {
    color: var(--accent-color, #4154f1);
}

/* Featured Articles - Encyclopedia Style */
.featured-articles-section {
    padding: 50px 0;
}

.encyclopedia-featured-card {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 4px;
    overflow: hidden;
    transition: all 0.2s ease;
}

.encyclopedia-featured-card:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border-color: var(--accent-color, #4154f1);
}

.encyclopedia-image {
    height: 180px;
    overflow: hidden;
    background: #f8f9fa;
}

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

.encyclopedia-featured-card:hover .encyclopedia-image img {
    transform: scale(1.02);
}

.encyclopedia-article-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 10px;
    line-height: 1.4;
}

.encyclopedia-article-title a {
    color: var(--nav-color, #212529);
    text-decoration: none;
}

.encyclopedia-article-title a:hover {
    color: var(--accent-color, #4154f1);
    text-decoration: underline;
}

.encyclopedia-summary {
    color: #495057;
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 0;
}

/* Latest Articles List - Encyclopedia Style */
.latest-articles-section {
    padding: 50px 0;
}

.encyclopedia-list {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 4px;
    padding: 24px;
}

.encyclopedia-list-item {
    padding: 12px 0;
}

.encyclopedia-link {
    color: var(--nav-color, #212529);
    text-decoration: none;
    font-weight: 500;
    font-size: 1rem;
    transition: color 0.2s ease;
    line-height: 1.5;
}

.encyclopedia-link:hover {
    color: var(--accent-color, #4154f1);
    text-decoration: underline;
}

.encyclopedia-divider {
    margin: 0.5rem 0;
    border-color: #e9ecef;
    opacity: 0.5;
}

.article-meta-info {
    margin-top: 8px;
}

.article-meta-info a {
    color: var(--accent-color, #4154f1);
    text-decoration: none;
}

.article-meta-info a:hover {
    text-decoration: underline;
}

.article-tags {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.tag-badge-small {
    display: inline-block;
    padding: 2px 8px;
    background: #e9ecef;
    color: #495057;
    border-radius: 4px;
    font-size: 0.75rem;
    text-decoration: none;
    transition: all 0.2s ease;
}

.tag-badge-small:hover {
    background: var(--accent-color, #4154f1);
    color: #fff;
    text-decoration: none;
}

.article-excerpt {
    font-size: 0.9rem;
    line-height: 1.5;
}

/* Dark Mode Styles for Home Page */
body.dark-mode .welcome-section {
    background: #1a1a1a;
    border-bottom-color: #444;
}

body.dark-mode .encyclopedia-title {
    color: #fff;
}

body.dark-mode .encyclopedia-subtitle {
    color: #adb5bd;
}

body.dark-mode .encyclopedia-section-title {
    color: #fff;
    border-bottom-color: var(--accent-color, #4154f1);
}

body.dark-mode .portal-link-card {
    background: #242424;
    border-color: #444;
}

body.dark-mode .portal-link-card:hover {
    border-color: var(--accent-color, #4154f1);
    background: #2a2a2a;
}

body.dark-mode .portal-title {
    color: #e0e0e0;
}

body.dark-mode .portal-count {
    color: #adb5bd;
}

body.dark-mode .featured-article-card {
    background: #242424;
    border-color: #444;
}

body.dark-mode .featured-article-card .article-image {
    background: #2a2a2a;
}

body.dark-mode .featured-article-card .article-title a {
    color: #e0e0e0;
}

body.dark-mode .featured-article-card .article-summary {
    color: #adb5bd;
}

body.dark-mode .latest-articles-list {
    background: #242424;
    border-color: #444;
}

body.dark-mode .latest-article-item .article-link {
    color: #e0e0e0;
}

body.dark-mode .tag-badge-small {
    background: #2a2a2a;
    color: #e0e0e0;
    border-color: #444;
}

body.dark-mode .tag-badge-small:hover {
    background: var(--accent-color, #4154f1);
    color: #fff;
}

/* Arrow Icons - Use Main Site Colors */
.bi-arrow-right {
    color: var(--accent-color, #4154f1) !important;
    transition: color 0.3s ease, transform 0.3s ease;
    display: inline-block;
}

/* Arrow icons in readmore links */
.readmore .bi-arrow-right,
a .bi-arrow-right {
    color: var(--accent-color, #4154f1) !important;
}

.readmore:hover .bi-arrow-right,
a:hover .bi-arrow-right {
    color: var(--accent-color, #4154f1) !important;
    transform: translateX(4px);
}

/* Arrow icons in buttons - inherit button color */
.btn .bi-arrow-right,
.btn-outline-primary .bi-arrow-right {
    color: inherit !important;
}

.btn-outline-primary .bi-arrow-right {
    color: var(--accent-color, #4154f1) !important;
}

.btn-outline-primary:hover .bi-arrow-right {
    color: #fff !important;
}

/* Arrow icons in featured articles */
.featured-article-card .readmore .bi-arrow-right,
.latest-article-item .btn .bi-arrow-right {
    color: var(--accent-color, #4154f1) !important;
}

/* Dark mode for arrows */
body.dark-mode .bi-arrow-right {
    color: var(--accent-color, #4154f1) !important;
}

body.dark-mode .readmore .bi-arrow-right,
body.dark-mode a .bi-arrow-right {
    color: var(--accent-color, #4154f1) !important;
}

body.dark-mode .readmore:hover .bi-arrow-right,
body.dark-mode a:hover .bi-arrow-right {
    color: var(--accent-color, #4154f1) !important;
}

body.dark-mode .btn-outline-primary .bi-arrow-right {
    color: var(--accent-color, #4154f1) !important;
}

body.dark-mode .btn-outline-primary:hover .bi-arrow-right {
    color: #fff !important;
}

/* Revision View Link - Use Main Site Colors */
.revision-view-link {
    color: var(--accent-color, #4154f1) !important;
    transition: color 0.3s ease;
}

.revision-view-link:hover {
    color: var(--nav-hover-color, #2d3a8f) !important;
    text-decoration: underline !important;
}

.revision-view-link .bi-eye {
    color: var(--accent-color, #4154f1) !important;
}

.revision-view-link:hover .bi-eye {
    color: var(--nav-hover-color, #2d3a8f) !important;
}

/* Dark mode for revision view link */
body.dark-mode .revision-view-link {
    color: var(--accent-color, #4154f1) !important;
}

body.dark-mode .revision-view-link:hover {
    color: #8fc5f4 !important;
}

body.dark-mode .revision-view-link .bi-eye {
    color: var(--accent-color, #4154f1) !important;
}

body.dark-mode .revision-view-link:hover .bi-eye {
    color: #8fc5f4 !important;
}

/* ============================================
   Article Sections Styles
   ============================================ */

.article-sections {
    margin-top: 2rem;
}

.article-section {
    padding: 1.5rem 0;
}

.section-header {
    border-bottom: 2px solid var(--accent-color, #4154f1);
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
}

.section-title {
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--nav-color, #212529);
    margin-bottom: 0;
}

.section-content {
    font-size: 1rem;
    line-height: 1.8;
    color: #495057;
}

.section-meta {
    font-size: 0.875rem;
    margin-top: 1rem;
    padding-top: 0.5rem;
    border-top: 1px solid #e9ecef;
}

.section-meta a {
    color: var(--accent-color, #4154f1);
    text-decoration: none;
}

.section-meta a:hover {
    text-decoration: underline;
}

.sections-list .section-item {
    border: 1px solid #e9ecef;
    transition: all 0.2s ease;
}

.sections-list .section-item:hover {
    border-color: var(--accent-color, #4154f1);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

/* Dark mode for sections */
body.dark-mode .section-title {
    color: #fff;
}

body.dark-mode .section-content {
    color: #e0e0e0;
}

body.dark-mode .section-meta {
    border-top-color: #444;
    color: #adb5bd;
}

body.dark-mode .sections-list .section-item {
    background: #2a2a2a;
    border-color: #444;
}

body.dark-mode .sections-list .section-item:hover {
    border-color: var(--accent-color, #4154f1);
    background: #2f2f2f;
}

/* ============================================
   Modal Backdrop Fix
   ============================================ */

/* Ensure modal backdrop is properly styled and removed */
.modal-backdrop {
    z-index: 1040;
}

.modal-backdrop.fade.show {
    opacity: 0.5;
}

/* Remove any stuck backdrops */
body:not(.modal-open) .modal-backdrop {
    display: none !important;
}

/* Fix for modal not closing properly */
.modal.fade.show {
    display: block !important;
}

.modal.fade:not(.show) {
    display: none !important;
}

/* ============================================
   Form Loading/Success Messages - Hidden by Default
   ============================================ */

.loading,
.error-message,
.sent-message {
    display: none !important;
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: 4px;
    text-align: center;
}

.loading.show,
.error-message.show,
.sent-message.show {
    display: block !important;
}

.loading {
    background-color: #e7f3ff;
    color: #004085;
    border: 1px solid #b3d7ff;
}

.error-message {
    background-color: #f8d7da;
    color: #842029;
    border: 1px solid #f5c2c7;
}

.sent-message {
    background-color: #d1e7dd;
    color: #0f5132;
    border: 1px solid #badbcc;
}

/* ============================================
   Article List Search Form Styles
   ============================================ */

.article-list-controls {
    display: flex;
    flex-wrap: nowrap;
    gap: 0.75rem;
    align-items: center;
    width: 100%;
}

.search-form {
    display: flex;
    flex-wrap: nowrap;
    gap: 0.75rem;
    align-items: center;
    flex-grow: 1;
    min-width: 0;
}

.search-input-wrapper {
    flex: 1 1 auto;
    min-width: 150px;
}

.sort-select-wrapper {
    flex: 0 0 auto;
    min-width: 160px;
}

.search-form .form-control,
.search-form select.form-control {
    height: 42px;
    display: flex;
    align-items: center;
}

.search-form .btn-get-started,
.btn-create-article {
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    flex-shrink: 0;
}

.search-form .btn-get-started .btn-text,
.btn-create-article .btn-text {
    margin-left: 0.5rem;
}

/* Show icon-only on smaller screens or when space is limited */
@media (max-width: 992px) {
    .btn-get-started .btn-text,
    .btn-create-article .btn-text {
        display: none;
    }
    
    .btn-get-started i,
    .btn-create-article i {
        margin: 0;
    }
    
    .btn-get-started,
    .btn-create-article {
        min-width: 42px;
        padding: 0.5rem;
        justify-content: center;
    }
    
    .sort-select-wrapper {
        min-width: 140px;
    }
}

/* Ensure consistent heights on mobile */
@media (max-width: 768px) {
    .article-list-controls {
        flex-wrap: wrap;
    }
    
    .search-form {
        flex-wrap: wrap;
        width: 100%;
    }
    
    .search-input-wrapper,
    .sort-select-wrapper {
        width: 100%;
        min-width: 100%;
    }
    
    .search-form .form-control,
    .search-form select.form-control,
    .search-form .btn-get-started {
        width: 100%;
    }
    
    .btn-create-article {
        width: 100%;
    }
}

/* ============================================
   Button Outline Primary - Use Main Colors
   ============================================ */

.btn-outline-primary {
    color: var(--accent-color, #4154f1) !important;
    border-color: var(--accent-color, #4154f1) !important;
    background-color: transparent !important;
    transition: all 0.3s ease;
}

.btn-outline-primary:hover,
.btn-outline-primary:focus,
.btn-outline-primary:active {
    color: #fff !important;
    background-color: var(--accent-color, #4154f1) !important;
    border-color: var(--accent-color, #4154f1) !important;
}

.btn-outline-primary:active {
    background-color: var(--nav-hover-color, #2d3a8f) !important;
    border-color: var(--nav-hover-color, #2d3a8f) !important;
}

/* Dark mode for outline primary buttons */
body.dark-mode .btn-outline-primary {
    color: var(--accent-color, #4154f1) !important;
    border-color: var(--accent-color, #4154f1) !important;
    background-color: transparent !important;
}

body.dark-mode .btn-outline-primary:hover,
body.dark-mode .btn-outline-primary:focus,
body.dark-mode .btn-outline-primary:active {
    color: #fff !important;
    background-color: var(--accent-color, #4154f1) !important;
    border-color: var(--accent-color, #4154f1) !important;
}

/* Responsive */
@media (max-width: 768px) {
    .welcome-section {
        padding: 40px 0;
    }
    
    .welcome-section h1 {
        font-size: 2rem;
    }
    
    .portal-links-section,
    .featured-articles-section,
    .latest-articles-section {
        padding: 40px 0;
    }
    
    .latest-articles-list {
        padding: 20px;
    }
    
    .latest-article-item {
        padding: 12px 0;
    }
    
    .latest-article-item .article-link {
        font-size: 1rem;
    }
}

/* ============================================
   Article Form Styles
   ============================================ */

.article-form-image-preview {
    max-width: 200px;
    max-height: 200px;
}

/* ============================================
   Home Page Styles
   ============================================ */

.stats-container {
    background: var(--surface-color);
    border: 1px solid color-mix(in srgb, var(--default-color), transparent 90%);
}

.stats-container-compact {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 4px;
}

.stat-item-compact h3 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--accent-color, #4154f1);
    margin-bottom: 0.5rem;
}

.stat-item-compact p {
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-icon {
    color: var(--accent-color);
}

/* ============================================
   Badge Styles - Using Main Site Colors
   ============================================ */

.badge-accent {
    background-color: var(--accent-color, #3b82f6) !important;
    color: #ffffff !important;
}

.badge-accent:hover {
    background-color: color-mix(in srgb, var(--accent-color, #3b82f6), transparent 15%) !important;
}

/* Profile Avatar Background */
.profile-avatar-bg {
    background-color: var(--accent-color, #3b82f6) !important;
}

/* Profile icon accent color */
.profile-icon-accent {
    color: var(--accent-color, #3b82f6) !important;
}

/* Dark mode support for badges */
body.dark-mode .badge-accent {
    background-color: var(--accent-color, #3b82f6) !important;
    color: #ffffff !important;
}

body.dark-mode .profile-avatar-bg {
    background-color: var(--accent-color, #3b82f6) !important;
}

body.dark-mode .profile-icon-accent {
    color: var(--accent-color, #3b82f6) !important;
}

/* ============================================
   Change Icon Styles - Using Main Site Colors
   ============================================ */

.change-icon-accent {
    color: var(--accent-color, #3b82f6) !important;
}

body.dark-mode .change-icon-accent {
    color: var(--accent-color, #3b82f6) !important;
}

/* ============================================
   Alphabet Navigation (Wikipedia-style)
   ============================================ */
.alphabet-nav {
    padding: 1rem 0;
    border-bottom: 1px solid #e0e0e0;
    margin-bottom: 2rem;
}

.alphabet-link {
    display: inline-block;
    padding: 0.5rem 0.75rem;
    margin: 0.125rem;
    text-decoration: none;
    color: var(--accent-color, #3b82f6);
    font-weight: 500;
    border-radius: 4px;
    transition: all 0.2s ease;
    min-width: auto;
    text-align: center;
    font-size: 0.95rem;
    white-space: nowrap;
}

.alphabet-link .letter-count {
    font-size: 0.85rem;
    font-weight: 400;
    opacity: 0.8;
}

.alphabet-link:hover:not(.disabled) {
    background-color: var(--accent-color, #3b82f6);
    color: #fff;
    text-decoration: none;
}

.alphabet-link.active {
    background-color: var(--accent-color, #3b82f6);
    color: #fff;
    font-weight: 600;
}

.alphabet-link.disabled {
    color: #ccc;
    cursor: not-allowed;
    opacity: 0.5;
}

.alphabet-link.clear-filter {
    margin-left: 0.5rem;
    padding-left: 1rem;
    padding-right: 1rem;
    border-left: 2px solid #e0e0e0;
}

body.dark-mode .alphabet-nav {
    border-bottom-color: #444;
}

body.dark-mode .alphabet-link {
    color: var(--accent-color, #3b82f6);
}

body.dark-mode .alphabet-link:hover:not(.disabled) {
    background-color: var(--accent-color, #3b82f6);
    color: #fff;
}

body.dark-mode .alphabet-link.active {
    background-color: var(--accent-color, #3b82f6);
    color: #fff;
}

body.dark-mode .alphabet-link.disabled {
    color: #666;
}

body.dark-mode .alphabet-link.clear-filter {
    border-left-color: #444;
}

/* ============================================
   Contact Page Styles
   ============================================ */

.contact-map {
    border: 0;
    width: 100%;
    height: 270px;
    border-radius: 10px;
}

/* ============================================
   Article Detail Page Styles
   ============================================ */

/* Mobile ordering - Use flexbox to reorder widgets */
@media (max-width: 991.98px) {
    .widgets-container {
        display: flex;
        flex-direction: column;
    }
    
    .infobox-widget {
        order: 1;
    }
    
    .mobile-order-3 {
        order: 3;
    }
    
    .mobile-order-4 {
        order: 4;
    }
}

/* Desktop - Normal order in sidebar */
@media (min-width: 992px) {
    .widgets-container {
        display: block;
    }
    
    .infobox-widget,
    .mobile-order-3,
    .mobile-order-4 {
        order: 0;
    }
}

/* Infobox Custom Style - Clean and Modern */
.infobox-widget {
    font-size: 0.9em;
}

.infobox-widget .widget-title {
    font-size: 1.15em;
    margin-bottom: 15px;
    padding-bottom: 0;
    border-bottom: none;
}

.infobox-widget .infobox-section-title {
    font-size: 0.95em;
    font-weight: 600;
    margin-bottom: 8px;
    padding-bottom: 5px;
    border-bottom: 1px solid rgba(0,0,0,0.1);
}

.infobox-widget ul.list-unstyled li {
    font-size: 0.9em;
    border-bottom: none !important;
    padding: 6px 0;
}

.infobox-widget ul.list-unstyled li strong {
    font-weight: 500;
    font-size: 0.9em;
}

.infobox-widget .infobox-photo img {
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* Dark mode support */
body.dark-mode .infobox-widget .infobox-section-title {
    border-bottom-color: rgba(255,255,255,0.2);
}

/* Share buttons styling */
.share-buttons {
    padding: 12px;
    background-color: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    display: block !important;
    visibility: visible !important;
}

.share-buttons .share-btn {
    transition: all 0.2s ease;
    font-size: 0.875rem;
    display: inline-flex !important;
    align-items: center;
    visibility: visible !important;
}

.share-buttons .share-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.share-buttons .share-btn i {
    margin-right: 4px;
    display: inline-block !important;
}

#copy-link-message {
    font-size: 0.875rem;
    padding: 8px 12px;
    animation: fadeInOut 3s ease-in-out;
}

@keyframes fadeInOut {
    0%, 100% { opacity: 0; }
    10%, 90% { opacity: 1; }
}

/* Dark mode support for share buttons */
body.dark-mode .share-buttons {
    background-color: #2a2a2a;
    border-color: #404040;
}

body.dark-mode .share-buttons .btn-outline-secondary {
    color: #e0e0e0;
    border-color: #555;
}

body.dark-mode .share-buttons .btn-outline-secondary:hover {
    background-color: #3a3a3a;
    border-color: #666;
    color: #fff;
}

/* Print styles */
@media print {
    /* Hide navigation, header, footer, sidebar, buttons */
    header,
    footer,
    .page-title,
    .breadcrumbs,
    .col-lg-4,
    .share-buttons,
    .widgets-container,
    .action-buttons,
    .readmore,
    nav,
    .btn,
    button,
    .post-meta,
    .article-sections .section-meta,
    .article-sections .edit-section-btn {
        display: none !important;
    }
    
    /* Show only main article content */
    .col-lg-8 {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
    }
    
    /* Article styling for print */
    .article {
        margin: 0;
        padding: 20px;
    }
    
    .article h1,
    .article h2,
    .article h3,
    .article h4,
    .article h5,
    .article h6 {
        page-break-after: avoid;
        margin-top: 1em;
        margin-bottom: 0.5em;
    }
    
    .article p,
    .article li {
        page-break-inside: avoid;
    }
    
    .article img {
        max-width: 100% !important;
        height: auto !important;
        page-break-inside: avoid;
    }
    
    /* Remove background colors and shadows */
    * {
        background: white !important;
        color: black !important;
        box-shadow: none !important;
        text-shadow: none !important;
    }
    
    /* Links */
    a {
        color: black !important;
        text-decoration: underline;
    }
    
    a[href^="http"]:after {
        content: " (" attr(href) ")";
        font-size: 0.8em;
        color: #666;
    }
    
    /* Page breaks */
    .article-sections > div {
        page-break-inside: avoid;
        margin-bottom: 1em;
    }
    
    /* Article title */
    .article h1 {
        font-size: 24pt;
        margin-bottom: 0.5em;
    }
    
    /* Content */
    .content {
        font-size: 12pt;
        line-height: 1.6;
    }
    
    /* Sections */
    .article-sections h2 {
        font-size: 18pt;
        border-bottom: 2px solid #000;
        padding-bottom: 0.3em;
        margin-top: 1.5em;
    }
    
    .article-sections h3 {
        font-size: 14pt;
        margin-top: 1em;
    }
    
    /* Print URL at bottom */
    .article::after {
        content: "\A\A URL: " attr(data-url);
        white-space: pre;
        font-size: 10pt;
        color: #666;
        margin-top: 2em;
        padding-top: 1em;
        border-top: 1px solid #ccc;
    }
}

/* Statistics Section */
#statistics {
    padding: 60px 0;
}

.stat-item {
    padding: 30px 20px;
    transition: transform 0.3s ease;
}

.stat-item:hover {
    transform: translateY(-5px);
}

.stat-item h3 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--heading-color);
    margin-bottom: 0.5rem;
}

.stat-item p {
    font-size: 1.1rem;
    color: var(--default-color);
    margin-bottom: 0;
}

.stat-icon {
    transition: transform 0.3s ease;
}

.stat-item:hover .stat-icon {
    transform: scale(1.1);
}

/* Mission Vision Values Section */
#mission-vision {
    padding: 60px 0;
}

#mission-vision .card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-radius: 10px;
}

#mission-vision .card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15) !important;
}

#mission-vision .card-body {
    min-height: 250px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

#mission-vision h4 {
    color: var(--heading-color);
    font-weight: 600;
    margin-bottom: 1rem;
}

#mission-vision p {
    color: var(--default-color);
    line-height: 1.8;
}

/* About Images Enhancement */
.about-images img,
.about-image-container,
.about-image-small {
    padding: 2px !important;
}

.about-images img,
.about-images .about-image-container,
.about-images .about-image-small {
    padding: 2px !important;
}

.about-images img {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.about-images img:hover {
    transform: scale(1.05);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2) !important;
}

/* Team Member Cards Enhancement */
#team .team-member {
    transition: all 0.3s ease;
    background: #fff;
}

#team .team-member:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1) !important;
}

/* Leadership Section Enhancement */
#leadership .team-member {
    background: #fff;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

#leadership .team-member:hover {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    transform: translateY(-5px);
}

/* Dark Mode Support */
body.dark-mode #statistics {
    background-color: #1a1a1a !important;
}

body.dark-mode #mission-vision .card {
    background-color: #2a2a2a;
    border-color: #3a3a3a;
}

body.dark-mode #team .team-member,
body.dark-mode #leadership .team-member {
    background-color: #2a2a2a;
}

body.dark-mode #contact-form {
    background-color: #1a1a1a !important;
}

/* Article Tutorial Section */
#article-tutorial {
    padding: 60px 0;
}

.tutorial-steps {
    max-width: 800px;
    margin: 0 auto;
}

.tutorial-step {
    padding: 20px;
    border-left: 3px solid var(--accent-color);
    background: #f8f9fa;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.tutorial-step:hover {
    background: #e9ecef;
    transform: translateX(5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.tutorial-step .step-number {
    flex-shrink: 0;
}

.tutorial-step .step-content h4 {
    color: var(--heading-color);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.tutorial-step .step-content p {
    color: var(--default-color);
    margin-bottom: 0;
    line-height: 1.6;
}

/* Dark Mode for Tutorial */
body.dark-mode .tutorial-step {
    background: #2a2a2a;
    border-left-color: var(--accent-color);
}

body.dark-mode .tutorial-step:hover {
    background: #3a3a3a;
}

/* Article Sections Container (each section as its own card with accordion) */
.article-sections-container {
    margin-top: 2rem;
}

.article-section-card {
    border: 1px solid #e9ecef;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    background-color: #fff;
}

.article-section-card:hover {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1) !important;
    transform: translateY(-2px);
}

/* Accordion styling within each card */
.article-section-card .accordion {
    background-color: transparent;
}

.article-section-card .accordion-item {
    border: none;
    background-color: transparent;
}

.article-section-card .accordion-button {
    background-color: #f8f9fa;
    border: none;
    padding: 1.25rem 1.5rem;
    font-weight: 600;
    color: var(--heading-color);
    box-shadow: none;
    border-radius: 12px;
}

.article-section-card .accordion-button:not(.collapsed) {
    background-color: #f8f9fa;
    color: var(--heading-color);
    box-shadow: none;
    border-radius: 12px 12px 0 0;
}

.article-section-card .accordion-button:focus {
    box-shadow: none;
    border-color: transparent;
    outline: none;
}

.article-section-card .accordion-button.collapsed {
    border-radius: 12px;
}

.article-section-card .accordion-body {
    border-radius: 0 0 12px 12px;
}

/* Custom + and - icons for accordion */
.article-section-card .accordion-button::after {
    background-image: none;
    content: "+";
    font-size: 1.5rem;
    font-weight: 300;
    width: auto;
    height: auto;
    transform: none;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: auto;
    padding-left: 1rem;
}

.article-section-card .accordion-button:not(.collapsed)::after {
    content: "−";
    transform: none;
}

.article-section-card .accordion-body {
    padding: 1.5rem;
    background-color: #fff;
}

.article-section-card .section-content {
    line-height: 1.8;
}

.article-section-card .section-content p {
    margin-bottom: 1rem;
}

.article-section-card .section-content p:last-child {
    margin-bottom: 0;
}

/* Dark Mode for Article Section Cards */
body.dark-mode .article-section-card {
    border-color: #3a3a3a;
    background-color: #2a2a2a;
}

body.dark-mode .article-section-card .accordion-button {
    background-color: #2a2a2a;
    color: #e0e0e0;
}

body.dark-mode .article-section-card .accordion-button:not(.collapsed) {
    background-color: #2a2a2a;
    color: #e0e0e0;
}

body.dark-mode .article-section-card .accordion-body {
    background-color: #2a2a2a;
    color: #e0e0e0;
}

/* Article Info Widget - Accordion as Card */
.article-info-widget {
    margin-bottom: 1.5rem;
}

.article-info-accordion {
    background: transparent;
}

.article-info-accordion-item {
    border: 1px solid #e9ecef;
    border-radius: 12px;
    overflow: hidden;
    background-color: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.article-info-accordion-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.article-info-accordion .accordion-button {
    background-color: #f8f9fa;
    border: none;
    color: var(--heading-color);
    font-weight: 600;
    padding: 1rem 1.25rem;
    box-shadow: none;
    border-radius: 12px 12px 0 0;
}

.article-info-accordion .accordion-button:not(.collapsed) {
    background-color: #f8f9fa;
    color: var(--heading-color);
    box-shadow: none;
    border-radius: 12px 12px 0 0;
}

.article-info-accordion .accordion-button.collapsed {
    border-radius: 12px;
}

.article-info-accordion .accordion-button:hover {
    background-color: #f8f9fa;
    color: var(--heading-color);
}

.article-info-accordion .accordion-button:focus {
    box-shadow: none;
    border-color: transparent;
    outline: none;
}

.article-info-body {
    background-color: #fff;
    color: var(--default-color);
    padding: 1.5rem;
}

.article-info-section {
    color: var(--default-color);
}

.article-info-section .post-meta,
.article-info-section .post-meta span,
.article-info-section .post-meta a {
    color: var(--default-color);
}

.article-info-section .settings-section-title {
    color: var(--heading-color);
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 0.75rem;
}

/* Share buttons - icons only in one line */
.article-info-section .share-buttons .btn {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    padding: 0.5rem;
}

.article-info-section .share-buttons .btn i {
    margin: 0;
    font-size: 1.1rem;
}

/* Dark Mode for Article Info Widget */
body.dark-mode .article-info-accordion-item {
    border-color: #3a3a3a;
    background-color: #2a2a2a;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

body.dark-mode .article-info-accordion-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

body.dark-mode .article-info-accordion .accordion-button {
    background-color: #2a2a2a;
    color: #e0e0e0;
}

body.dark-mode .article-info-accordion .accordion-button:hover {
    background-color: #2a2a2a;
    color: #e0e0e0;
}

body.dark-mode .article-info-accordion .accordion-button:not(.collapsed) {
    background-color: #2a2a2a;
    color: #e0e0e0;
}

body.dark-mode .article-info-body {
    background-color: #2a2a2a;
    color: #e0e0e0;
}

body.dark-mode .article-info-section {
    color: #e0e0e0;
}

body.dark-mode .article-info-section .post-meta,
body.dark-mode .article-info-section .post-meta span,
body.dark-mode .article-info-section .post-meta a {
    color: #e0e0e0;
}

body.dark-mode .article-info-section .settings-section-title {
    color: #ffffff;
}

/* ============================================
   Save Article Button - Main Theme Colors
   ============================================ */

/* Save button (icon only) - uses main theme colors */
#save-article-btn-inline.btn-primary {
    background-color: var(--accent-color) !important;
    border-color: var(--accent-color) !important;
    color: var(--contrast-color) !important;
    transition: all 0.3s ease;
}

#save-article-btn-inline.btn-primary:hover {
    background-color: color-mix(in srgb, var(--accent-color) 85%, black) !important;
    border-color: color-mix(in srgb, var(--accent-color) 85%, black) !important;
    color: var(--contrast-color) !important;
}

#save-article-btn-inline.btn-outline-primary {
    border-color: var(--accent-color) !important;
    color: var(--accent-color) !important;
    background-color: transparent !important;
    transition: all 0.3s ease;
}

#save-article-btn-inline.btn-outline-primary:hover {
    background-color: var(--accent-color) !important;
    border-color: var(--accent-color) !important;
    color: var(--contrast-color) !important;
}

/* Dark mode for save button */
body.dark-mode #save-article-btn-inline.btn-primary {
    background-color: var(--accent-color) !important;
    border-color: var(--accent-color) !important;
    color: var(--contrast-color) !important;
}

body.dark-mode #save-article-btn-inline.btn-primary:hover {
    background-color: color-mix(in srgb, var(--accent-color) 80%, transparent) !important;
    border-color: color-mix(in srgb, var(--accent-color) 80%, transparent) !important;
    color: var(--contrast-color) !important;
}

body.dark-mode #save-article-btn-inline.btn-outline-primary {
    border-color: var(--accent-color) !important;
    color: var(--accent-color) !important;
    background-color: transparent !important;
}

body.dark-mode #save-article-btn-inline.btn-outline-primary:hover {
    background-color: var(--accent-color) !important;
    border-color: var(--accent-color) !important;
    color: var(--contrast-color) !important;
}

/* ============================================
   User Page - Align Sidebar and Main Content
   ============================================ */

/* Make blog-posts section and widgets-container start at the same top position */
.user-page-container .blog-posts.section {
    padding-top: 40px !important;
}

.user-page-container .widgets-container {
    margin-top: 40px !important;
}

/* Statistics card styling to match widget-item */
.user-page-container article.widget-item {
    background-color: color-mix(in srgb, var(--default-color), transparent 98%) !important;
    border: 1px solid color-mix(in srgb, var(--default-color), transparent 90%) !important;
    border-radius: 5px !important;
    padding: 20px !important;
    box-shadow: none !important;
}

.user-page-container article.widget-item .post-content {
    padding: 0 !important;
}

body.dark-mode .user-page-container article.widget-item {
    background-color: var(--surface-color) !important;
    border-color: color-mix(in srgb, var(--default-color), transparent 80%) !important;
}

/* ============================================
   Footer Contact Text Colors
   ============================================ */

.footer .footer-contact {
    color: var(--default-color);
}

.footer .footer-contact address {
    color: var(--default-color);
    font-style: normal;
}

.footer .footer-contact p {
    color: var(--default-color);
}

.footer .footer-contact strong {
    color: var(--heading-color);
}

.footer .footer-contact a {
    color: var(--accent-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer .footer-contact a:hover {
    color: color-mix(in srgb, var(--accent-color) 85%, black);
    text-decoration: underline;
}

/* Dark mode for footer contact */
body.dark-mode .footer .footer-contact {
    color: var(--default-color);
}

body.dark-mode .footer .footer-contact address {
    color: var(--default-color);
}

body.dark-mode .footer .footer-contact p {
    color: var(--default-color);
}

body.dark-mode .footer .footer-contact strong {
    color: var(--contrast-color);
}

body.dark-mode .footer .footer-contact a {
    color: var(--accent-color);
}

body.dark-mode .footer .footer-contact a:hover {
    color: color-mix(in srgb, var(--accent-color) 80%, transparent);
}

/* ============================================
   Form Checkbox Styling - Main Theme Colors
   ============================================ */

.form-check-input:checked {
    background-color: var(--accent-color) !important;
    border-color: var(--accent-color) !important;
}

.form-check-input:focus {
    border-color: var(--accent-color) !important;
    box-shadow: 0 0 0 0.25rem color-mix(in srgb, var(--accent-color) 25%, transparent) !important;
}

.form-check-input:hover:not(:disabled) {
    border-color: var(--accent-color) !important;
}

/* Dark mode for checkboxes */
body.dark-mode .form-check-input:checked {
    background-color: var(--accent-color) !important;
    border-color: var(--accent-color) !important;
}

body.dark-mode .form-check-input:focus {
    border-color: var(--accent-color) !important;
    box-shadow: 0 0 0 0.25rem color-mix(in srgb, var(--accent-color) 30%, transparent) !important;
}

/* ============================================
   Logout Button Style
   ============================================ */

.btn-get-started.logout-btn {
    background-color: #dc3545 !important;
    border-color: #dc3545 !important;
    color: #ffffff !important;
}

.btn-get-started.logout-btn:hover {
    background-color: #c82333 !important;
    border-color: #bd2130 !important;
    color: #ffffff !important;
}

body.dark-mode .btn-get-started.logout-btn {
    background-color: #dc3545 !important;
    border-color: #dc3545 !important;
    color: #ffffff !important;
}

body.dark-mode .btn-get-started.logout-btn:hover {
    background-color: #c82333 !important;
    border-color: #bd2130 !important;
    color: #ffffff !important;
}

/* ============================================
   Wiki-style Internal Links
   ============================================ */

/* Existing article link - blue (like Wikipedia) */
.wiki-link {
    text-decoration: none;
    border-bottom: 1px dotted currentColor;
    transition: all 0.2s ease;
}

.wiki-link:hover {
    border-bottom-style: solid;
}

.wiki-link-exists {
    color: var(--accent-color);
}

.wiki-link-exists:hover {
    color: color-mix(in srgb, var(--accent-color), #000 20%);
    text-decoration: none;
}

/* Missing article link - red (like Wikipedia) */
.wiki-link-missing {
    color: #ba0000;
}

.wiki-link-missing:hover {
    color: #a50000;
    text-decoration: none;
}

/* Dark mode support */
body.dark-mode .wiki-link-exists {
    color: #6b9eff;
}

body.dark-mode .wiki-link-exists:hover {
    color: #8bb4ff;
}

body.dark-mode .wiki-link-missing {
    color: #ff6b6b;
}

body.dark-mode .wiki-link-missing:hover {
    color: #ff8585;
}

/* High contrast mode support */
body.high-contrast .wiki-link-exists {
    color: #0000ff;
    border-bottom-width: 2px;
}

body.high-contrast .wiki-link-missing {
    color: #ff0000;
    border-bottom-width: 2px;
}

/* ============================================
   Wiki Preview Popup (Wikipedia-style)
   ============================================ */

.wiki-preview-popup {
    position: absolute;
    z-index: 10000;
    width: 320px;
    max-width: 90vw;
    background: #fff;
    border: 1px solid #a2a9b1;
    border-radius: 2px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    font-size: 14px;
    line-height: 1.5;
    opacity: 0;
    transform: translateY(5px);
    transition: opacity 0.15s ease, transform 0.15s ease;
    pointer-events: none;
}

.wiki-preview-popup.wiki-preview-visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.wiki-preview-content {
    display: flex;
    gap: 12px;
    padding: 12px;
}

.wiki-preview-image-container {
    flex-shrink: 0;
    width: 80px;
    height: 80px;
    overflow: hidden;
    border-radius: 4px;
    background: #f8f9fa;
}

.wiki-preview-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.wiki-preview-text {
    flex: 1;
    min-width: 0;
}

.wiki-preview-text h4 {
    margin: 0 0 6px 0;
    font-size: 15px;
    font-weight: 600;
    color: #202122;
    line-height: 1.3;
}

.wiki-preview-text p {
    margin: 0;
    font-size: 13px;
    color: #54595d;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.wiki-preview-footer {
    padding: 8px 12px;
    background: #f8f9fa;
    border-top: 1px solid #eaecf0;
    font-size: 12px;
    color: #72777d;
}

/* Missing article preview */
.wiki-preview-popup.wiki-preview-missing {
    border-color: #ffc1c1;
}

.wiki-preview-popup.wiki-preview-missing .wiki-preview-text h4 {
    color: #ba0000;
}

.wiki-preview-popup.wiki-preview-missing .wiki-preview-footer {
    background: #fff5f5;
    border-color: #ffc1c1;
    color: #ba0000;
}

/* Dark mode */
body.dark-mode .wiki-preview-popup {
    background: #1e1e1e;
    border-color: #404040;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.4);
}

body.dark-mode .wiki-preview-text h4 {
    color: #e0e0e0;
}

body.dark-mode .wiki-preview-text p {
    color: #b0b0b0;
}

body.dark-mode .wiki-preview-footer {
    background: #2a2a2a;
    border-color: #404040;
    color: #909090;
}

body.dark-mode .wiki-preview-image-container {
    background: #2a2a2a;
}

body.dark-mode .wiki-preview-popup.wiki-preview-missing {
    border-color: #6b3030;
}

body.dark-mode .wiki-preview-popup.wiki-preview-missing .wiki-preview-text h4 {
    color: #ff6b6b;
}

body.dark-mode .wiki-preview-popup.wiki-preview-missing .wiki-preview-footer {
    background: #2a1f1f;
    border-color: #6b3030;
    color: #ff6b6b;
}

/* High contrast mode */
body.high-contrast .wiki-preview-popup {
    border-width: 2px;
    border-color: #000;
}

body.high-contrast .wiki-preview-text h4 {
    color: #000;
}

body.high-contrast .wiki-preview-popup.wiki-preview-missing {
    border-color: #ff0000;
}

/* ============================================
   Article List - Titles Only (Wikipedia Style)
   ============================================ */

.article-titles-list {
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.article-titles-list ul {
    margin: 0;
    padding: 0;
    columns: 2;
    column-gap: 40px;
}

@media (max-width: 768px) {
    .article-titles-list ul {
        columns: 1;
    }
}

.article-title-item {
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
    break-inside: avoid;
}

.article-title-item:last-child {
    border-bottom: none;
}

.article-title-link {
    color: var(--accent-color);
    text-decoration: none;
    font-size: 15px;
    display: block;
    transition: color 0.2s ease;
}

.article-title-link:hover {
    color: color-mix(in srgb, var(--accent-color), #000 20%);
    text-decoration: underline;
}

.article-title-link i {
    color: #72777d;
    font-size: 14px;
}

/* Dark mode */
body.dark-mode .article-titles-list {
    background: #1e1e1e;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

body.dark-mode .article-title-item {
    border-bottom-color: #333;
}

body.dark-mode .article-title-link {
    color: #6b9eff;
}

body.dark-mode .article-title-link:hover {
    color: #8bb4ff;
}

body.dark-mode .article-title-link i {
    color: #888;
}

/* ============================================
   Article List - Grouped by Letter (Wikipedia Style)
   ============================================ */

/* Alphabet Navigation */
.alphabet-nav {
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 15px;
}

.alphabet-link {
    display: inline-flex;
    flex-direction: row;
    align-items: center;
    gap: 2px;
    padding: 5px 8px;
    font-size: 14px;
    font-weight: 600;
    color: var(--accent-color);
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.alphabet-link:hover {
    background: color-mix(in srgb, var(--accent-color), transparent 90%);
    color: color-mix(in srgb, var(--accent-color), #000 20%);
}

.alphabet-link.active {
    background: var(--accent-color);
    color: #fff;
}

.alphabet-link.disabled {
    color: #a2a9b1;
    cursor: default;
    padding: 5px 6px;
}

.alphabet-link.clear-filter {
    background: #fff3cd;
    color: #856404;
    font-size: 13px;
    padding: 5px 10px;
}

.alphabet-link.clear-filter:hover {
    background: #ffeeba;
}

.letter-count {
    font-size: 11px;
    font-weight: normal;
    color: #72777d;
}

.alphabet-link.active .letter-count {
    color: rgba(255, 255, 255, 0.8);
}

/* Articles grouped by letter */
.articles-by-letter {
    background: #fff;
    border-radius: 8px;
    padding: 20px 30px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.letter-group {
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eaecf0;
}

.letter-group:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.letter-heading {
    font-size: 28px;
    font-weight: 700;
    color: var(--heading-color);
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--accent-color);
    display: inline-block;
}

.letter-article-count {
    font-size: 16px;
    font-weight: 500;
    color: #72777d;
}

.article-list-items {
    list-style: none;
    margin: 0;
    padding: 0;
    columns: 3;
    column-gap: 30px;
}

@media (max-width: 992px) {
    .article-list-items {
        columns: 2;
    }
}

@media (max-width: 576px) {
    .article-list-items {
        columns: 1;
    }
}

.article-list-items li {
    padding: 6px 0;
    break-inside: avoid;
    page-break-inside: avoid;
}

.article-list-items li a {
    color: var(--accent-color);
    text-decoration: none;
    font-size: 15px;
    line-height: 1.5;
    transition: color 0.2s ease;
}

.article-list-items li a:hover {
    color: color-mix(in srgb, var(--accent-color), #000 20%);
    text-decoration: underline;
}

/* Articles count */
.articles-count {
    font-size: 14px;
}

/* Dark mode for alphabet navigation */
body.dark-mode .alphabet-nav {
    background: #2a2a2a;
    border-color: #404040;
}

body.dark-mode .alphabet-link {
    color: #6b9eff;
}

body.dark-mode .alphabet-link:hover {
    background: #3a3a4a;
    color: #8bb4ff;
}

body.dark-mode .alphabet-link.active {
    background: #4a6da7;
    color: #fff;
}

body.dark-mode .alphabet-link.disabled {
    color: #555;
}

body.dark-mode .alphabet-link.clear-filter {
    background: #4a4020;
    color: #ffc107;
}

body.dark-mode .alphabet-link.clear-filter:hover {
    background: #5a4a25;
}

body.dark-mode .letter-count {
    color: #888;
}

/* Dark mode for articles by letter */
body.dark-mode .articles-by-letter {
    background: #1e1e1e;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

body.dark-mode .letter-group {
    border-bottom-color: #333;
}

body.dark-mode .letter-heading {
    color: #e0e0e0;
    border-bottom-color: #6b9eff;
}

body.dark-mode .letter-article-count {
    color: #888;
}

body.dark-mode .article-list-items li a {
    color: #6b9eff;
}

body.dark-mode .article-list-items li a:hover {
    color: #8bb4ff;
}

/* ============================================
   Wikipedia-Style Home Page
   ============================================ */

/* Hero Section */
.wiki-hero-section {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 60px 0;
    border-bottom: 3px solid var(--accent-color);
}

.wiki-hero-content {
    max-width: 700px;
    margin: 0 auto;
}

.wiki-main-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #202122;
    margin-bottom: 15px;
}

.wiki-subtitle {
    font-size: 1.2rem;
    color: #54595d;
    margin-bottom: 30px;
}

/* Search Box */
.wiki-search-container {
    max-width: 500px;
    margin: 0 auto;
}

.wiki-search-wrapper {
    display: flex;
    background: #fff;
    border: 2px solid #a2a9b1;
    border-radius: 25px;
    overflow: hidden;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.wiki-search-wrapper:focus-within {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent-color), transparent 90%);
}

.wiki-search-input {
    flex: 1;
    border: none;
    padding: 15px 25px;
    font-size: 16px;
    outline: none;
}

.wiki-search-btn {
    background: var(--accent-color);
    color: #fff;
    border: none;
    padding: 15px 25px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.wiki-search-btn:hover {
    background: color-mix(in srgb, var(--accent-color), #000 20%);
}

/* Categories Section */
.wiki-categories-section {
    padding: 50px 0;
    background: #fff;
}

.wiki-section-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #202122;
    margin-bottom: 25px;
    padding-bottom: 10px;
    border-bottom: 2px solid #eaecf0;
}

.wiki-categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
}

.wiki-category-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 25px 15px;
    background: #f8f9fa;
    border: 1px solid #eaecf0;
    border-radius: 12px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.wiki-category-card:hover {
    background: color-mix(in srgb, var(--accent-color), transparent 92%);
    border-color: var(--accent-color);
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.wiki-category-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--accent-color) 0%, color-mix(in srgb, var(--accent-color), #fff 30%) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
}

.wiki-category-icon i {
    font-size: 24px;
    color: #fff;
}

.wiki-category-name {
    font-size: 1rem;
    font-weight: 600;
    color: #202122;
    margin-bottom: 5px;
    text-align: center;
}

.wiki-category-count {
    font-size: 0.85rem;
    color: #72777d;
}

/* Featured Article Section */
.wiki-featured-section {
    padding: 30px 0;
}

.wiki-featured-card {
    background: #fff;
    border: 1px solid #eaecf0;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.wiki-featured-content {
    padding: 25px;
}

.wiki-featured-category {
    display: inline-block;
    background: color-mix(in srgb, var(--accent-color), transparent 90%);
    color: var(--accent-color);
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 12px;
}

.wiki-featured-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 12px;
}

.wiki-featured-title a {
    color: var(--accent-color);
    text-decoration: none;
}

.wiki-featured-title a:hover {
    text-decoration: underline;
}

.wiki-featured-summary {
    color: #54595d;
    line-height: 1.7;
    margin-bottom: 15px;
}

.wiki-featured-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 15px;
}

.wiki-read-time {
    color: #72777d;
    font-size: 0.9rem;
}

.wiki-read-more {
    color: var(--accent-color);
    font-weight: 500;
    text-decoration: none;
}

.wiki-read-more:hover {
    text-decoration: underline;
}

/* Latest Articles Section */
.wiki-latest-section {
    padding: 30px 0;
}

.wiki-latest-list {
    background: #fff;
    border: 1px solid #eaecf0;
    border-radius: 12px;
    overflow: hidden;
}

.wiki-latest-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    border-bottom: 1px solid #eaecf0;
}

.wiki-latest-item:last-child {
    border-bottom: none;
}

.wiki-latest-link {
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 500;
}

.wiki-latest-link:hover {
    text-decoration: underline;
}

.wiki-latest-date {
    color: #72777d;
    font-size: 0.85rem;
}

.wiki-view-all {
    margin-top: 15px;
}

.wiki-view-all a {
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 500;
}

.wiki-view-all a:hover {
    text-decoration: underline;
}

/* Sidebar Sections */
.wiki-sidebar-section {
    background: #fff;
    border: 1px solid #eaecf0;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
}

.wiki-sidebar-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #202122;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #eaecf0;
}

/* Did You Know */
.wiki-did-you-know {
    border-left: 4px solid var(--accent-color);
}

.wiki-fact-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.wiki-fact-item {
    display: flex;
    gap: 5px;
}

.wiki-fact-item i {
    color: var(--accent-color);
    font-size: 1.5rem;
    flex-shrink: 0;
}

.wiki-fact-item p {
    margin: 0;
    color: #54595d;
    font-size: 0.95rem;
    line-height: 1.5;
}

.wiki-fact-item a {
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 500;
}

.wiki-fact-item a:hover {
    text-decoration: underline;
}

/* On This Day */
.wiki-on-this-day {
    border-left: 4px solid color-mix(in srgb, var(--accent-color), #0a5 50%);
}

.wiki-timeline {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.wiki-timeline-item {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.wiki-year {
    background: color-mix(in srgb, var(--accent-color), #0a5 50%);
    color: #fff;
    padding: 3px 10px;
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.85rem;
    flex-shrink: 0;
}

.wiki-timeline-item p {
    margin: 0;
    color: #54595d;
    font-size: 0.95rem;
    line-height: 1.5;
}

/* Statistics */
.wiki-statistics {
    border-left: 4px solid color-mix(in srgb, var(--accent-color), #fa0 50%);
}

.wiki-stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    text-align: center;
}

.wiki-stat-item {
    display: flex;
    flex-direction: column;
}

.wiki-stat-number {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent-color);
}

.wiki-stat-label {
    font-size: 0.8rem;
    color: #72777d;
    text-transform: uppercase;
}

/* Contribute Section */
.wiki-contribute-section {
    background: linear-gradient(135deg, var(--accent-color) 0%, color-mix(in srgb, var(--accent-color), #fff 20%) 100%);
    padding: 60px 0;
    margin-top: 40px;
}

.wiki-contribute-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 15px;
}

.wiki-contribute-text {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.1rem;
    margin-bottom: 25px;
}

.wiki-contribute-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.wiki-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 25px;
    border-radius: 25px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
}

.wiki-btn-primary {
    background: #fff;
    color: var(--accent-color);
}

.wiki-btn-primary:hover {
    background: #f8f9fa;
    transform: translateY(-2px);
}

.wiki-btn-secondary {
    background: transparent;
    color: #fff;
    border: 2px solid #fff;
}

.wiki-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* User Pages Section */
.wiki-user-pages-section {
    padding: 40px 0;
    background: #f8f9fa;
}

.wiki-user-card {
    display: flex;
    align-items: center;
    gap: 15px;
    background: #fff;
    border: 1px solid #eaecf0;
    border-radius: 12px;
    padding: 20px;
    height: 100%;
}

.wiki-user-avatar {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--accent-color) 0%, color-mix(in srgb, var(--accent-color), #fff 20%) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 600;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.wiki-user-info {
    flex: 1;
}

.wiki-user-name {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 5px;
}

.wiki-user-name a {
    color: var(--accent-color);
    text-decoration: none;
}

.wiki-user-name a:hover {
    text-decoration: underline;
}

.wiki-user-bio {
    color: #72777d;
    font-size: 0.9rem;
    margin: 0;
}

/* Dark Mode for Wikipedia Home Page */
body.dark-mode .wiki-hero-section {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border-bottom-color: #4a6da7;
}

body.dark-mode .wiki-main-title {
    color: #e0e0e0;
}

body.dark-mode .wiki-subtitle {
    color: #a0a0a0;
}

body.dark-mode .wiki-search-wrapper {
    background: #2a2a2a;
    border-color: #404040;
}

body.dark-mode .wiki-search-input {
    background: #2a2a2a;
    color: #e0e0e0;
}

body.dark-mode .wiki-search-btn {
    background: #4a6da7;
}

body.dark-mode .wiki-categories-section {
    background: #121212;
}

body.dark-mode .wiki-section-title {
    color: #e0e0e0;
    border-bottom-color: #333;
}

body.dark-mode .wiki-category-card {
    background: #1e1e1e;
    border-color: #333;
}

body.dark-mode .wiki-category-card:hover {
    background: #2a2a3a;
    border-color: #4a6da7;
}

body.dark-mode .wiki-category-name {
    color: #e0e0e0;
}

body.dark-mode .wiki-category-count {
    color: #888;
}

body.dark-mode .wiki-featured-card,
body.dark-mode .wiki-latest-list,
body.dark-mode .wiki-sidebar-section,
body.dark-mode .wiki-user-card {
    background: #1e1e1e;
    border-color: #333;
}

body.dark-mode .wiki-featured-category {
    background: #2a2a3a;
    color: #6b9eff;
}

body.dark-mode .wiki-featured-title a,
body.dark-mode .wiki-latest-link,
body.dark-mode .wiki-fact-item a,
body.dark-mode .wiki-user-name a,
body.dark-mode .wiki-view-all a,
body.dark-mode .wiki-read-more {
    color: #6b9eff;
}

body.dark-mode .wiki-featured-summary,
body.dark-mode .wiki-fact-item p,
body.dark-mode .wiki-timeline-item p,
body.dark-mode .wiki-user-bio {
    color: #a0a0a0;
}

body.dark-mode .wiki-latest-item {
    border-bottom-color: #333;
}

body.dark-mode .wiki-latest-date,
body.dark-mode .wiki-read-time,
body.dark-mode .wiki-stat-label {
    color: #888;
}

body.dark-mode .wiki-sidebar-title {
    color: #e0e0e0;
    border-bottom-color: #333;
}

body.dark-mode .wiki-stat-number {
    color: #6b9eff;
}

body.dark-mode .wiki-contribute-section {
    background: linear-gradient(135deg, #1a1a2e 0%, #2a2a4e 100%);
}

body.dark-mode .wiki-user-pages-section {
    background: #0a0a0a;
}

/* ============================================
   Article List Hover Preview Popup
   ============================================ */

.article-list-popup {
    position: absolute;
    z-index: 9999;
    width: 320px;
    background: #fff;
    border: 1px solid #a2a9b1;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    opacity: 0;
    visibility: hidden;
    transform: translateY(5px);
    transition: all 0.2s ease;
    pointer-events: none;
}

.article-list-popup.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

.article-list-popup-content {
    padding: 16px;
}

.article-list-popup-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--accent-color);
    margin: 0 0 10px 0;
    line-height: 1.3;
}

.article-list-popup-summary {
    font-size: 0.9rem;
    color: #54595d;
    line-height: 1.5;
    margin: 0 0 12px 0;
}

.article-list-popup-meta {
    display: flex;
    gap: 15px;
    font-size: 0.8rem;
    color: #72777d;
    margin-bottom: 10px;
}

.article-list-popup-meta i {
    margin-right: 4px;
}

.article-list-popup-footer {
    padding-top: 10px;
    border-top: 1px solid #eaecf0;
}

.article-list-popup-hint {
    font-size: 0.75rem;
    color: #a2a9b1;
    font-style: italic;
}

/* Dark mode for article list popup */
body.dark-mode .article-list-popup {
    background: #1e1e1e;
    border-color: #404040;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

body.dark-mode .article-list-popup-title {
    color: #6b9eff;
}

body.dark-mode .article-list-popup-summary {
    color: #a0a0a0;
}

body.dark-mode .article-list-popup-meta {
    color: #888;
}

body.dark-mode .article-list-popup-footer {
    border-top-color: #333;
}

body.dark-mode .article-list-popup-hint {
    color: #666;
}

/* Article preview link hover effect */
.article-preview-link {
    position: relative;
}

.article-preview-link:hover {
    background: color-mix(in srgb, var(--accent-color), transparent 95%);
    border-radius: 2px;
}

body.dark-mode .article-preview-link:hover {
    background: rgba(107, 158, 255, 0.1);
}

/* ============================================
   Global Link Preview Popup
   ============================================ */

.global-link-popup {
    position: fixed;
    z-index: 9999;
    width: 320px;
    background: var(--surface-color, #fff);
    border: 1px solid #a2a9b1;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    opacity: 0;
    visibility: hidden;
    transform: translateY(5px);
    transition: all 0.2s ease;
    pointer-events: none;
    top: 0;
    left: -9999px;
}

.global-link-popup.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

.global-link-popup-content {
    padding: 16px;
}

.global-link-popup-loading {
    text-align: center;
    padding: 20px;
    color: var(--accent-color);
}

.global-link-popup-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--accent-color);
    margin: 0 0 10px 0;
    line-height: 1.3;
}

.global-link-popup-summary {
    font-size: 0.9rem;
    color: var(--default-color, #54595d);
    line-height: 1.5;
    margin: 0 0 12px 0;
}

.global-link-popup-meta {
    display: flex;
    gap: 15px;
    font-size: 0.8rem;
    color: #72777d;
    margin-bottom: 10px;
}

.global-link-popup-meta i {
    margin-right: 4px;
}

.global-link-popup-footer {
    padding-top: 10px;
    border-top: 1px solid #eaecf0;
}

.global-link-popup-hint {
    font-size: 0.75rem;
    color: #a2a9b1;
    font-style: italic;
}

/* Dark mode for global link popup */
body.dark-mode .global-link-popup {
    background: #1e1e1e;
    border-color: #404040;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

body.dark-mode .global-link-popup-title {
    color: #6b9eff;
}

body.dark-mode .global-link-popup-summary {
    color: #a0a0a0;
}

body.dark-mode .global-link-popup-meta {
    color: #888;
}

body.dark-mode .global-link-popup-footer {
    border-top-color: #333;
}

body.dark-mode .global-link-popup-hint {
    color: #666;
}

body.dark-mode .global-link-popup-loading {
    color: #6b9eff;
}

/* Global Link Popup - Clickable Links */
.global-link-popup-title-link {
    text-decoration: none;
    display: block;
}

.global-link-popup-title-link:hover .global-link-popup-title {
    text-decoration: underline;
}

.global-link-popup-read-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    padding: 6px 12px;
    background: color-mix(in srgb, var(--accent-color), transparent 92%);
    border-radius: 20px;
    transition: all 0.2s ease;
}

.global-link-popup-read-btn:hover {
    background: color-mix(in srgb, var(--accent-color), transparent 85%);
    color: var(--accent-color);
}

.global-link-popup-footer {
    text-align: center;
}

body.dark-mode .global-link-popup-read-btn {
    color: #6b9eff;
    background: rgba(107, 158, 255, 0.1);
}

body.dark-mode .global-link-popup-read-btn:hover {
    background: rgba(107, 158, 255, 0.2);
}

/* ============================================
   References Section (Manbalar) Styles
   ============================================ */

/* Reference anchor scroll offset for fixed header */
[id^="cite-"],
[id^="ref-"] {
    scroll-margin-top: 100px;
}

/* Reference links in article content - Wikipedia style */
.reference-link {
    font-size: 0.65em;
    vertical-align: super;
    line-height: 0;
}

.reference-link a {
    color: #0645ad;
    text-decoration: none;
    font-weight: normal;
}

.reference-link a:hover {
    color: #0b0080;
    text-decoration: underline;
}

/* Reference hover preview popup */
.ref-preview-popup {
    position: absolute;
    z-index: 1000;
    background: #fff;
    border: 1px solid #a2a9b1;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    padding: 12px 14px;
    max-width: 320px;
    min-width: 200px;
    font-size: 13px;
    line-height: 1.5;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.15s ease-in-out;
}

.ref-preview-popup.visible {
    opacity: 1;
}

.ref-preview-popup .ref-preview-num {
    font-weight: 600;
    color: #0645ad;
    margin-bottom: 6px;
}

.ref-preview-popup .ref-preview-title {
    font-weight: 500;
    color: #202122;
    margin-bottom: 4px;
}

.ref-preview-popup .ref-preview-url {
    font-size: 11px;
    color: #0645ad;
    word-break: break-all;
    margin-bottom: 4px;
}

.ref-preview-popup .ref-preview-meta {
    font-size: 11px;
    color: #72777d;
}

body.dark-mode .ref-preview-popup {
    background: #2b2b2b;
    border-color: #444;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

body.dark-mode .ref-preview-popup .ref-preview-title {
    color: #e0e0e0;
}

body.dark-mode .ref-preview-popup .ref-preview-meta {
    color: #aaa;
}

/* References section container */
.references-section {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.references-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--accent-color);
    margin-bottom: 1.5rem;
}

.references-title i {
    font-size: 1rem;
}

.btn-add-reference {
    margin-left: auto;
    color: var(--accent-color);
    text-decoration: none;
    opacity: 0.7;
    transition: all 0.2s ease;
}

.btn-add-reference:hover {
    opacity: 1;
    color: var(--accent-color);
}

/* References list */
.references-list {
    padding-left: 1.5rem;
    margin: 0;
    list-style-type: decimal;
}

.reference-item {
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    line-height: 1.6;
}

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

.reference-backlink {
    color: var(--accent-color);
    text-decoration: none;
    margin-right: 0.5rem;
    font-weight: 600;
}

.reference-backlink:hover {
    text-decoration: underline;
}

.reference-content {
    display: inline;
}

.reference-link-external {
    color: var(--accent-color);
    text-decoration: none;
}

.reference-link-external:hover {
    text-decoration: underline;
}

.reference-link-external i {
    font-size: 0.75em;
    margin-left: 0.25rem;
    opacity: 0.7;
}

.reference-title {
    font-weight: 500;
}

.reference-author {
    color: #666;
    font-style: italic;
}

.reference-publisher {
    color: #666;
}

.reference-date {
    color: #888;
    font-size: 0.9em;
    margin-left: 0.25rem;
}

.reference-description {
    display: block;
    margin-top: 0.25rem;
    color: #666;
    font-size: 0.9em;
}

/* Missing reference (placeholder) */
.reference-missing {
    background: rgba(255, 193, 7, 0.1);
    border-radius: 4px;
    padding: 0.5rem 0.75rem !important;
}

.reference-placeholder {
    color: #856404;
    font-style: italic;
}

/* Edit reference button */
.btn-edit-reference,
.btn-add-reference-inline {
    color: var(--accent-color);
    text-decoration: none;
    margin-left: 0.5rem;
    opacity: 0;
    transition: all 0.2s ease;
}

.reference-item:hover .btn-edit-reference,
.reference-item:hover .btn-add-reference-inline {
    opacity: 0.7;
}

.btn-edit-reference:hover,
.btn-add-reference-inline:hover {
    opacity: 1 !important;
}

/* Dark mode styles for references */
body.dark-mode .references-section {
    border-top-color: rgba(255, 255, 255, 0.1);
}

body.dark-mode .reference-item {
    border-bottom-color: rgba(255, 255, 255, 0.05);
}

body.dark-mode .reference-author,
body.dark-mode .reference-publisher,
body.dark-mode .reference-description {
    color: #aaa;
}

body.dark-mode .reference-date {
    color: #888;
}

body.dark-mode .reference-missing {
    background: rgba(255, 193, 7, 0.15);
}

body.dark-mode .reference-placeholder {
    color: #ffc107;
}

/* Reference modals styling */
#addReferenceModal .modal-content,
#editReferenceModal .modal-content {
    border-radius: 12px;
    border: none;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
}

#addReferenceModal .modal-header,
#editReferenceModal .modal-header {
    background: var(--accent-color);
    color: var(--contrast-color);
    border-radius: 12px 12px 0 0;
    padding: 1rem 1.5rem;
}

#addReferenceModal .modal-title,
#editReferenceModal .modal-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

#addReferenceModal .btn-close,
#editReferenceModal .btn-close {
    filter: brightness(0) invert(1);
    opacity: 0.8;
}

#addReferenceModal .btn-close:hover,
#editReferenceModal .btn-close:hover {
    opacity: 1;
}

body.dark-mode #addReferenceModal .modal-content,
body.dark-mode #editReferenceModal .modal-content {
    background: #1e1e1e;
    color: #e0e0e0;
}

body.dark-mode #addReferenceModal .modal-body,
body.dark-mode #editReferenceModal .modal-body {
    background: #1e1e1e;
}

body.dark-mode #addReferenceModal .modal-footer,
body.dark-mode #editReferenceModal .modal-footer {
    background: #252525;
    border-top-color: #333;
}

body.dark-mode #addReferenceModal .form-control,
body.dark-mode #editReferenceModal .form-control {
    background: #2d2d2d;
    border-color: #444;
    color: #e0e0e0;
}

body.dark-mode #addReferenceModal .form-control:focus,
body.dark-mode #editReferenceModal .form-control:focus {
    background: #333;
    border-color: var(--accent-color);
    color: #e0e0e0;
}

body.dark-mode #addReferenceModal .form-label,
body.dark-mode #editReferenceModal .form-label {
    color: #ccc;
}

body.dark-mode #addReferenceModal .form-text,
body.dark-mode #editReferenceModal .form-text {
    color: #888;
}

/* ============================================
   OltinFond New Design Styles
   ============================================ */

/* Header Styles */
.oltinfond-header {
    background: #fff;
    border-bottom: 1px solid #e5e7eb;
    padding: 12px 0;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1030;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* Add padding to body to account for fixed header */
body {
    padding-top: 76px;
}

.oltinfond-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.oltinfond-logo-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.oltinfond-logo-icon i {
    font-size: 24px;
    color: #fff;
}

.oltinfond-logo-text {
    display: flex;
    flex-direction: column;
}

.oltinfond-logo-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1f2937;
    line-height: 1.2;
}

.oltinfond-logo-subtitle {
    font-size: 0.75rem;
    color: #3b82f6;
    font-weight: 500;
}

.oltinfond-nav {
    display: flex;
    align-items: center;
}

.oltinfond-nav-list {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 8px;
}

.oltinfond-nav-list li a {
    display: block;
    padding: 8px 16px;
    color: #4b5563;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.oltinfond-nav-list li a:hover {
    color: #3b82f6;
    background: #eff6ff;
}

.oltinfond-nav-list li a.active {
    color: #3b82f6;
    background: #eff6ff;
}

.oltinfond-header-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.oltinfond-header-right .mobile-nav-toggle {
    display: none;
    font-size: 28px;
    color: #1f2937;
    cursor: pointer;
    padding: 4px;
    transition: color 0.2s ease;
}

.oltinfond-header-right .mobile-nav-toggle:hover {
    color: #3b82f6;
}

@media (max-width: 1199px) {
    .oltinfond-header-right .mobile-nav-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
    }
}

.oltinfond-auth {
    display: flex;
    align-items: center;
    gap: 12px;
}

.oltinfond-user-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    color: #4b5563;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.oltinfond-user-btn:hover {
    color: #3b82f6;
    background: #eff6ff;
}

.oltinfond-user-btn i {
    font-size: 1.25rem;
}

.oltinfond-login-btn {
    padding: 8px 20px;
    color: #4b5563;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.oltinfond-login-btn:hover {
    color: #1f2937;
    border-color: #d1d5db;
    background: #f9fafb;
}

.oltinfond-register-btn {
    padding: 8px 20px;
    color: #fff;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    border-radius: 8px;
    transition: all 0.2s ease;
}

.oltinfond-register-btn:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

/* Hero Section */
.oltinfond-hero {
    background: linear-gradient(180deg, #f8fafc 0%, #fff 100%);
    padding: 80px 0 60px;
    text-align: center;
}

.oltinfond-hero-content {
    max-width: 720px;
    margin: 0 auto;
}

.oltinfond-hero-title {
    font-size: 3rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 16px;
    line-height: 1.2;
}

.oltinfond-hero-subtitle {
    font-size: 1.25rem;
    color: #3b82f6;
    margin-bottom: 40px;
    font-weight: 400;
}

.oltinfond-search-box {
    max-width: 580px;
    margin: 0 auto;
}

.oltinfond-search-wrapper {
    display: flex;
    align-items: center;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 50px;
    padding: 6px 24px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
}

.oltinfond-search-wrapper:focus-within {
    border-color: #3b82f6;
    box-shadow: 0 4px 20px rgba(59, 130, 246, 0.15);
}

.oltinfond-search-icon {
    color: #9ca3af;
    font-size: 1.1rem;
    margin-right: 12px;
}

.oltinfond-search-input {
    flex: 1;
    border: none;
    outline: none;
    padding: 14px 0;
    font-size: 1rem;
    color: #1f2937;
    background: transparent;
}

.oltinfond-search-input::placeholder {
    color: #9ca3af;
}

/* Categories Section */
.oltinfond-categories {
    background: #f8fafc;
    padding: 60px 0;
    border-top: 1px solid #e5e7eb;
}

.oltinfond-section-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 32px;
}

.oltinfond-section-icon {
    color: #3b82f6;
    margin-right: 8px;
}

.oltinfond-categories-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 24px;
}

.oltinfond-category-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 32px 20px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.oltinfond-category-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.08);
    border-color: transparent;
}

.oltinfond-category-icon {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
}

.oltinfond-category-icon i {
    font-size: 28px;
    color: #fff;
}

/* Category color variants */
.oltinfond-category-icon-1 {
    background: linear-gradient(135deg, #60a5fa 0%, #3b82f6 100%);
}

.oltinfond-category-icon-2 {
    background: linear-gradient(135deg, #a78bfa 0%, #8b5cf6 100%);
}

.oltinfond-category-icon-3 {
    background: linear-gradient(135deg, #f472b6 0%, #ec4899 100%);
}

.oltinfond-category-icon-4 {
    background: linear-gradient(135deg, #34d399 0%, #10b981 100%);
}

.oltinfond-category-icon-5 {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
}

.oltinfond-category-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 4px;
    text-align: center;
}

.oltinfond-category-translation {
    font-size: 0.85rem;
    color: #9ca3af;
    text-align: center;
}

/* Featured Article Section */
.oltinfond-featured {
    padding: 60px 0;
    background: #fff;
}

.oltinfond-featured-card {
    display: grid;
    grid-template-columns: 1fr 1fr;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
}

.oltinfond-featured-image {
    position: relative;
    min-height: 400px;
    overflow: hidden;
}

.oltinfond-featured-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.oltinfond-featured-card:hover .oltinfond-featured-image img {
    transform: scale(1.05);
}

.oltinfond-featured-placeholder {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.oltinfond-featured-placeholder-content {
    text-align: center;
    color: rgba(255, 255, 255, 0.8);
}

.oltinfond-featured-placeholder-content i {
    font-size: 80px;
}

.oltinfond-featured-content {
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.oltinfond-featured-tag {
    display: inline-block;
    padding: 6px 16px;
    background: #eff6ff;
    color: #3b82f6;
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: 20px;
    margin-bottom: 16px;
    width: fit-content;
}

.oltinfond-featured-title {
    font-size: 2rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 16px;
    line-height: 1.3;
}

.oltinfond-featured-summary {
    font-size: 1rem;
    color: #6b7280;
    line-height: 1.7;
    margin-bottom: 20px;
}

.oltinfond-featured-meta {
    margin-bottom: 24px;
}

.oltinfond-featured-time {
    font-size: 0.9rem;
    color: #9ca3af;
}

.oltinfond-featured-time i {
    margin-right: 6px;
}

.oltinfond-featured-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    color: #fff;
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 10px;
    transition: all 0.3s ease;
    width: fit-content;
}

.oltinfond-featured-btn:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
    color: #fff;
    transform: translateX(4px);
}

/* Did You Know Section */
.oltinfond-did-you-know {
    padding: 60px 0;
    background: #f8fafc;
}

.oltinfond-facts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.oltinfond-fact-card {
    background: #fff;
    padding: 28px;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    transition: all 0.3s ease;
}

.oltinfond-fact-card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
    border-color: transparent;
}

.oltinfond-fact-text {
    font-size: 1rem;
    color: #4b5563;
    line-height: 1.7;
    margin-bottom: 16px;
}

.oltinfond-fact-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #3b82f6;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
}

.oltinfond-fact-link:hover {
    color: #1d4ed8;
    gap: 10px;
}

/* On This Day Section */
.oltinfond-on-this-day {
    padding: 60px 0;
    background: #fff;
}

.oltinfond-timeline {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.oltinfond-timeline-item {
    display: flex;
    align-items: center;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 24px 32px;
    transition: all 0.3s ease;
}

.oltinfond-timeline-item:hover {
    background: #fff;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
    border-color: transparent;
}

.oltinfond-timeline-year {
    font-size: 1.75rem;
    font-weight: 700;
    color: #3b82f6;
    min-width: 100px;
    padding-right: 32px;
    border-right: 2px solid #e5e7eb;
    margin-right: 32px;
}

.oltinfond-timeline-content {
    flex: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.oltinfond-timeline-content p {
    margin: 0;
    font-size: 1rem;
    color: #4b5563;
    font-weight: 500;
}

.oltinfond-timeline-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #3b82f6;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
}

.oltinfond-timeline-link:hover {
    color: #1d4ed8;
    gap: 10px;
}

/* Responsive Design */
@media (max-width: 1199px) {
    .oltinfond-nav-list {
        display: none;
    }

    .mobile-nav-active .oltinfond-nav-list {
        display: block;
        position: absolute;
        top: calc(100% + 10px);
        right: 0;
        min-width: 200px;
        background: #fff;
        border: 1px solid #e5e7eb;
        border-radius: 12px;
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
        padding: 8px;
    }

    .mobile-nav-active .oltinfond-nav-list li a {
        display: block;
        padding: 12px 16px;
    }
}

@media (max-width: 991px) {
    .oltinfond-hero-title {
        font-size: 2.25rem;
    }

    .oltinfond-categories-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .oltinfond-featured-card {
        grid-template-columns: 1fr;
    }

    .oltinfond-featured-image {
        min-height: 280px;
    }

    .oltinfond-facts-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 767px) {
    .oltinfond-hero {
        padding: 50px 0 40px;
    }

    .oltinfond-hero-title {
        font-size: 1.75rem;
    }

    .oltinfond-hero-subtitle {
        font-size: 1rem;
        margin-bottom: 30px;
    }

    .oltinfond-categories-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }

    .oltinfond-category-card {
        padding: 24px 16px;
    }

    .oltinfond-category-icon {
        width: 56px;
        height: 56px;
    }

    .oltinfond-category-icon i {
        font-size: 22px;
    }

    .oltinfond-featured-content {
        padding: 24px;
    }

    .oltinfond-featured-title {
        font-size: 1.5rem;
    }

    .oltinfond-timeline-item {
        flex-direction: column;
        align-items: flex-start;
        padding: 20px 24px;
    }

    .oltinfond-timeline-year {
        border-right: none;
        border-bottom: 2px solid #e5e7eb;
        padding-right: 0;
        padding-bottom: 12px;
        margin-right: 0;
        margin-bottom: 12px;
    }

    .oltinfond-timeline-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .oltinfond-login-btn,
    .oltinfond-register-btn {
        padding: 6px 12px;
        font-size: 0.85rem;
    }

    .oltinfond-logo-title {
        font-size: 1.1rem;
    }

    .oltinfond-logo-subtitle {
        font-size: 0.65rem;
    }

    .oltinfond-logo-icon {
        width: 40px;
        height: 40px;
    }

    .oltinfond-logo-icon i {
        font-size: 20px;
    }
}

@media (max-width: 480px) {
    .oltinfond-categories-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

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

    .oltinfond-logo-subtitle {
        display: none;
    }
}

/* Dark Mode Support */
body.dark-mode .oltinfond-header {
    background: #1a1a1a;
    border-bottom-color: #333;
}

body.dark-mode .oltinfond-header-right .mobile-nav-toggle {
    color: #e5e7eb;
}

body.dark-mode .oltinfond-header-right .mobile-nav-toggle:hover {
    color: #60a5fa;
}

body.dark-mode .oltinfond-logo-title {
    color: #fff;
}

body.dark-mode .oltinfond-nav-list li a {
    color: #a0a0a0;
}

body.dark-mode .oltinfond-nav-list li a:hover,
body.dark-mode .oltinfond-nav-list li a.active {
    color: #60a5fa;
    background: rgba(59, 130, 246, 0.1);
}

body.dark-mode .oltinfond-login-btn {
    color: #a0a0a0;
    border-color: #333;
}

body.dark-mode .oltinfond-login-btn:hover {
    color: #fff;
    background: #2d2d2d;
}

body.dark-mode .oltinfond-hero {
    background: linear-gradient(180deg, #121212 0%, #1a1a1a 100%);
}

body.dark-mode .oltinfond-hero-title {
    color: #fff;
}

body.dark-mode .oltinfond-hero-subtitle {
    color: #60a5fa;
}

body.dark-mode .oltinfond-search-wrapper {
    background: #2d2d2d;
    border-color: #404040;
}

body.dark-mode .oltinfond-search-input {
    color: #fff;
}

body.dark-mode .oltinfond-categories {
    background: #121212;
    border-top-color: #333;
}

body.dark-mode .oltinfond-section-title {
    color: #fff;
}

body.dark-mode .oltinfond-category-card {
    background: #1a1a1a;
    border-color: #333;
}

body.dark-mode .oltinfond-category-card:hover {
    background: #2d2d2d;
}

body.dark-mode .oltinfond-category-name {
    color: #fff;
}

body.dark-mode .oltinfond-category-translation {
    color: #6b7280;
}

body.dark-mode .oltinfond-featured {
    background: #1a1a1a;
}

body.dark-mode .oltinfond-featured-card {
    background: #1a1a1a;
    border-color: #333;
}

body.dark-mode .oltinfond-featured-tag {
    background: rgba(59, 130, 246, 0.15);
}

body.dark-mode .oltinfond-featured-title {
    color: #fff;
}

body.dark-mode .oltinfond-featured-summary {
    color: #a0a0a0;
}

body.dark-mode .oltinfond-featured-time {
    color: #6b7280;
}

body.dark-mode .oltinfond-did-you-know {
    background: #121212;
}

body.dark-mode .oltinfond-fact-card {
    background: #1a1a1a;
    border-color: #333;
}

body.dark-mode .oltinfond-fact-card:hover {
    background: #2d2d2d;
}

body.dark-mode .oltinfond-fact-text {
    color: #a0a0a0;
}

body.dark-mode .oltinfond-on-this-day {
    background: #1a1a1a;
}

body.dark-mode .oltinfond-timeline-item {
    background: #121212;
    border-color: #333;
}

body.dark-mode .oltinfond-timeline-item:hover {
    background: #1a1a1a;
}

body.dark-mode .oltinfond-timeline-year {
    border-right-color: #333;
}

body.dark-mode .oltinfond-timeline-content p {
    color: #a0a0a0;
}

/* ============================================
   OltinFond Modal Design
   ============================================ */

.oltinfond-modal {
    border: none;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    overflow: hidden;
}

.oltinfond-modal-header {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    border-bottom: none;
    padding: 20px 24px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.oltinfond-modal-header .modal-title {
    color: #fff;
    font-weight: 600;
    font-size: 1.1rem;
}

.oltinfond-modal-header .btn-close {
    filter: brightness(0) invert(1);
    opacity: 0.8;
}

.oltinfond-modal-header .btn-close:hover {
    opacity: 1;
}

.oltinfond-modal-icon {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.oltinfond-modal-icon i {
    font-size: 20px;
    color: #fff;
}

.oltinfond-modal-icon-edit {
    background: rgba(255, 255, 255, 0.2);
}

.oltinfond-modal-body {
    padding: 24px;
    background: #fff;
}

.oltinfond-form-label {
    font-weight: 500;
    color: #374151;
    font-size: 0.9rem;
    margin-bottom: 6px;
}

.oltinfond-form-control {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 0.95rem;
    transition: all 0.2s ease;
}

.oltinfond-form-control:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.oltinfond-modal .input-group-text {
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-right: none;
    border-radius: 8px 0 0 8px;
    color: #6b7280;
}

.oltinfond-modal .input-group .oltinfond-form-control {
    border-radius: 0 8px 8px 0;
}

.oltinfond-modal-footer {
    background: #f8fafc;
    border-top: 1px solid #e5e7eb;
    padding: 16px 24px;
}

.oltinfond-btn-primary {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 10px 20px;
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.2s ease;
}

.oltinfond-btn-primary:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.oltinfond-btn-secondary {
    background: #fff;
    color: #4b5563;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 10px 20px;
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.2s ease;
}

.oltinfond-btn-secondary:hover {
    background: #f9fafb;
    border-color: #d1d5db;
    color: #1f2937;
}

.oltinfond-btn-danger {
    background: #fff;
    color: #dc2626;
    border: 1px solid #fecaca;
    border-radius: 8px;
    padding: 10px 20px;
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.2s ease;
}

.oltinfond-btn-danger:hover {
    background: #fef2f2;
    border-color: #f87171;
    color: #b91c1c;
}

/* Dark mode for modals */
body.dark-mode .oltinfond-modal {
    background: #1a1a1a;
}

body.dark-mode .oltinfond-modal-body {
    background: #1a1a1a;
}

body.dark-mode .oltinfond-form-label {
    color: #d1d5db;
}

body.dark-mode .oltinfond-form-control {
    background: #2d2d2d;
    border-color: #404040;
    color: #e5e7eb;
}

body.dark-mode .oltinfond-form-control:focus {
    border-color: #3b82f6;
    background: #333;
}

body.dark-mode .oltinfond-modal .input-group-text {
    background: #2d2d2d;
    border-color: #404040;
    color: #9ca3af;
}

body.dark-mode .oltinfond-modal-footer {
    background: #121212;
    border-top-color: #333;
}

body.dark-mode .oltinfond-btn-secondary {
    background: #2d2d2d;
    border-color: #404040;
    color: #d1d5db;
}

body.dark-mode .oltinfond-btn-secondary:hover {
    background: #333;
    border-color: #525252;
    color: #fff;
}

body.dark-mode .oltinfond-btn-danger {
    background: #2d2d2d;
    border-color: #7f1d1d;
    color: #f87171;
}

body.dark-mode .oltinfond-btn-danger:hover {
    background: #450a0a;
    border-color: #b91c1c;
}

/* ============================================
   Floating Settings Button & Compact Panel
   ============================================ */

/* Floating Button */
.floating-settings-btn {
    position: fixed;
    bottom: 90px;
    right: 24px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    color: #fff;
    border: none;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.35);
    cursor: pointer;
    z-index: 1040;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.floating-settings-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.45);
}

.floating-settings-btn:active {
    transform: scale(0.95);
}

.floating-settings-btn i {
    font-size: 20px;
    transition: transform 0.3s ease;
}

.floating-settings-btn:hover i {
    transform: rotate(90deg);
}

/* Panel Overlay - subtle */
.settings-panel-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.2);
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    z-index: 1050;
}

.settings-panel-overlay.open {
    opacity: 1;
    visibility: visible;
}

/* Compact Inline Panel */
.settings-side-panel {
    position: fixed;
    bottom: 145px;
    right: 24px;
    width: 280px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    z-index: 1060;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px) scale(0.95);
    transform-origin: bottom right;
    transition: all 0.25s ease;
}

.settings-side-panel.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.settings-panel-header {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    color: #fff;
    padding: 14px 16px;
    border-radius: 16px 16px 0 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.settings-panel-header h3 {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 600;
    display: flex;
    align-items: center;
}

.settings-panel-header h3 i {
    font-size: 16px;
}

.settings-panel-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: #fff;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.settings-panel-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

.settings-panel-close i {
    font-size: 14px;
}

.settings-panel-body {
    padding: 16px;
}

.settings-panel-section {
    margin-bottom: 14px;
}

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

.settings-panel-title {
    font-size: 0.7rem;
    font-weight: 600;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.settings-btn-group {
    display: flex;
    gap: 6px;
}

.settings-panel-btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    padding: 8px 10px;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    color: #374151;
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.settings-panel-btn:hover {
    background: #eff6ff;
    border-color: #3b82f6;
    color: #3b82f6;
}

.settings-panel-btn.active {
    background: #3b82f6;
    border-color: #3b82f6;
    color: #fff;
}

.settings-panel-btn i {
    font-size: 16px;
}

.settings-panel-btn.full-width {
    width: 100%;
    flex-direction: row;
    justify-content: flex-start;
    gap: 10px;
    padding: 10px 12px;
}

.settings-panel-btn.full-width i {
    font-size: 16px;
}

/* Font size controls */
.settings-panel-font-controls {
    display: flex;
    gap: 8px;
}

.settings-panel-font-controls .settings-panel-btn {
    flex: 1;
    justify-content: center;
    padding: 8px 12px;
    font-weight: 600;
}

/* Dark mode for settings panel */
body.dark-mode .settings-side-panel {
    background: #1f1f1f;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

body.dark-mode .settings-panel-title {
    color: #6b7280;
}

body.dark-mode .settings-panel-btn {
    background: #2a2a2a;
    border-color: #3a3a3a;
    color: #d1d5db;
}

body.dark-mode .settings-panel-btn:hover {
    background: rgba(59, 130, 246, 0.15);
    border-color: #3b82f6;
    color: #60a5fa;
}

body.dark-mode .settings-panel-btn.active {
    background: #3b82f6;
    border-color: #3b82f6;
    color: #fff;
}

/* Mobile adjustments */
@media (max-width: 480px) {
    .floating-settings-btn {
        bottom: 80px;
        right: 16px;
        width: 42px;
        height: 42px;
    }

    .floating-settings-btn i {
        font-size: 18px;
    }

    .settings-side-panel {
        right: 16px;
        bottom: 130px;
        width: calc(100vw - 32px);
        max-width: 300px;
    }
}

/* ============================================
   History Page Styles
   ============================================ */

/* Page Header */
.oltinfond-page-header {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    padding: 2rem 0;
    margin-bottom: 2rem;
}

.oltinfond-breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.oltinfond-breadcrumb a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: color 0.2s ease;
}

.oltinfond-breadcrumb a:hover {
    color: #fff;
}

.oltinfond-breadcrumb i {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.75rem;
}

.oltinfond-breadcrumb span {
    color: #fff;
}

.oltinfond-page-title {
    color: #fff;
    font-size: 1.75rem;
    font-weight: 700;
    margin: 0 0 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.oltinfond-page-title i {
    font-size: 1.5rem;
}

.oltinfond-page-subtitle {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1rem;
    margin: 0;
}

/* History Section */
.oltinfond-history-section {
    padding-bottom: 3rem;
}

/* Back Button */
.oltinfond-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #3b82f6;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    padding: 0.5rem 1rem;
    background: #f0f7ff;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.oltinfond-back-btn:hover {
    background: #3b82f6;
    color: #fff;
}

.oltinfond-back-btn i {
    font-size: 1rem;
}

/* Statistics Row */
.oltinfond-stats-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.oltinfond-stat-card {
    background: #fff;
    border-radius: 12px;
    padding: 1.25rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    border: 1px solid #e5e7eb;
}

.oltinfond-stat-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.oltinfond-stat-icon i {
    font-size: 1.25rem;
    color: #fff;
}

.oltinfond-stat-icon-purple {
    background: linear-gradient(135deg, #8b5cf6 0%, #6d28d9 100%);
}

.oltinfond-stat-icon-green {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.oltinfond-stat-content {
    display: flex;
    flex-direction: column;
}

.oltinfond-stat-number {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1f2937;
    line-height: 1.2;
}

.oltinfond-stat-label {
    font-size: 0.75rem;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Revisions List */
.oltinfond-revisions-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.oltinfond-revision-card {
    background: #fff;
    border-radius: 12px;
    padding: 1.25rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    border: 1px solid #e5e7eb;
    transition: all 0.2s ease;
}

.oltinfond-revision-card:hover {
    border-color: #3b82f6;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
}

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

.oltinfond-revision-number {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.revision-badge {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
}

.oltinfond-badge-latest {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #fff;
    font-size: 0.625rem;
    font-weight: 600;
    padding: 0.2rem 0.5rem;
    border-radius: 12px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.oltinfond-revision-actions {
    display: flex;
    gap: 0.5rem;
}

.oltinfond-action-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f3f4f6;
    border-radius: 8px;
    color: #6b7280;
    text-decoration: none;
    transition: all 0.2s ease;
}

.oltinfond-action-btn:hover {
    background: #3b82f6;
    color: #fff;
}

.oltinfond-action-btn-restore:hover {
    background: #f59e0b;
    color: #fff;
}

.oltinfond-revision-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.oltinfond-meta-item {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.875rem;
    color: #6b7280;
}

.oltinfond-meta-item i {
    font-size: 0.875rem;
    color: #9ca3af;
}

.oltinfond-meta-item a {
    color: #3b82f6;
    text-decoration: none;
}

.oltinfond-meta-item a:hover {
    text-decoration: underline;
}

.oltinfond-revision-summary {
    background: #f9fafb;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-size: 0.875rem;
    color: #4b5563;
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
}

.oltinfond-revision-summary i {
    color: #9ca3af;
    margin-top: 2px;
}

/* Sidebar */
.oltinfond-sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.oltinfond-widget {
    background: #fff;
    border-radius: 12px;
    padding: 1.25rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    border: 1px solid #e5e7eb;
}

.oltinfond-widget-title {
    font-size: 1rem;
    font-weight: 600;
    color: #1f2937;
    margin: 0 0 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #3b82f6;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.oltinfond-widget-title i {
    color: #3b82f6;
}

/* Contributors List */
.oltinfond-contributors-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.oltinfond-contributor-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.oltinfond-contributor-avatar {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 0.875rem;
    font-weight: 600;
    flex-shrink: 0;
}

.oltinfond-contributor-info {
    display: flex;
    flex-direction: column;
}

.oltinfond-contributor-name {
    font-size: 0.875rem;
    font-weight: 500;
    color: #1f2937;
    text-decoration: none;
}

.oltinfond-contributor-name:hover {
    color: #3b82f6;
}

.oltinfond-contributor-edits {
    font-size: 0.75rem;
    color: #6b7280;
}

/* Quick Actions */
.oltinfond-quick-actions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.oltinfond-quick-action {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: #f9fafb;
    border-radius: 8px;
    color: #4b5563;
    text-decoration: none;
    font-size: 0.875rem;
    transition: all 0.2s ease;
}

.oltinfond-quick-action:hover {
    background: #3b82f6;
    color: #fff;
}

.oltinfond-quick-action i {
    font-size: 1rem;
}

/* Pagination */
.oltinfond-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.oltinfond-page-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    color: #3b82f6;
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
}

.oltinfond-page-btn:hover {
    background: #3b82f6;
    border-color: #3b82f6;
    color: #fff;
}

.oltinfond-page-numbers {
    display: flex;
    gap: 0.25rem;
}

.oltinfond-page-num {
    min-width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    color: #4b5563;
    font-size: 0.875rem;
    text-decoration: none;
    transition: all 0.2s ease;
}

.oltinfond-page-num:hover {
    background: #f0f7ff;
    border-color: #3b82f6;
    color: #3b82f6;
}

.oltinfond-page-num.active {
    background: #3b82f6;
    border-color: #3b82f6;
    color: #fff;
}

/* Empty State */
.oltinfond-empty-state {
    text-align: center;
    padding: 3rem 2rem;
    background: #fff;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
}

.oltinfond-empty-state i {
    font-size: 3rem;
    color: #d1d5db;
    margin-bottom: 1rem;
    display: block;
}

.oltinfond-empty-state p {
    font-size: 1rem;
    color: #6b7280;
    margin: 0;
}

/* Dark Mode History Page */
body.dark-mode .oltinfond-page-header {
    background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
}

body.dark-mode .oltinfond-back-btn {
    background: rgba(59, 130, 246, 0.15);
    color: #60a5fa;
}

body.dark-mode .oltinfond-back-btn:hover {
    background: #3b82f6;
    color: #fff;
}

body.dark-mode .oltinfond-stat-card,
body.dark-mode .oltinfond-revision-card,
body.dark-mode .oltinfond-widget {
    background: #1e1e1e;
    border-color: #333;
}

body.dark-mode .oltinfond-stat-number,
body.dark-mode .oltinfond-widget-title,
body.dark-mode .oltinfond-contributor-name {
    color: #e5e7eb;
}

body.dark-mode .oltinfond-stat-label,
body.dark-mode .oltinfond-meta-item,
body.dark-mode .oltinfond-contributor-edits {
    color: #9ca3af;
}

body.dark-mode .oltinfond-revision-summary {
    background: #252525;
    color: #d1d5db;
}

body.dark-mode .oltinfond-action-btn {
    background: #2a2a2a;
    color: #9ca3af;
}

body.dark-mode .oltinfond-action-btn:hover {
    background: #3b82f6;
    color: #fff;
}

body.dark-mode .oltinfond-quick-action {
    background: #252525;
    color: #d1d5db;
}

body.dark-mode .oltinfond-quick-action:hover {
    background: #3b82f6;
    color: #fff;
}

body.dark-mode .oltinfond-page-btn,
body.dark-mode .oltinfond-page-num {
    background: #1e1e1e;
    border-color: #333;
    color: #d1d5db;
}

body.dark-mode .oltinfond-page-num:hover {
    background: rgba(59, 130, 246, 0.15);
    border-color: #3b82f6;
    color: #60a5fa;
}

body.dark-mode .oltinfond-page-num.active {
    background: #3b82f6;
    border-color: #3b82f6;
    color: #fff;
}

body.dark-mode .oltinfond-empty-state {
    background: #1e1e1e;
    border-color: #333;
}

body.dark-mode .oltinfond-empty-state i {
    color: #4b5563;
}

body.dark-mode .oltinfond-empty-state p {
    color: #9ca3af;
}

/* Responsive History Page */
@media (max-width: 991px) {
    .oltinfond-stats-row {
        grid-template-columns: 1fr;
    }
}

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

    .oltinfond-page-title {
        font-size: 1.5rem;
    }

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

    .oltinfond-revision-meta {
        flex-direction: column;
        gap: 0.5rem;
    }

    .oltinfond-pagination {
        flex-direction: column;
        gap: 0.75rem;
    }

    .oltinfond-page-numbers {
        order: -1;
    }
}

/* ============================================
   About Page - OltinFond Styles
   ============================================ */

/* Avatar Styles */
.oltinfond-avatar {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    color: #fff;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.oltinfond-avatar-large {
    width: 120px;
    height: 120px;
    font-size: 3rem;
}

.oltinfond-avatar-medium {
    width: 80px;
    height: 80px;
    font-size: 2rem;
}

.oltinfond-avatar-small {
    width: 48px;
    height: 48px;
    font-size: 1.25rem;
}

/* Step Number Styles */
.oltinfond-step-number {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    color: #fff;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

/* About Page Section Styling */
.about-page .section-title h2 {
    color: #1f2937;
    font-weight: 700;
}

.about-page .team-member {
    background: #fff;
    border: 1px solid #e5e7eb;
    transition: all 0.3s ease;
}

.about-page .team-member:hover {
    border-color: #3b82f6;
    box-shadow: 0 8px 24px rgba(59, 130, 246, 0.15);
}

.about-page .team-member h4 {
    color: #1f2937;
    font-weight: 600;
}

.about-page .card {
    border: 1px solid #e5e7eb;
    transition: all 0.3s ease;
}

.about-page .card:hover {
    border-color: #3b82f6;
    box-shadow: 0 8px 24px rgba(59, 130, 246, 0.15);
    transform: translateY(-4px);
}

.about-page .stat-item h3 {
    color: #3b82f6;
    font-weight: 700;
    font-size: 2.5rem;
}

.about-page .tutorial-step {
    background: #fff;
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    transition: all 0.3s ease;
}

.about-page .tutorial-step:hover {
    border-color: #3b82f6;
    box-shadow: 0 4px 16px rgba(59, 130, 246, 0.1);
}

.about-page .tutorial-step h4 {
    color: #1f2937;
    font-weight: 600;
}

.about-page .about-feature-icon {
    color: #3b82f6;
}

/* Dark Mode About Page */
body.dark-mode .oltinfond-avatar {
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

body.dark-mode .oltinfond-step-number {
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

body.dark-mode .about-page .team-member {
    background: #1e1e1e;
    border-color: #333;
}

body.dark-mode .about-page .team-member:hover {
    border-color: #3b82f6;
}

body.dark-mode .about-page .team-member h4 {
    color: #e5e7eb;
}

body.dark-mode .about-page .card {
    background: #1e1e1e;
    border-color: #333;
}

body.dark-mode .about-page .card:hover {
    border-color: #3b82f6;
}

body.dark-mode .about-page .tutorial-step {
    background: #1e1e1e;
    border-color: #333;
}

body.dark-mode .about-page .tutorial-step:hover {
    border-color: #3b82f6;
}

body.dark-mode .about-page .tutorial-step h4 {
    color: #e5e7eb;
}

body.dark-mode .about-page .section-title h2 {
    color: #e5e7eb;
}

/* ============================================
   Wikipedia-Style References (Manbalar)
   ============================================ */

.wiki-references-section {
    margin-top: 2rem;
    padding-top: 1.5rem;
}

.wiki-references-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #a2a9b1;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.wiki-btn-add-ref {
    font-size: 1rem;
    color: #3b82f6;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.wiki-btn-add-ref:hover {
    opacity: 1;
}

/* New References List Design */
.wiki-references-list-new {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    font-size: 0.9rem;
    line-height: 1.6;
}

.wiki-ref-row {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    background: #f8f9fa;
    border-radius: 6px;
    border-left: 3px solid #3b82f6;
    transition: all 0.2s;
}

.wiki-ref-row:hover {
    background: #f1f5f9;
}

.wiki-ref-row:target {
    background: #dbeafe;
    border-left-color: #1d4ed8;
}

.wiki-ref-num {
    font-weight: 600;
    color: #3b82f6;
    min-width: 24px;
    text-decoration: none;
}

.wiki-ref-num:hover {
    text-decoration: underline;
}

.wiki-ref-body {
    flex: 1;
    color: #374151;
}

.wiki-ref-author {
    font-weight: 500;
}

.wiki-ref-link {
    color: #0645ad;
    text-decoration: none;
}

.wiki-ref-link:hover {
    text-decoration: underline;
}

.wiki-ref-title {
    color: #374151;
}

.wiki-ref-publisher,
.wiki-ref-date,
.wiki-ref-desc {
    color: #6b7280;
}

.wiki-btn-edit-ref {
    color: #9ca3af;
    font-size: 0.85rem;
    opacity: 0;
    transition: opacity 0.2s;
}

.wiki-ref-row:hover .wiki-btn-edit-ref {
    opacity: 1;
}

.wiki-btn-edit-ref:hover {
    color: #3b82f6;
}

.wiki-ref-missing {
    border-left-color: #f59e0b;
    background: #fffbeb;
}

.wiki-ref-placeholder {
    color: #92400e;
    font-style: italic;
}

/* Dark mode */
body.dark-mode .wiki-ref-row {
    background: #1f2937;
    border-left-color: #60a5fa;
}

body.dark-mode .wiki-ref-row:hover {
    background: #374151;
}

body.dark-mode .wiki-ref-row:target {
    background: #1e3a5f;
}

body.dark-mode .wiki-ref-num {
    color: #60a5fa;
}

body.dark-mode .wiki-ref-body {
    color: #e5e7eb;
}

body.dark-mode .wiki-ref-author {
    color: #d1d5db;
}

body.dark-mode .wiki-ref-link {
    color: #60a5fa;
}

body.dark-mode .wiki-ref-title {
    color: #e5e7eb;
}

body.dark-mode .wiki-ref-publisher,
body.dark-mode .wiki-ref-date,
body.dark-mode .wiki-ref-desc {
    color: #9ca3af;
}

body.dark-mode .wiki-btn-edit-ref {
    color: #6b7280;
}

body.dark-mode .wiki-btn-edit-ref:hover {
    color: #60a5fa;
}

body.dark-mode .wiki-ref-missing {
    background: #422006;
    border-left-color: #f59e0b;
}

body.dark-mode .wiki-ref-placeholder {
    color: #fbbf24;
}

/* ============================================
   Article Action Buttons
   ============================================ */

#save-article-btn-inline {
    min-width: 85px;
}

/* Mobile styles */
@media (max-width: 576px) {
    /* Action buttons: show only icons */
    .article-action-buttons .btn-text {
        display: none;
    }

    .article-action-buttons {
        justify-content: center !important;
        gap: 0.4rem !important;
        margin-bottom: 0.75rem !important;
    }

    .article-action-buttons .btn {
        padding: 0.35rem 0.6rem !important;
        font-size: 0.9rem;
    }

    #save-article-btn-inline {
        min-width: auto;
    }

    /* Article meta: stack vertically */
    .article-meta-header .article-meta-info {
        flex-direction: column;
        align-items: flex-start !important;
        gap: 0.4rem !important;
    }

    .article-meta-header .article-meta-info > div {
        font-size: 0.8rem;
    }
}

/* ============================================
   Categories Section (Turkumlar)
   ============================================ */

.wiki-categories-list {
    display: inline;
}

.wiki-category-item {
    color: #3b82f6;
    text-decoration: none;
}

.wiki-category-item:hover {
    text-decoration: underline;
}

.wiki-category-item::after {
    content: " · ";
    color: #6b7280;
}

.wiki-category-item:last-child::after {
    content: "";
}

/* Dark mode categories */
body.dark-mode .wiki-category-item {
    color: #60a5fa;
}

body.dark-mode .wiki-category-item::after {
    color: #9ca3af;
}

/* ============================================
   Edittools / Character Picker
   ============================================ */

.wiki-edittools {
    border: 1px solid #dee2e6;
    border-radius: 6px;
    background: #f8f9fa;
    overflow: hidden;
    position: relative;
    z-index: 10;
    display: block !important;
}

.wiki-edittools-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.wiki-edittools-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    cursor: pointer;
    font-size: 0.85rem;
    color: #495057;
    transition: background 0.2s;
    flex: 1;
}

.wiki-edittools-toggle:hover {
    background: #e9ecef;
}

.wiki-edittools-link {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.4rem 0.75rem;
    font-size: 0.8rem;
    color: #0d6efd;
    text-decoration: none;
    border-left: 1px solid #dee2e6;
    transition: all 0.2s;
}

.wiki-edittools-link:hover {
    background: #e7f1ff;
    color: #0a58ca;
}

.wiki-edittools-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem 0.7rem;
    font-size: 0.75rem;
    font-weight: 500;
    color: #495057;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 1px solid #dee2e6;
    border-radius: 4px;
    margin-left: 0.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.wiki-edittools-btn:hover {
    background: linear-gradient(135deg, #e9ecef 0%, #dee2e6 100%);
    border-color: #ced4da;
    color: #212529;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transform: translateY(-1px);
}

.wiki-edittools-btn:active {
    background: #dee2e6;
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.wiki-edittools-btn i {
    font-size: 0.85rem;
}

.wiki-edittools-btn#latinToCyrillicBtn {
    color: #0d6efd;
    border-color: #b6d4fe;
    background: linear-gradient(135deg, #e7f1ff 0%, #cfe2ff 100%);
}

.wiki-edittools-btn#latinToCyrillicBtn:hover {
    background: linear-gradient(135deg, #cfe2ff 0%, #b6d4fe 100%);
    border-color: #9ec5fe;
}

.wiki-edittools-btn#cyrillicToLatinBtn {
    color: #198754;
    border-color: #a3cfbb;
    background: linear-gradient(135deg, #d1e7dd 0%, #badbcc 100%);
}

.wiki-edittools-btn#cyrillicToLatinBtn:hover {
    background: linear-gradient(135deg, #badbcc 0%, #a3cfbb 100%);
    border-color: #8fc9a8;
}

.wiki-edittools-btn#fixApostrophesBtn {
    color: #6f42c1;
    border-color: #c5b3e6;
    background: linear-gradient(135deg, #e9e0f7 0%, #d9cdef 100%);
}

.wiki-edittools-btn#fixApostrophesBtn:hover {
    background: linear-gradient(135deg, #d9cdef 0%, #c5b3e6 100%);
    border-color: #b49fdc;
}

body.dark-mode .wiki-edittools-btn {
    color: #e9ecef;
    background: linear-gradient(135deg, #3d4249 0%, #2d3238 100%);
    border-color: #495057;
}

body.dark-mode .wiki-edittools-btn:hover {
    background: linear-gradient(135deg, #495057 0%, #3d4249 100%);
    border-color: #6c757d;
    color: #fff;
}

body.dark-mode .wiki-edittools-btn#latinToCyrillicBtn {
    color: #6ea8fe;
    background: linear-gradient(135deg, #1a3a5c 0%, #0d2847 100%);
    border-color: #3d6a99;
}

body.dark-mode .wiki-edittools-btn#cyrillicToLatinBtn {
    color: #75b798;
    background: linear-gradient(135deg, #1a4231 0%, #0d2f22 100%);
    border-color: #3d7a5c;
}

body.dark-mode .wiki-edittools-btn#fixApostrophesBtn {
    color: #a98eda;
    background: linear-gradient(135deg, #3d2d5c 0%, #2d1f47 100%);
    border-color: #6a4d99;
}

.wiki-edittools-toggle .bi-chevron-down {
    transition: transform 0.2s;
}

.wiki-edittools-toggle[aria-expanded="true"] .bi-chevron-down {
    transform: rotate(180deg);
}

.wiki-edittools-content {
    padding: 0.75rem;
    border-top: 1px solid #dee2e6;
    background: #fff;
}

.wiki-edittools-section {
    margin-bottom: 0.75rem;
}

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

.wiki-edittools-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: #6c757d;
    margin-bottom: 0.35rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.wiki-edittools-chars {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
}

.wiki-char {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 28px;
    padding: 0 0.4rem;
    font-size: 0.9rem;
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.15s;
    color: #212529;
}

.wiki-char:hover {
    background: #e7f1ff;
    border-color: #86b7fe;
    color: #0d6efd;
}

.wiki-char:active {
    background: #cfe2ff;
    transform: scale(0.95);
}

.wiki-char code {
    font-size: 0.7rem;
    background: transparent;
    padding: 0;
    color: inherit;
}

/* Dark mode edittools */
body.dark-mode .wiki-edittools {
    border-color: #495057;
    background: #2d3238;
}

body.dark-mode .wiki-edittools-toggle {
    color: #adb5bd;
}

body.dark-mode .wiki-edittools-toggle:hover {
    background: #3d4349;
}

body.dark-mode .wiki-edittools-link {
    color: #60a5fa;
    border-left-color: #495057;
}

body.dark-mode .wiki-edittools-link:hover {
    background: #3d5a80;
    color: #93c5fd;
}

body.dark-mode .wiki-edittools-content {
    border-top-color: #495057;
    background: #212529;
}

body.dark-mode .wiki-edittools-label {
    color: #9ca3af;
}

body.dark-mode .wiki-char {
    background: #2d3238;
    border-color: #495057;
    color: #e9ecef;
}

body.dark-mode .wiki-char:hover {
    background: #3d5a80;
    border-color: #5a9fd4;
    color: #fff;
}

body.dark-mode .wiki-char:active {
    background: #4a6fa5;
}

/* Old styles kept for backward compatibility */
.wiki-references-list {
    list-style: decimal;
    padding-left: 2rem;
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.6;
}

.wiki-reference-item {
    padding: 0.25rem 0;
    color: #202122;
    position: relative;
}

.wiki-ref-backlink {
    margin-right: 0.25rem;
}

.wiki-ref-backlink a {
    color: #3b82f6;
    text-decoration: none;
    font-weight: 600;
}

.wiki-ref-backlink a:hover {
    text-decoration: underline;
}

.wiki-ref-content {
    color: #202122;
}

.wiki-ref-lang {
    color: #72777d;
    font-size: 0.85em;
    margin-left: 0.15rem;
}

.wiki-old-ref-publisher {
    color: #202122;
    margin-left: 0.25rem;
}

.wiki-ref-accessed {
    color: #72777d;
    margin-left: 0.25rem;
}

.wiki-ref-author {
    color: #72777d;
    margin-left: 0.25rem;
}

.wiki-ref-desc {
    color: #72777d;
    font-style: italic;
    margin-left: 0.25rem;
}

.wiki-ref-missing {
    color: #d33;
}

.wiki-ref-placeholder {
    color: #d33;
    font-style: italic;
}

.wiki-btn-edit-ref,
.wiki-btn-add-ref-inline {
    font-size: 0.75rem;
    color: #72777d;
    margin-left: 0.5rem;
    opacity: 0;
    transition: opacity 0.2s;
}

.wiki-reference-item:hover .wiki-btn-edit-ref,
.wiki-reference-item:hover .wiki-btn-add-ref-inline {
    opacity: 0.7;
}

.wiki-btn-edit-ref:hover,
.wiki-btn-add-ref-inline:hover {
    opacity: 1 !important;
    color: #3b82f6;
}

/* Inline citation links in article content */
.cite-ref {
    font-size: 0.75em;
    vertical-align: super;
    line-height: 1;
}

.cite-ref a {
    color: #3b82f6;
    text-decoration: none;
    font-weight: 600;
}

.cite-ref a:hover {
    text-decoration: underline;
}

/* Dark Mode References */
body.dark-mode .wiki-references-section {
}

body.dark-mode .wiki-references-title {
    color: #e5e7eb;
    border-bottom-color: #444;
}

body.dark-mode .wiki-reference-item {
    color: #d1d5db;
}

body.dark-mode .wiki-ref-content {
    color: #d1d5db;
}

body.dark-mode .wiki-ref-title {
    color: #d1d5db;
}

body.dark-mode .wiki-ref-link {
    color: #60a5fa;
}

body.dark-mode .wiki-ref-lang,
body.dark-mode .wiki-ref-publisher,
body.dark-mode .wiki-ref-accessed,
body.dark-mode .wiki-ref-author,
body.dark-mode .wiki-ref-desc {
    color: #9ca3af;
}

body.dark-mode .wiki-btn-edit-ref,
body.dark-mode .wiki-btn-add-ref-inline {
    color: #9ca3af;
}

body.dark-mode .wiki-ref-backlink a {
    color: #60a5fa;
}

body.dark-mode .cite-ref a {
    color: #60a5fa;
}

.wiki-ref-empty {
    color: #72777d;
    font-style: italic;
    font-size: 0.9rem;
    margin: 0.5rem 0;
}

body.dark-mode .wiki-ref-empty {
    color: #9ca3af;
}

/* =========================================
   WIKI ARTICLE FORM - SIMPLIFIED LAYOUT
   ========================================= */

/* Main Form Container */
.wiki-article-form {
    max-width: 100%;
}

/* Form Cards */
.wiki-form-card {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.wiki-form-card-header {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: #fff;
    padding: 1rem 1.5rem;
    font-weight: 600;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.wiki-form-card-header i {
    font-size: 1.2rem;
}

.wiki-form-card-body {
    padding: 1.5rem;
}

/* Form Groups */
.wiki-form-group {
    margin-bottom: 1.25rem;
}

.wiki-form-group:last-child {
    margin-bottom: 0;
}

.wiki-form-label {
    display: block;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.wiki-required {
    color: #ef4444;
}

.wiki-form-input {
    border: 1px solid #d1d5db;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.wiki-form-input:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
    outline: none;
}

.wiki-form-title {
    font-size: 1.25rem;
    font-weight: 500;
}

.wiki-form-help {
    display: block;
    color: #6b7280;
    font-size: 0.85rem;
    margin-top: 0.5rem;
}

.wiki-form-help i {
    color: #f59e0b;
    margin-right: 0.25rem;
}

.wiki-form-json {
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.9rem;
}

/* Accordion Styles */
.wiki-form-accordion {
    margin-bottom: 1.5rem;
}

.wiki-accordion-item {
    border: 1px solid #e5e7eb;
    border-radius: 10px !important;
    margin-bottom: 0.75rem;
    overflow: hidden;
}

.wiki-accordion-item:last-child {
    margin-bottom: 0;
}

.wiki-accordion-btn {
    background: #f9fafb;
    border: none;
    padding: 1rem 1.25rem;
    font-weight: 600;
    color: #374151;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    text-align: left;
}

.wiki-accordion-btn:not(.collapsed) {
    background: #f3f4f6;
    color: #3b82f6;
    box-shadow: none;
}

.wiki-accordion-btn:focus {
    box-shadow: none;
    outline: none;
}

.wiki-accordion-btn::after {
    margin-left: auto;
}

.wiki-accordion-btn i {
    font-size: 1.1rem;
    color: #6b7280;
}

.wiki-accordion-btn:not(.collapsed) i {
    color: #3b82f6;
}

.wiki-accordion-badge {
    background: #e5e7eb;
    color: #6b7280;
    font-size: 0.75rem;
    padding: 0.2rem 0.6rem;
    border-radius: 20px;
    font-weight: 500;
    margin-left: auto;
    margin-right: 1rem;
}

.wiki-accordion-item .accordion-body {
    padding: 1.25rem;
    background: #fff;
}

/* Tags Styles */
.wiki-tags-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.wiki-tag-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: #3b82f6;
    color: #fff;
    padding: 0.4rem 0.75rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
}

.wiki-tag-remove {
    background: transparent;
    border: none;
    color: #fff;
    font-size: 1.1rem;
    line-height: 1;
    padding: 0;
    margin-left: 0.25rem;
    cursor: pointer;
    opacity: 0.8;
}

.wiki-tag-remove:hover {
    opacity: 1;
}

/* Autocomplete Dropdown */
.wiki-autocomplete-wrapper {
    position: relative;
}

.wiki-autocomplete-wrapper input:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

/* Allow dropdown to overflow accordion */
#tagsSection,
#tagsSection .accordion-body,
#tagsSection.accordion-collapse {
    overflow: visible !important;
}

.wiki-form-accordion,
.wiki-accordion-item {
    overflow: visible;
}

.wiki-autocomplete-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    max-height: 350px;
    overflow-y: auto;
    z-index: 9999;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15), 0 4px 12px rgba(0, 0, 0, 0.1);
    padding: 10px;
}

.wiki-autocomplete-dropdown::-webkit-scrollbar {
    width: 6px;
}

.wiki-autocomplete-dropdown::-webkit-scrollbar-track {
    background: transparent;
}

.wiki-autocomplete-dropdown::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

.wiki-autocomplete-dropdown::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

.wiki-autocomplete-item {
    padding: 12px 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.9rem;
    border-radius: 8px;
    margin-bottom: 6px;
    transition: all 0.15s ease;
    color: #334155;
}

.wiki-autocomplete-item:last-child {
    margin-bottom: 0;
}

.wiki-autocomplete-item:hover,
.wiki-autocomplete-item.active {
    background: linear-gradient(135deg, #eff6ff 0%, #f0f9ff 100%);
    color: #1e40af;
}

.wiki-autocomplete-item i {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f1f5f9;
    border-radius: 8px;
    color: #64748b;
    font-size: 0.95rem;
    flex-shrink: 0;
    transition: all 0.15s ease;
}

.wiki-autocomplete-item:hover i,
.wiki-autocomplete-item.active i {
    background: #dbeafe;
    color: #3b82f6;
}

.wiki-autocomplete-item .tag-parent {
    color: #94a3b8;
    font-size: 0.85rem;
    font-weight: 500;
}

.wiki-autocomplete-item:hover .tag-parent,
.wiki-autocomplete-item.active .tag-parent {
    color: #60a5fa;
}

.wiki-autocomplete-create {
    background: linear-gradient(135deg, #f0fdf4 0%, #ecfdf5 100%);
    color: #166534;
    border: 1px dashed #86efac;
}

.wiki-autocomplete-create i {
    background: #dcfce7;
    color: #22c55e;
}

.wiki-autocomplete-create:hover {
    background: linear-gradient(135deg, #dcfce7 0%, #d1fae5 100%);
    border-color: #4ade80;
}

.wiki-autocomplete-create:hover i {
    background: #bbf7d0;
    color: #16a34a;
}

.wiki-autocomplete-header {
    padding: 6px 14px 10px;
    font-size: 0.75rem;
    font-weight: 600;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.wiki-autocomplete-header:not(:first-child) {
    margin-top: 10px;
    padding-top: 12px;
    border-top: 1px solid #f1f5f9;
}

.wiki-popular-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 16px;
    background: #f8fafc;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    max-height: 280px;
    overflow-y: auto;
}

.wiki-tag-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #fff;
    border: 1px solid #e2e8f0;
    color: #475569;
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.wiki-tag-btn:hover {
    background: #3b82f6;
    border-color: #3b82f6;
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.wiki-tag-btn i {
    font-size: 0.85rem;
    opacity: 0.7;
}

.wiki-tag-btn:hover i {
    opacity: 1;
}

.wiki-tag-btn .tag-parent {
    color: #94a3b8;
    font-size: 0.8rem;
}

.wiki-tag-btn:hover .tag-parent {
    color: rgba(255, 255, 255, 0.8);
}

/* Compact Form Inputs */
.wiki-form-input-sm {
    padding: 0.5rem 0.75rem;
    font-size: 0.9rem;
}

.wiki-form-label-sm {
    font-size: 0.85rem;
    margin-bottom: 0.35rem;
}

.wiki-form-group-inline {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.wiki-form-group-inline .wiki-form-label {
    margin-bottom: 0;
    white-space: nowrap;
    min-width: 80px;
}

.wiki-form-group-inline .wiki-form-input,
.wiki-form-group-inline .form-select {
    flex: 1;
}

/* Compact Row Layout */
.wiki-form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.wiki-form-row-3 {
    grid-template-columns: repeat(3, 1fr);
}

.wiki-form-row-4 {
    grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 768px) {
    .wiki-form-row-3,
    .wiki-form-row-4 {
        grid-template-columns: 1fr;
    }
}

/* Form Actions */
.wiki-form-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e5e7eb;
}

.wiki-btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: #fff;
    border: none;
    padding: 0.875rem 2rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}

.wiki-btn-primary:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.wiki-btn-primary.wiki-btn-sm {
    padding: 0.5rem 1.25rem;
    font-size: 0.9rem;
}

.wiki-btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: #f3f4f6;
    color: #374151;
    border: 1px solid #d1d5db;
    padding: 0.875rem 2rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}

.wiki-btn-secondary:hover {
    background: #e5e7eb;
    color: #374151;
}

/* Sections Management */
.wiki-sections-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.wiki-section-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 1rem 1.25rem;
    transition: all 0.2s;
}

.wiki-section-item:hover {
    background: #f3f4f6;
    border-color: #d1d5db;
}

.wiki-section-info {
    flex: 1;
}

.wiki-section-title {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: #374151;
}

.wiki-section-meta {
    font-size: 0.85rem;
    color: #6b7280;
}

.wiki-section-actions {
    display: flex;
    gap: 0.5rem;
}

.wiki-btn-sm {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
}

.wiki-btn-edit {
    background: #e0f2fe;
    color: #0284c7;
}

.wiki-btn-edit:hover {
    background: #0284c7;
    color: #fff;
}

.wiki-btn-delete {
    background: #fee2e2;
    color: #dc2626;
}

.wiki-btn-delete:hover {
    background: #dc2626;
    color: #fff;
}

/* Add Section Form */
.wiki-add-section {
    background: #f9fafb;
    border: 1px dashed #d1d5db;
    border-radius: 8px;
    padding: 1.25rem;
}

.wiki-add-section-title {
    color: #374151;
    font-size: 1rem;
    margin-bottom: 1rem;
}

/* Empty State */
.wiki-empty-message {
    color: #6b7280;
    font-style: italic;
    text-align: center;
    padding: 1rem;
    margin: 0;
}

/* Info Banner */
.wiki-form-info {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 8px;
    padding: 1rem 1.25rem;
    color: #1e40af;
    font-size: 0.9rem;
}

.wiki-form-info i {
    font-size: 1.2rem;
    flex-shrink: 0;
    margin-top: 0.1rem;
}

/* Form Check */
.wiki-form-check {
    padding-top: 0.5rem;
}

.wiki-form-check .form-check-label {
    font-size: 0.95rem;
    color: #374151;
}

/* Current Photo */
.wiki-current-photo {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 1rem;
}

/* Dark Mode */
body.dark-mode .wiki-form-card {
    background: #1f2937;
    border-color: #374151;
}

body.dark-mode .wiki-form-card-header {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
}

body.dark-mode .wiki-form-card-body {
    background: #1f2937;
}

body.dark-mode .wiki-form-label {
    color: #e5e7eb;
}

body.dark-mode .wiki-form-input {
    background: #374151;
    border-color: #4b5563;
    color: #e5e7eb;
}

body.dark-mode .wiki-form-input:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

body.dark-mode .wiki-form-help {
    color: #9ca3af;
}

body.dark-mode .wiki-accordion-item {
    border-color: #374151;
}

body.dark-mode .wiki-accordion-btn {
    background: #374151;
    color: #e5e7eb;
}

body.dark-mode .wiki-accordion-btn:not(.collapsed) {
    background: #4b5563;
    color: #60a5fa;
}

body.dark-mode .wiki-accordion-btn i {
    color: #9ca3af;
}

body.dark-mode .wiki-accordion-btn:not(.collapsed) i {
    color: #60a5fa;
}

body.dark-mode .wiki-accordion-badge {
    background: #4b5563;
    color: #9ca3af;
}

body.dark-mode .wiki-accordion-item .accordion-body {
    background: #1f2937;
}

body.dark-mode .wiki-tag-btn {
    background: #374151;
    border-color: #4b5563;
    color: #e5e7eb;
}

body.dark-mode .wiki-tag-btn:hover {
    background: #3b82f6;
    border-color: #3b82f6;
    color: #fff;
}

body.dark-mode .wiki-form-actions {
    border-top-color: #374151;
}

body.dark-mode .wiki-btn-secondary {
    background: #374151;
    border-color: #4b5563;
    color: #e5e7eb;
}

body.dark-mode .wiki-btn-secondary:hover {
    background: #4b5563;
}

body.dark-mode .wiki-section-item {
    background: #374151;
    border-color: #4b5563;
}

body.dark-mode .wiki-section-item:hover {
    background: #4b5563;
}

body.dark-mode .wiki-section-title {
    color: #e5e7eb;
}

body.dark-mode .wiki-section-meta {
    color: #9ca3af;
}

body.dark-mode .wiki-btn-edit {
    background: rgba(59, 130, 246, 0.2);
    color: #60a5fa;
}

body.dark-mode .wiki-btn-edit:hover {
    background: #3b82f6;
    color: #fff;
}

body.dark-mode .wiki-btn-delete {
    background: rgba(239, 68, 68, 0.2);
    color: #f87171;
}

body.dark-mode .wiki-btn-delete:hover {
    background: #ef4444;
    color: #fff;
}

body.dark-mode .wiki-add-section {
    background: #374151;
    border-color: #4b5563;
}

body.dark-mode .wiki-add-section-title {
    color: #e5e7eb;
}

body.dark-mode .wiki-empty-message {
    color: #9ca3af;
}

body.dark-mode .wiki-form-info {
    background: rgba(59, 130, 246, 0.1);
    border-color: rgba(59, 130, 246, 0.3);
    color: #60a5fa;
}

body.dark-mode .wiki-current-photo {
    background: #374151;
    border-color: #4b5563;
}

/* Responsive */
@media (max-width: 768px) {
    .wiki-form-card-header {
        padding: 0.875rem 1rem;
        font-size: 1rem;
    }

    .wiki-form-card-body {
        padding: 1rem;
    }

    .wiki-accordion-btn {
        padding: 0.875rem 1rem;
        font-size: 0.95rem;
    }

    .wiki-form-actions {
        flex-direction: column;
    }

    .wiki-btn-primary,
    .wiki-btn-secondary {
        width: 100%;
        justify-content: center;
    }

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

    .wiki-section-actions {
        width: 100%;
        justify-content: flex-end;
    }
}

/* Section Title Label (Kirish bo'limi) - Centered and Bigger */
.wiki-section-title-label {
    display: block;
    text-align: center;
    font-size: 1.25rem;
    font-weight: 700;
    color: #3b82f6;
    margin-bottom: 1rem;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    border-radius: 10px;
    border: 1px solid #bfdbfe;
}

body.dark-mode .wiki-section-title-label {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.15) 0%, rgba(59, 130, 246, 0.25) 100%);
    border-color: rgba(59, 130, 246, 0.3);
    color: #60a5fa;
}

/* Accordion Button - Centered Content */
.wiki-accordion-btn {
    justify-content: center !important;
    text-align: center;
}

.wiki-accordion-btn i {
    margin-right: 0.5rem;
}

.wiki-accordion-btn span:first-of-type {
    font-size: 1.1rem;
}

.wiki-accordion-btn .wiki-accordion-badge {
    position: absolute;
    right: 3rem;
}

.wiki-accordion-btn::after {
    position: absolute;
    right: 1rem;
}

/* Fix accordion button positioning */
.wiki-accordion-item .accordion-header {
    position: relative;
}

.wiki-accordion-btn {
    position: relative;
}

/* Fix Optional Badge - Better Styling & Right Aligned */
.wiki-accordion-badge {
    position: absolute !important;
    right: 3.5rem !important;
    margin: 0 !important;
    font-size: 0.7rem !important;
    padding: 0.15rem 0.5rem !important;
    background: #d1d5db !important;
    color: #6b7280 !important;
    border-radius: 4px !important;
}

body.dark-mode .wiki-accordion-badge {
    background: #4b5563 !important;
    color: #9ca3af !important;
}

/* Add Section Toggle Button */
/* Article Link Search Results */
.article-search-results {
    max-height: 300px;
    overflow-y: auto;
}

.article-search-item {
    padding: 0.75rem 1rem;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    margin-bottom: 0.5rem;
    cursor: pointer;
    transition: all 0.2s;
}

.article-search-item:hover {
    background: #f0f9ff;
    border-color: #3b82f6;
}

.article-search-title {
    font-weight: 600;
    color: #1f2937;
}

.article-search-summary {
    font-size: 0.85rem;
    color: #6b7280;
    margin-top: 0.25rem;
}

body.dark-mode .article-search-item {
    border-color: #374151;
    background: #1f2937;
}

body.dark-mode .article-search-item:hover {
    background: #374151;
    border-color: #60a5fa;
}

body.dark-mode .article-search-title {
    color: #e5e7eb;
}

body.dark-mode .article-search-summary {
    color: #9ca3af;
}

.wiki-add-section-wrapper {
    border-top: 1px solid #e5e7eb;
    padding-top: 1.5rem;
}

.wiki-add-section-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.875rem 1.5rem;
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    border: 2px dashed #22c55e;
    border-radius: 10px;
    color: #16a34a;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s;
}

.wiki-add-section-toggle:hover {
    background: linear-gradient(135deg, #dcfce7 0%, #bbf7d0 100%);
    border-color: #16a34a;
}

.wiki-add-section-toggle i {
    font-size: 1.2rem;
}

body.dark-mode .wiki-add-section-wrapper {
    border-top-color: #374151;
}

body.dark-mode .wiki-add-section-toggle {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.1) 0%, rgba(34, 197, 94, 0.2) 100%);
    border-color: #22c55e;
    color: #4ade80;
}

body.dark-mode .wiki-add-section-toggle:hover {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.2) 0%, rgba(34, 197, 94, 0.3) 100%);
}

/* References List in Edit Form */
.wiki-references-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.wiki-reference-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    transition: all 0.2s;
}

.wiki-reference-item:hover {
    background: #f3f4f6;
    border-color: #d1d5db;
}

.wiki-reference-info {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    flex: 1;
    min-width: 0;
}

.wiki-reference-number {
    font-weight: 700;
    color: #0645ad;
    font-size: 0.9rem;
    min-width: 30px;
}

.wiki-reference-content {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    min-width: 0;
}

.wiki-reference-title {
    font-weight: 500;
    color: #374151;
}

.wiki-reference-url {
    font-size: 0.8rem;
    color: #6b7280;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.wiki-reference-url:hover {
    color: #0645ad;
}

.wiki-reference-actions {
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0;
}

body.dark-mode .wiki-reference-item {
    background: #374151;
    border-color: #4b5563;
}

body.dark-mode .wiki-reference-item:hover {
    background: #4b5563;
}

body.dark-mode .wiki-reference-title {
    color: #e5e7eb;
}

body.dark-mode .wiki-reference-url {
    color: #9ca3af;
}

body.dark-mode .wiki-reference-url:hover {
    color: #60a5fa;
}

@media (max-width: 576px) {
    .wiki-reference-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }

    .wiki-reference-actions {
        width: 100%;
        justify-content: flex-end;
    }
}

/* Fix Accordion Button - Title Left, Badge Right */
.wiki-accordion-btn {
    justify-content: flex-start !important;
    text-align: left !important;
    gap: 10px !important;
}

.wiki-accordion-btn i {
    margin-right: 4px;
}

.wiki-accordion-btn span:first-of-type {
    flex: 1;
}

.wiki-accordion-badge {
    position: relative !important;
    right: auto !important;
    margin-left: auto !important;
    margin-right: 0.5rem !important;
}

/* ============================================
   Quick Links Section (Admin Customizable)
   ============================================ */

.oltinfond-quick-links {
    padding: 60px 0;
    background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
}

body.dark-mode .oltinfond-quick-links {
    background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
}

.oltinfond-quick-links-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.oltinfond-quick-link-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px 24px;
    background: #fff;
    border-radius: 12px;
    text-decoration: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    border: 1px solid #e5e7eb;
    transition: all 0.3s ease;
}

.oltinfond-quick-link-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.08);
    border-color: #3b82f6;
}

body.dark-mode .oltinfond-quick-link-card {
    background: #1e293b;
    border-color: #334155;
}

body.dark-mode .oltinfond-quick-link-card:hover {
    border-color: #60a5fa;
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.3);
}

.oltinfond-quick-link-icon {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.oltinfond-quick-link-icon i {
    font-size: 22px;
    color: #3b82f6;
}

body.dark-mode .oltinfond-quick-link-icon {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.2) 0%, rgba(59, 130, 246, 0.1) 100%);
}

body.dark-mode .oltinfond-quick-link-icon i {
    color: #60a5fa;
}

.oltinfond-quick-link-content {
    flex: 1;
    min-width: 0;
}

.oltinfond-quick-link-title {
    font-size: 1rem;
    font-weight: 600;
    color: #1f2937;
    margin: 0 0 4px 0;
}

body.dark-mode .oltinfond-quick-link-title {
    color: #f1f5f9;
}

.oltinfond-quick-link-desc {
    font-size: 0.85rem;
    color: #6b7280;
    margin: 0;
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

body.dark-mode .oltinfond-quick-link-desc {
    color: #9ca3af;
}

.oltinfond-quick-link-arrow {
    font-size: 18px;
    color: #9ca3af;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.oltinfond-quick-link-card:hover .oltinfond-quick-link-arrow {
    color: #3b82f6;
    transform: translateX(4px);
}

body.dark-mode .oltinfond-quick-link-arrow {
    color: #6b7280;
}

body.dark-mode .oltinfond-quick-link-card:hover .oltinfond-quick-link-arrow {
    color: #60a5fa;
}

/* Timeline description styling */
.oltinfond-timeline-desc {
    font-size: 0.9rem;
    color: #6b7280;
    margin-top: 8px;
    line-height: 1.5;
}

body.dark-mode .oltinfond-timeline-desc {
    color: #9ca3af;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .oltinfond-quick-links-grid {
        grid-template-columns: 1fr;
    }
    
    .oltinfond-quick-link-card {
        padding: 16px 20px;
    }
}

/* ============================================
   Hierarchical Tags Styling
   ============================================ */

.wiki-tag-btn .tag-parent {
    color: #6b7280;
    font-size: 0.85em;
}

.wiki-tag-btn i {
    margin-right: 4px;
    font-size: 0.9em;
}

body.dark-mode .wiki-tag-btn .tag-parent {
    color: #9ca3af;
}

/* Tag badge with hierarchy */
.wiki-tag-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    border-radius: 16px;
    font-size: 0.875rem;
    color: #1d4ed8;
    margin: 2px;
}

body.dark-mode .wiki-tag-badge {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.2) 0%, rgba(59, 130, 246, 0.1) 100%);
    color: #60a5fa;
}

.wiki-tag-remove {
    background: none;
    border: none;
    color: inherit;
    opacity: 0.7;
    cursor: pointer;
    padding: 0 2px;
    font-size: 1.1em;
    line-height: 1;
}

.wiki-tag-remove:hover {
    opacity: 1;
}

/* ============================================
   Categories (Turkumlar) Page Styles
   ============================================ */

/* Statistics */
.categories-stats {
    padding: 20px;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: 12px;
}

body.dark-mode .categories-stats {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.stat-item i {
    font-size: 1.5rem;
    color: #3b82f6;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1f2937;
}

body.dark-mode .stat-value {
    color: #f1f5f9;
}

.stat-label {
    color: #6b7280;
    font-size: 0.9rem;
}

/* Category Card */
.category-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 24px;
    background: #fff;
    border-radius: 16px;
    text-decoration: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    border: 1px solid #e5e7eb;
    transition: all 0.3s ease;
    height: 100%;
}

.category-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1);
    border-color: #3b82f6;
}

body.dark-mode .category-card {
    background: #1e293b;
    border-color: #334155;
}

body.dark-mode .category-card:hover {
    border-color: #60a5fa;
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.3);
}

.category-card-icon {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.category-card-icon i {
    font-size: 28px;
    color: #3b82f6;
}

body.dark-mode .category-card-icon {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.2) 0%, rgba(59, 130, 246, 0.1) 100%);
}

body.dark-mode .category-card-icon i {
    color: #60a5fa;
}

.category-card-content {
    flex: 1;
    min-width: 0;
}

.category-card-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1f2937;
    margin: 0 0 4px 0;
}

body.dark-mode .category-card-title {
    color: #f1f5f9;
}

.category-card-desc {
    font-size: 0.9rem;
    color: #6b7280;
    margin: 0 0 8px 0;
    line-height: 1.4;
}

body.dark-mode .category-card-desc {
    color: #9ca3af;
}

.category-card-meta {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.category-meta-item {
    font-size: 0.85rem;
    color: #6b7280;
    display: flex;
    align-items: center;
    gap: 4px;
}

.category-meta-item i {
    font-size: 0.9rem;
}

body.dark-mode .category-meta-item {
    color: #9ca3af;
}

.category-card-arrow {
    color: #9ca3af;
    font-size: 1.25rem;
    transition: all 0.3s ease;
}

.category-card:hover .category-card-arrow {
    color: #3b82f6;
    transform: translateX(4px);
}

body.dark-mode .category-card:hover .category-card-arrow {
    color: #60a5fa;
}

/* Category Detail Page */
.category-icon-large {
    width: 80px;
    height: 80px;
    border-radius: 20px;
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.category-icon-large i {
    font-size: 36px;
    color: #fff;
}

.category-title {
    font-size: 2rem;
    font-weight: 700;
    color: #1f2937;
}

body.dark-mode .category-title {
    color: #f1f5f9;
}

.category-description {
    font-size: 1.1rem;
}

.section-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1f2937;
    display: flex;
    align-items: center;
    gap: 8px;
}

body.dark-mode .section-title {
    color: #f1f5f9;
}

.section-title i {
    color: #3b82f6;
}

/* Subcategory Card */
.subcategory-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    background: #fff;
    border-radius: 12px;
    text-decoration: none;
    border: 1px solid #e5e7eb;
    transition: all 0.3s ease;
}

.subcategory-card:hover {
    transform: translateX(4px);
    border-color: #3b82f6;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

body.dark-mode .subcategory-card {
    background: #1e293b;
    border-color: #334155;
}

body.dark-mode .subcategory-card:hover {
    border-color: #60a5fa;
}

.subcategory-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.subcategory-icon i {
    font-size: 20px;
    color: #64748b;
}

body.dark-mode .subcategory-icon {
    background: linear-gradient(135deg, #334155 0%, #1e293b 100%);
}

body.dark-mode .subcategory-icon i {
    color: #94a3b8;
}

.subcategory-content {
    flex: 1;
    min-width: 0;
}

.subcategory-title {
    font-size: 1rem;
    font-weight: 600;
    color: #1f2937;
    margin: 0 0 2px 0;
}

body.dark-mode .subcategory-title {
    color: #f1f5f9;
}

.subcategory-meta {
    font-size: 0.8rem;
    color: #6b7280;
    display: flex;
    gap: 12px;
}

.subcategory-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}

body.dark-mode .subcategory-meta {
    color: #9ca3af;
}

.subcategory-arrow {
    color: #9ca3af;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.subcategory-card:hover .subcategory-arrow {
    color: #3b82f6;
    transform: translateX(4px);
}

/* Category Articles List */
.category-articles-list {
    list-style: none;
    padding: 0;
    margin: 0;
    background: #fff;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    overflow: hidden;
}

body.dark-mode .category-articles-list {
    background: #1e293b;
    border-color: #334155;
}

.category-article-item {
    border-bottom: 1px solid #e5e7eb;
}

.category-article-item:last-child {
    border-bottom: none;
}

body.dark-mode .category-article-item {
    border-color: #334155;
}

.category-article-link {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 14px 20px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.category-article-link:hover {
    background: #f8fafc;
}

body.dark-mode .category-article-link:hover {
    background: #0f172a;
}

.category-article-link .article-title {
    font-size: 1rem;
    font-weight: 500;
    color: #3b82f6;
}

.category-article-link:hover .article-title {
    color: #1d4ed8;
}

body.dark-mode .category-article-link .article-title {
    color: #60a5fa;
}

body.dark-mode .category-article-link:hover .article-title {
    color: #93c5fd;
}

.category-article-link .article-summary {
    font-size: 0.85rem;
    color: #6b7280;
}

body.dark-mode .category-article-link .article-summary {
    color: #9ca3af;
}

/* Empty state styling */
.empty-state h3 {
    color: #6b7280;
    font-weight: 500;
}

body.dark-mode .empty-state h3 {
    color: #9ca3af;
}

/* ============================================
   Article Categories Display
   ============================================ */

.article-categories {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border-radius: 10px;
    border: 1px solid #bae6fd;
}

body.dark-mode .article-categories {
    background: linear-gradient(135deg, #1e3a5f 0%, #0c4a6e 100%);
    border-color: #0369a1;
}

.article-categories .categories-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: #0369a1;
}

body.dark-mode .article-categories .categories-label {
    color: #7dd3fc;
}

.article-categories .category-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 12px;
    font-size: 0.85rem;
    font-weight: 500;
    color: #0284c7;
    background: #fff;
    border: 1px solid #7dd3fc;
    border-radius: 20px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.article-categories .category-badge:hover {
    background: #0284c7;
    color: #fff;
    border-color: #0284c7;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(2, 132, 199, 0.3);
}

.article-categories .category-badge i {
    font-size: 0.9rem;
}

.article-categories .category-badge .category-parent {
    color: #64748b;
    font-weight: 400;
}

.article-categories .category-badge:hover .category-parent {
    color: rgba(255, 255, 255, 0.8);
}

body.dark-mode .article-categories .category-badge {
    color: #38bdf8;
    background: #0f172a;
    border-color: #0ea5e9;
}

body.dark-mode .article-categories .category-badge:hover {
    background: #0ea5e9;
    color: #fff;
    border-color: #0ea5e9;
}

body.dark-mode .article-categories .category-badge .category-parent {
    color: #94a3b8;
}

/* ============================================
   Privacy Policy Page Styles
   ============================================ */

.privacy-page .privacy.section {
    padding: 60px 0;
}

.privacy-content {
    background: var(--surface-color, #fff);
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.privacy-intro {
    border-bottom: 1px solid #eee;
    padding-bottom: 20px;
}

.privacy-intro .lead {
    font-size: 1.1rem;
    color: var(--default-color);
    line-height: 1.8;
}

.privacy-section h3 {
    color: var(--heading-color);
    font-size: 1.4rem;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
}

.privacy-section h3 i {
    color: var(--accent-color);
}

.privacy-section p {
    color: var(--default-color);
    line-height: 1.8;
    margin-bottom: 15px;
}

.privacy-section ul {
    padding-left: 20px;
    margin-bottom: 0;
}

.privacy-section ul li {
    color: var(--default-color);
    line-height: 1.8;
    margin-bottom: 8px;
}

.privacy-section ul li::marker {
    color: var(--accent-color);
}

/* Dark mode */
body.dark-mode .privacy-content {
    background: #1e1e1e;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
}

body.dark-mode .privacy-intro {
    border-bottom-color: #333;
}

body.dark-mode .privacy-section h3 {
    color: #fff;
}

body.dark-mode .privacy-section p,
body.dark-mode .privacy-section ul li {
    color: #b0b0b0;
}

/* Responsive */
@media (max-width: 768px) {
    .privacy-content {
        padding: 25px 20px;
    }

    .privacy-section h3 {
        font-size: 1.2rem;
    }
}

/* ============================================
   iOS Style Tabs
   ============================================ */

.ios-tabs-container {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.ios-tabs-container::-webkit-scrollbar {
    display: none;
}

.ios-tabs {
    display: inline-flex;
    background: #f1f1f1;
    border-radius: 12px;
    padding: 4px;
    gap: 4px;
    min-width: 100%;
}

.ios-tab {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 16px;
    border: none;
    background: transparent;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 500;
    color: #666;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
    position: relative;
    flex: 1;
}

.ios-tab i {
    font-size: 1rem;
    transition: transform 0.2s ease;
}

.ios-tab span {
    transition: color 0.2s ease;
}

.ios-tab:hover {
    color: #333;
}

.ios-tab.active {
    background: #fff;
    color: #007aff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.04);
}

.ios-tab.active i {
    transform: scale(1.1);
}

.ios-tab-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    background: #007aff;
    color: #fff;
    font-size: 0.7rem;
    font-weight: 600;
    border-radius: 9px;
    margin-left: 4px;
}

.ios-tab.active .ios-tab-badge {
    background: #007aff;
}

/* Dark Mode */
body.dark-mode .ios-tabs {
    background: #2c2c2e;
}

body.dark-mode .ios-tab {
    color: #98989f;
}

body.dark-mode .ios-tab:hover {
    color: #fff;
}

body.dark-mode .ios-tab.active {
    background: #3a3a3c;
    color: #0a84ff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

body.dark-mode .ios-tab-badge {
    background: #0a84ff;
}

/* Responsive - Scrollable on mobile */
@media (max-width: 768px) {
    .ios-tabs {
        min-width: max-content;
    }

    .ios-tab {
        padding: 8px 12px;
        font-size: 0.8rem;
        flex: 0 0 auto;
    }

    .ios-tab i {
        font-size: 0.9rem;
    }

    .ios-tab span {
        display: none;
    }

    .ios-tab.active span {
        display: inline;
    }

    .ios-tab-badge {
        min-width: 16px;
        height: 16px;
        font-size: 0.65rem;
    }
}

/* ============================================
   Footer Tools Section
   ============================================ */

.footer-tools h4 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.footer-tools-grid {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.footer-tool-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.75rem;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 6px;
    color: inherit;
    text-decoration: none;
    font-size: 0.8rem;
}

.footer-tool-btn:hover {
    color: inherit;
    text-decoration: none;
}

.footer-tool-btn i {
    font-size: 0.9rem;
}

/* Dark mode footer tools */
body.dark-mode .footer-tool-btn {
    background: transparent;
    border-color: rgba(255, 255, 255, 0.2);
}

body.dark-mode .footer-tool-btn:hover {
    color: inherit;
}

/* ============================
   Dashboard Section
   ============================ */
.oltinfond-dashboard {
    padding: 48px 0 60px;
    background: #f8fafc;
}

/* --- Article Cards (Main Column) --- */
.oltinfond-article-card {
    display: flex;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    overflow: hidden;
    margin-bottom: 20px;
    text-decoration: none;
    color: inherit;
    transition: box-shadow 0.25s ease, border-color 0.25s ease;
}

.oltinfond-article-card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.07);
    border-color: transparent;
    color: inherit;
    text-decoration: none;
}

.oltinfond-article-card-image {
    flex-shrink: 0;
    width: 220px;
    min-height: 160px;
    background: #f1f5f9;
}

.oltinfond-article-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.oltinfond-article-card-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    font-size: 2.5rem;
}

.oltinfond-article-card-body {
    flex: 1;
    padding: 20px 24px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.oltinfond-article-card-tag {
    display: inline-block;
    background: #eff6ff;
    color: #3b82f6;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 20px;
    margin-bottom: 8px;
    width: fit-content;
}

.oltinfond-article-card-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 8px;
    line-height: 1.4;
}

.oltinfond-article-card-summary {
    font-size: 0.9rem;
    color: #64748b;
    line-height: 1.6;
    margin: 0 0 10px;
}

.oltinfond-article-card-meta {
    display: flex;
    gap: 16px;
    font-size: 0.8rem;
    color: #94a3b8;
}

.oltinfond-article-card-meta i {
    margin-right: 4px;
}

/* View All Button */
.oltinfond-view-all {
    text-align: center;
    margin-top: 8px;
}

.oltinfond-view-all-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 28px;
    background: #3b82f6;
    color: #fff;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s ease;
}

.oltinfond-view-all-btn:hover {
    background: #2563eb;
    color: #fff;
    text-decoration: none;
}

/* --- Sidebar Widgets --- */
.oltinfond-sidebar-widget {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    padding: 24px;
    margin-bottom: 20px;
}

.oltinfond-sidebar-widget-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid #e5e7eb;
    display: flex;
    align-items: center;
    gap: 8px;
}

.oltinfond-sidebar-widget-title i {
    color: #3b82f6;
    font-size: 1.1rem;
}

/* News Items */
.oltinfond-news-item {
    display: block;
    padding: 12px 0;
    border-bottom: 1px solid #f1f5f9;
    text-decoration: none;
    color: inherit;
    transition: background 0.15s ease;
}

.oltinfond-news-item:last-of-type {
    border-bottom: none;
}

.oltinfond-news-item:hover {
    color: inherit;
    text-decoration: none;
}

.oltinfond-news-item:hover .oltinfond-news-item-title {
    color: #3b82f6;
}

.oltinfond-news-item-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.oltinfond-news-item-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: #1e293b;
    line-height: 1.4;
    transition: color 0.2s ease;
}

.oltinfond-news-item-date {
    font-size: 0.78rem;
    color: #94a3b8;
}

.oltinfond-news-item-date i {
    margin-right: 3px;
}

.oltinfond-sidebar-more {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 12px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #3b82f6;
    text-decoration: none;
}

.oltinfond-sidebar-more:hover {
    color: #1d4ed8;
    text-decoration: none;
}

/* On This Day Items (sidebar) */
.oltinfond-onthisday-item {
    display: flex;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid #f1f5f9;
}

.oltinfond-onthisday-item:last-child {
    border-bottom: none;
}

.oltinfond-onthisday-year {
    flex-shrink: 0;
    font-size: 1rem;
    font-weight: 700;
    color: #3b82f6;
    min-width: 48px;
}

.oltinfond-onthisday-text p {
    margin: 0;
    font-size: 0.88rem;
    color: #4b5563;
    line-height: 1.5;
}

.oltinfond-onthisday-desc {
    font-size: 0.8rem !important;
    color: #94a3b8 !important;
    margin-top: 2px !important;
}

/* --- Dark Mode --- */
body.dark-mode .oltinfond-dashboard {
    background: #0f172a;
}

body.dark-mode .oltinfond-article-card {
    background: #1e293b;
    border-color: #334155;
}

body.dark-mode .oltinfond-article-card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    border-color: #475569;
}

body.dark-mode .oltinfond-article-card-image {
    background: #334155;
}

body.dark-mode .oltinfond-article-card-placeholder {
    color: #64748b;
}

body.dark-mode .oltinfond-article-card-tag {
    background: #1e3a5f;
    color: #60a5fa;
}

body.dark-mode .oltinfond-article-card-title {
    color: #f1f5f9;
}

body.dark-mode .oltinfond-article-card-summary {
    color: #94a3b8;
}

body.dark-mode .oltinfond-article-card-meta {
    color: #64748b;
}

body.dark-mode .oltinfond-view-all-btn {
    background: #2563eb;
}

body.dark-mode .oltinfond-view-all-btn:hover {
    background: #3b82f6;
}

body.dark-mode .oltinfond-sidebar-widget {
    background: #1e293b;
    border-color: #334155;
}

body.dark-mode .oltinfond-sidebar-widget-title {
    color: #f1f5f9;
    border-color: #334155;
}

body.dark-mode .oltinfond-news-item {
    border-color: #334155;
}

body.dark-mode .oltinfond-news-item-title {
    color: #e2e8f0;
}

body.dark-mode .oltinfond-news-item:hover .oltinfond-news-item-title {
    color: #60a5fa;
}

body.dark-mode .oltinfond-news-item-date {
    color: #64748b;
}

body.dark-mode .oltinfond-sidebar-more {
    color: #60a5fa;
}

body.dark-mode .oltinfond-sidebar-more:hover {
    color: #93bbfd;
}

body.dark-mode .oltinfond-onthisday-item {
    border-color: #334155;
}

body.dark-mode .oltinfond-onthisday-year {
    color: #60a5fa;
}

body.dark-mode .oltinfond-onthisday-text p {
    color: #cbd5e1;
}

body.dark-mode .oltinfond-onthisday-desc {
    color: #64748b !important;
}

/* --- Stats Bar --- */
.oltinfond-stats-bar {
    padding: 24px 0;
    background: #f8fafc;
    border-bottom: 1px solid #e5e7eb;
}

.oltinfond-stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.oltinfond-stat-item {
    display: flex;
    align-items: center;
    gap: 14px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 18px 22px;
}

.oltinfond-stat-item > i {
    font-size: 1.6rem;
    color: #3b82f6;
    flex-shrink: 0;
}

.oltinfond-stat-info {
    display: flex;
    flex-direction: column;
}

.oltinfond-stat-value {
    font-size: 1.35rem;
    font-weight: 700;
    color: #1e293b;
    line-height: 1.2;
}

.oltinfond-stat-label {
    font-size: 0.82rem;
    color: #64748b;
    margin-top: 2px;
}

/* --- Did You Know Items --- */
.oltinfond-dyk-item {
    display: flex;
    gap: 4px;
    padding: 8px 0;
    border-bottom: 1px solid #f1f5f9;
}

.oltinfond-dyk-item:last-child {
    border-bottom: none;
}

.oltinfond-dyk-bullet i {
    font-size: 1.5rem;
    color: #3b82f6;
    line-height: 1;
}

.oltinfond-dyk-item p {
    margin: 0;
    font-size: 0.88rem;
    color: #4b5563;
    line-height: 1.5;
    padding-top: 2px;
}

/* --- Most Viewed / Popular Items --- */
.oltinfond-popular-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid #f1f5f9;
    text-decoration: none;
    color: inherit;
    transition: background 0.15s ease;
}

.oltinfond-popular-item:last-of-type {
    border-bottom: none;
}

.oltinfond-popular-item:hover {
    text-decoration: none;
    color: inherit;
}

.oltinfond-popular-item:hover .oltinfond-popular-title {
    color: #3b82f6;
}

.oltinfond-popular-rank {
    flex-shrink: 0;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: #eff6ff;
    color: #3b82f6;
    font-size: 0.78rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

.oltinfond-popular-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.oltinfond-popular-title {
    font-size: 0.88rem;
    font-weight: 600;
    color: #1e293b;
    line-height: 1.4;
    transition: color 0.2s ease;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.oltinfond-popular-views {
    font-size: 0.76rem;
    color: #94a3b8;
}

.oltinfond-popular-views i {
    margin-right: 3px;
}

/* --- Dark Mode: Stats Bar --- */
body.dark-mode .oltinfond-stats-bar {
    background: #0f172a;
    border-color: #1e293b;
}

body.dark-mode .oltinfond-stat-item {
    background: #1e293b;
    border-color: #334155;
}

body.dark-mode .oltinfond-stat-value {
    color: #f1f5f9;
}

body.dark-mode .oltinfond-stat-label {
    color: #94a3b8;
}

/* --- Dark Mode: Did You Know --- */
body.dark-mode .oltinfond-dyk-item {
    border-color: #334155;
}

body.dark-mode .oltinfond-dyk-item p {
    color: #cbd5e1;
}

/* --- Dark Mode: Most Viewed --- */
body.dark-mode .oltinfond-popular-item {
    border-color: #334155;
}

body.dark-mode .oltinfond-popular-rank {
    background: #1e3a5f;
    color: #60a5fa;
}

body.dark-mode .oltinfond-popular-title {
    color: #e2e8f0;
}

body.dark-mode .oltinfond-popular-item:hover .oltinfond-popular-title {
    color: #60a5fa;
}

body.dark-mode .oltinfond-popular-views {
    color: #64748b;
}

/* --- Responsive --- */
@media (max-width: 991.98px) {
    .oltinfond-stats-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 12px;
    }

    .oltinfond-article-card {
        flex-direction: column;
    }

    .oltinfond-article-card-image {
        width: 100%;
        min-height: 180px;
        max-height: 200px;
    }
}

@media (max-width: 575.98px) {
    .oltinfond-stats-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .oltinfond-stat-item {
        padding: 14px 16px;
    }

    .oltinfond-dashboard {
        padding: 32px 0 40px;
    }

    .oltinfond-article-card-image {
        min-height: 140px;
        max-height: 160px;
    }

    .oltinfond-article-card-body {
        padding: 16px;
    }

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