/* Post-Nuclear Contaminated Archive Styling */
@import url('https://fonts.googleapis.com/css2?family=Courier+Prime:wght@400;700&display=swap');

:root {
    /* Improved Post-Nuclear Color Palette - Better Contrast */
    --bg-primary: #1e1e1e;
    --bg-secondary: #2d2d2d;
    --bg-accent: #3a3a3a;
    --text-primary: #e0e0e0;        /* Improved contrast */
    --text-secondary: #b0b0b0;      /* Better readability */
    --text-muted: #808080;          /* Still muted but readable */

    /* Contamination Colors - Adjusted for accessibility */
    --toxic-green: #6abd00;         /* Less harsh green */
    --rust-orange: #e68a00;        /* Better contrast orange */
    --warning-yellow: #f5d916;     /* More readable yellow */
    --radiation-orange: #ff7b47;   /* Softer orange */
    --ash-gray: #5a5a5a;          /* Lighter gray */
    --danger-red: #e74c3c;         /* Better contrast red */

    /* Effects - Reduced intensity */
    --glow-green: 0 0 6px rgba(106, 189, 0, 0.2);
    --glow-orange: 0 0 4px rgba(255, 123, 71, 0.3);
    --text-shadow: 1px 1px 2px rgba(0,0,0,0.6);
    --border-glow: 0 0 3px rgba(106, 189, 0, 0.15);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
html {
    background-color: var(--bg-primary);
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 50%, #242424 100%);
}
body {
    font-family: 'Courier Prime', 'Courier New', monospace;
    line-height: 1.7;  /* Increased for better readability */
    color: var(--text-primary);
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 50%, #242424 100%);
    min-height: 100vh;
    text-shadow: none;  /* Remove text shadow for clarity */
}

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

/* Classified content styling */
.classified-content {
    position: relative;
}

.classified-banner {
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--ash-gray) 50%, var(--bg-accent) 100%);
    color: var(--text-primary);
    padding: 2rem;
    text-align: center;
    margin: 2rem 0;
    border: 2px solid var(--warning-yellow);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.4);
    position: relative;
}

.classified-banner h2 {
    border-left: none !important;
    padding-left: 0 !important;
    margin: 1rem 0;
    font-size: 2rem;  /* Reduced size */
    color: var(--warning-yellow) !important;
    text-align: center;
    font-weight: bold;
}

.classified-banner::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--toxic-green), var(--warning-yellow), var(--radiation-orange));
    border-radius: 8px 8px 0 0;
}

.classified-banner::after {
    content: "☢️ ⚠️ ☢️";
    position: absolute;
    top: 1rem;
    left: 50%;
    transform: translateX(-50%);
    font-size: 1.5rem;
    color: var(--radiation-orange);
    text-shadow: var(--glow-orange);
}

.classified-banner h2 {
    margin: 1.5rem 0 1rem 0;
    font-size: 2.5rem;
    text-shadow: var(--text-shadow), var(--glow-green);
    color: var(--toxic-green) !important;
    text-align: center;
    font-weight: bold;
}

.classified-banner p {
    margin: 0.8rem auto;
    font-size: 1.1rem;
    text-align: center;
    color: var(--text-primary);
    max-width: 600px;
    text-shadow: var(--text-shadow);
}

.classified-banner p:last-child {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-style: italic;
    margin-top: 1.5rem;
}
.classified-banner-container {
    position: relative;
}

.classified-banner-container * {
    position: static !important;
}

.classified-banner-container *::before,
.classified-banner-container *::after {
    display: none !important;
}

.classified-banner::before,
.classified-banner::after {
    display: block !important;
}

/* Gentle Pulse Animation - Migraine Friendly */
@keyframes contamination-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.85; }
}

/* Reduced motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    .contaminated,
    .view-toggle,
    .view-mode-indicator,
    .contamination-warning {
        animation: none !important;
    }
}

.contaminated {
    animation: contamination-pulse 2s ease-in-out infinite;
}

/* Header - Made more compact for mobile */
header {
    background: linear-gradient(90deg, var(--bg-secondary) 0%, var(--ash-gray) 50%, var(--bg-secondary) 100%);
    border-bottom: 3px solid var(--toxic-green);
    box-shadow: 0 4px 10px rgba(0,0,0,0.5), var(--border-glow);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.site-title {
    font-size: 2rem;
    font-weight: bold;
    color: var(--warning-yellow);
    text-decoration: none;
    text-shadow: var(--text-shadow), var(--glow-orange);
    transition: all 0.3s ease;
}

.site-title:hover {
    color: var(--toxic-green);
    text-shadow: var(--text-shadow), var(--glow-green);
    transform: scale(1.02);
}

.site-title::before {
    content: "☢️ ";
    color: var(--radiation-orange);
}

/* View Toggle Button */
.view-toggle {
    background: linear-gradient(45deg, var(--radiation-orange), var(--danger-red));
    color: white;
    border: none;
    padding: 0.7rem 1.2rem;
    border-radius: 25px;
    font-family: 'Courier Prime', monospace;
    font-weight: bold;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-shadow: var(--text-shadow);
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    animation: contamination-pulse 3s ease-in-out infinite;
}

.view-toggle:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0,0,0,0.4), var(--glow-orange);
}

.view-toggle.player-mode {
    background: linear-gradient(45deg, #2196F3, #4CAF50);
}

.view-toggle.dm-mode {
    background: linear-gradient(45deg, var(--radiation-orange), var(--danger-red));
}

/* View Mode Indicator */
.view-mode-indicator {
    background: linear-gradient(45deg, var(--radiation-orange), var(--toxic-green));
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: bold;
    text-shadow: var(--text-shadow);
    animation: contamination-pulse 2s ease-in-out infinite;
    margin: 0 1rem;
}

.view-mode-player {
    background: linear-gradient(45deg, #2196F3, #4CAF50);
}

.view-mode-dm {
    background: linear-gradient(45deg, var(--radiation-orange), var(--danger-red));
}

/* Header Controls */
.header-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
}

nav ul {
    display: flex;
    list-style: none;
    gap: 1rem;
}

nav a {
    color: var(--text-secondary);
    text-decoration: none;
    padding: 0.7rem 1.2rem;
    border: 1px solid var(--ash-gray);
    border-radius: 4px;
    transition: all 0.3s ease;
    background: rgba(74, 74, 74, 0.2);
    position: relative;
}

nav a:hover {
    background: var(--rust-orange);
    color: var(--text-primary);
    border-color: var(--toxic-green);
    box-shadow: var(--glow-green);
    transform: translateY(-2px);
}

nav a::before {
    content: "☢️";
    margin-right: 0.5rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

nav a:hover::before {
    opacity: 1;
}

/* Remove icon space on mobile for better centering */
@media (max-width: 768px) {
    nav a::before {
        display: none; /* Completely remove the icon space on mobile */
    }

    nav a {
        text-align: center; /* Ensure text is centered */
        justify-content: center; /* Center content if using flexbox */
        display: inline-flex; /* Use flexbox for better centering */
        align-items: center; /* Vertically center text */
    }
}

/* Content filtering classes */
.dm-only {
    transition: opacity 0.3s ease, max-height 0.3s ease;
}

.player-safe {
    transition: opacity 0.3s ease, max-height 0.3s ease;
}

/* Hidden in player mode */
.player-view .dm-only {
    display: none;
}

/* Hidden content styling */
.content-hidden {
    opacity: 0.3;
    font-style: italic;
}

.content-hidden::before {
    content: "[CLASSIFIED] ";
    color: var(--danger-red);
    font-weight: bold;
}

/* Main Content */
main {
    padding: 2rem 0;
    min-height: calc(100vh - 200px);
}

.content-wrapper {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 2rem;
    align-items: start;
}

.main-content {
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-accent) 100%);
    padding: 2.5rem;
    border-radius: 8px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.4);
    border: 2px solid var(--ash-gray);
    position: relative;
}

.main-content::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--toxic-green), var(--warning-yellow), var(--radiation-orange));
    border-radius: 8px 8px 0 0;
}

.sidebar {
    background: linear-gradient(135deg, var(--bg-accent) 0%, var(--ash-gray) 100%);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 6px 15px rgba(0,0,0,0.4);
    border: 2px solid var(--rust-orange);
    position: sticky;
    top: 120px;
}

.sidebar::before {
    content: "⚠️ CONTAMINATED DATA";
    display: block;
    color: var(--radiation-orange);
    font-size: 0.8rem;
    font-weight: bold;
    margin-bottom: 1rem;
    text-align: center;
    padding: 0.5rem;
    background: rgba(255, 107, 53, 0.1);
    border-radius: 4px;
    border: 1px solid var(--radiation-orange);
}

/* Sidebar Navigation Sections */
.nav-section {
    margin-bottom: 2rem;
}

.nav-section h4 {
    font-size: 1rem;
    margin-bottom: 0.8rem;
    color: var(--warning-yellow);
    text-align: center;
    border-bottom: 1px solid var(--ash-gray);
    padding-bottom: 0.5rem;
}

.nav-level {
    margin-bottom: 1rem;
}

.nav-level-title {
    font-size: 0.85rem;
    color: var(--rust-orange);
    font-weight: bold;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.nav-item {
    display: block;
    color: var(--text-secondary);
    text-decoration: none;
    padding: 0.4rem 0.8rem;
    margin: 0.2rem 0;
    border-radius: 4px;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    border-left: 3px solid transparent;
}

.nav-item:hover {
    background: var(--rust-orange);
    color: var(--text-primary);
    border-left-color: var(--toxic-green);
    transform: translateX(5px);
}

.nav-item.current {
    background: rgba(124, 252, 0, 0.1);
    border-left-color: var(--toxic-green);
    color: var(--text-primary);
}

.nav-item::before {
    margin-right: 0.5rem;
}

.nav-up::before { content: "⬆️"; }
.nav-same::before { content: "↔️"; }
.nav-down::before { content: "⬇️"; }
.nav-home::before { content: "🏠"; }

/* Typography */
h1, h2, h3, h4, h5, h6 {
    color: var(--warning-yellow);
    margin-bottom: 1.2rem;
    font-weight: bold;
    text-shadow: var(--text-shadow);
}

h1 {
    font-size: 2.8rem;
    border-bottom: 3px solid var(--toxic-green);
    padding-bottom: 0.8rem;
    margin-bottom: 2rem;
    position: relative;
}

h1::before {
    content: "☢️";
    color: var(--radiation-orange);
    margin-right: 1rem;
    text-shadow: var(--glow-orange);
}

h2 {
    font-size: 2.2rem;
    margin-top: 2.5rem;
    color: var(--toxic-green);
    border-left: 4px solid var(--rust-orange);
    padding-left: 1rem;
}

h3 {
    font-size: 1.8rem;
    margin-top: 2rem;
    color: var(--rust-orange);
}

h4 {
    font-size: 1.5rem;
    color: var(--text-primary);
    margin-top: 1.5rem;
}

h5 {
    font-size: 1.3rem;
    color: var(--text-primary);
    margin-top: 1.5rem;
}

h6 {
  font-size: 1.1rem;
  color: var(--text-primary);
  margin-top: 1.5rem;
}

p {
    margin-bottom: 1.5rem;
    text-align: justify;
    color: var(--text-primary);
}

/* Links */
a {
    color: var(--warning-yellow);
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
}

a:hover {
    color: var(--toxic-green);
    text-shadow: var(--glow-green);
}

.main-content a:hover {
    text-decoration: underline;
}

/* Lists */
ul, ol {
    margin-left: 2rem;
    margin-bottom: 1.5rem;
}

li {
    margin-bottom: 0.7rem;
    color: var(--text-primary);
}

.main-content ul li::marker,
.sidebar us li::marker {
    content: "☢️ ";
    color: var(--toxic-green);
}

/* Images */
img {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
    box-shadow: 0 6px 15px rgba(0,0,0,0.4);
    margin: 1.5rem 0;
    border: 2px solid var(--ash-gray);
    transition: all 0.3s ease;
}

img:hover {
    border-color: var(--toxic-green);
    box-shadow: 0 8px 20px rgba(0,0,0,0.6), var(--glow-green);
    transform: scale(1.02);
}

/* Blockquotes */
blockquote {
    border-left: 5px solid var(--radiation-orange);
    padding: 1.5rem;
    margin: 1.5rem 0;
    font-style: italic;
    color: var(--text-secondary);
    background: rgba(255, 107, 53, 0.05);
    border-radius: 0 6px 6px 0;
    position: relative;
}

blockquote::before {
    content: "⚠️";
    position: absolute;
    top: 1rem;
    left: -15px;
    background: var(--radiation-orange);
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
}

/* Code */
code {
    background: var(--bg-primary);
    color: var(--toxic-green);
    padding: 0.3rem 0.6rem;
    border-radius: 4px;
    font-family: 'Courier Prime', 'Courier New', monospace;
    border: 1px solid var(--ash-gray);
}

pre {
    background: var(--bg-primary);
    padding: 1.5rem;
    border-radius: 6px;
    overflow-x: auto;
    margin: 1.5rem 0;
    border: 2px solid var(--toxic-green);
    box-shadow: var(--glow-green);
}

pre code {
    background: none;
    border: none;
    padding: 0;
}

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    background: var(--bg-accent);
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

th, td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--ash-gray);
}

th {
    background: var(--rust-orange);
    color: white;
    font-weight: bold;
    text-shadow: var(--text-shadow);
}

tr:hover {
    background: rgba(124, 252, 0, 0.05);
}

/* Footer */
footer {
    background: linear-gradient(90deg, var(--bg-secondary) 0%, var(--ash-gray) 50%, var(--bg-secondary) 100%);
    text-align: center;
    padding: 2rem 0;
    border-top: 3px solid var(--toxic-green);
    color: var(--text-secondary);
    box-shadow: var(--border-glow);
}

footer::before {
    content: "☢️ CONTAMINATION WARNING: All materials subject to Remnant Magic exposure ☢️";
    display: block;
    color: var(--radiation-orange);
    font-size: 0.8rem;
    margin-bottom: 1rem;
    animation: contamination-pulse 3s ease-in-out infinite;
}

/* Desktop Header Layout - Better spacing */
@media (min-width: 769px) {
    .header-content {
        flex-direction: column;
        gap: 0.8rem;
        padding: 1rem 0;
    }

    /* First line: Title and Search */
    .title-search-line {
        display: flex;
        justify-content: space-between;
        align-items: center;
        width: 100%;
    }

    .title-line {
        flex-shrink: 0;
    }

    .search-line {
        flex-shrink: 1;
        display: flex;
        justify-content: center;
        flex: 1;
        max-width: 400px;
        margin: 0 2rem; /* Add side margins for breathing room */
    }

    /* Second line: Access controls and Navigation with better spacing */
    .access-nav-line {
        display: flex;
        justify-content: space-between;
        align-items: center;
        width: 100%;
    }

    .access-line {
        display: flex;
        align-items: center;
        gap: 1.5rem; /* More space between indicator and button */
        flex-shrink: 0;
    }

    .nav-line {
        display: flex;
        justify-content: flex-end;
        flex-shrink: 0;
    }

    .nav-line nav ul {
        display: flex;
        gap: 1.5rem; /* More space between nav items */
        margin: 0;
        padding: 0;
    }

    .site-title {
        white-space: nowrap;
        font-size: 2rem;
    }

    .view-mode-indicator,
    .view-toggle {
        white-space: nowrap;
    }

    /* Better search input sizing on desktop */
    .search-input {
        width: 100%;
        max-width: 350px;
    }
}

/* Tablet adjustments */
@media (max-width: 1024px) and (min-width: 769px) {
    .header-content {
        padding: 0.7rem 0;
    }

    .site-title {
        font-size: 1.6rem;
    }

    nav a {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }
}

/* Mobile Responsive - Improved Header Layout */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 0.8rem;
        padding: 0.8rem 0;
    }

    /* First line: Site title and icon only */
    .title-line {
        display: flex;
        justify-content: center;
        align-items: center;
        width: 100%;
        order: 1;
    }

    .site-title {
        font-size: 1.5rem;
        text-align: center;
    }

    /* Second line: Search bar */
    .search-line {
        display: flex;
        justify-content: center;
        width: 100%;
        order: 2;
    }

    /* Second line: Access indicator and toggle button */
    .access-line {
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 1rem;
        width: 100%;
        order: 2;
    }

    .view-mode-indicator {
        font-size: 0.8rem;
        padding: 0.3rem 0.8rem;
        margin: 0;
    }

    .view-toggle {
        padding: 0.6rem 1.2rem;
        font-size: 0.85rem;
    }

    /* Third line: Navigation centered */
    .nav-line {
        display: flex;
        justify-content: center;
        width: 100%;
        order: 3;
    }

    .nav-line nav {
        width: 100%;
        display: flex;
        justify-content: center;
    }

    nav ul {
        gap: 0.5rem;
        flex-wrap: wrap;
        justify-content: center;
        width: auto; /* Changed from 100% to auto */
        margin: 0; /* Remove any default margins */
        padding: 0; /* Remove any default padding */
    }

    nav a {
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
    }

    /* Header controls reorganization */
    .header-controls {
        flex-direction: column;
        gap: 0.8rem;
        width: 100%;
        align-items: center;
    }

    .view-toggle {
        padding: 0.5rem 1rem;
        font-size: 0.8rem;
    }

    nav ul {
        gap: 0.3rem;
        flex-wrap: wrap;
        justify-content: center;
        width: 100%;
    }

    nav a {
        padding: 0.4rem 0.8rem;
        font-size: 0.8rem;
    }

    .content-wrapper {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .sidebar {
        order: -1;
        position: static;
        padding: 1.5rem;
    }

    h1 {
        font-size: 2rem;
    }

    .main-content {
        padding: 1.5rem;
    }
}
/* Header Scroll Behavior */
header {
    transition: all 0.3s ease-in-out;
}

.header-minimal {
    background: rgba(42, 42, 42, 0.95);
    backdrop-filter: blur(10px);
}

.header-minimal .header-content {
    padding: 0.5rem 0;
}

.header-minimal .access-line,
.header-minimal .nav-line {
    display: none !important;
}

.header-minimal .title-line {
    margin: 0;
}

.header-minimal .site-title {
    font-size: 1.2rem;
}

/* Desktop minimal header adjustments */
@media (min-width: 769px) {
    .header-minimal .header-content {
        flex-direction: row;
        justify-content: center;
        padding: 0.5rem 0;
    }

    .header-minimal .site-title {
        font-size: 1.5rem;
    }
}

/* Tablet adjustments */
@media (max-width: 1024px) and (min-width: 769px) {
    .header-content {
        padding: 0.7rem 0;
    }

    .site-title {
        font-size: 1.6rem;
    }

    nav a {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }
}

/* Special Effects */
.contamination-warning {
    background: linear-gradient(45deg, rgba(255, 107, 53, 0.1), rgba(124, 252, 0, 0.1));
    border: 2px solid var(--radiation-orange);
    padding: 1rem;
    border-radius: 6px;
    margin: 1rem 0;
    animation: contamination-pulse 2s ease-in-out infinite;
}

/* Hide the default Jekyll title since we'll handle it in CSS */
.main-content > h1:first-child {
    display: none;
}

/* Custom page title styling */
.page-title {
    font-size: 2.8rem;
    color: var(--warning-yellow);
    border-bottom: 3px solid var(--toxic-green);
    padding-bottom: 0.8rem;
    margin-bottom: 2rem;
    text-shadow: var(--text-shadow);
}

.page-title::before {
    content: "☢️";
    color: var(--radiation-orange);
    margin-right: 1rem;
    text-shadow: var(--glow-orange);
}

/* Mobile page title adjustment */
@media (max-width: 768px) {
    .page-title {
        font-size: 1.8rem;
    }
}
/* Search Functionality */
.search-container {
    position: relative;
    margin-bottom: 0; /* Remove bottom margin */
}

/* Mobile specific search styling */
@media (max-width: 768px) {
    .search-container {
        margin-bottom: 0rem; /* Only add margin on mobile */
    }

    .search-input {
        max-width: 300px; /* Slightly smaller on mobile */
    }
}

.search-input {
    width: 100%;
    max-width: 400px;
    padding: 0.7rem 1rem;
    background: var(--bg-accent);
    border: 2px solid var(--ash-gray);
    border-radius: 25px;
    color: var(--text-primary);
    font-family: 'Courier Prime', monospace;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.search-input:focus {
    border-color: var(--toxic-green);
    box-shadow: var(--glow-green);
    outline: none;
}

.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-accent);
    border: 2px solid var(--ash-gray);
    border-radius: 8px;
    max-height: 300px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
}

.search-result-item {
    padding: 0.8rem;
    border-bottom: 1px solid var(--ash-gray);
    cursor: pointer;
    transition: all 0.3s ease;
}

.search-result-item:hover {
    background: var(--rust-orange);
}

.search-result-title {
    font-weight: bold;
    color: var(--warning-yellow);
    margin-bottom: 0.3rem;
}

.search-result-content {
    font-size: 0.8rem;
    color: var(--text-secondary);
}
/* Enhanced search result styling */
.search-result-item {
    padding: 0.8rem;
    border-bottom: 1px solid var(--ash-gray);
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.search-result-item:hover {
    background: var(--rust-orange);
    transform: translateX(3px);
}

.search-result-title {
    font-weight: bold;
    color: var(--warning-yellow);
    margin-bottom: 0.3rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.search-result-rank {
    font-size: 0.7rem;
    color: var(--text-muted);
    background: var(--bg-primary);
    padding: 0.2rem 0.4rem;
    border-radius: 10px;
    font-weight: normal;
}

.search-result-content {
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

/* Highlight matched text */
.search-results mark {
    background: var(--toxic-green);
    color: var(--bg-primary);
    padding: 0.1rem 0.2rem;
    border-radius: 2px;
    font-weight: bold;
}

/* Score-based styling (optional visual indicator) */
.search-result-item[data-score] {
    border-left: 3px solid var(--ash-gray);
}

.search-result-item[data-score="100"],
.search-result-item[data-score^="1"] {
    border-left-color: var(--toxic-green); /* High relevance */
}

.search-result-item[data-score^="5"],
.search-result-item[data-score^="6"],
.search-result-item[data-score^="7"],
.search-result-item[data-score^="8"],
.search-result-item[data-score^="9"] {
    border-left-color: var(--warning-yellow); /* Medium relevance */
}
/* Download button styling */
.download-btn {
    display: block;
    color: var(--text-secondary) !important;
    text-decoration: none;
    padding: 0.6rem 0.8rem;
    margin: 0.2rem 0;
    border-radius: 4px;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    border-left: 3px solid var(--ash-gray);
    font-family: 'Courier Prime', monospace;
    font-weight: bold;
    background: var(--bg-accent) !important;
}

.download-btn:hover {
    background: var(--ash-gray) !important;
    color: var(--text-primary) !important;
    border-left-color: var(--toxic-green);
    transform: translateX(5px);
    box-shadow: 0 0 5px rgba(124, 252, 0, 0.2);
}
/* Accessibility Improvements */
*:focus {
    outline: 2px solid var(--warning-yellow);
    outline-offset: 2px;
}

button:focus,
input:focus,
a:focus {
    box-shadow: 0 0 0 3px rgba(245, 217, 22, 0.3);
}

/* Skip Link - Hidden until focused (keyboard navigation) */
.skip-link {
    position: absolute;
    top: -100px; /* Hide off-screen */
    left: 8px;
    background: var(--warning-yellow);
    color: var(--bg-primary);
    padding: 8px 12px;
    text-decoration: none;
    border-radius: 0 0 8px 8px;
    font-weight: bold;
    font-size: 0.9rem;
    z-index: 2000;
    border: 2px solid var(--bg-primary);
    font-family: 'Courier Prime', monospace;
    transition: top 0.2s ease;
}

.skip-link:focus {
    top: 0; /* Slide down when focused */
    outline: none;
}

/* Style it to match your theme when visible */
.skip-link:focus {
    background: linear-gradient(45deg, var(--warning-yellow), var(--toxic-green));
    color: var(--bg-primary);
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
}



/* Accessibility Control Panel */
.accessibility-controls {
    font-family: 'Courier Prime', monospace;
    font-size: 0.85rem;
}

.accessibility-btn {
    padding: 0.6rem 1rem;
    background: var(--bg-accent);
    border: 1px solid var(--ash-gray);
    color: var(--text-primary);
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: 'Courier Prime', monospace;
    font-size: 0.8rem;
    min-height: 40px;
    white-space: nowrap;
}

.accessibility-btn:hover {
    background: var(--rust-orange);
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.accessibility-btn:active {
    transform: translateY(0);
}

/* Mode Status Indicator */
.mode-status {
    padding: 0.5rem 1rem;
    text-align: center;
    border-radius: 15px;
    font-weight: bold;
    font-size: 0.75rem;
    border: 2px solid;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.mode-status.normal {
    background: var(--bg-accent);
    color: var(--text-primary);
    border-color: var(--toxic-green);
}

.mode-status.safe {
    background: linear-gradient(45deg, #e8f5e8, #f0f8f0);
    color: #2d5a2d;
    border-color: #28a745;
}

.mode-status.low-contrast {
    background: var(--bg-secondary);
    color: var(--text-secondary);
    border-color: var(--text-muted);
}

.mode-status.safe-low {
    background: linear-gradient(45deg, #f8f9fa, #e9ecef);
    color: #495057;
    border-color: #6c757d;
}



/* Mobile responsiveness for control panel */
@media (max-width: 768px) {
    .accessibility-controls {
        bottom: 10px;
        right: 10px;
        max-width: 160px;
    }

    .accessibility-btn {
        padding: 0.5rem 0.8rem;
        font-size: 0.75rem;
        min-height: 36px;
    }

    .mode-status {
        font-size: 0.7rem;
        padding: 0.4rem 0.8rem;
    }
}

/* Ensure control panel appears above everything */
.accessibility-controls {
    z-index: 9999 !important;
}

.accessibility-controls * {
    z-index: 9999 !important;
}


/* Safe Mode - Comprehensive Migraine-Friendly Design */
html.safe-mode,
html.safe-mode body,
.safe-mode,
.safe-mode body {
    background: #1a1a1a !important;
    background-color: #1a1a1a !important;
    background-image: none !important;
}

/* Force dark on ALL elements in safe mode */
html.safe-mode *,
.safe-mode * {
    background-color: transparent !important;
    background-image: none !important;
}

/* Main containers get dark backgrounds */
.safe-mode .main-content,
.safe-mode .content-wrapper,
.safe-mode .container,
.safe-mode article,
.safe-mode .sidebar,
.safe-mode header,
.safe-mode footer {
    background: #2d2d2d !important;
    background-color: #2d2d2d !important;
    background-image: none !important;
    border: 1px solid #404040 !important;
}

/* Header and navigation in safe mode */
.safe-mode header {
    background: #1a1a1a !important;
    background-color: #1a1a1a !important;
    border-bottom: 1px solid #404040 !important;
}

/* Ensure all text is readable on dark background */
.safe-mode,
.safe-mode * {
    color: #e0e0e0 !important;
}

.safe-mode h1,
.safe-mode h2,
.safe-mode h3,
.safe-mode h4,
.safe-mode h5,
.safe-mode h6 {
    color: #f0f0f0 !important;
    border-color: #404040 !important;
    text-shadow: none !important;
}

/* Button styling in safe mode */
.safe-mode button,
.safe-mode .view-toggle {
    background: #404040 !important;
    color: #e0e0e0 !important;
    border: 1px solid #606060 !important;
}

.safe-mode button:hover,
.safe-mode .view-toggle:hover {
    background: #505050 !important;
}

/* Remove ALL animations and transitions in safe mode */
.safe-mode *,
.safe-mode *::before,
.safe-mode *::after {
    animation: none !important;
    transition: none !important;
    transform: none !important;
    box-shadow: none !important;
    text-shadow: none !important;
}

/* Remove decorative elements */
.safe-mode .site-title::before,
.safe-mode h1::before,
.safe-mode nav a::before,
.safe-mode footer::before {
    display: none !important;
}

/* Remove contamination warnings visual effects */
.safe-mode .contamination-warning,
.safe-mode .classified-banner {
    background: #404040 !important;
    border: 1px solid #606060 !important;
    color: #e0e0e0 !important;
}

/* Sidebar in safe mode */
.safe-mode .sidebar {
    background: #2d2d2d !important;
    border: 1px solid #404040 !important;
}

.safe-mode .sidebar::before {
    display: none !important;
}
/* Low Contrast Mode - Same pattern as Safe Mode */
html.low-contrast,
html.low-contrast body,
.low-contrast,
.low-contrast body {
    --text-primary: #d0d0d0 !important;
    --text-secondary: #b0b0b0 !important;
    --warning-yellow: #c8b000 !important;
    --toxic-green: #6ba000 !important;
    --danger-red: #cc4444 !important;
    --rust-orange: #d48800 !important;
}
