:root {
    --textprim: #1f2933;
    --textsecond: #0f172a;
    --textmuted: #5b6570;
    --button: #e7e1d9;
    --accent: #0f6b6b;
    --accent-strong: #0b4f4f;
    --buttonhover: #0f6b6b;
    --background: #f7f4ef;
    --inputs: #ffffff;
    --surface-muted: #f1ede6;
    --border: #e4dfd7;
    --shadow-sm: 0 10px 24px rgba(15, 23, 42, 0.08);
    --shadow-lg: 0 30px 60px rgba(15, 23, 42, 0.16);
    --focus: rgba(15, 107, 107, 0.2);
}


* {
    font-family: San-Francisco, ProximaNova, sans-serif;
    color: var(--textprim);
    box-sizing: border-box;
}

html {
    height: 100%;
    overflow: hidden;
}

body {
    width: 100%;
    min-height: 100vh;
    margin: 0px;
    overflow: hidden;
    background:
        radial-gradient(1200px circle at 15% -10%, rgba(15, 107, 107, 0.12), transparent 60%),
        radial-gradient(900px circle at 85% 0%, rgba(217, 106, 74, 0.12), transparent 55%),
        var(--background);
    color: var(--textprim);
    user-select: none;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    display: flex;
    flex-direction: column;
}


#header {
    width: 100%;
    height: 5%;

    background-color: var(--inputs);
    border-bottom-left-radius: 10px;
    border-bottom-right-radius: 10px;

    display: grid;
    grid-template-columns: 33.333% 33.333% 33.333%;
}

#title {
    line-height: 5vh;

    padding-left: 20px;
    font-size: 3vh;
    font-weight: 600;
    color: var(--textsecond);
}

#credits {
    text-align: left;
    line-height: 5vh;
    padding-left: 20px;
}

#Discord {
    line-height: 5vh;

    width: auto;
    height: 5vh;
}

#sahp {
    text-align: center;
    line-height: 5vh;
    padding-left: 20px;
    color: var(--textprim);
    font-weight: bold
}

#searchbar input {
    float: right;
    width: 70%;
    height: 3vh;
    background-color: var(--background);
    border: none;
    border-radius: 5px;
    font-size: 1.5vh;

    margin-top: 1vh;
    margin-right: 20px;

    tab-size: 0px;
    outline: none;
    box-sizing: border-box;
    font-weight: 500;
    color: white;

    text-indent: 5px;
}

#contentbox {
    width: 100%;
    height: 94.5%;

    position: absolute;
    bottom: 0;

    background-color: var(--inputs);
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;

    display: grid;
    grid-template-columns: 75% 25%;
}

#fineslist {
    background-color: var(--background);
    border-radius: 10px;
    margin: 1vh;
    overflow: hidden;
    overflow-y: scroll;
}

#fineslist::-webkit-scrollbar {
    display: none;
}

#results::-webkit-scrollbar {
    width: 8px;
    display: block;
}


#results {
    background-color: var(--background);
    border-radius: 10px;
    margin: 1vh;
    margin-left: 0;

    overflow-y: scroll;
    overflow-x: hidden;

    padding-bottom: 30px;
}

#fineslist table {
    overflow: hidden;

    margin-top: 2%;

    width: 100%;
}

#fineslist table {
    border-spacing: 3px;
}

#finesHeader th {
    position: sticky;
    overflow: visible;
    color: white;
    font-size: 20px;
    z-index: 50;
}

#fineslist table tr td {
    text-align: center;

    transition: all 0.3s;
}

.fine {
    transition: all 0.3s;
}

.showing {
    background: var(--inputs);
}

.hiding {
    display: none;
} 

.selected {
    background-color: var(--accent);
    
}

.selected td {
    color: white;
}
#logoContainer {
    margin-top: 10px; /* Abstand zum vorherigen Element */
    text-align: center; /* Zentriert das Logo im Container */
    margin-left: 20px; /* Verschiebt das Logo 20px nach rechts */
}

#logo {
	animation: blink 10s infinite; /* Die Animation blinkt alle 1 Sekunde unendlich oft */
    width: 200px; /* Setze die Breite auf 200px */
    height: auto; /* Automatische Höhe basierend auf der Breite */
    opacity: 0.8; /* Leichte Transparenz für einen sanften Effekt */
}

#logo:hover {
    opacity: 1; /* Vollständig sichtbar beim Überfahren mit der Maus */
}
@keyframes blink {
    0% {
        opacity: 1;
    }
    50% {
        opacity: 0; /* Logo wird unsichtbar */
    }
    100% {
        opacity: 1; /* Logo wird wieder sichtbar */
    }
}
#resultsTitle {
    width: 100%;
    font-size: 3vh;
    font-weight: 600;
    color: white;
    text-align: center;
    margin-top: 5px;
}

#infoTitle {
    width: 90%;
    position: relative;
    left: 5%;
    text-align: center;
    padding-top: 10px;
    padding-bottom: 10px;
    font-size: 15px;
}

#plateInput {
    width: 90%;
    position: relative;
    left: 5%;
}

#blitzerInput {
    width: 90%;
    position: relative;
    left: 5%;
}

#systemwantedsInput {
    width: 90%;
    position: relative;
    left: 5%;
}

.result {
    width: 90%;
    position: relative;
    left: 5%;
}

#plateInput_input {
    width: 70%;
    height: 3vh;
    background-color: var(--inputs);
    border: none;
    border-radius: 5px;
    font-size: 1.5vh;

    margin-top: 1vh;

    tab-size: 0px;
    outline: none;
    box-sizing: border-box;
    font-weight: 500;
    color: white;

    text-indent: 5px;
}

#blitzerInput_input {
    width: 70%;
    height: 3vh;
    background-color: var(--inputs);
    border: none;
    border-radius: 5px;
    font-size: 1.5vh;

    margin-top: 1vh;

    tab-size: 0px;
    outline: none;
    box-sizing: border-box;
    font-weight: 500;
    color: white;

    text-indent: 5px;
}

#systemwantedsInput_input {
    width: 70%;
    height: 3vh;
    background-color: var(--inputs);
    border: none;
    border-radius: 5px;
    font-size: 1.5vh;

    margin-top: 1vh;

    tab-size: 0px;
    outline: none;
    box-sizing: border-box;
    font-weight: 500;
    color: white;

    text-indent: 5px;
}

.categoryHeader th {
    color: var(--buttonhover);
    font-size: 20px;
}

#resetButton {
    width: 70%;
    height: 4vh;
    background-color: var(--inputs);
    border: none;
    border-radius: 5px;
    font-size: 1.5vh;

    margin-top: 1.5vh;

    tab-size: 0px;
    outline: none;
    box-sizing: border-box;
    font-weight: 500;
    color: white;

    transition: all 0.3s;

    position: relative;
    left: 5%;

}

#showButton {
    width: 70%;
    height: 4vh;
    background-color: var(--inputs);
    border: none;
    border-radius: 5px;
    font-size: 1.5vh;

    margin-top: 1.5vh;

    tab-size: 0px;
    outline: none;
    box-sizing: border-box;
    font-weight: 500;
    color: white;

    transition: all 0.3s;

    position: relative;
    left: 5%;

}

#showButton:hover {
    background-color: rgb(107, 232, 96);
}

#showAttorneysButton {
    width: 70%;
    height: 4vh;
    background-color: var(--inputs);
    border: none;
    border-radius: 5px;
    font-size: 1.5vh;

    margin-top: 1.5vh;

    tab-size: 0px;
    outline: none;
    box-sizing: border-box;
    font-weight: 500;
    color: white;

    transition: all 0.3s;

    position: relative;
    left: 5%;

}

#showAttorneysButton:hover {
    background-color: rgb(107, 232, 96);
}

#showRightsButton {
    width: 70%;
    height: 4vh;
    background-color: var(--inputs);
    border: none;
    border-radius: 5px;
    font-size: 1.5vh;

    margin-top: 1.5vh;

    tab-size: 0px;
    outline: none;
    box-sizing: border-box;
    font-weight: 500;
    color: white;

    transition: all 0.3s;

    position: relative;
    left: 5%;
}

#showRightsButton:hover {
    background-color: rgb(107, 232, 96);
}
#resetButton:hover {
    background-color: rgb(255, 44, 44);
}



.selected_extrawanted {
    color: yellow;
}

.extrawanted {
    transition: 0.1s all;
}

.extrawanted:hover {
    color: yellow;
}

/*

* CHECKBOX

*/

[type="checkbox"] {
    position: relative;
    left: 10px;
    top: 0px;
    z-index: 0;
    appearance: none;
}

[type="checkbox"] + label {
    position: relative;
    display: block;
    cursor: pointer;
    font-size: 16px;

    color: white;
    font-weight: 600;

    
    padding-left: 50px;
    position: relative;
    margin-top: -20px;
}

#checkboxfont1 {
    font-size: 16px;

    color: white;
    font-weight: 600;
}

[type="checkbox"] + label:before {
    width: 40px;
    height: 20px;
    border-radius: 30px;
    border: 2px solid var(--button);
    background-color: var(--inputs);
    content: "";
    margin-right: 15px;
    transition: background-color 0.5s;
    z-index: 5;
    position: absolute;
    left: 0px;
}

[type="checkbox"] + label:after {
    width: 20px;
    height: 20px;
    border-radius: 30px;
    background-color: #e64949;
    content: "";
    transition: all 0.4s;
    box-shadow: 0px 0px 2px #e64949;
    position: absolute;
    left: 2px;
    top: 2px;
    z-index: 10;
}

[type="checkbox"]:checked + label:after {
    margin: 0 0 0 20px;
    background-color: #49e656;
    box-shadow: 0px 0px 2px #49e656;
}

#checkbox {
    position: relative;
    left: 5%;
    width: 90%;
    margin-top: 1vh;
    margin-bottom: 0.5vh;
    
}

/* CUSTOM SELECT */

#übergabeInput {
    width: 90%;
    position: relative;
    left: 5%;
}

#übergabeInput_input {
    width: 70%;
    height: 3vh;
    background-color: var(--inputs);
    border: none;
    border-radius: 5px;
    font-size: 1.5vh;

    margin-top: 1vh;

    tab-size: 0px;
    outline: none;
    box-sizing: border-box;
    font-weight: 500;
    color: white;

    text-indent: 5px;
}

/* ===== Scrollbar CSS ===== */
  /* Firefox */
  #notepadArea textarea {
    scrollbar-width: auto;
    scrollbar-color: #ffdd00 #ffffff00;
  }

  /* Chrome, Edge, and Safari */
  #notepadArea textarea::-webkit-scrollbar {
    width: 3px;
  }

  #notepadArea textarea::-webkit-scrollbar-track {
    background: #ffffff00;
  }

  #notepadArea textarea::-webkit-scrollbar-thumb {
    background-color: #ffdd00;
    border-radius: 10px;
    border: 1px solid #ffffff00;
  }

#notepadArea {
    width: 90%;
    position: relative;
    left: 5%;

    max-height: 250px;
}

#notepadArea textarea {
    width: 70%;
    background-color: var(--inputs);
    border: none;
    border-radius: 5px;
    font-size: 1.5vh;
    margin-top: 1vh;

    min-height: 2.5vh;
    max-width: 90%;
    min-width: 100px;
    max-height: 240px;

    tab-size: 0px;
    outline: none;
    box-sizing: border-box;
    font-weight: 500;
    color: white;

    padding-left: 5px;

}

#systemfehler {
    position: relative;
    left: 5%;
    width: 90%;
    margin-top: 1vh;
    margin-bottom: 0.5vh;
    
}

#reue {
    position: relative;
    left: 5%;
    width: 90%;
    margin-top: 1vh;
    margin-bottom: 0.5vh;
    
}

#verdoppelung {
    position: relative;
    left: 5%;
    width: 90%;
    margin-top: 1vh;
    margin-bottom: 0.5vh;
    
}

select {

    background-color: var(--inputs);
    border: none;
    border-radius: 5px;
    font-size: 1.5vh;

    width: 70%;
    height: 3vh;

    margin-top: 1vh;

    tab-size: 0px;
    outline: none;
    box-sizing: border-box;
    font-weight: 500;
    color: white;

    text-indent: 5px;
}



#finesListContainer {
    width: 50%;
    height: 50%;

    position: fixed;
    z-index: 2;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);

    background-color: var(--background);
    box-shadow: 0px 0px 10px black;

    border-radius: 16px;

    overflow-y: scroll;

    opacity: 0;
    transition: opacity 0.3s;
}

#fineListContainer[data-showing="true"] {
    opacity: 1;
}

#finesListContainer::-webkit-scrollbar {
    display: none;
}

#finesListContainer_title {
    width: 100%;
    color: white;
    text-align: center;

    padding-top: 5px;
    font-size: 25px;
    font-weight: 600;
}

#finesListContainer table {
    position: relative;
    width: 95%;
    margin-top: 10px;
    left: 2.5%;
    border-spacing: 3px;

    color: white;
    text-align: center;
}

#finesListContainer table tr th {
    color: white;
}

.finesList_fine {
    background-color: var(--inputs);
}

#rightsContainer {
    width: 60%;
    max-width: 800px;
    height: auto;
    max-height: 80vh;
    overflow-y: auto;
    overflow-x: hidden;
    position: fixed;
    z-index: 1000;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    background-color: #1e1e1e;
    box-shadow: 0px 0px 10px black;
    border-radius: 16px; /* Rundet alle Ecken */
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
    padding: 0; /* Entferne Padding, um Probleme mit den Ecken zu vermeiden */
    overflow: hidden; /* Stellt sicher, dass der Titel nicht überlappt */
}

#rightsContainer[data-showing="true"] {
    opacity: 1;
    pointer-events: auto;
}

#rightsContainer_backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 999;
    display: none;
}


#rightsContainer_title {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 15px;
    font-size: 22px;
    font-weight: bold;
    background-color: #2a2a2a;
    border-top-left-radius: 16px; /* Sicherstellen, dass die oberen Ecken rund sind */
    border-top-right-radius: 16px;
    color: white;
}

#rightsContainer_content {
    padding: 20px;
    color: white;
    font-size: 18px; /* Standard-Schriftgröße für den Text */
    line-height: 1.8; /* Mehr Zeilenhöhe für bessere Lesbarkeit */
    text-align: center; /* Zentrierter Text */
}

#rightsContainer_content h2 {
    font-size: 22px; /* Größer als der Standardtext */
    font-weight: bold;
    margin-bottom: 10px;
    color: white;
}

#rightsContainer_content p {
    font-size: 18px; /* Einheitliche Größe */
    font-weight: normal; /* Normalgewicht für bessere Lesbarkeit */
    margin-bottom: 15px;
}

#rightsContainer_close {
    position: absolute;
    top: 12px;
    right: 15px;
    background: none;
    border: none;
    color: white;
    font-size: 25px;
    font-weight: bold;
    cursor: pointer;
    z-index: 1002;
    transition: color 0.2s, transform 0.2s;
}

#rightsContainer_close:hover {
    color: red;
    transform: scale(1.2);
}

#attorneyContainer {
    width: 65%;
    height: 80%;
    overflow-y: hidden;
    position: fixed;
    z-index: 1000;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    background-color: var(--background, #2a2a2a);
    box-shadow: 0px 0px 10px black;
    border-radius: 16px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}

#attorneyContainer[data-showing="true"] {
    opacity: 1;
    pointer-events: auto;
}

#attorneyContainer_backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 999;
    display: none;
}

#attorneyContainer::-webkit-scrollbar {
    display: none;
}

#attorneyContainer_title {
    width: 100%;
    color: white;
    display: flex;
    justify-content: center; /* Zentriert den Titel */
    align-items: center;
    padding: 10px;
    font-size: 25px;
    font-weight: 600;
    position: relative;
    background-color: #2a2a2a;
    border-top-left-radius: 16px;
    border-top-right-radius: 16px;
}

#attorneyContainer_close {
    position: absolute;
    top: 8px;
    right: 30px;
    background: none;
    border: none;
    color: white;
    font-size: 25px; /* Größer für bessere Sichtbarkeit */
    font-weight: bold;
    cursor: pointer;
    z-index: 1002;
    transition: color 0.2s, transform 0.2s;
}

#attorneyContainer_close:hover {
    color: red;
    transform: scale(1.2);
}


#attorneyContainer_iframe {
    width: 100%;
    height: calc(100% - 50px); /* Platz für die Titelleiste abziehen */
    overflow: hidden;
}

#attorneyContainer_iframe iframe {
    width: 100%;
    height: 100%;
    border: none;
    
}

.help-button {
    position: fixed;
    bottom: 16px;
    right: 16px;
    background-color: var(--inputs);
    color: var(--textsecond);
    border: 1px solid var(--border);
    border-radius: 999px;
    width: 26px;
    height: 26px;
    padding: 0;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.02em;
    box-shadow: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
    z-index: 100;
    overflow: hidden;
}

.help-button .help-icon {
    width: 18px;
    height: 18px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--accent), var(--accent-strong));
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 700;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.25);
    flex: 0 0 auto;
}

.help-button .help-text {
    opacity: 0;
    transform: translateX(-4px);
    transition: opacity 0.2s ease, transform 0.2s ease;
    white-space: nowrap;
}

.help-button:hover {
    width: auto;
    height: 26px;
    padding: 0 10px 0 8px;
    border-color: var(--accent);
    box-shadow: var(--shadow-sm);
    transform: translateY(-1px);
}

.help-button:hover .help-text {
    opacity: 1;
    transform: translateX(0);
}

.help-button:focus-visible {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--focus), var(--shadow-sm);
}


/* Modern refresh */
@keyframes fade-up {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes logo-float {
    0%,
    100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-6px);
    }
}

@keyframes pulse {
    0% {
        transform: scale(0.8);
        background-color: var(--accent);
        box-shadow: 0 0 0 0 rgba(15, 107, 107, 0.28);
    }

    50% {
        transform: scale(1.15);
        background-color: var(--accent-strong);
        box-shadow: 0 0 0 12px rgba(15, 107, 107, 0);
    }

    100% {
        transform: scale(0.8);
        background-color: var(--accent);
        box-shadow: 0 0 0 0 rgba(15, 107, 107, 0.28);
    }
}

#header {
    width: 100%;
    max-width: none;
    height: 72px;
    margin: 0;
    background-color: var(--inputs);
    border: 1px solid var(--border);
    border-radius: 0;
    display: grid;
    grid-template-columns: 1.4fr 1fr 1.4fr;
    align-items: center;
    padding: 0 20px;
    gap: 12px;
    box-shadow: var(--shadow-sm);
    animation: fade-up 0.6s ease both;
}

#credits {
    text-align: left;
    line-height: 1.2;
    padding-left: 0;
    font-size: 12px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--textmuted);
    font-weight: 600;
}

#sahp {
    text-align: center;
    line-height: 1.2;
    padding-left: 0;
    color: var(--textsecond);
    font-weight: 700;
    font-size: 16px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

#searchbar {
    display: flex;
    align-items: center;
    gap: 12px;
}

#searchbar input {
    float: none;
    width: 100%;
    height: 40px;
    background-color: var(--surface-muted);
    border: 1px solid var(--border);
    border-radius: 999px;
    font-size: 14px;
    margin-top: 0;
    margin-right: 0;
    padding: 0 16px;
    outline: none;
    font-weight: 500;
    color: var(--textsecond);
    text-indent: 0;
    flex: 1;
    min-width: 0;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

#searchbar input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 4px var(--focus);
    background-color: var(--inputs);
    color: var(--textsecond);
    caret-color: var(--textsecond);
}

#searchbar input::placeholder {
    color: var(--textmuted);
}

#themeToggle {
    height: 40px;
    padding: 0 16px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background-color: var(--inputs);
    color: var(--textsecond);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease, transform 0.2s ease;
    white-space: nowrap;
}

#themeToggle:hover {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--focus);
    transform: translateY(-1px);
}

#contentbox {
    width: 100%;
    max-width: none;
    height: auto;
    min-height: calc(100vh - 72px);
    margin: 0;
    padding: 16px;
    position: relative;
    bottom: auto;
    background-color: transparent;
    border-radius: 0;
    display: grid;
    grid-template-columns: 2.2fr 1fr;
    gap: 16px;
    align-items: start;
    flex: 1;
    min-height: 0;
    animation: fade-up 0.7s ease both;
    animation-delay: 0.08s;
}

#fineslist,
#results {
    background-color: var(--inputs);
    border: 1px solid var(--border);
    border-radius: 18px;
    box-shadow: var(--shadow-sm);
    min-height: 0;
}

#fineslist {
    margin: 0;
    overflow: hidden auto;
    padding: 6px 16px 16px;
    --fines-header-offset: 48px;
    height: calc(100vh - 72px - 32px);
    position: relative;
}

#results {
    margin: 0;
    padding: 18px;
    overflow: hidden auto;
    align-self: start;
    height: auto;
    max-height: calc(100vh - 72px - 32px);
}

#fineslist table {
    margin-top: 0;
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 10px;
    padding: 0;
    overflow: visible;
}

#fineslist thead th {
    position: sticky;
    top: 0;
    z-index: 7;
    background-color: var(--inputs);
}

#finesHeader th {
    position: sticky;
    top: 0;
    z-index: 7;
    color: var(--textmuted);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    background-color: var(--inputs);
    padding: 14px 12px;
    border-bottom: 1px solid var(--border);
}

#finesHeader th:nth-child(2) {
    text-align: left;
}

#fineslistStickyCategory {
    position: sticky;
    top: var(--fines-header-offset);
    z-index: 6;
    background: var(--inputs);
    color: var(--accent);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    padding: 12px 18px 8px;
    margin-bottom: 6px;
    border-bottom: 1px solid var(--border);
}

#fineslistStickyCategory:empty {
    display: none;
}

#fineslist table tr td {
    text-align: center;
    padding: 12px 14px;
    font-size: 14px;
    line-height: 1.4;
    vertical-align: top;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

#fineslist table tr.fine td {
    background-color: var(--surface-muted);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

#fineslist table tr.fine {
    cursor: pointer;
}

#fineslist table tr.fine td:first-child {
    border-left: 1px solid var(--border);
    border-radius: 12px 0 0 12px;
}

#fineslist table tr.fine td:last-child {
    border-right: 1px solid var(--border);
    border-radius: 0 12px 12px 0;
}

#fineslist table tr.fine:hover td {
    background-color: #fff;
    border-color: #d9d2c8;
}

#fineslist table tr.selected td {
    background-color: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

#fineslist table tr.selected td:first-child {
    border-left-color: var(--accent);
}

#fineslist table tr.selected td:last-child {
    border-right-color: var(--accent);
}

#fineslist td.fineText {
    text-align: left;
}

#fineslist td.paragraph {
    cursor: pointer;
}

#fineslist td.paragraph:hover {
    text-decoration: underline;
    text-underline-offset: 3px;
}

#fineslist td.fineText[data-category]::before {
    content: attr(data-category);
    display: block;
    margin-bottom: 6px;
    color: var(--textmuted);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

#fineslist tr.selected td.fineText[data-category]::before {
    color: rgba(255, 255, 255, 0.8);
}

.categoryHeader th {
    position: static;
    color: var(--accent);
    font-size: 12px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    text-align: left;
    padding: 18px 18px 8px;
    background: var(--inputs);
    border: none;
}

.categoryHeader th::after {
    content: "";
    display: block;
    height: 1px;
    margin-top: 10px;
    background: linear-gradient(90deg, rgba(15, 107, 107, 0.45), rgba(15, 107, 107, 0));
}

#resultsTitle {
    width: 100%;
    font-size: 22px;
    font-weight: 700;
    color: var(--textsecond);
    text-align: left;
    margin: 0 0 8px;
}

#infoTitle {
    width: 100%;
    left: 0;
    text-align: left;
    padding: 10px 12px;
    font-size: 12px;
    background-color: var(--surface-muted);
    border: 1px solid var(--border);
    border-radius: 12px;
    color: var(--textmuted);
}

#results hr {
    border: none;
    height: 1px;
    background-color: var(--border);
    margin: 14px 0;
}

.result {
    width: 100%;
    left: 0;
    background-color: #fff;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 10px 12px;
    margin-top: 10px;
    color: var(--textsecond);
}

#plateInput,
#blitzerInput,
#systemwantedsInput,
#notepadArea,
#checkbox,
#reue,
#verdoppelung,
#systemfehler {
    width: 100%;
    left: 0;
}

#plateInput,
#blitzerInput,
#systemwantedsInput,
#übergabeInput,
#notepadArea {
    margin-top: 12px;
}

#results input[type="text"],
#results select,
#results textarea {
    width: 100%;
    height: 40px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background-color: var(--surface-muted);
    padding: 0 12px;
    font-size: 14px;
    color: var(--textsecond);
    outline: none;
    text-indent: 0;
    margin: 0;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

#plateInput_input,
#blitzerInput_input,
#systemwantedsInput_input,
#notepadArea_input {
    width: 100%;
    height: 40px;
    background-color: var(--surface-muted);
    border: 1px solid var(--border);
    border-radius: 12px;
    font-size: 14px;
    padding: 0 12px;
    color: var(--textsecond);
    text-indent: 0;
    margin-top: 0;
}

#notepadArea_input {
    height: 120px;
    padding: 12px;
}

#notepadArea textarea {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    margin-top: 0;
    padding: 12px 44px 12px 12px;
    background-color: var(--surface-muted);
    border: 1px solid var(--border);
    border-radius: 12px;
    color: var(--textsecond);
}

#übergabeInput {
    width: 100%;
    left: 0;
    display: grid;
    gap: 10px;
}

#übergabeInput select,
#übergabeInput input {
    width: 100%;
    margin-top: 0;
}

#results textarea {
    height: 120px;
    padding: 12px;
}

#results input[type="text"]:focus,
#results select:focus,
#results textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 4px var(--focus);
    background-color: var(--inputs);
}

#results select option,
#results select optgroup {
    background-color: var(--inputs);
    color: var(--textsecond);
}

#showAttorneysButton,
#showRightsButton,
#resetButton {
    width: 100%;
    height: 42px;
    margin-top: 12px;
    position: relative;
    left: 0;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.02em;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

#showAttorneysButton,
#showRightsButton {
    background-color: var(--accent);
    color: #fff;
    border: none;
    box-shadow: var(--shadow-sm);
}

#showAttorneysButton:hover,
#showRightsButton:hover {
    background-color: var(--accent-strong);
    transform: translateY(-1px);
}

#resetButton {
    background-color: #fef2f2;
    color: #b42318;
    border: 1px solid #f4c7c7;
}

#resetButton:hover {
    background-color: #fde8e8;
    transform: translateY(-1px);
}

[type="checkbox"] + label,
#checkboxfont1 {
    color: var(--textsecond);
}

[type="checkbox"] + label:before {
    border: 1px solid var(--border);
    background-color: var(--surface-muted);
}

[type="checkbox"] + label:after {
    background-color: #c4b8ad;
    box-shadow: none;
}

[type="checkbox"]:checked + label:before {
    background-color: rgba(15, 107, 107, 0.12);
    border-color: var(--accent);
}

[type="checkbox"]:checked + label:after {
    background-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(15, 107, 107, 0.24);
}

#loading {
    position: fixed;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 24px;
    background:
        radial-gradient(800px circle at 20% 20%, rgba(15, 107, 107, 0.18), transparent 55%),
        radial-gradient(700px circle at 80% 10%, rgba(217, 106, 74, 0.16), transparent 60%),
        var(--background);
    z-index: 2000;
}

#loading .loading-card {
    width: min(420px, 92vw);
    background: var(--inputs);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 28px;
    text-align: center;
    box-shadow: var(--shadow-lg);
    animation: loading-card-in 0.6s ease both;
}

#loading .loading-logo {
    position: relative;
    width: clamp(120px, 18vw, 180px);
    height: clamp(120px, 18vw, 180px);
    margin: 0 auto 16px;
}

#loading .loading-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    filter: drop-shadow(0 14px 22px rgba(15, 23, 42, 0.2));
}

#loading .loading-ring {
    position: absolute;
    inset: -10px;
    border-radius: 50%;
    border: 2px solid rgba(15, 107, 107, 0.18);
    border-top-color: var(--accent);
    animation: loading-spin 2.2s linear infinite;
}

#loading .loading-title {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--textsecond);
    margin-bottom: 6px;
}

#loading .loading-subtitle {
    font-size: 13px;
    color: var(--textmuted);
    margin-bottom: 16px;
}

#loading .loading-bar {
    height: 8px;
    background: var(--surface-muted);
    border-radius: 999px;
    overflow: hidden;
}

#loading .loading-bar span {
    display: block;
    height: 100%;
    width: 40%;
    background: linear-gradient(90deg, var(--accent), var(--accent-strong));
    border-radius: 999px;
    animation: loading-bar 1.6s ease-in-out infinite;
}

#loading .loading-dots {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 14px;
}

#loading .loading-dots span {
    width: 6px;
    height: 6px;
    border-radius: 999px;
    background: var(--accent);
    opacity: 0.6;
    animation: loading-dot 1.2s ease-in-out infinite;
}

#loading .loading-dots span:nth-child(2) {
    animation-delay: 0.2s;
}

#loading .loading-dots span:nth-child(3) {
    animation-delay: 0.4s;
}

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

@keyframes loading-bar {
    0% {
        transform: translateX(-120%);
    }
    50% {
        transform: translateX(30%);
    }
    100% {
        transform: translateX(140%);
    }
}

@keyframes loading-dot {
    0%,
    100% {
        transform: translateY(0);
        opacity: 0.4;
    }
    50% {
        transform: translateY(-4px);
        opacity: 1;
    }
}

@keyframes loading-card-in {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#logo {
    animation: logo-float 6s ease-in-out infinite;
    opacity: 0.9;
}

#finesListContainer {
    background-color: var(--inputs);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
}

#finesListContainer_title {
    color: var(--textsecond);
    font-size: 18px;
    letter-spacing: 0.04em;
}

#finesListContainer table tr th {
    color: var(--textsecond);
}

#rightsContainer,
#attorneyContainer {
    background-color: var(--inputs);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
    border-radius: 20px;
    overflow: hidden;
    transform: translate(-50%, -50%) scale(0.98);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

#rightsContainer {
    width: min(720px, 92vw);
    max-width: none;
}

#attorneyContainer {
    width: min(1200px, 94vw);
    height: min(82vh, 800px);
}

#rightsContainer[data-showing="true"],
#attorneyContainer[data-showing="true"] {
    transform: translate(-50%, -50%) scale(1);
}

#rightsContainer_backdrop,
#attorneyContainer_backdrop {
    background-color: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
}

#rightsContainer_title,
#attorneyContainer_title {
    background-color: var(--surface-muted);
    color: var(--textsecond);
    border-bottom: 1px solid var(--border);
    justify-content: space-between;
    padding: 16px 20px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

#rightsContainer_content {
    color: var(--textsecond);
    padding: 24px 28px 28px;
    font-size: 15px;
    line-height: 1.6;
    text-align: left;
    background: var(--inputs);
    max-height: calc(80vh - 70px);
    overflow-y: auto;
}

#rightsContainer_content h2 {
    color: var(--textmuted);
    font-size: 12px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin-bottom: 8px;
}

#rightsContainer_content p {
    font-size: 14px;
    margin-bottom: 14px;
    color: var(--textsecond);
}

#attorneyContainer_close,
#rightsContainer_close {
    color: var(--textsecond);
    width: 32px;
    height: 32px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--inputs);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    transition: transform 0.2s ease, box-shadow 0.2s ease, color 0.2s ease, border-color 0.2s ease;
    right: 16px;
    top: 12px;
}

#attorneyContainer_close:hover,
#rightsContainer_close:hover {
    color: #b42318;
    border-color: #f4c7c7;
    box-shadow: var(--shadow-sm);
    transform: translateY(-1px);
}

#attorneyContainer_iframe {
    padding: 12px;
    height: calc(100% - 60px);
    background: var(--inputs);
}

#attorneyContainer_iframe iframe {
    border-radius: 14px;
    border: 1px solid var(--border);
    background: #fff;
}

#attorneyContainer_iframe {
    --attorney-sheet-scale: 0.933;
}

#attorneyContainer_iframe iframe {
    width: calc(100% / var(--attorney-sheet-scale));
    height: calc(100% / var(--attorney-sheet-scale));
    transform: scale(var(--attorney-sheet-scale));
    transform-origin: top left;
}

#fineslist::-webkit-scrollbar,
#results::-webkit-scrollbar {
    width: 8px;
    display: block;
}

#fineslist::-webkit-scrollbar-thumb,
#results::-webkit-scrollbar-thumb {
    background-color: rgba(15, 107, 107, 0.28);
    border-radius: 999px;
}

#fineslist::-webkit-scrollbar-track,
#results::-webkit-scrollbar-track {
    background: transparent;
}

:root[data-theme="dark"] {
    --textprim: #e2e8f0;
    --textsecond: #f8fafc;
    --textmuted: #94a3b8;
    --button: #243041;
    --accent: #2dd4bf;
    --accent-strong: #14b8a6;
    --background: #0b0f14;
    --inputs: #12171f;
    --surface-muted: #1a2230;
    --border: #243041;
    --shadow-sm: 0 12px 24px rgba(0, 0, 0, 0.45);
    --shadow-lg: 0 24px 60px rgba(0, 0, 0, 0.6);
    --focus: rgba(45, 212, 191, 0.28);
}

:root[data-theme="dark"] body {
    background:
        radial-gradient(1200px circle at 15% -10%, rgba(45, 212, 191, 0.12), transparent 60%),
        radial-gradient(900px circle at 85% 0%, rgba(248, 113, 113, 0.12), transparent 55%),
        var(--background);
}

:root[data-theme="dark"] #fineslist table tr.fine:hover td {
    background-color: #222a36;
    border-color: #2f3743;
}

:root[data-theme="dark"] #results select {
    color-scheme: dark;
}

:root[data-theme="dark"] .result,
:root[data-theme="dark"] #infoTitle {
    background-color: var(--inputs);
}

:root[data-theme="dark"] #finesListContainer,
:root[data-theme="dark"] #rightsContainer,
:root[data-theme="dark"] #attorneyContainer {
    background-color: var(--inputs);
}

:root[data-theme="dark"] #rightsContainer_title,
:root[data-theme="dark"] #attorneyContainer_title {
    background-color: #141b24;
}

:root[data-theme="dark"] #resetButton {
    background-color: #2b1a1a;
    color: #fca5a5;
    border-color: #3b1f1f;
}

:root[data-theme="dark"] #resetButton:hover {
    background-color: #3b1f1f;
}

:root[data-theme="dark"] #clearButton {
    background-color: var(--inputs);
    color: #fca5a5;
    border-color: #3a2330;
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme]) {
        --textprim: #e2e8f0;
        --textsecond: #f8fafc;
        --textmuted: #94a3b8;
        --button: #243041;
        --accent: #2dd4bf;
        --accent-strong: #14b8a6;
        --background: #0b0f14;
        --inputs: #12171f;
        --surface-muted: #1a2230;
        --border: #243041;
        --shadow-sm: 0 12px 24px rgba(0, 0, 0, 0.45);
        --shadow-lg: 0 24px 60px rgba(0, 0, 0, 0.6);
        --focus: rgba(45, 212, 191, 0.28);
    }

    :root:not([data-theme]) body {
        background:
            radial-gradient(1200px circle at 15% -10%, rgba(45, 212, 191, 0.12), transparent 60%),
            radial-gradient(900px circle at 85% 0%, rgba(248, 113, 113, 0.12), transparent 55%),
            var(--background);
    }

    :root:not([data-theme]) #fineslist table tr.fine:hover td {
        background-color: #222a36;
        border-color: #2f3743;
    }

    :root:not([data-theme]) #results select {
        color-scheme: dark;
    }

    :root:not([data-theme]) .result,
    :root:not([data-theme]) #infoTitle {
        background-color: var(--inputs);
    }

    :root:not([data-theme]) #finesListContainer,
    :root:not([data-theme]) #rightsContainer,
    :root:not([data-theme]) #attorneyContainer {
        background-color: var(--inputs);
    }

    :root:not([data-theme]) #rightsContainer_title,
    :root:not([data-theme]) #attorneyContainer_title {
        background-color: #141b24;
    }

    :root:not([data-theme]) #resetButton {
        background-color: #2b1a1a;
        color: #fca5a5;
        border-color: #3b1f1f;
    }

    :root:not([data-theme]) #resetButton:hover {
        background-color: #3b1f1f;
    }

    :root:not([data-theme]) #clearButton {
        background-color: var(--inputs);
        color: #fca5a5;
        border-color: #3a2330;
    }
}
