/* ==========================================================================
   Markdown Viewer Stylesheet - UITS Event Raiders theme
   ========================================================================== */

:root {
    --bg-primary: #07080b;
    --bg-secondary: #0f1118;
    --bg-tertiary: #161a24;
    --card-bg: rgba(15, 17, 24, 0.7);
    --border-color: rgba(255, 255, 255, 0.08);
    --border-hover: rgba(255, 255, 255, 0.16);
    
    --text-primary: #ffffff;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    
    --accent: #d4af37;
    --accent-hover: #f1c40f;
    --accent-bg: rgba(212, 175, 55, 0.1);
    
    --transition-speed: 0.3s;
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
    
    --glass-blur: blur(12px);
    --header-height: 70px;
}

body.light-theme {
    --bg-primary: #f6f9fc;
    --bg-secondary: #ffffff;
    --bg-tertiary: #edf2f7;
    --card-bg: rgba(255, 255, 255, 0.85);
    --border-color: rgba(15, 23, 42, 0.08);
    --border-hover: rgba(15, 23, 42, 0.16);
    
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #64748b;
    
    --accent: #2563eb;
    --accent-hover: #1d4ed8;
    --accent-bg: rgba(37, 99, 235, 0.08);
}

body.dark-theme {
    --bg-primary: #07080b;
    --bg-secondary: #0f1118;
    --bg-tertiary: #161a24;
    --card-bg: rgba(15, 17, 24, 0.7);
    --border-color: rgba(255, 255, 255, 0.08);
    --border-hover: rgba(255, 255, 255, 0.16);
    
    --text-primary: #ffffff;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    
    --accent: #d4af37;
    --accent-hover: #f1c40f;
    --accent-bg: rgba(212, 175, 55, 0.1);
}

/* Explicit theme overrides to override github-markdown-css media queries */
body.light-theme .markdown-body {
    --focus-outlineColor: #0969da;
    --fgColor-default: #1f2328;
    --fgColor-muted: #59636e;
    --fgColor-accent: #0969da;
    --fgColor-success: #1a7f37;
    --fgColor-attention: #9a6700;
    --fgColor-danger: #d1242f;
    --fgColor-done: #8250df;
    --bgColor-default: #ffffff;
    --bgColor-muted: #f6f8fa;
    --bgColor-neutral-muted: rgba(129, 139, 152, 0.12);
    --bgColor-attention-muted: #fff8c5;
    --borderColor-default: #d1d9e0;
    --borderColor-muted: rgba(209, 217, 224, 0.7);
    --borderColor-neutral-muted: rgba(209, 217, 224, 0.7);
    --borderColor-accent-emphasis: #0969da;
    --borderColor-success-emphasis: #1a7f37;
    --borderColor-attention-emphasis: #9a6700;
    --borderColor-danger-emphasis: #cf222e;
    --borderColor-done-emphasis: #8250df;
    --color-prettylights-syntax-comment: #59636e;
    --color-prettylights-syntax-constant: #0550ae;
    --color-prettylights-syntax-constant-other-reference-link: #0a3069;
    --color-prettylights-syntax-entity: #6639ba;
    --color-prettylights-syntax-storage-modifier-import: #1f2328;
    --color-prettylights-syntax-entity-tag: #0550ae;
    --color-prettylights-syntax-keyword: #cf222e;
    --color-prettylights-syntax-string: #0a3069;
    --color-prettylights-syntax-variable: #953800;
    --color-prettylights-syntax-brackethighlighter-unmatched: #82071e;
    --color-prettylights-syntax-brackethighlighter-angle: #59636e;
    --color-prettylights-syntax-invalid-illegal-text: #f6f8fa;
    --color-prettylights-syntax-invalid-illegal-bg: #82071e;
    --color-prettylights-syntax-carriage-return-text: #f6f8fa;
    --color-prettylights-syntax-carriage-return-bg: #cf222e;
    --color-prettylights-syntax-string-regexp: #116329;
    --color-prettylights-syntax-markup-list: #3b2300;
    --color-prettylights-syntax-markup-heading: #0550ae;
    --color-prettylights-syntax-markup-italic: #1f2328;
    --color-prettylights-syntax-markup-bold: #1f2328;
    --color-prettylights-syntax-markup-deleted-text: #82071e;
    --color-prettylights-syntax-markup-deleted-bg: #ffebe9;
    --color-prettylights-syntax-markup-inserted-text: #116329;
    --color-prettylights-syntax-markup-inserted-bg: #dafbe1;
    --color-prettylights-syntax-markup-changed-text: #953800;
    --color-prettylights-syntax-markup-changed-bg: #ffd8b5;
    --color-prettylights-syntax-markup-ignored-text: #d1d9e0;
    --color-prettylights-syntax-markup-ignored-bg: #0550ae;
    --color-prettylights-syntax-meta-diff-range: #8250df;
    --color-prettylights-syntax-sublimelinter-gutter-mark: #818b98;
}

body.dark-theme .markdown-body {
    --focus-outlineColor: #1f6feb;
    --fgColor-default: #f0f6fc;
    --fgColor-muted: #9198a1;
    --fgColor-accent: #4493f8;
    --fgColor-success: #3fb950;
    --fgColor-attention: #d29922;
    --fgColor-danger: #f85149;
    --fgColor-done: #ab7df8;
    --bgColor-default: #0d1117;
    --bgColor-muted: #151b23;
    --bgColor-neutral-muted: rgba(101, 108, 118, 0.2);
    --bgColor-attention-muted: rgba(187, 128, 9, 0.15);
    --borderColor-default: #3d444d;
    --borderColor-muted: rgba(61, 68, 77, 0.7);
    --borderColor-neutral-muted: rgba(61, 68, 77, 0.7);
    --borderColor-accent-emphasis: #1f6feb;
    --borderColor-success-emphasis: #238636;
    --borderColor-attention-emphasis: #9e6a03;
    --borderColor-danger-emphasis: #da3633;
    --borderColor-done-emphasis: #8957e5;
    --color-prettylights-syntax-comment: #9198a1;
    --color-prettylights-syntax-constant: #79c0ff;
    --color-prettylights-syntax-constant-other-reference-link: #a5d6ff;
    --color-prettylights-syntax-entity: #d2a8ff;
    --color-prettylights-syntax-storage-modifier-import: #f0f6fc;
    --color-prettylights-syntax-entity-tag: #7ee787;
    --color-prettylights-syntax-keyword: #ff7b72;
    --color-prettylights-syntax-string: #a5d6ff;
    --color-prettylights-syntax-variable: #ffa657;
    --color-prettylights-syntax-brackethighlighter-unmatched: #f85149;
    --color-prettylights-syntax-brackethighlighter-angle: #9198a1;
    --color-prettylights-syntax-invalid-illegal-text: #f0f6fc;
    --color-prettylights-syntax-invalid-illegal-bg: #8e1519;
    --color-prettylights-syntax-carriage-return-text: #f0f6fc;
    --color-prettylights-syntax-carriage-return-bg: #b62324;
    --color-prettylights-syntax-string-regexp: #7ee787;
    --color-prettylights-syntax-markup-list: #f2cc60;
    --color-prettylights-syntax-markup-heading: #1f6feb;
    --color-prettylights-syntax-markup-italic: #f0f6fc;
    --color-prettylights-syntax-markup-bold: #f0f6fc;
    --color-prettylights-syntax-markup-deleted-text: #ffdcd7;
    --color-prettylights-syntax-markup-deleted-bg: #67060c;
    --color-prettylights-syntax-markup-inserted-text: #aff5b4;
    --color-prettylights-syntax-markup-inserted-bg: #033a16;
    --color-prettylights-syntax-markup-changed-text: #ffdfb6;
    --color-prettylights-syntax-markup-changed-bg: #5a1e02;
    --color-prettylights-syntax-markup-ignored-text: #f0f6fc;
    --color-prettylights-syntax-markup-ignored-bg: #1158c7;
    --color-prettylights-syntax-meta-diff-range: #d2a8ff;
    --color-prettylights-syntax-sublimelinter-gutter-mark: #3d444d;
}

/* Ensure code blocks in light theme remain readable with highlight.js dark styling */
body.light-theme .markdown-body pre {
    background-color: #0f1118 !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
}
body.light-theme .markdown-body pre code {
    color: #e6edf3 !important;
}

/* Force light text on dark backgrounds for code blocks in all themes */
.markdown-body pre,
.markdown-body pre code {
    color: #e6edf3 !important;
}

/* Ensure table rows in light theme have clean, whiter backgrounds */
body.light-theme .markdown-body table tr {
    background-color: #ffffff !important;
}
body.light-theme .markdown-body table tr:nth-child(2n) {
    background-color: #f8fafc !important;
}
body.light-theme .markdown-body table th,
body.light-theme .markdown-body table td {
    border-color: #e2e8f0 !important;
}

/* ==========================================================================
   Basic Layout & Boilerplate
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-family: var(--font-body);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: background-color var(--transition-speed) ease, color var(--transition-speed) ease;
}

/* ==========================================================================
   Header Elements
   ========================================================================== */
header {
    position: sticky;
    top: 0;
    height: var(--header-height);
    z-index: 100;
    background-color: var(--card-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
    transition: background-color var(--transition-speed) ease, border-bottom var(--transition-speed) ease;
}

.header-left, .header-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.back-btn, .nav-toggle {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    background-color: var(--bg-tertiary);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1rem;
    transition: all var(--transition-speed) ease;
}

.back-btn:hover, .nav-toggle:hover {
    color: var(--text-primary);
    border-color: var(--accent);
    transform: translateY(-1px);
}

.file-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.file-name {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--text-primary);
    line-height: 1.2;
}

.file-path {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-family: var(--font-mono);
}

/* ==========================================================================
   Viewer Layout Container
   ========================================================================== */
.viewer-container {
    max-width: 900px;
    width: 100%;
    margin: 0 auto;
    padding: 3rem 2rem;
    flex: 1;
}

/* ==========================================================================
   Loading Spinner
   ========================================================================== */
#loader {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 5rem 0;
    gap: 1.5rem;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 3px solid var(--border-color);
    border-top: 3px solid var(--accent);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

#loader p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-weight: 500;
}

/* ==========================================================================
   GitHub Markdown Override Styling
   ========================================================================== */
.markdown-body {
    background-color: transparent !important;
    color: var(--text-primary) !important;
    font-size: 1.05rem;
    line-height: 1.7;
    font-family: var(--font-body);
}

.markdown-body h1, 
.markdown-body h2, 
.markdown-body h3, 
.markdown-body h4 {
    color: var(--text-primary) !important;
    font-family: var(--font-heading);
    font-weight: 800;
    border-bottom: 1px solid var(--border-color) !important;
    padding-bottom: 0.4em;
    margin-top: 2rem;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
}

.markdown-body h1 { font-size: 2.2rem; }
.markdown-body h2 { font-size: 1.75rem; }
.markdown-body h3 { font-size: 1.4rem; }

.markdown-body p, .markdown-body ul, .markdown-body ol {
    margin-bottom: 1.25rem;
    color: var(--text-secondary);
}

.markdown-body a {
    color: var(--accent) !important;
    font-weight: 600;
    text-decoration: none;
}

.markdown-body a:hover {
    text-decoration: underline;
}

.markdown-body hr {
    height: 1px;
    background-color: var(--border-color) !important;
    border: none;
    margin: 2.5rem 0;
}

.markdown-body blockquote {
    border-left: 4px solid var(--accent) !important;
    background-color: var(--bg-secondary) !important;
    border-radius: 0 8px 8px 0;
    padding: 1rem 1.5rem;
    color: var(--text-secondary) !important;
    font-style: italic;
    margin: 1.5rem 0;
}

.markdown-body code {
    font-family: var(--font-mono) !important;
    background-color: var(--bg-tertiary) !important;
    color: var(--accent) !important;
    padding: 0.2em 0.4em;
    border-radius: 6px;
    font-size: 85%;
}

.markdown-body pre {
    background-color: var(--bg-secondary) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: 12px;
    padding: 1.25rem;
    margin-bottom: 1.5rem;
    overflow-x: auto;
}

.markdown-body pre code {
    background-color: transparent !important;
    color: inherit !important;
    padding: 0;
    font-size: 90%;
}

/* Page Break Decorator */
.page-break {
    border-top: 1px dashed var(--border-color);
    margin: 3rem 0;
    position: relative;
}

.page-break::before {
    content: 'PAGE BREAK';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: var(--bg-primary);
    padding: 0 1rem;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    color: var(--text-muted);
}

/* ==========================================================================
   ToC Slide-out Sidebar Pane
   ========================================================================== */
#nav-pane {
    position: fixed;
    top: 0;
    right: 0;
    width: 320px;
    height: 100vh;
    background-color: var(--bg-secondary);
    border-left: 1px solid var(--border-color);
    z-index: 200;
    transform: translateX(100%);
    transition: transform var(--transition-speed) cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
}

#nav-pane.open {
    transform: translateX(0);
}

#nav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
    z-index: 199;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition-speed) ease;
}

#nav-overlay.open {
    opacity: 1;
    pointer-events: auto;
}

.nav-header {
    height: var(--header-height);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.5rem;
}

.nav-title {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.15rem;
}

#toc-list {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.toc-link {
    font-size: 0.9rem;
    color: var(--text-secondary);
    text-decoration: none;
    padding: 0.4rem 0.75rem;
    border-radius: 6px;
    transition: all 0.2s ease;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.toc-link:hover {
    color: var(--text-primary);
    background-color: var(--bg-tertiary);
}

.toc-link.h1 { font-weight: 700; padding-left: 0.75rem; }
.toc-link.h2 { padding-left: 1.5rem; font-size: 0.85rem; }
.toc-link.h3 { padding-left: 2.25rem; font-size: 0.8rem; color: var(--text-muted); }

/* ==========================================================================
   Footer
   ========================================================================== */
.render-footer {
    border-top: 1px solid var(--border-color);
    background-color: var(--bg-secondary);
    padding: 1.5rem 2rem;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-top: auto;
    transition: background-color var(--transition-speed) ease, border-top var(--transition-speed) ease;
}

/* ==========================================================================
   Error Display
   ========================================================================== */
.error-container {
    text-align: center;
    padding: 4rem 2rem;
    border: 1px solid rgba(239, 68, 68, 0.2);
    background-color: rgba(239, 68, 68, 0.05);
    border-radius: 16px;
    max-width: 600px;
    margin: 0 auto;
}

.error-icon {
    font-size: 3rem;
    color: #ef4444;
    margin-bottom: 1.5rem;
}

.error-container h2 {
    font-family: var(--font-heading);
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.error-container p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* ==========================================================================
   Responsive Adaptations
   ========================================================================== */
@media (max-width: 768px) {
    header {
        padding: 0 1rem;
    }
    
    .file-name {
        font-size: 0.95rem;
    }
    
    .file-path {
        font-size: 0.7rem;
    }
    
    .viewer-container {
        padding: 2rem 1rem;
    }
    
    .markdown-body h1 { font-size: 1.8rem; }
    .markdown-body h2 { font-size: 1.45rem; }
}

/* ==========================================================================
   Floating Search Panel & Toggle
   ========================================================================== */

#floating-search-toggle {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--accent);
    color: white;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    z-index: 999;
    transition: transform 0.2s, background-color 0.2s, bottom 0.3s, right 0.3s;
}

#floating-search-toggle:hover {
    transform: scale(1.05);
    opacity: 0.95;
}

#floating-search-toggle:active {
    transform: scale(0.95);
}

#search-container {
    position: fixed;
    z-index: 1000;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    
    /* Default: List Mode (bottom-right) */
    left: calc(100vw - 412px); /* 380px width + 32px right margin */
    width: 380px;
    bottom: 5.5rem;
    max-height: 450px;
    
    /* Smooth transitions */
    transition: left 0.4s cubic-bezier(0.16, 1, 0.3, 1), 
                bottom 0.4s cubic-bezier(0.16, 1, 0.3, 1), 
                width 0.4s cubic-bezier(0.16, 1, 0.3, 1), 
                max-height 0.4s cubic-bezier(0.16, 1, 0.3, 1),
                opacity 0.3s ease, 
                transform 0.3s ease;
}

/* Glassmorphism style for dark theme or by default */
#search-container {
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

#search-container.search-container-hidden {
    opacity: 0;
    pointer-events: none;
    transform: scale(0.9) translateY(10px);
}

/* Pagination Mode Override */
#search-container.pagination-mode {
    left: calc(50vw - 190px); /* Centered: 380px width */
    bottom: 2rem;
    max-height: 56px; /* Just the header height */
}

#search-container.pagination-mode .search-results-list {
    display: none;
}

/* Header/Bar */
.search-bar-header {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border-color);
    gap: 0.5rem;
    height: 56px;
    box-sizing: border-box;
}

/* Search input wrapper */
.search-input-wrapper {
    position: relative;
    flex-grow: 1;
    display: flex;
    align-items: center;
}

.search-input-icon {
    position: absolute;
    left: 0.75rem;
    color: var(--text-primary);
    opacity: 0.5;
    pointer-events: none;
    font-size: 0.9rem;
}

#search-input {
    width: 100%;
    padding: 0.5rem 2rem;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.2s, background-color 0.2s;
}

#search-input:focus {
    border-color: var(--accent);
    background: rgba(0, 0, 0, 0.2);
}

body.light-theme #search-input {
    background: rgba(0, 0, 0, 0.02);
    border-color: rgba(15, 23, 42, 0.15);
}

body.light-theme #search-input:focus {
    background: rgba(0, 0, 0, 0);
}

#search-clear-btn {
    position: absolute;
    right: 0.5rem;
    border: none;
    background: none;
    cursor: pointer;
    color: var(--text-primary);
    opacity: 0.5;
    padding: 0.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

#search-clear-btn:hover {
    opacity: 0.8;
}

/* Buttons and Controls */
.search-bar-header button:not(#search-clear-btn) {
    border: none;
    background: none;
    cursor: pointer;
    color: var(--text-primary);
    opacity: 0.7;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s, opacity 0.2s;
}

.search-bar-header button:not(#search-clear-btn):hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.1);
    opacity: 1;
}

body.light-theme .search-bar-header button:not(#search-clear-btn):hover:not(:disabled) {
    background: rgba(0, 0, 0, 0.05);
}

.search-bar-header button:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.search-arrows {
    display: flex;
    gap: 0.25rem;
}

/* Search results list */
.search-results-list {
    flex-grow: 1;
    overflow-y: auto;
    max-height: calc(450px - 56px);
    padding: 0.5rem 0;
}

.search-result-item {
    padding: 0.75rem 1rem;
    cursor: pointer;
    font-size: 0.85rem;
    line-height: 1.4;
    transition: background-color 0.2s;
    border-bottom: 1px solid var(--border-color);
}

.search-result-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

body.light-theme .search-result-item:hover {
    background: rgba(0, 0, 0, 0.03);
}

.search-result-item .match-highlight {
    background: rgba(255, 230, 0, 0.25);
    color: #fff;
    border-radius: 2px;
    padding: 0 2px;
    font-weight: 500;
}

body.light-theme .search-result-item .match-highlight {
    background: rgba(255, 230, 0, 0.4);
    color: inherit;
}

.search-no-results {
    padding: 2rem 1rem;
    text-align: center;
    opacity: 0.5;
    font-size: 0.85rem;
}

/* In-document Highlights */
mark.search-match {
    background-color: rgba(255, 230, 0, 0.25);
    color: inherit;
    border-radius: 2px;
    transition: background-color 0.3s;
}

body.light-theme mark.search-match {
    background-color: rgba(255, 230, 0, 0.4);
}

mark.search-match-active {
    background-color: #ff9600 !important;
    color: #000 !important;
    box-shadow: 0 0 8px rgba(255, 150, 0, 0.5);
}

/* Flash Highlight Animation */
.flash-highlight {
    animation: flashHighlight 1.5s ease-out;
}

@keyframes flashHighlight {
    0% {
        background-color: rgba(255, 230, 0, 0.5);
    }
    100% {
        background-color: transparent;
    }
}

/* Responsiveness for Search Panel */
@media (max-width: 480px) {
    #search-container {
        left: 5vw !important;
        width: 90vw !important;
        max-width: none !important;
    }
    #search-container.pagination-mode {
        left: 5vw !important;
        width: 90vw !important;
        bottom: 1rem !important;
    }
}

/* Search Tags Container */
.search-tags-container {
    padding: 0.75rem 1rem 0.5rem 1rem;
    border-bottom: 1px solid var(--border-color);
}

.search-tags-title {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    opacity: 0.6;
    margin-bottom: 0.5rem;
}

.search-tags-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.search-tag-pill {
    padding: 0.25rem 0.75rem;
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
    border-radius: 20px;
    font-size: 0.75rem;
    cursor: pointer;
    transition: background-color 0.2s, color 0.2s;
    user-select: none;
    border: 1px solid var(--border-color);
}

body.light-theme .search-tag-pill {
    background: rgba(0, 0, 0, 0.05);
    border-color: rgba(15, 23, 42, 0.08);
}

.search-tag-pill:hover {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
}

#search-container.pagination-mode .search-tags-container {
    display: none !important;
}
