/* Scoped styles for Uutuuskirjat app */

/* Inherits variables from ../tyyli.css */
/* --accent: #DFAF2B; */
/* --radius: 12px; */

/* :root {
    --bg: #ffffff;
    --text: #111111;
    --text-soft: #555555;
    --border: #e5e5e5;
    --accent-soft: #FFF4D8;
} */




body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: #f6f8fa;
    color: #1f2328;
    line-height: 1.6;
    /* display: block; REVERTED - using flex from tyyli.css for sidebar layout */
}

/* Main Content Container */
main {
    max-width: 700px;
    margin: 0;
    /* Left align as requested */
    padding: 2rem 40px 4rem 40px;
    width: 100%;
}

/* Header */
/* Sidebar Styling (overrides tyyli.css header) */
/* Header */
/* Sidebar Styling (overrides tyyli.css header) */
/* Sidebar Styling (overrides tyyli.css header) - Scoped to avoid flash on default dark */
body.light-mode header {
    background: linear-gradient(180deg, #FF9900 0%, #FFCC00 100%) !important;
    color: white !important;
    border-right: none !important;
    box-shadow: 4px 0 12px rgba(255, 153, 0, 0.1);
}

body.light-mode header .app-title {
    color: white !important;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* HIGH SPECIFICITY to override tyyli.css */
body.light-mode header .app-title .app-title-com,
body.light-mode .app-title-com {
    color: #000000 !important;
    opacity: 0.8 !important;
    /* Slight transparency for style, remove if unwanted */
}

.app-logo-link {
    text-decoration: none;
    display: block;
}

body.light-mode header nav {
    padding-top: 1rem;
    border-left: none !important;
}

body.light-mode header nav ul,
body.light-mode header nav ul li {
    border-left: none !important;
}

body.light-mode header nav ul li a {
    color: rgba(255, 255, 255, 0.9) !important;
}

body.light-mode header nav ul li strong {
    color: white !important;
    border-left-color: white !important;
}

/* Fix for book.html where strong is inside a (avoids double border) */
body.light-mode header nav ul li a strong {
    border-left: none !important;
    padding-left: 0 !important;
    display: inline !important;
    /* Keep it inline within the link */
}

body.light-mode header nav ul li a:hover {
    color: white !important;
    background: rgba(255, 255, 255, 0.15);
    border-left-color: white !important;
    border-radius: 0 4px 4px 0;
}

/* Page Layout */
.filters-container {
    display: flex;
    align-items: center;
    gap: 12px;
}

.filter-label {
    font-weight: 600;
    color: #555;
    font-size: 0.95rem;
}

.app-header .subtitle {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.95);
    margin-top: 4px;
    font-weight: 500;
}

.beta-tag {
    background: rgba(255, 255, 255, 0.25);
    color: white;
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 0.75rem;
    vertical-align: middle;
    backdrop-filter: blur(4px);
    text-shadow: none;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* App Hero (Main Content Title) */
.app-hero {
    margin-bottom: 1.5rem;
    /* Reduced from 3rem */
    border-bottom: 1px solid #eaeef2;
    padding-bottom: 1rem;
    /* Reduced from 1.5rem */
}

.app-hero h1 {
    font-size: 3rem;
    font-weight: 800;
    letter-spacing: -2px;
    margin-bottom: 0.2rem;
    color: #1f2328;
}

.hero-subtitle {
    font-size: 1.1rem;
    color: #57606a;
    font-weight: 500;
}

.app-header a {
    text-decoration: none;
}

/* Sections */
section {
    margin-bottom: 2rem;
    /* Reduced from 3rem */
}

.section-header {
    display: flex;
    justify-content: flex-start;
    /* Changed from space-between to keep items closer */
    align-items: center;
    gap: 2rem;
    /* Add spacing between title and controls */
    margin-bottom: 1rem;
    /* Reduced from 1.5rem */
}

h2 {
    font-size: 1.6rem;
    margin: 0;
    font-weight: 700;
    color: #24292f;
}

/* Controls & Filters */
.controls,
.filters {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.btn-text {
    background: none;
    border: none;
    color: #DFAF2B;
    /* Accent color */
    font-weight: 600;
    cursor: pointer;
    font-size: 0.95rem;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    transition: background 0.2s;
}

.btn-text:hover {
    background: rgba(223, 175, 43, 0.1);
    text-decoration: none;
}

/* Style Select Box */
select {
    padding: 0.6rem 2.8rem 0.6rem 1rem;
    /* Extra right padding for icon */
    border-radius: 8px;
    border: 1px solid #d0d7de;
    font-size: 0.9rem;
    background-color: white;
    cursor: pointer;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    /* Custom Arrow using SVG data URI */
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23333333' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.7rem center;
    background-size: 16px;
}

select:hover {
    border-color: #DFAF2B;
}

select:focus {
    outline: none;
    border-color: #DFAF2B;
    box-shadow: 0 0 0 3px rgba(223, 175, 43, 0.2);
}

/* Author List (Chips/Pills style) */
.author-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.author-chip {
    background: white;
    border: 1px solid #e1e4e8;
    padding: 8px 16px;
    border-radius: 99px;
    /* Pill shape */
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    position: relative;
    padding-right: 40px;
    /* Space for remove button */
    font-weight: 500;
}

.author-chip:hover {
    border-color: #DFAF2B;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.08);
}

.author-chip.active {
    background: #FFF8E1;
    /* Light yellow */
    border-color: #DFAF2B;
    color: #7b5e00;
    font-weight: 600;
}

.author-chip .count {
    background: #DFAF2B;
    color: #fff;
    font-size: 0.75rem;
    height: 18px;
    min-width: 18px;
    padding: 0 5px;
    border-radius: 9px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

.remove-author {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: transparent;
    color: #8c959f;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s;
}

.remove-author:hover {
    background: #ffebe9;
    color: #cf222e;
}

/* Book Grid */
.book-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 1rem;
}

.book-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    border: 1px solid transparent;
    position: relative;
    cursor: pointer;
}

.book-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.12);
    border-color: rgba(0, 0, 0, 0.04);
}

/* Detail Container (Moved from inline styles) */
#detail-container {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    margin-top: 2rem;
}

.cover-wrapper,
.book-cover-container {
    position: relative;
    aspect-ratio: 2/3;
    background: #f6f8fa;
    overflow: hidden;
    border-bottom: 1px solid #eaeef2;
}

.cover-wrapper img,
.book-cover-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.book-card:hover .cover-wrapper img,
.book-card:hover .book-cover-container img {
    transform: scale(1.05);
}

.btn-secondary {
    background: #f6f8fa;
    border: 1px solid #d0d7de;
    color: #24292f;
    font-size: 0.85rem;
    padding: 6px 12px;
    border-radius: 6px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-secondary:hover {
    background: #eaeef2;
    border-color: #bbc0c4;
}

.btn-accent {
    background: transparent;
    border: 1px solid transparent;
    color: #e6b800;
    /* Brighter yellow as requested */
    font-size: 0.9rem;
    padding: 6px 12px;
    border-radius: 6px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    letter-spacing: 0.01em;
}

.btn-accent:hover {
    background: rgba(255, 248, 225, 0.5);
    /* Very light, fresh yellow background */
    color: #e6b800;
    /* Keep the bright color, don't darken it */
    text-shadow: 0 0 1px rgba(230, 184, 0, 0.2);
    /* Subtle glow instead of color shift */
    text-decoration: none;
    transform: translateY(-1px);
}

.no-cover {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #8c959f;
    font-size: 0.9rem;
    text-align: center;
    padding: 1rem;
    background-color: #f3f3f3;
}

.book-info {
    padding: 10px;
    display: flex;
    flex-direction: column;
}

.book-info h3 {
    font-size: 0.95rem;
    line-height: 1.3;
    margin: 0 0 0.4rem 0;
    font-weight: 600;
    color: #1f2328;
}

.book-info .author {
    font-size: 0.9rem;
    color: #57606a;
    margin-bottom: 8px;
}

.year-tag {
    display: inline-block;
    background: #f6f8fa;
    border: 1px solid #d0d7de;
    color: #57606a;
    font-size: 0.75rem;
    padding: 2px 8px;
    border-radius: 12px;
    align-self: flex-start;
    font-weight: 500;
}

/* Series Badge */
.series-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(31, 35, 40, 0.9);
    color: #fff;
    font-size: 0.8rem;
    font-weight: 700;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    z-index: 5;
    cursor: help;
}

.series-tooltip {
    position: absolute;
    right: 10px;
    top: 10px;
    width: auto;
    white-space: nowrap;
    background: #24292f;
    color: white;
    padding: 0 12px 0 32px;
    border-radius: 14px;
    font-size: 0.8rem;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    pointer-events: none;
    height: 28px;
    display: flex;
    align-items: center;
    z-index: 4;
}

.series-badge:hover+.series-tooltip {
    opacity: 1;
    visibility: visible;
}

/* Search Panel */
.hidden {
    display: none !important;
}

.search-panel {
    background: white;
    border: 1px solid #d0d7de;
    padding: 1.5rem;
    margin-bottom: 1rem;
    /* Reduced margin */
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    /* Make panel hug the content (remove tail) */
}

.search-panel input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 1px solid #d0d7de;
    border-radius: 8px;
    min-width: 200px;
    /* Constrain width as requested */
    font-size: 1rem;
    transition: all 0.2s;
}

.search-panel input:focus {
    outline: none;
    border-color: #DFAF2B;
    box-shadow: 0 0 0 3px rgba(223, 175, 43, 0.2);
}

.search-panel button {
    padding: 0 1.5rem;
    background: #24292f;
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.search-panel button:hover {
    background: #424a53;
}

.search-results-container {
    width: 100%;
    margin-top: 12px;
    max-height: 250px;
    overflow-y: auto;
    border: 1px solid #e1e4e8;
    border-radius: 8px;
    background-color: white;
    /* Strong visual hints: inner shadows + custom scrollbar */
    box-shadow: inset 0 -4px 6px -4px rgba(0, 0, 0, 0.1);
}

/* Custom Scrollbar for visual clarity */
.search-results-container::-webkit-scrollbar {
    width: 8px;
}

.search-results-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.search-results-container::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

.search-results-container::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Custom scrollbar for the description to make it obvious */
.scrollable-content {
    max-height: 400px;
    overflow-y: auto;
    padding: 1rem;
    background: #ffffff;
    border: 1px solid #e1e4e8;
    border-radius: 8px;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.02);
}

.scrollable-content::-webkit-scrollbar {
    width: 6px;
}

.scrollable-content::-webkit-scrollbar-track {
    background: transparent;
    /* Cleaner look */
    border-radius: 3px;
}

.scrollable-content::-webkit-scrollbar-thumb {
    background: transparent;
    /* Hidden by default */
    border-radius: 3px;
    transition: background 0.3s;
}

.scrollable-content:hover::-webkit-scrollbar-thumb {
    background: #d0d7de;
    /* Visible on hover */
}

.scrollable-content::-webkit-scrollbar-thumb:hover {
    background: #b0b8c0;
    /* Darker when grabbing */
}

.search-results {
    width: 100%;
}

.search-result-item {
    padding: 12px 16px;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    font-size: 0.95rem;
    color: #24292f;
    display: flex;
    align-items: center;
    transition: background 0.1s;
}

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

.search-result-item:hover {
    background-color: #f6f8fa;
    color: #0969da;
    border-left: 3px solid #DFAF2B;
    padding-left: 13px;
    /* Compensate for border */
}

/* Footer */
.app-footer {
    margin-top: 80px;
    padding-top: 32px;
    border-top: 1px solid #eaeef2;
    text-align: center;
    color: #57606a;
    font-size: 0.9rem;
    padding-bottom: 48px;
}

.app-footer a {
    color: #0969da;
    text-decoration: none;
    font-weight: 500;
}

.app-footer a:hover {
    text-decoration: underline;
}

.app-footer .disclaimer {
    margin-top: 12px;
    font-size: 0.8rem;
    color: #8c959f;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Info Icon & Tooltip (Replaces Footer) */
.info-icon-container {
    position: relative;
    display: inline-block;
}

.info-icon {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 1.5px solid #8c959f;
    color: #8c959f;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    font-style: italic;
    cursor: help;
    transition: all 0.2s;
}

.info-icon:hover {
    border-color: #DFAF2B;
    color: #DFAF2B;
    background: #FFF8E1;
}

.info-tooltip {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 8px;
    width: 280px;
    background: white;
    border: 1px solid #d0d7de;
    border-radius: 8px;
    padding: 16px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-4px);
    transition: all 0.2s ease;
    z-index: 100;
    font-size: 0.85rem;
    color: #57606a;
    text-align: left;
    pointer-events: none;
    /* Let clicks pass through if hidden */
}

.info-icon-container:hover .info-tooltip,
.info-icon-container:focus-within .info-tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

.info-tooltip a {
    color: #0969da;
    text-decoration: none;
}

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

.info-tooltip p {
    margin-bottom: 8px;
}

.info-tooltip p:last-child {
    margin-bottom: 0;
    font-size: 0.75rem;
    color: #6e7781;
    margin-top: 8px;
    line-height: 1.4;
}

/* Current Year Highlight (2026 etc) */
.current-year {
    background-color: #fff9c4 !important;
    border: 1px solid #fdd835 !important;
    font-weight: 700;
}

/* Future/Unknown Year (2099 etc) - Yellow as requested */
.future-year {
    background-color: #fff3cd !important;
    border: 1px solid #ffeeba !important;
    color: #856404 !important;
    font-weight: 600;
}

/* ISBN Pill */
.isbn-pill {
    font-size: 0.75rem;
    font-weight: 600;
    color: #57606a;
    background: #f3f4f6;
    padding: 2px 8px;
    border-radius: 999px;
    border: 1px solid #d0d7de;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    line-height: 1.4;
}

.isbn-pill:hover {
    background: #eef1f4;
    color: #0969da;
    border-color: #0969da;
}

.isbn-pill:active {
    background: #e4e6ea;
    transform: translateY(1px);
}

/* -----------------------------------------
/* -----------------------------------------
   Dark Mode (Deep Blue / Navy Slate)
   Colors:
   Bg: #0f172a (Slate 900)
   Card: #1e293b (Slate 800)
   Text Main: #f1f5f9 (Slate 100)
   Text Muted: #94a3b8 (Slate 400)
   Border: #334155 (Slate 700)
------------------------------------------ */

body.dark-mode,
body.dark-mode .content-wrapper,
body.dark-mode main {
    background-color: #0f172a !important;
    color: #f1f5f9 !important;
}

body.dark-mode .app-hero h1,
body.dark-mode h2,
body.dark-mode h3,
body.dark-mode .filter-label {
    color: #f1f5f9 !important;
}

body.dark-mode .hero-subtitle,
body.dark-mode p {
    color: #cbd5e1 !important;
}

/* Sidebar / Header Override */
/* User: "tummansininen toimii erinomaisesti". The orange sidebar is branding, but maybe we can darken it slightly or keep it.
   Current issue: layout background is white. Fixed above. */

body.dark-mode nav ul li a {
    color: rgba(255, 255, 255, 0.7) !important;
}

body.dark-mode nav ul li a:hover {
    color: white !important;
}

/* Cards */
body.dark-mode .book-card,
body.dark-mode .search-panel,
body.dark-mode #detail-container,
body.dark-mode .scrollable-content {
    background-color: #1e293b !important;
    /* Ensure bg color wins */
    background: #1e293b !important;
    border-color: #334155 !important;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3) !important;
}

body.dark-mode .book-info h3 {
    color: #e2e8f0 !important;
}

body.dark-mode .book-info .author {
    color: #94a3b8 !important;
}

/* Inputs */
body.dark-mode select,
body.dark-mode input {
    background-color: #0f172a !important;
    border-color: #334155 !important;
    color: #f1f5f9 !important;
}

/* Search results */
body.dark-mode .search-results-container {
    background-color: #1e293b !important;
    border-color: #334155 !important;
}

body.dark-mode .search-result-item {
    color: #e2e8f0 !important;
    border-bottom-color: #334155 !important;
}

body.dark-mode .search-result-item:hover {
    background-color: #334155 !important;
    color: #38bdf8 !important;
}

/* Tags */
body.dark-mode .year-tag,
body.dark-mode .isbn-pill {
    background: #0f172a !important;
    border-color: #334155 !important;
    color: #cbd5e1 !important;
}

body.dark-mode .isbn-pill:hover {
    border-color: #38bdf8 !important;
    color: #38bdf8 !important;
}


/* Chips */
body.dark-mode .author-chip {
    background: #1e293b !important;
    border-color: #334155 !important;
    color: #e2e8f0 !important;
}

body.dark-mode .author-chip:hover {
    border-color: #38bdf8 !important;
    box-shadow: 0 0 0 1px #38bdf8 !important;
}

/* Active Chip specifically */
body.dark-mode .author-chip.active {
    background-color: #334155 !important;
    border-color: #fbbf24 !important;
    /* Amber border */
    color: #fbbf24 !important;
}

body.dark-mode .author-chip.active .count {
    background-color: #fbbf24 !important;
    color: #1e293b !important;
}

/* Manual Date Tag (Yellow) override & Current Year */
/* "Hillitympi" dark mode style: Transparent bg + Yellow Border/Text */
body.dark-mode span[style*="background:#fff9c4"],
body.dark-mode .year-tag.current-year {
    background-color: transparent !important;
    background: transparent !important;
    border: 1px solid #fbbf24 !important;
    /* Amber border */
    color: #fbbf24 !important;
}

/* Also target class if needed later, but style* selector works for inline styles */

/* Footer & Links */
body.dark-mode .app-footer {
    border-top-color: #334155 !important;
}

body.dark-mode a {
    color: #38bdf8 !important;
    /* Ensure links correspond to dark theme */
}

body.dark-mode .app-title .app-title-com {
    color: #fbbf24 !important;
    /* Yellow logo text in dark mode */
}

/* Dark Mode Sidebar Override */
body.dark-mode header {
    background: #0f172a !important;
    /* Dark Slate to match body, or slightly different */
    background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%) !important;
    border-right-color: #334155 !important;
    box-shadow: 4px 0 12px rgba(0, 0, 0, 0.3) !important;
}

body.dark-mode header .app-title {
    color: #f1f5f9 !important;
    border-left: none !important;
}

body.dark-mode .app-logo-link {
    border-left: none !important;
}

body.dark-mode header nav ul li strong {
    color: #f1f5f9 !important;
    border-left: 3px solid #38bdf8 !important;
    background: rgba(56, 189, 248, 0.1) !important;
    border-radius: 0 4px 4px 0 !important;
}

body.dark-mode header nav ul li a strong {
    border-left: none !important;
    background: none !important;
    padding-left: 0 !important;
}

body.dark-mode header nav ul li a {
    color: #94a3b8 !important;
}

body.dark-mode header nav ul li a:hover {
    color: #38bdf8 !important;
    background: rgba(56, 189, 248, 0.1);
    border-left-color: #38bdf8 !important;
}

body.dark-mode .app-title-com {
    color: #38bdf8 !important;
}

/* Info Icon - Floating Position */
.info-icon-container {
    position: fixed;
    top: 90px;
    /* More space below the 20px + 40px toggle */
    right: 20px;
    width: 40px;
    /* Match toggle width for alignment */
    z-index: 1000;
    display: flex;
    justify-content: center;
}

/* Dark Mode Tooltip */
body.dark-mode .info-tooltip {
    background-color: #1e293b;
    border-color: #334155;
    color: #f1f5f9;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

body.dark-mode .info-tooltip a {
    color: #38bdf8 !important;
}

/* Toggle Button Style */
.theme-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid #d0d7de;
    background: white;
    color: #24292f;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    transition: all 0.2s;
}

body.dark-mode .theme-toggle {
    background: #1e293b;
    border-color: #334155;
    color: #fbbf24;
}

.theme-toggle:hover {
    transform: scale(1.1);
}

/* Search Button High Contrast Override for Dark Mode */
body.dark-mode .search-panel button {
    background-color: #334155 !important;
    border: 1px solid #94a3b8 !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2) !important;
}

body.dark-mode .search-panel button:hover {
    background-color: #475569 !important;
    border-color: #f1f5f9 !important;
}