@import url('https://fonts.googleapis.com/css2?family=Merriweather:ital,opsz,wght@0,18..144,300..900;1,18..144,300..900&display=swap');

/* --- Light Theme (Default) --- */
:root {
    --primary-color: #C19A4E; /* Weicheres DOJ Gold */
    --primary-dark: #9D7E3B; /* Dunkleres Gold */
    --primary-light: #E5D4A8; /* Helleres Gold */
    --secondary-color: #2c3549; /* Sanfteres Navy Blue */
    --accent-color: #3d4660; /* Lighter Navy */
    --text-color: #2d3748; /* Weicheres dunkles Grau */
    --text-muted: #718096; /* Gedämpfter Text */
    --background-color: #f7fafc; /* Sehr heller Hintergrund */
    --paper-color: #ffffff; /* Reines Weiß für Content */
    --border-color: #e2e8f0; /* Sanfte Border-Farbe */
    --hover-color: #fafbfc; /* Hover-Farbe */
    --active-color: #fef8e7; /* Aktive Farbe - Sanftes Gold Tint */
    --success-color: #38a169; /* Erfolg/Verfügbar */
    --warning-color: #dd6b20; /* Warnung */
    --error-color: #e53e3e; /* Fehler */
    --border-radius: 8px; /* Modernere Rundungen */
    --border-radius-lg: 12px; /* Große Rundungen */
    --transition-speed: 0.3s; /* Sanftere Übergänge */
    --box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.04);
    --box-shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.08), 0 4px 6px rgba(0, 0, 0, 0.04);
    --gradient-primary: linear-gradient(135deg, #C19A4E 0%, #9D7E3B 100%);
    --gradient-secondary: linear-gradient(135deg, #f0f4f8 0%, #e2e8f0 100%);
    --gradient-gold: linear-gradient(145deg, #E5D4A8 0%, #C19A4E 50%, #9D7E3B 100%);
}

/* --- Dark Theme --- */
body.dark-mode {
    --primary-color: #F4E4B0; /* Helles Gold für Dark Mode */
    --primary-dark: #D4AF37; /* Standard Gold */
    --primary-light: #FFF8DC; /* Sehr helles Gold */
    --secondary-color: #0f1729; /* Sehr dunkles Navy */
    --accent-color: #1a2340; /* Mittleres Navy */
    --text-color: #f1f5f9; /* Heller Text */
    --text-muted: #94a3b8; /* Gedämpfter Text */
    --background-color: #050810; /* Sehr dunkler Hintergrund */
    --paper-color: #0f1729; /* Dunkle Content-Karten */
    --border-color: #2a3254; /* Dunkle Borders mit Navy */
    --hover-color: #1a2340; /* Hover-Farbe */
    --active-color: #2d3548; /* Aktive Farbe */
    --success-color: #22c55e; /* Erfolg */
    --warning-color: #fbbf24; /* Warnung */
    --error-color: #f87171; /* Fehler */
    --gradient-primary: linear-gradient(135deg, #F4E4B0 0%, #D4AF37 100%);
    --gradient-secondary: linear-gradient(135deg, #0f1729 0%, #1a2340 100%);
    --gradient-gold: linear-gradient(145deg, #FFF8DC 0%, #F4E4B0 50%, #D4AF37 100%);
}


/* General Resets and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Merriweather', serif;
    background: var(--background-color);
    color: var(--text-color);
    line-height: 1.7;
    min-height: 100vh;
    overflow: hidden;
    transition: background-color var(--transition-speed), color var(--transition-speed);
    
    /* Chromium/FiveM Font-Rendering Optimierung */
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: subpixel-antialiased;
    -moz-osx-font-smoothing: auto;
    font-smooth: always;
    -webkit-font-feature-settings: "liga", "kern";
    font-feature-settings: "liga", "kern";
    
    /* Verhindern von Blur bei Transforms */
    -webkit-backface-visibility: hidden;
    -moz-backface-visibility: hidden;
    backface-visibility: hidden;
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
}

::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--secondary-color);
}

::-webkit-scrollbar-thumb {
    background-color: var(--border-color);
    border-radius: 10px;
    border: 2px solid var(--secondary-color);
}

::-webkit-scrollbar-thumb:hover {
    background-color: var(--primary-color);
}

/* Light Mode Scrollbar */
body:not(.dark-mode) ::-webkit-scrollbar-track {
    background: #f0f4f8;
}

body:not(.dark-mode) ::-webkit-scrollbar-thumb {
    background-color: rgba(193, 154, 78, 0.3);
    border-color: #f0f4f8;
}

body:not(.dark-mode) ::-webkit-scrollbar-thumb:hover {
    background-color: rgba(193, 154, 78, 0.5);
}

/* Main Layout */
.tablet-frame {
    width: 100%;
    height: 100vh;
    padding-top: 40px; /* Reduced status bar height */
    background-color: var(--background-color);
    transition: background-color var(--transition-speed);
}

.tablet-content {
    height: 100%;
    display: flex;
    background: var(--paper-color);
    border-top: 1px solid var(--border-color);
    transition: background-color var(--transition-speed), border-color var(--transition-speed);
}

/* Status Bar */
.status-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 50px;
    padding: 0 28px;
    background: linear-gradient(180deg, #0a0d1a 0%, #1a1f3a 100%);
    backdrop-filter: blur(12px);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
    font-weight: 600;
    z-index: 1000;
    border-bottom: 2px solid rgba(212, 175, 55, 0.2);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    transition: all var(--transition-speed);
}

/* Light Mode Status Bar */
body:not(.dark-mode) .status-bar {
    background: linear-gradient(180deg, #2c3549 0%, #3d4660 100%);
    border-bottom-color: rgba(193, 154, 78, 0.25);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

body:not(.dark-mode) .status-bar::after {
    color: var(--primary-color);
    text-shadow: 0 0 8px rgba(193, 154, 78, 0.25);
}

.status-bar-left,
.status-bar-right {
    display: flex;
    gap: 15px;
    align-items: center;
}

.status-item {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #cbd5e1;
    font-weight: 600;
    letter-spacing: 0.05em;
    transition: all var(--transition-speed);
}

.status-item:hover {
    color: var(--primary-color);
}

.status-icon {
    color: var(--primary-color);
    font-size: 1rem;
    transition: all var(--transition-speed);
    filter: drop-shadow(0 0 4px rgba(212, 175, 55, 0.4));
}

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


/* Sidebar */
.sidebar {
    flex: 0 0 80px; /* Schmale Breite standardmäßig */
    width: 80px;
    background: linear-gradient(180deg, rgba(26, 31, 58, 0.4) 0%, rgba(15, 23, 41, 0.6) 100%);
    padding: 24px 16px; /* Padding anpassen */
    overflow-y: auto;
    overflow-x: hidden; /* Horizontalen Overflow verhindern */
    border-right: 2px solid rgba(212, 175, 55, 0.15);
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    scrollbar-width: none;
    position: relative;
    z-index: 100; /* Sidebar über den Inhalt legen */
}

.sidebar:hover {
    flex: 0 0 300px; /* Breite beim Hover */
    width: 300px;
    align-items: flex-start;
}

/* Light Mode Sidebar */
body:not(.dark-mode) .sidebar {
    background: linear-gradient(180deg, #f0f4f8 0%, #e8eef5 100%);
    border-right-color: rgba(193, 154, 78, 0.2);
    box-shadow: 4px 0 15px rgba(0, 0, 0, 0.05);
}

.sidebar::-webkit-scrollbar {
    width: 0;
    height: 0;
}

.sidebar::after {
    content: '»';
    position: absolute;
    top: 20px; /* Weiter nach oben verschoben */
    left: 50%;
    transform: translateX(-50%);
    font-size: 1.5rem;
    color: var(--primary-color);
    opacity: 0.6;
    transition: all 0.3s ease;
    animation: pulse-chevron 2s infinite ease-in-out;
}

@keyframes pulse-chevron {
    0%, 100% {
        transform: translateX(-50%) scale(1);
        opacity: 0.6;
    }
    50% {
        transform: translateX(-50%) scale(1.2);
        opacity: 1;
    }
}

.sidebar::before {
    content: 'Öffnen';
    position: absolute;
    top: 50px; /* Positionierung unter dem Chevron */
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-muted);
    opacity: 0.7;
    transition: opacity 0.3s ease;
    white-space: nowrap;
}

.sidebar:hover::after,
.sidebar:hover::before {
    opacity: 0;
    animation: none; /* Animation beim Hover stoppen */
}

/* Klickbare Fläche für den Hinweis vergrößern */
.sidebar-expand-trigger {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 90px; /* Höhe des sichtbaren Hinweis-Bereichs angepasst */
    cursor: pointer;
    z-index: 1; /* Über den Pseudo-Elementen */
}

.sidebar h2 {
    font-family: 'Merriweather', serif;
    font-weight: 700;
    margin-bottom: 28px;
    color: var(--primary-color);
    text-align: left;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-size: 0.85rem;
    padding-bottom: 14px;
    border-bottom: 2px solid rgba(212, 175, 55, 0.3);
    transition: all var(--transition-speed);
    position: relative;
    white-space: nowrap; /* Verhindert Umbruch */
    opacity: 0; /* Standardmäßig ausblenden */
    transform: translateX(-10px); /* Leichte Animation */
}

.sidebar:hover h2 {
    opacity: 1;
    transform: translateX(0);
}

/* Light Mode Sidebar Titel */
body:not(.dark-mode) .sidebar h2 {
    border-bottom-color: rgba(193, 154, 78, 0.3);
}

.sidebar h2::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 50px;
    height: 2px;
    background: var(--gradient-gold);
    border-radius: 1px;
    box-shadow: 0 0 8px rgba(212, 175, 55, 0.5);
}

.sidebar ul {
    list-style: none;
    padding-left: 0;
}

.sidebar li {
    margin-bottom: 5px;
}

.sidebar li a {
    color: var(--text-color);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    padding: 14px;
    border-radius: 10px;
    transition: all var(--transition-speed) cubic-bezier(0.4, 0, 0.2, 1);
    border-left: 3px solid transparent;
    margin-bottom: 6px;
    position: relative;
    overflow: hidden;
    white-space: nowrap; /* Text nicht umbrechen */
}

.sidebar li a span {
    opacity: 0; /* Text standardmäßig ausblenden */
    transition: opacity 0.2s ease-in-out, transform 0.2s ease-in-out;
    transform: translateX(-10px);
}

.sidebar:hover li a span {
    opacity: 1;
    transform: translateX(0);
    transition-delay: 0.1s; /* Leichte Verzögerung für schönen Effekt */
}

.sidebar li a::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background: var(--gradient-gold);
    opacity: 0.08;
    transition: width var(--transition-speed);
}

.sidebar li a:hover::before {
    width: 100%;
}

.sidebar li a i {
    margin-right: 14px;
    font-size: 1.1rem; /* Icons etwas größer machen */
    color: var(--primary-color);
    opacity: 0.8;
    transition: all var(--transition-speed);
    min-width: 24px; /* Feste Breite für das Icon, um Sprünge zu vermeiden */
    text-align: center;
}

.sidebar .icon-collapsed {
    font-size: 0.4rem;
    opacity: 0.6;
}

.sidebar .icon-full {
    display: none;
}

.sidebar:hover .icon-collapsed {
    display: none;
}

.sidebar:hover .icon-full {
    display: inline-block;
}


.sidebar:hover li a i.icon-full {
    font-size: 0.95rem; /* Icongröße im aufgeklappten Zustand anpassen */
}

.sidebar li a:hover {
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.08), rgba(212, 175, 55, 0.12));
    color: var(--primary-dark);
    transform: translateX(6px);
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.2);
    border-left-color: var(--primary-color);
}

.sidebar li a:hover i {
    opacity: 1;
    transform: scale(1.15);
}

.sidebar li a.active {
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.12), rgba(212, 175, 55, 0.18));
    border-left: 3px solid var(--primary-color);
    font-weight: 600;
    color: var(--primary-dark);
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.25);
}

.sidebar li a.active i {
    opacity: 1;
}

/* Main Content Area */
.main-content {
    flex: 1 1 auto;
    min-width: 0;
    padding: 28px 32px;
    overflow-y: auto;
    scroll-behavior: smooth;
    background-color: var(--paper-color);
    transition: background-color var(--transition-speed), margin-left var(--transition-speed);
    margin-left: 80px; /* Platz für die schmale Sidebar schaffen */
}

/* Header - DOJ Style */
.header {
    background: linear-gradient(160deg, #0a0d1a 0%, #1a1f3a 50%, #0f1729 100%);
    padding: 2.5rem 2rem;
    border-radius: 20px;
    margin-bottom: 2rem;
    text-align: center;
    border: 2px solid #2a3254;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6), 
                0 0 0 1px rgba(212, 175, 55, 0.1),
                inset 0 1px 0 rgba(212, 175, 55, 0.1);
    transition: all var(--transition-speed);
    position: relative;
    overflow: hidden;
    
    /* Scharf-Rendering für Chromium */
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
}

.header::before {
    content: '';
    position: absolute;
    inset: 0;
    background: 
        radial-gradient(circle at top center, rgba(212, 175, 55, 0.08), transparent 60%),
        radial-gradient(circle at bottom center, rgba(26, 31, 58, 0.6), transparent 70%);
    pointer-events: none;
}

.header::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-gold);
    opacity: 0.6;
}

/* Light Mode Header Anpassungen */
body:not(.dark-mode) .header {
    background: linear-gradient(160deg, #2c3549 0%, #3d4660 50%, #2c3549 100%);
    border-color: rgba(193, 154, 78, 0.2);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.12), 
                0 0 0 1px rgba(193, 154, 78, 0.15),
                inset 0 1px 0 rgba(193, 154, 78, 0.08);
}

body:not(.dark-mode) .header::before {
    background: 
        radial-gradient(circle at top center, rgba(193, 154, 78, 0.06), transparent 60%),
        radial-gradient(circle at bottom center, rgba(44, 53, 73, 0.4), transparent 70%);
}

body:not(.dark-mode) .header::after {
    opacity: 0.5;
}

.header-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    position: relative;
    z-index: 1;
}

.header-emblem {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    position: relative;
}

/* DOJ Badge/Siegel */
.emblem-circle {
    display: grid;
    place-items: center;
    width: 95px;
    height: 95px;
    border-radius: 50%;
    background: 
        radial-gradient(circle at 35% 35%, #F4E4B0, #D4AF37 45%, #B8860B 80%, #8B6914);
    box-shadow: 
        0 0 0 3px #1a1f3a,
        0 0 0 5px #D4AF37,
        0 0 0 6px #1a1f3a,
        0 15px 35px rgba(0, 0, 0, 0.5),
        inset 0 2px 5px rgba(255, 255, 255, 0.3),
        inset 0 -2px 5px rgba(0, 0, 0, 0.3);
    color: #0f1729;
    font-size: 2.2rem;
    position: relative;
    animation: badgeGlow 3s ease-in-out infinite;
}

@keyframes badgeGlow {
    0%, 100% {
        box-shadow: 
            0 0 0 3px #1a1f3a,
            0 0 0 5px #D4AF37,
            0 0 0 6px #1a1f3a,
            0 15px 35px rgba(0, 0, 0, 0.5),
            inset 0 2px 5px rgba(255, 255, 255, 0.3),
            inset 0 -2px 5px rgba(0, 0, 0, 0.3);
    }
    50% {
        box-shadow: 
            0 0 0 3px #1a1f3a,
            0 0 0 5px #D4AF37,
            0 0 0 6px #1a1f3a,
            0 15px 35px rgba(0, 0, 0, 0.5),
            0 0 25px rgba(212, 175, 55, 0.4),
            inset 0 2px 5px rgba(255, 255, 255, 0.3),
            inset 0 -2px 5px rgba(0, 0, 0, 0.3);
    }
}

.emblem-circle::before {
    content: '';
    position: absolute;
    inset: 8px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 35%, rgba(255, 255, 255, 0.2), transparent 60%);
    pointer-events: none;
}

.emblem-flag {
    display: none;
}

.header-text {
    text-align: center;
}

.header-label {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 1.2rem;
    border-radius: 999px;
    font-size: 0.7rem;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: #D4AF37;
    background: rgba(212, 175, 55, 0.1);
    border: 1px solid rgba(212, 175, 55, 0.3);
    font-weight: 600;
    font-family: 'Merriweather', serif;
}

.header-title {
    font-family: 'Merriweather', serif;
    font-size: 2.2rem;
    font-weight: 800;
    background: var(--gradient-gold);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0.8rem 0 0.4rem;
    letter-spacing: 0.02em;
    text-shadow: 0 2px 10px rgba(212, 175, 55, 0.3);
    
    /* Chromium Font-Rendering Fix */
    -webkit-font-smoothing: subpixel-antialiased;
    -moz-osx-font-smoothing: auto;
    paint-order: stroke fill;
}

.header-subtitle {
    color: #94a3b8;
    font-size: 0.85rem;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    font-weight: 500;
}

.header-subtitle::after {
    content: '';
    display: block;
    width: 80px;
    height: 2px;
    background: var(--gradient-gold);
    margin: 0.8rem auto 0;
    opacity: 0.6;
}

.header-divider {
    width: 120px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(212, 175, 55, 0.5), transparent);
    margin: 1rem auto 0.5rem;
    position: relative;
}

.header-divider::before {
    content: '⚖';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #0a0d1a;
    padding: 0 12px;
    color: var(--primary-color);
    font-size: 0.9rem;
}

.greeting {
    margin-top: 0.5rem;
    color: #cbd5e1;
    font-size: 0.9rem;
    font-weight: 500;
    letter-spacing: 0.05em;
    font-style: italic;
}


/* Search Bar */
.search-container {
    position: relative;
    margin-bottom: 2rem;
    max-width: min(650px, 92%);
    margin-left: auto;
    margin-right: auto;
}

.search-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

.search-input {
    position: relative; /* Behebt das Icon-Overlap-Problem */
    width: 100%;
    background: var(--paper-color);
    border: 2px solid var(--border-color);
    border-radius: 14px;
    color: var(--text-color);
    font-size: 0.95rem;
    font-family: 'Merriweather', serif;
    font-weight: 500;
    transition: all var(--transition-speed) cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    padding: 1rem 100px 1rem 3.5rem;
    
    /* Font-Rendering */
    -webkit-font-smoothing: subpixel-antialiased;
    -moz-osx-font-smoothing: auto;
}

.search-input::placeholder {
    color: var(--text-muted);
    opacity: 0.6;
    transition: opacity var(--transition-speed);
}

.search-input:focus::placeholder {
    opacity: 0.4;
}

/* Light Mode Search Input */
body:not(.dark-mode) .search-input {
    border-color: rgba(193, 154, 78, 0.2);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
}

body:not(.dark-mode) .search-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(193, 154, 78, 0.12), 
                0 6px 20px rgba(0, 0, 0, 0.06);
}

.search-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(212, 175, 55, 0.15), 
                0 8px 25px rgba(0, 0, 0, 0.1);
    outline: none;
}

/* Search Results Count */
.search-results-count {
    margin-top: 0.8rem;
    padding: 0.6rem 1rem;
    background: linear-gradient(135deg, rgba(193, 154, 78, 0.08), rgba(193, 154, 78, 0.12));
    border: 1px solid rgba(193, 154, 78, 0.2);
    border-radius: 8px;
    color: var(--text-color);
    font-size: 0.85rem;
    font-weight: 600;
    text-align: center;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

body.dark-mode .search-results-count {
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.1), rgba(212, 175, 55, 0.15));
    border-color: rgba(212, 175, 55, 0.25);
}

.search-input::placeholder {
    color: var(--text-muted);
    font-weight: 400;
}

.search-icon {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 1.1rem;
    transition: all var(--transition-speed);
    pointer-events: none;
    user-select: none;
}

.search-wrapper:focus-within .search-icon {
    color: var(--primary-color);
    transform: translateY(-50%) scale(1.05);
}

.search-clear {
    position: absolute;
    right: 90px;
    top: 50%;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(239, 68, 68, 0.1);
    border: none;
    color: #ef4444;
    cursor: pointer;
    transition: all var(--transition-speed);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    opacity: 0.7;
}

.search-clear:hover {
    background: #ef4444;
    color: white;
    opacity: 1;
    transform: translateY(-50%) scale(1.1);
}

.search-clear:active {
    transform: translateY(-50%) scale(0.95);
}

.search-shortcut {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    background: linear-gradient(135deg, rgba(26, 31, 58, 0.8), rgba(42, 50, 84, 0.6));
    padding: 5px 10px;
    border-radius: 6px;
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--primary-color);
    border: 1px solid rgba(212, 175, 55, 0.3);
    transition: all var(--transition-speed);
    letter-spacing: 0.8px;
    pointer-events: none;
    user-select: none;
}

/* Light Mode Search Shortcut */
body:not(.dark-mode) .search-shortcut {
    background: linear-gradient(135deg, rgba(193, 154, 78, 0.12), rgba(193, 154, 78, 0.18));
    border-color: rgba(193, 154, 78, 0.35);
}

.search-wrapper:focus-within .search-shortcut {
    opacity: 0.5;
    transform: translateY(-50%) scale(0.95);
}

.search-highlight {
    background: linear-gradient(135deg, rgba(193, 154, 78, 0.3), rgba(193, 154, 78, 0.4));
    padding: 2px 4px;
    border-radius: 4px;
    font-weight: 600;
    color: var(--text-color);
    box-shadow: 0 0 0 1px rgba(193, 154, 78, 0.3);
    transition: all var(--transition-speed);
}

body.dark-mode .search-highlight {
    background: linear-gradient(135deg, rgba(244, 228, 176, 0.25), rgba(212, 175, 55, 0.35));
    color: #fff8dc;
    box-shadow: 0 0 0 1px rgba(212, 175, 55, 0.4);
}


/* Law Content */
.law-container {
    max-width: 98%;
    margin: 0 auto;
}

.law-section {
    background: var(--paper-color);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    margin-bottom: 1.8rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08), 
                0 0 0 1px rgba(212, 175, 55, 0.1);
    transition: all var(--transition-speed) cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    display: block;
    
    /* Chromium Font-Rendering Fix */
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}

/* Light Mode Law Section */
body:not(.dark-mode) .law-section {
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04), 
                0 0 0 1px rgba(193, 154, 78, 0.08);
    border-color: rgba(193, 154, 78, 0.12);
}

body:not(.dark-mode) .law-section:hover {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08),
                0 0 0 1px rgba(193, 154, 78, 0.15),
                0 0 20px rgba(193, 154, 78, 0.06);
    border-color: rgba(193, 154, 78, 0.2);
}

.law-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-gold);
    opacity: 0;
    transition: opacity var(--transition-speed);
}

.law-section::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at top right, rgba(212, 175, 55, 0.03), transparent 60%);
    pointer-events: none;
    opacity: 0;
    transition: opacity var(--transition-speed);
}

.law-section:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15),
                0 0 0 1px rgba(212, 175, 55, 0.2),
                0 0 30px rgba(212, 175, 55, 0.1);
    border-color: rgba(212, 175, 55, 0.3);
}

.law-section:hover::before {
    opacity: 1;
}

.law-section:hover::after {
    opacity: 1;
}

.section-header {
    padding: 1.4rem 1.8rem;
    background: linear-gradient(135deg, rgba(26, 31, 58, 0.03) 0%, rgba(212, 175, 55, 0.03) 100%);
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: default;
    border-bottom: 2px solid rgba(212, 175, 55, 0.15);
    border-top-left-radius: 16px;
    border-top-right-radius: 16px;
    transition: all var(--transition-speed);
    position: relative;
}

/* Light Mode Section Header */
body:not(.dark-mode) .section-header {
    background: linear-gradient(135deg, rgba(193, 154, 78, 0.04) 0%, rgba(193, 154, 78, 0.06) 100%);
    border-bottom-color: rgba(193, 154, 78, 0.15);
}

body:not(.dark-mode) .section-header:hover {
    background: linear-gradient(135deg, rgba(193, 154, 78, 0.06) 0%, rgba(193, 154, 78, 0.1) 100%);
}

.section-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-gold);
    opacity: 0;
    transition: opacity var(--transition-speed);
}

.section-header:hover {
    background: linear-gradient(135deg, rgba(26, 31, 58, 0.05) 0%, rgba(212, 175, 55, 0.08) 100%);
}

.section-header:hover::before {
    opacity: 0.8;
}

.section-header-left {
    display: flex;
    align-items: center;
    gap: 1.2rem;
}

.section-header-left .fa-gavel {
    color: var(--primary-color);
    font-size: 1.4rem;
    transition: all var(--transition-speed);
    filter: drop-shadow(0 2px 4px rgba(212, 175, 55, 0.3));
}

.section-header:hover .section-header-left .fa-gavel {
    transform: scale(1.15) rotate(-10deg);
    filter: drop-shadow(0 4px 8px rgba(212, 175, 55, 0.5));
}

.section-header-left span {
    font-family: 'Merriweather', serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-color);
    letter-spacing: 0.3px;
    transition: all var(--transition-speed);
    
    /* Font-Rendering */
    -webkit-font-smoothing: subpixel-antialiased;
    -moz-osx-font-smoothing: auto;
}

.section-header:hover .section-header-left span {
    color: var(--primary-dark);
}

.law-content {
    padding: 0.5rem;
    display: block !important;
    visibility: visible !important;
}

.law-subsection {
    margin-bottom: 1.8rem;
    border-bottom: 1px solid rgba(212, 175, 55, 0.15);
    border-radius: 12px;
    position: relative;
    overflow: visible;
    display: block;
    transition: all var(--transition-speed);
}

.law-subsection:last-child {
    margin-bottom: 0;
    border-bottom: none;
}

.law-subsection:hover {
    border-bottom-color: rgba(212, 175, 55, 0.3);
}



/* Gruppierung - Container für Header-Content Paare */
.law-subsection-header,
.law-subsection-content {
    position: relative;
}

.law-subsection-header {
    font-family: 'Merriweather', serif;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary-dark);
    margin-bottom: 0;
    display: flex !important;
    align-items: center;
    cursor: default;
    padding: 1.1rem 1.5rem;
    border-radius: 12px 12px 0 0;
    position: relative;
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.04) 0%, rgba(212, 175, 55, 0.08) 100%);
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-bottom: none;
    visibility: visible !important;
    opacity: 1 !important;
    transition: all var(--transition-speed);
    
    /* Chromium Font-Rendering Fix */
    -webkit-font-smoothing: subpixel-antialiased;
    -moz-osx-font-smoothing: auto;
}

/* Light Mode Subsection Header */
body:not(.dark-mode) .law-subsection-header {
    background: linear-gradient(135deg, rgba(193, 154, 78, 0.06) 0%, rgba(193, 154, 78, 0.1) 100%);
    border-color: rgba(193, 154, 78, 0.18);
}

.law-subsection-header::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 5px;
    background: var(--gradient-gold);
    border-radius: 12px 0 0 0;
    opacity: 0.6;
    transition: all var(--transition-speed);
}

.law-subsection-header:hover::before {
    opacity: 1;
    width: 6px;
}

.law-subsection-header i {
    font-size: 1.1rem;
    margin-right: 14px;
    color: var(--primary-color);
    transition: all var(--transition-speed);
}

.law-subsection-header:hover i {
    transform: scale(1.1);
}


.law-subsection-content {
    font-family: 'Merriweather', serif;
    font-size: 1rem;
    line-height: 1.7; /* Etwas mehr Zeilenabstand für bessere Lesbarkeit */
    color: var(--text-color);
    text-align: justify;
    background: var(--paper-color);
    border-radius: 0 0 12px 12px;
    padding: 0.8rem 1.8rem;
    margin-top: 0;
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-top: none;
    position: relative;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    transition: all var(--transition-speed);
    
    /* Chromium Font-Rendering Fix */
    -webkit-font-smoothing: subpixel-antialiased;
    -moz-osx-font-smoothing: auto;
}

/* Light Mode Subsection Content */
body:not(.dark-mode) .law-subsection-content {
    border-color: rgba(193, 154, 78, 0.18);
}

.law-subsection-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--gradient-gold);
    opacity: 0.3;
}



.law-subsection-content ul,
.law-subsection-content ol {
    padding-left: 28px;
    margin: 0.5rem 0;
}

.law-subsection-content li {
    margin-bottom: 0.4rem;
    position: relative;
    padding-left: 8px;
}

.law-subsection-content ul li::marker {
    color: var(--primary-color);
    font-weight: 700;
}

.law-subsection-content ol li::marker {
    color: var(--primary-dark);
    font-weight: 700;
}

.law-subsection-content strong {
    color: var(--primary-dark);
    font-weight: 700;
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.1), rgba(212, 175, 55, 0.05));
    padding: 2px 4px;
    border-radius: 3px;
}

.law-subsection-content em {
    color: var(--text-muted);
    font-style: italic;
}


/* Floating Action Buttons */
.action-menu {
    position: fixed;
    right: 30px;
    bottom: 30px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 100;
}

.action-button {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--gradient-primary);
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: all var(--transition-speed);
    box-shadow: 0 4px 15px rgba(64, 144, 242, 0.3);
    border: none;
    position: relative;
    overflow: hidden;
}

.action-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 30%, rgba(255, 255, 255, 0.2) 50%, transparent 70%);
    transform: translateX(-100%);
    transition: transform 0.6s;
}

.action-button:hover::before {
    transform: translateX(100%);
}

.action-button:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 25px rgba(64, 144, 242, 0.4);
}

.action-button:active {
    transform: scale(0.95);
}

.action-button i {
    font-size: 1.3rem;
    position: relative;
    z-index: 1;
}

/* Quick Access Bar */
.quick-access {
    position: fixed;
    right: 30px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: var(--paper-color);
    padding: 16px;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--box-shadow-lg);
    border: 1px solid var(--border-color);
    z-index: 100;
    transition: all var(--transition-speed);
    backdrop-filter: blur(10px);
}

.quick-access:hover {
    transform: translateY(-50%) scale(1.02);
    box-shadow: 0 20px 25px rgba(0, 0, 0, 0.1), 0 10px 10px rgba(0, 0, 0, 0.04);
}

.quick-access-item {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--gradient-secondary);
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: all var(--transition-speed);
    position: relative;
    overflow: hidden;
}

.quick-access-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--gradient-primary);
    opacity: 0;
    transition: opacity var(--transition-speed);
}

.quick-access-item:hover {
    background: var(--primary-color);
    transform: scale(1.1);
    box-shadow: 0 4px 15px rgba(64, 144, 242, 0.3);
}

.quick-access-item:hover::before {
    opacity: 1;
}

.quick-access-item i {
    color: var(--primary-color);
    font-size: 1.1rem;
    transition: all var(--transition-speed);
    position: relative;
    z-index: 1;
}

.quick-access-item:hover i {
    color: white;
    transform: scale(1.1);
}

/* Hide quick access toggle, not fitting for this design */
.quick-access-toggle {
    display: none;
}

/* Popups and Modals */
.note-popup,
.settings-popup,
.alert-modal,
.context-menu {
    position: fixed;
    background: var(--paper-color);
    border-radius: var(--border-radius);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-color);
    z-index: 10000;
    display: none;
    transition: background-color var(--transition-speed), border-color var(--transition-speed);
}

.note-popup,
.settings-popup,
.alert-modal {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 450px;
}

.note-header,
.settings-header,
.alert-header {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    font-family: 'Merriweather', serif;
    font-weight: 700;
    background-color: var(--secondary-color);
    transition: background-color var(--transition-speed), border-color var(--transition-speed);
}

.note-header h3,
.settings-header h3,
.alert-header h3 {
    margin: 0;
    font-size: 1.1rem;
}

.note-content,
.settings-content,
.alert-content {
    padding: 1.5rem;
}

textarea,
input[type="text"] {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    font-family: 'Merriweather', serif;
    font-size: 1rem;
    color: var(--text-color);
    background-color: var(--background-color);
    transition: all var(--transition-speed);
}

textarea:focus,
input[type="text"]:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(13, 71, 161, 0.1);
}

body.dark-mode textarea:focus,
body.dark-mode input[type="text"]:focus {
    box-shadow: 0 0 0 3px rgba(66, 165, 245, 0.2);
}

.note-actions,
.settings-actions,
.alert-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 1rem 1.5rem;
    background-color: var(--secondary-color);
    border-top: 1px solid var(--border-color);
    border-bottom-left-radius: var(--border-radius);
    border-bottom-right-radius: var(--border-radius);
    transition: background-color var(--transition-speed), border-color var(--transition-speed);
}


/* Boot Screen */
.boot-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--background-color);
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    transition: background-color var(--transition-speed);
}

.boot-screen.boot-dark {
    background: #0f172a;
}

.boot-screen.boot-light {
    background: #f1f5f9;
}

.boot-logo {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.boot-progress {
    width: 250px;
    height: 5px;
    background: var(--accent-color);
    border-radius: 5px;
    overflow: hidden;
}

.boot-bar {
    width: 0%;
    height: 100%;
    background: var(--primary-color);
    transition: width 3s ease-in-out;
}

.boot-screen.boot-dark .boot-progress {
    background: #1f2937;
}

.boot-screen.boot-dark .boot-bar {
    background: var(--primary-light);
}

.boot-screen.boot-light .boot-progress {
    background: #e2e8f0;
}

.boot-screen.boot-light .boot-bar {
    background: var(--primary-dark);
}

/* VRXT Phalanx Protection Notice */
.boot-vrxt-protection {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    color: var(--text-color);
    font-size: 0.75rem;
    font-weight: 400;
    font-family: 'Merriweather', serif;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0;
    animation: fadeInScale 1s ease-out 1.5s forwards, pulseGlow 3s ease-in-out infinite;
    z-index: 10;
}

.boot-vrxt-protection:hover {
    background: rgba(0, 0, 0, 0.15);
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateX(-50%) translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.boot-vrxt-protection .vrxt-logo {
    width: 16px;
    height: 16px;
    filter: drop-shadow(0 0 5px rgba(0, 0, 0, 0.3));
    transition: transform 0.3s ease;
}

.boot-vrxt-protection:hover .vrxt-logo {
    transform: scale(1.1) rotate(5deg);
}

.boot-vrxt-protection .protection-text {
    letter-spacing: 0.5px;
}

.boot-vrxt-protection .shield-icon {
    font-size: 12px;
    color: #10b981;
    animation: shieldPulse 2s ease-in-out infinite;
}

@keyframes fadeInScale {
    0% {
        opacity: 0;
        transform: translateX(-50%) scale(0.8);
    }
    100% {
        opacity: 1;
        transform: translateX(-50%) scale(1);
    }
}

@keyframes pulseGlow {
    0%, 100% {
        box-shadow: 0 0 5px rgba(0, 0, 0, 0.1);
    }
    50% {
        box-shadow: 0 0 15px rgba(0, 0, 0, 0.2), 0 0 25px rgba(16, 185, 129, 0.1);
    }
}

@keyframes shieldPulse {
    0%, 100% {
        opacity: 0.7;
        transform: scale(1);
    }
    50% {
        opacity: 1;
        transform: scale(1.1);
    }
}

/* Remove unnecessary elements */
.moon-container, .corner, .header-divider {
    display: none;
}

/* Responsive adjustments */
@media (max-width: 1024px) {
    .sidebar {
        width: 280px;
        min-width: 260px;
    }
    .main-content {
        padding: 24px;
    }
    .law-container {
        max-width: 900px;
    }
}

@media (max-width: 768px) {
    .sidebar {
        display: none;
    }
    .main-content {
        padding: 20px;
        width: 100%;
    }
    .action-menu, .quick-access {
        right: 15px;
        bottom: 15px;
    }
    .header {
        padding: 2rem 1.5rem;
    }
    .header h1 {
        font-size: 2rem;
    }
    .header-logo {
        width: 60px;
        height: 60px;
        font-size: 2.5rem;
    }
    .search-container {
        margin-bottom: 2rem;
    }
    .law-section {
        margin-bottom: 1.5rem;
    }
    .section-header {
        padding: 1.25rem 1.5rem;
    }
    .law-content {
        padding: 1.5rem;
    }
}

@media (max-width: 480px) {
    .main-content {
        padding: 16px;
    }
    .header {
        padding: 1.5rem 1rem;
    }
    .header h1 {
        font-size: 1.75rem;
    }
    .header-slogan {
        font-size: 0.85rem;
        letter-spacing: 1.5px;
    }
    .search-input {
        padding: 14px 16px 14px 45px;
        font-size: 0.95rem;
    }
    .section-header {
        padding: 1rem;
    }
    .section-header-left span {
        font-size: 1.4rem;
    }
    .law-content {
        padding: 1.25rem;
    }
    .law-subsection-content {
        padding: 1.25rem 1.5rem;
        font-size: 1rem;
    }
}

/* Tweak header and titles for law-book feel */
.header h1 { letter-spacing: 0.5px; }
.section-header-left span { letter-spacing: 0.3px; }
.law-subsection-header { color: var(--primary-color); }

/* Remove styles for removed components */
.quick-access-toggle, .quick-access, .note-popup, .settings-popup, .alert-modal, .sticky-notes, .context-menu, .preview-tooltip { display: none !important; }

/* Sidebar links as HyperUI Vertical Menu */
.sidebar ul li a { display:flex; align-items:center; gap:8px; border-radius:8px; }

/* Reduziere die Schriftgröße im Menü für schmälere Viewports */
@media (max-width: 1150px) {
    .sidebar li a {
        font-size: 0.88rem;
        padding: 12px 16px;
    }
    .sidebar li a i {
        font-size: 0.85rem;
    }
}

.sidebar ul li a.active { font-weight:600; }

/* Cards feel */
.law-section { border-radius: 12px; }
.section-header { border-top-left-radius:12px; border-top-right-radius:12px; }

/* Typography tweaks */
.header h1 { font-weight: 800; }
.law-subsection-header { font-weight:700; }

/* Search input spacing improvements */
.search-input { border-radius:10px; }
.search-shortcut { border-radius:6px; }

/* Icons */
.section-header-left i { font-size: 0.95rem; }

/* Layout width adjustments */
.law-container { max-width: 1600px; }

/* Sidebar shift to the right (larger left gutter) */
.sidebar { width: 300px; padding-left: 28px; }

/* Tablet-like TopBar */
.status-bar {
    height: 50px;
    padding: 0 24px;
    background: linear-gradient(to bottom, rgba(0,0,0,0.35), rgba(0,0,0,0.2));
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(8px);
}
.status-bar-left .status-item span,
.status-bar-right .status-item span { font-weight: 600; letter-spacing: 0.2px; }
.status-bar-left { gap: 18px; }
.status-bar-right { gap: 18px; }

/* Center app title in top bar for tablet feel */
.status-bar::after {
    content: 'LOS SANTOS BUSSGELDKATALOG';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    top: 50%;
    translate: 0 -50%;
    font-weight: 800;
    letter-spacing: 2px;
    font-size: 0.75rem;
    color: var(--primary-color);
    opacity: 0.9;
    text-shadow: 0 0 10px rgba(212, 175, 55, 0.3);
}

/* Dark mode topbar polish */
body.dark-mode .status-bar { background: linear-gradient(to bottom, rgba(16,19,23,0.85), rgba(16,19,23,0.6)); }

/* Increase left/right breathing room of law sections */
.main-content { padding-left: 40px; padding-right: 40px; }

/* Improve law-section inner padding for larger width */
.law-content { padding: 0.5rem; }

@media (max-width: 1800px) {
    .law-container { max-width: 98%; }
}
@media (max-width: 1600px) {
    .law-container { max-width: 98%; }
}
@media (max-width: 1280px) {
    .law-container { max-width: 98%; }
    .sidebar { width: 280px; }
}
@media (max-width: 1024px) {
    .law-container { max-width: 98%; }
}
@media (max-width: 768px) {
    .law-container { max-width: 98%; }
}

/* Sidebar: hide scrollbar visually while keeping scroll */
.sidebar { scrollbar-width: none; }
.sidebar::-webkit-scrollbar { width: 0; height: 0; }

/* Search field polish */
.search-container { margin-top: 0.5rem; }
.search-input { border: 1px solid var(--border-color); background: var(--paper-color); }
.search-container:focus-within .search-input { box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.2); }
.search-container .search-icon { opacity: 0.8; }
.search-shortcut { right: 10px; top: 50%; transform: translateY(-50%); opacity: 0.85; }

/* Topbar theme toggle */
.topbar-toggle { 
    width: 36px; 
    height: 36px;
    display: inline-flex; 
    align-items: center; 
    justify-content: center;
    border-radius: 50%; 
    border: 2px solid var(--border-color);
    background: var(--gradient-secondary);
    color: var(--text-color);
    transition: all var(--transition-speed);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.topbar-toggle::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--gradient-primary);
    opacity: 0;
    transition: opacity var(--transition-speed);
}

.topbar-toggle:hover { 
    background: var(--primary-color);
    color: white;
    transform: scale(1.1);
    box-shadow: 0 4px 15px rgba(64, 144, 242, 0.3);
}

.topbar-toggle:hover::before {
    opacity: 1;
}

.topbar-toggle i { 
    font-size: 1rem;
    position: relative;
    z-index: 1;
    transition: transform var(--transition-speed);
}

.topbar-toggle:hover i {
    transform: rotate(180deg);
}

/* Sidebar width to 23% as requested */
/* .sidebar { width: 23%; min-width: 240px; max-width: 360px; } */

/* Main content takes remaining width */
/* .main-content { width: 77%; } */

/* Media Query für spezifische FiveM-Auflösung und ähnliche */
@media (max-width: 1150px) {
    .sidebar {
        width: 80px; /* Beibehaltung der schmalen Sidebar */
        min-width: 80px;
    }
    .sidebar:hover {
        width: 260px;
    }
    .main-content {
        width: calc(100% - 80px); /* Hauptinhalt füllt den Rest */
        margin-left: 0; /* Margin entfernen, da die Sidebar absolut positioniert werden könnte oder der flex-container das regelt */
    }

    .sidebar li a {
        font-size: 0.88rem;
        padding: 12px 16px;
    }
    .sidebar li a i {
        font-size: 1.1rem; /* Angepasste Icon-Größe für den schmalen Zustand */
    }
    .sidebar:hover li a i {
        font-size: 0.85rem; /* Icon-Größe im aufgeklappten Zustand */
    }
}


/* Additional modern touches */
.law-section {
    backdrop-filter: blur(10px);
}

.sidebar {
    backdrop-filter: blur(10px);
}

/* Smooth scrolling for better UX */
html {
    scroll-behavior: smooth;
}

/* Focus states for accessibility */
.search-input:focus,
.action-button:focus,
.quick-access-item:focus,
.topbar-toggle:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Loading animation for content */
@keyframes contentLoad {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.law-section {
    animation: contentLoad 0.6s ease-out;
}

.law-section:nth-child(2) { animation-delay: 0.1s; }
.law-section:nth-child(3) { animation-delay: 0.2s; }
.law-section:nth-child(4) { animation-delay: 0.3s; }
.law-section:nth-child(5) { animation-delay: 0.4s; }
.law-section:nth-child(6) { animation-delay: 0.5s; }

/* Improved scrollbar for webkit browsers */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--background-color);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--primary-light) 0%, var(--primary-color) 50%, var(--primary-dark) 100%);
    border-radius: 5px;
    border: 2px solid var(--background-color);
    transition: all var(--transition-speed);
    box-shadow: 0 0 6px rgba(212, 175, 55, 0.3);
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.6);
}

/* Dark Mode Overrides for Law Subsections */
body.dark-mode .law-subsection-header {
    color: var(--primary-light);
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.08) 0%, rgba(212, 175, 55, 0.12) 100%);
    border-color: rgba(212, 175, 55, 0.25);
}

body.dark-mode .law-section {
    background: var(--paper-color);
    border-color: rgba(212, 175, 55, 0.15);
}

body.dark-mode .law-section:hover {
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4),
                0 0 0 1px rgba(212, 175, 55, 0.3),
                0 0 40px rgba(212, 175, 55, 0.15);
}

body.dark-mode .section-header {
    background: linear-gradient(135deg, rgba(26, 31, 58, 0.5) 0%, rgba(212, 175, 55, 0.08) 100%);
    border-bottom-color: rgba(212, 175, 55, 0.2);
}

body.dark-mode .sidebar {
    background: linear-gradient(180deg, rgba(15, 23, 41, 0.8) 0%, rgba(10, 13, 26, 0.9) 100%);
    border-right-color: rgba(212, 175, 55, 0.2);
}

body.dark-mode .status-bar {
    background: linear-gradient(180deg, #050810 0%, #0a0d1a 100%);
    border-bottom-color: rgba(212, 175, 55, 0.25);
}

.no-results-message {
    padding: 2rem 2.5rem;
    margin: 2rem auto;
    max-width: 500px;
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.04), rgba(239, 68, 68, 0.08));
    border: 2px solid rgba(239, 68, 68, 0.2);
    border-radius: 16px;
    text-align: center;
    color: var(--text-color);
    font-family: 'Merriweather', serif;
    font-weight: 600;
    font-size: 1rem;
    box-shadow: 0 4px 20px rgba(239, 68, 68, 0.1);
    transition: all var(--transition-speed);
    animation: slideDown 0.3s ease-out;
}

.no-results-message i {
    display: block;
    font-size: 2.5rem;
    color: rgba(239, 68, 68, 0.5);
    margin-bottom: 1rem;
}

body.dark-mode .no-results-message {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.08), rgba(239, 68, 68, 0.12));
    border-color: rgba(239, 68, 68, 0.25);
}

/* Kopierschutz - Verhindert Textmarkierung und Auswahl */
* {
    -webkit-user-select: none; /* Safari */
    -moz-user-select: none; /* Firefox */
    -ms-user-select: none; /* Internet Explorer/Edge */
    user-select: none; /* Standard */
}

/* Ausnahme für Eingabefelder */
input,
textarea {
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
    user-select: text;
}

/* Tabellen-Optimierungen für bessere Lesbarkeit */
.law-section table {
    table-layout: fixed;
    width: 100%;
    word-wrap: break-word;
}

.law-section table th:nth-child(7),
.law-section table td:nth-child(7) {
    min-width: 200px;
    max-width: 250px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.law-section table th:nth-child(1),
.law-section table td:nth-child(1) {
    min-width: 180px;
    max-width: 220px;
}

.law-section table th:nth-child(2),
.law-section table td:nth-child(2),
.law-section table th:nth-child(3),
.law-section table td:nth-child(3) {
    width: 100px;
    text-align: center;
}

.law-section table th:nth-child(4),
.law-section table td:nth-child(4),
.law-section table th:nth-child(5),
.law-section table td:nth-child(5) {
    width: 120px;
    text-align: center;
}

.law-section table th:nth-child(6),
.law-section table td:nth-child(6) {
    width: 100px;
    text-align: center;
}

/* Responsive Tabellen-Anpassungen */
@media (max-width: 1024px) {
    .law-section table {
        font-size: 0.9rem;
    }
    
    .law-section table th:nth-child(7),
    .law-section table td:nth-child(7) {
        min-width: 150px;
        max-width: 180px;
    }
}

@media (max-width: 768px) {
    .law-section table {
        font-size: 0.85rem;
    }
    
    .law-section table th,
    .law-section table td {
        padding: 0.5rem !important;
    }
    
    .law-section table th:nth-child(7),
    .law-section table td:nth-child(7) {
        min-width: 120px;
        max-width: 150px;
    }
}

/* FiveM Chromium Performance-Optimierungen */
.header,
.law-section,
.sidebar,
.search-container,
.status-bar {
    will-change: transform;
    -webkit-perspective: 1000;
    perspective: 1000;
}