/* Grundlegende Einstellungen */
html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

/* Flexbox-Layout für Footer-Fixierung */
body {
    display: flex;
    flex-direction: column;
}
/* Globale Box-Sizing- und Medien-Defaults zur Vermeidung von Überläufen */
*, *::before, *::after {
    box-sizing: border-box;
}
img, video {
    max-width: 100%;
    height: auto;
}

/* Header */
header {
    background-color: #2c3e50;
    color: #ecf0f1;
    padding: 15px;
    text-align: center;
    position: relative;
}

.header-container {
    position: relative;
}

.settings-icon {
    position: absolute;
    top: 15px;
    right: 15px;
    text-decoration: none;
    color: #ecf0f1;
}

.shop-icon {
    position: absolute;
    top: 15px;
    left: 15px;
    text-decoration: none;
    color: #ecf0f1;
    animation: pulse 2s infinite ease-in-out;
}

@keyframes pulse {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.2); opacity: 0.7; }
    100% { transform: scale(1); opacity: 1; }
}

.settings-icon:hover,
.shop-icon:hover {
    color: #bdc3c7;
}

header h1 {
    margin: 0;
    font-size: 2em;
}

nav a {
    text-decoration: none;
    color: #ecf0f1;
    margin: 0 10px;
    font-weight: bold;
}

nav a:hover {
    color: #bdc3c7;
}

/* Shop Hero Section */
.shop-hero {
    background: linear-gradient(135deg, #3498db 0%, #2c3e50 100%);
    color: #fff;
    text-align: center;
    padding: 50px 20px;
    margin-bottom: 20px;
}

.shop-hero h1 {
    margin: 0;
    font-size: 2.5em;
}

.shop-hero p {
    margin: 10px 0 0;
    font-size: 1.2em;
}

/* Shop Container */
.shop-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-around;
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.premium-card {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    padding: 20px;
    width: 300px;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 350px;
}

.premium-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.premium-card h3 {
    margin: 0 0 10px;
    font-size: 1.5em;
    color: #34495e;
}

.premium-card p {
    margin: 0 0 15px;
    color: #666;
    flex-grow: 1;
}

.price {
    font-size: 1.2em;
    font-weight: bold;
    color: #3498db;
    margin: 15px 0;
}

.buy-button {
    background-color: #3498db;
    color: #fff;
    border: none;
    border-radius: 4px;
    padding: 10px 20px;
    font-size: 1em;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.buy-button:hover {
    background-color: #2980b9;
}

/* Main & Container */
main {
    flex: 1;
    padding: 20px;
    background: #ecf0f1;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: #fff;
    padding: 20px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    border-radius: 8px;
}

/* Hilfe-Icon für Boxen im Dashboard */
.top-reports-container,
.feedback-container,
.stats-container,
.top-users-container {
    position: relative;
    overflow: visible; /* Tooltips nicht abschneiden */
}

.help-icon {
    position: absolute;
    top: 6px;            /* näher in die Ecke */
    right: 6px;          /* näher in die Ecke */
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: transparent;          /* transparenter Hintergrund */
    color: #3498db;
    border: 2px solid #3498db;        /* klare Kontur statt Fläche */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 12px;
    cursor: pointer;
    z-index: 8;
    box-shadow: none;
    line-height: 1;
}

.help-icon:hover { background: rgba(52,152,219,0.08); }

.help-icon:focus { outline: 2px solid #90caf9; outline-offset: 2px; }

.help-icon .help-tooltip {
    position: absolute;
    top: 0;                 /* bündig nach oben */
    left: 0;                /* Basisposition für links */
    width: 300px;           /* etwas breiter, damit weniger Zeilen umbrechen */
    background: #2c3e50;
    color: #ecf0f1;
    padding: 10px 12px;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    font-size: 0.92em;
    line-height: 1.35;
    display: none;
    transform: translateX(calc(-100% - 10px)); /* links neben dem Icon platzieren */
    z-index: 5000; /* über Floating-Boxen etc. */
    white-space: normal;
    word-break: break-word;
}

.help-icon .help-tooltip:before {
    content: "";
    position: absolute;
    top: 8px;
    right: -6px;
    border-width: 6px 0 6px 6px;
    border-style: solid;
    border-color: transparent transparent transparent #2c3e50;
}

.help-icon:hover .help-tooltip,
.help-icon.open .help-tooltip,
.help-icon:focus-within .help-tooltip { display: block; }

/* Fixierte Positionierung, wenn per JS berechnet */
.help-icon[data-floating="fixed"] .help-tooltip {
    position: fixed !important;
    transform: none !important;
}

/* Optional: Ausrichtung nach rechts (nur wenn explizit gesetzt) */
.help-icon[data-side="right"] .help-tooltip {
    right: 0;
    left: auto;
    transform: translateX(calc(100% + 10px));
}
.help-icon[data-side="right"] .help-tooltip:before {
    left: -6px;
    right: auto;
    border-width: 6px 6px 6px 0;
    border-color: transparent #2c3e50 transparent transparent;
}

/* Spezieller Offset für eingeklappte Warnkarte – Tooltip weiter nach innen schieben */
#warnkarte-box .help-icon .help-tooltip {
    transform: translateX(calc(100% + 10px)); /* standard: nach rechts aufklappen */
}
#warnkarte-box.expanded .help-icon .help-tooltip {
    transform: translateX(calc(100% + 10px));
}

/* Dark Mode für Hilfe-Tooltips */
.dark-mode .help-icon { color: #64b5f6; border-color: #64b5f6; }
.dark-mode .help-icon:hover { background: rgba(100,181,246,0.12); }
.dark-mode .help-icon .help-tooltip { background: #222; color: #fff; }
.dark-mode .help-icon .help-tooltip:before { border-color: transparent transparent transparent #222; }
.dark-mode .help-icon[data-side="right"] .help-tooltip:before { border-color: transparent #222 transparent transparent; }

/* Mobile: Tooltip unter dem Icon und zentriert */
@media (max-width: 600px) {
    .help-icon .help-tooltip {
        width: min(88vw, 320px);
        right: 50%;
        left: 50%;
        transform: translate(-50%, calc(100% + 10px));
    }
    .help-icon .help-tooltip:before {
        top: -6px;
        left: calc(50% - 6px);
        border-width: 0 6px 6px 6px;
        border-color: transparent transparent currentColor transparent;
    }
}

/* Boxen dürfen Tooltips nicht abschneiden */
.top-users-container { overflow: visible; }

/* Formulare */
form {
    max-width: 400px;
    margin: 0 auto;
}

label {
    display: block;
    margin-top: 15px;
    color: #34495e;
}

input[type="text"],
input[type="email"],
input[type="password"],
select,
textarea {
    width: 100%;
    padding: 10px;
    margin-top: 5px;
    border: 1px solid #bdc3c7;
    border-radius: 4px;
    box-sizing: border-box;
}

textarea {
    resize: vertical;
    min-height: 100px;
}

input[type="submit"] {
    width: 100%;
    padding: 12px;
    margin-top: 20px;
    background-color: #3498db;
    border: none;
    border-radius: 4px;
    color: #fff;
    font-size: 1em;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

input[type="submit"]:hover {
    background-color: #2980b9;
}

/* Switch-Toggle */
.switch-toggle {
    display: inline-block;
    position: relative;
    width: 60px;
    height: 45px;
    margin-left: 20px;
    vertical-align: middle;
}

.switch-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-label {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    border-radius: 30px;
    transition: background-color 0.3s ease;
}

.toggle-label:before {
    position: absolute;
    content: "";
    height: 24px;
    width: 24px;
    left: 3px;
    bottom: 3px;
    background-color: #fff;
    border-radius: 50%;
    transition: transform 0.3s ease-in-out;
}

.switch-toggle input:checked + .toggle-label {
    background-color: #3498db;
}

.switch-toggle input:checked + .toggle-label:before {
    transform: translateX(30px);
}

/* Popup Nachricht */
.popup-message {
    display: none;
    position: fixed;
    top: 80px;
    right: 20px;
    padding: 10px 20px;
    border-radius: 5px;
    color: #fff;
    z-index: 1000;
}

/* Footer */
footer {
    background-color: #2c3e50;
    color: #ecf0f1;
    text-align: center;
    padding: 10px;
    position: relative;
}
footer p a {
    color: #ffffff; /* Weiße Schrift für Links im Footer */
    text-decoration: none; /* Entfernt standardmäßige Unterstreichung, falls gewünscht */
}

footer p a:hover {
    color: #e0e0e0; /* Leicht grauer Ton für Hover-Effekt, für bessere Sichtbarkeit */
    text-decoration: underline; /* Optional: Unterstreichung beim Hover */
}

footer p a:visited {
    color: #ffffff; /* Stellt sicher, dass besuchte Links weiß bleiben */
}

/* (entfernt) Alte Flexbox-Variante von .dashboard-container – Grid wird weiter unten definiert */

/* Gemeinsame Stile für alle Container */
.top-reports-container, .feedback-container, .stats-container {
    background-color: #fff;
    padding: 20px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    border-radius: 8px;
}

/* Container mit fester Breite und Reihenfolge */
.top-reports-container {
    flex: 0 0 20%; /* Feste Breite: 20% */
    order: 1; /* Links */
}

.feedback-container {
    flex: 0 0 45%; /* Feste Breite: 45% */
    order: 2; /* Mitte */
}

.stats-container {
    flex: 0 0 20%; /* Feste Breite: 20% */
    order: 3; /* Rechts */
}

/* Höhe an Inhalt anpassen */
.top-reports-container, .feedback-container, .stats-container {
    height: auto; /* Höhe passt sich dem Inhalt an */
}

/* Styling für die Top-5-Liste */
.top-reports-container ul {
    list-style-type: none;
    padding: 0;
    margin: 0;
}

.top-reports-container ul li {
    margin: 10px 0;
    padding: 5px;
    background-color: #f9f9f9;
    border-radius: 4px;
}

/* Dark Mode */
.dark-mode {
    background-color: #333;
    color: #fff;
}

.dark-mode header,
.dark-mode footer {
    background-color: #222;
    color: #fff;
}

.dark-mode main {
    background-color: #333;
}

.dark-mode .container,
.dark-mode .top-reports-container,
.dark-mode .feedback-container,
.dark-mode .stats-container {
    background-color: #444;
    color: #fff;
    box-shadow: 0 2px 6px rgba(255,255,255,0.1);
}

.dark-mode .shop-hero {
    background: linear-gradient(135deg, #2980b9 0%, #222 100%);
}

.dark-mode .premium-card {
    background: #555;
}

.dark-mode .premium-card h3 {
    color: #fff;
}

.dark-mode .premium-card p {
    color: #ccc;
}

.dark-mode label {
    color: #fff;
}

.dark-mode input[type="text"],
.dark-mode input[type="email"],
.dark-mode input[type="password"],
.dark-mode select,
.dark-mode textarea {
    background-color: #555;
    color: #fff;
    border: 1px solid #777;
}

.dark-mode input[type="text"]::placeholder,
.dark-mode input[type="email"]::placeholder,
.dark-mode input[type="password"]::placeholder,
.dark-mode select,
.dark-mode textarea::placeholder {
    color: #ccc;
}

.dark-mode input[type="submit"] {
    background-color: #3498db;
    color: #fff;
}

.dark-mode input[type="submit"]:hover {
    background-color: #2980b9;
}

.dark-mode table thead tr {
    background-color: #555;
    color: #fff;
}

.dark-mode table tbody tr {
    border-bottom: 1px solid #666;
}

.dark-mode table tbody td {
    color: #fff;
}

.dark-mode .top-reports-container ul li {
    background-color: #555;
    color: #fff;
}

/* Dark Mode für Switch-Toggle */
.dark-mode .switch-toggle .toggle-label {
    background-color: #333;
}

.dark-mode .switch-toggle input:checked + .toggle-label {
    background-color: #3498db;
}

/* Dark Mode für Header-Icons */
.dark-mode .settings-icon,
.dark-mode .shop-icon {
    color: #fff;
}

.dark-mode .settings-icon:hover,
.dark-mode .shop-icon:hover {
    color: #bdc3c7;
}

/* Garage-Liste */
.settings-section .garage-list .garage-plates {
    list-style-type: disc !important;
    padding-left: 30px !important;
    margin: 40px 0 !important;
}

.settings-section .garage-list .garage-plates .garage-item {
    display: flex;
    align-items: center;
    margin-bottom: 30px !important;
}

.settings-section .garage-list .garage-plates .license-plate {
    margin-right: 60px !important;
}

.settings-section .garage-list .delete-garage-form {
    display: inline;
    margin: 0;
}

.settings-section .garage-list .delete-button {
    background-color: #e74c3c;
    color: #fff;
    border: none;
    border-radius: 4px;
    padding: 5px 10px;
    font-size: 0.9em;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.settings-section .garage-list .delete-button:hover {
    background-color: #c0392b;
}

/* Mobile Anpassungen */
@media screen and (max-width: 900px) {
    .dashboard-container {
        flex-direction: column;
        flex-wrap: wrap;
        padding: 16px;
        margin: 0;
    }
    
    .top-reports-container, .feedback-container, .stats-container {
        flex: none;
        width: 100%;
        margin: 10px 0;
        padding: 14px;
        text-align: left;
        box-shadow: 0 2px 6px rgba(0,0,0,0.1);
        border-radius: 8px;
    }
    
    .shop-container {
        flex-direction: column;
        align-items: flex-start;
        padding: 0;
    }

    .premium-card {
        width: 90%;
        max-width: none;
        margin: 10px 0 10px 0;
    }
    
    header, footer {
        padding: 15px;
    }
    
    header h1 {
        font-size: 1.5em;
    }
    
    nav a {
        margin: 0 5px;
        font-size: 0.9em;
    }
    
    main {
        padding: 0 10px 10px 10px;
    }
    
    .container {
        max-width: 100%;
        padding: 16px;
        margin: 0;
    }
    
    form {
        max-width: 100%;
    }
    
    input[type="text"],
    input[type="email"],
    input[type="password"],
    select,
    textarea {
        padding: 8px;
    }
    
    input[type="submit"] {
        padding: 10px;
    }

    .scrollable-table {
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .scrollable-table table {
        width: max-content;
        min-width: 600px;
    }

    .scrollable-table th,
    .scrollable-table td {
        white-space: nowrap;
    }
}

/* Premium-Paket Hervorhebung */
.highlight-premium {
    background: linear-gradient(135deg, #fff6e6, #ffe0b2) !important;
    border: 2px solid #ffc107 !important;
    transform: scale(1.05);
    box-shadow: 0 8px 20px rgba(255, 193, 7, 0.4) !important;
    position: relative;
    overflow: hidden;
    z-index: 1;
    animation: premium-glow 3s infinite alternate;
}

@keyframes premium-glow {
    0% { box-shadow: 0 8px 20px rgba(255, 193, 7, 0.4); }
    100% { box-shadow: 0 8px 25px rgba(255, 193, 7, 0.8); }
}

.highlight-premium::after {
    content: "";
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        to right,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.3) 50%,
        rgba(255, 255, 255, 0) 100%
    );
    transform: rotate(30deg);
    animation: premium-shine 4s infinite;
    z-index: 0;
    pointer-events: none;
}

@keyframes premium-shine {
    0% { transform: translateX(-100%) rotate(30deg); }
    100% { transform: translateX(100%) rotate(30deg); }
}

.highlight-premium h3 {
    color: #b7950b !important;
    font-size: 1.8em !important;
    text-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.highlight-premium .premium-benefits {
    position: relative;
    z-index: 1;
}

.premium-button {
    background: linear-gradient(135deg, #ffc107, #ff9800) !important;
    font-weight: bold !important;
    padding: 12px 24px !important;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2) !important;
    transform: translateY(0);
    transition: transform 0.2s, box-shadow 0.2s !important;
}

.premium-button:hover {
    background: linear-gradient(135deg, #ff9800, #f57c00) !important;
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3) !important;
}

.highlight-premium .price {
    color: #d4af37 !important;
    font-size: 1.4em !important;
    position: relative;
    display: inline-block;
    padding: 5px 10px;
    background: rgba(255, 215, 0, 0.1);
    border-radius: 4px;
    animation: price-pulse 2s infinite;
}

@keyframes price-pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.premium-crown {
    font-size: 32px;
    position: absolute;
    top: -15px;
    right: 20px;
    transform: rotate(15deg);
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
    animation: float 3s ease-in-out infinite;
    z-index: 3;
}

@keyframes float {
    0% { transform: translateY(0) rotate(15deg); }
    50% { transform: translateY(-5px) rotate(15deg); }
    100% { transform: translateY(0) rotate(15deg); }
}

/* Dark Mode Anpassungen für Premium-Karten */
.dark-mode .highlight-premium {
    background: linear-gradient(135deg, #413001, #5e4501) !important;
    border: 2px solid #ffc107 !important;
}

.dark-mode .highlight-premium h3 {
    color: #ffd700 !important;
    text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}

.dark-mode .highlight-premium p,
.dark-mode .highlight-premium .premium-benefits li {
    color: #ffffff !important;
    text-shadow: 0 1px 1px rgba(0,0,0,0.4);
}

.dark-mode .highlight-premium .price {
    color: #ffd700 !important;
    background: rgba(255, 215, 0, 0.15);
}

.dark-mode .premium-button {
    background: linear-gradient(135deg, #ffc107, #ff9800) !important;
    color: #000 !important;
    font-weight: bold;
}

.dark-mode .premium-button:hover {
    background: linear-gradient(135deg, #ff9800, #f57c00) !important;
}

/* Dark Mode für Meldungszähler */
.dark-mode .reports-counter {
    color: #ccc;
}

.dark-mode .counter-zero {
    color: #ff6b6b;
}

.dark-mode .counter-zero .cooldown-timer {
    color: #ff6b6b;
}

.dark-mode .cooldown-timer {
    color: #aaa;
}

.dark-mode .cooldown-message {
    background-color: rgba(211, 47, 47, 0.2);
    border-left: 3px solid #ff6b6b;
    color: #ff6b6b;
}

.dark-mode .cooldown-message a {
    color: #64b5f6;
}

/* Statistik-Link */
.statistics-link {
    color: inherit;
    text-decoration: none;
    display: inline-block;
    position: relative;
}

.statistics-link:after {
    content: "➡️";
    font-size: 0.8em;
    margin-left: 5px;
    opacity: 0.7;
}

.statistics-link:hover {
    color: #3498db;
}

.dark-mode .statistics-link:hover {
    color: #64b5f6;
}

/* Animation für Garage-Nachrichten */
@keyframes highlight-pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.03); box-shadow: 0 4px 10px rgba(0,0,0,0.2); }
    100% { transform: scale(1); }
}

.highlight-animation {
    animation: highlight-pulse 1s ease-in-out;
}

/* Session Message Styling */
#session-message {
    position: fixed;
    top: 20px;
    right: 20px;
    max-width: 350px;
    padding: 15px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 9999;
    transform: translateX(120%);
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

#session-message.show {
    transform: translateX(0);
    opacity: 1;
}

#session-message[data-status="success"] {
    background-color: #4CAF50;
    color: white;
}

#session-message[data-status="error"] {
    background-color: #f44336;
    color: white;
}

#session-message[data-status="info"] {
    background-color: #2196F3;
    color: white;
}

#session-message[data-status="warning"] {
    background-color: #ff9800;
    color: white;
}

/* Garage Message Highlight Animation */
@keyframes highlight-pulse {
    0% { background-color: rgba(52, 152, 219, 0.2); }
    50% { background-color: rgba(52, 152, 219, 0.5); }
    100% { background-color: rgba(52, 152, 219, 0.2); }
}

.dark-mode .highlight-animation {
    animation: highlight-pulse-dark 2s;
}

@keyframes highlight-pulse-dark {
    0% { background-color: rgba(100, 181, 246, 0.2); }
    50% { background-color: rgba(100, 181, 246, 0.5); }
    100% { background-color: rgba(100, 181, 246, 0.2); }
}

.highlight-animation {
    animation: highlight-pulse 2s;
}





/* Neuer Stil für Startseite ohne Karten-Look */
.driverrep-section {
    background-color: #f9f9f9;
    padding: 40px 20px;
    margin: 0 auto 40px;
    max-width: 900px;
    border-left: 6px solid #3498db;
    border-radius: 6px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.driverrep-section h2 {
    font-size: 1.6em;
    color: #2c3e50;
    margin-bottom: 15px;
}

.driverrep-section p,
.driverrep-section li {
    font-size: 1.05em;
    line-height: 1.6;
    color: #333;
}

.driverrep-section ul {
    padding-left: 20px;
    margin-top: 10px;
}

.driverrep-section strong {
    color: #2c3e50;
}

.driverrep-callout {
    text-align: center;
    background-color: #f9f9f9;
    font-size: 1.2em;
    max-width: 900px;
    padding: 40px 20px;
    font-weight: bold;
    color: #2c3e50;
    border: 6px solid #e74c3c; /* Roter Rand rundum */
    margin: 0 auto 40px;
}

/* Dark Mode für Index-Boxen */
.dark-mode .driverrep-section {
    background-color: #333;
    color: #f0f0f0;
    border-left-color: #64b5f6;
    box-shadow: 0 2px 10px rgba(255, 255, 255, 0.06);
}
.dark-mode .driverrep-section h2 { color: #64b5f6; }
.dark-mode .driverrep-section p,
.dark-mode .driverrep-section li { color: #e0e0e0; }
.dark-mode .driverrep-section strong { color: #ffffff; }
.dark-mode .driverrep-section a { color: #90caf9; }
.dark-mode .driverrep-section a:hover { color: #b3e5fc; }

.dark-mode .driverrep-callout {
    background-color: #333;
    color: #f0f0f0;
    border-color: #ef5350;
    box-shadow: 0 2px 10px rgba(255, 255, 255, 0.06);
}





@media screen and (max-width: 768px) {
    .info-card {
        margin: 15px 10px;
        padding: 20px;
    }
}

/* Social Media Icons Style */
.social-icons {
    display: flex;
    justify-content: flex-start;  /* Icons nach links ausrichten */
    gap: 15px;  /* Abstand zwischen den Icons */
    position: absolute;  /* Absolute Positionierung im Footer */
    bottom: 15px;  /* Abstand vom unteren Rand des Footers */
    left: 10px;  /* Abstand vom linken Rand des Footers */
}

.social-icon i {
    font-size: 30px;  /* Standardgröße der Icons */
    color: #fff;  /* Standardfarbe der Icons */
    transition: color 0.3s ease, transform 0.3s ease;
}

.social-icon:hover i {
    color: #3498db;  /* Farbe ändern beim Hover */
    transform: scale(1.1);  /* Vergrößern der Icons beim Hover */
}

/* Optional: Färbung für jedes Icon */
.social-icon.facebook i {
    color: #3b5998;  /* Facebook Blau */
}

.social-icon.instagram i {
    color: #e4405f;  /* Instagram Rot */
}

.social-icon.tiktok i {
    color: #000000;  /* TikTok Schwarz */
}

/* Media Query für kleinere Bildschirme (z.B. Smartphones) */
@media (max-width: 768px) {
    .social-icons {
        bottom: 20px;  /* Etwas mehr Abstand vom unteren Rand auf kleineren Bildschirmen */
        left: 20px;  /* Etwas mehr Abstand vom linken Rand */
    }

    .social-icon i {
        font-size: 24px;  /* Reduziert die Größe der Icons auf mobilen Geräten */
    }
}

/* Media Query für sehr kleine Bildschirme (z.B. kleine Smartphones) */
@media (max-width: 480px) {
    .social-icons {
        bottom: 10px;  /* Noch mehr Abstand auf sehr kleinen Bildschirmen */
        left: 15px;  /* Noch mehr Abstand vom linken Rand */
    }

    .social-icon i {
        font-size: 20px;  /* Weitere Reduzierung der Icon-Größe */
    }
}
/* Dashboard Layout mit Grid */
.dashboard-container {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 1.5fr) minmax(0, 1.25fr);
    grid-template-areas:
        "left middle right";
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto 20px auto;
    padding: 20px;
    transition: transform 0.3s ease;
    position: relative; /* neue Stacking-Context-Kontrolle */
    z-index: 2001;      /* über den Floating-Boxen (z-index: 1000) */
}

.left-column {
    grid-area: left;
}

.middle-column {
    grid-area: middle;
}

.right-column {
    grid-area: right;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Verhindert, dass Inhalte Grid-Spalten überlaufen */
.left-column,
.middle-column,
.right-column {
    min-width: 0;
}

/* Boxen im Dashboard dürfen nie breiter als der Container werden */
.top-reports-container,
.feedback-container,
.stats-container,
.top-users-container,
.dashboard-challenge-box {
    max-width: 100%;
    overflow-wrap: anywhere;
}

/* Top-Users Styling */
.topusers-container {
    max-width: 920px;
    margin: 16px auto;
    padding: 16px 16px 8px 16px;
    background-color: var(--content-bg);
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.premium-notice {
    background-color: rgba(52, 152, 219, 0.1);
    border-left: 4px solid #3498db;
    padding: 15px;
    margin: 20px 0;
    border-radius: 4px;
}

.btn-premium {
    display: inline-block;
    background-color: #3498db;
    color: white;
    padding: 10px 20px;
    border-radius: 4px;
    text-decoration: none;
    margin-top: 10px;
    transition: background-color 0.3s;
}

.btn-premium:hover {
    background-color: #2980b9;
}

.user-rank-info {
    margin: 20px 0;
}

.rank-card {
    background-color: var(--card-bg);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.rank-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #3498db;
    color: white;
    padding: 10px 12px;
}

.rank-position {
    font-size: 1.2em;
    font-weight: bold;
}

.rank-level {
    background-color: rgba(255, 255, 255, 0.2);
    padding: 5px 10px;
    border-radius: 4px;
}

.rank-body {
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.rank-name {
    font-size: 1.1em;
    font-weight: bold;
}

.rank-points {
    font-size: 1.1em;
    color: #3498db;
    font-weight: bold;
}

.level-progress {
    padding: 0 15px 15px;
}

.progress-text {
    margin-bottom: 5px;
    font-size: 0.9em;
    color: var(--text-secondary);
}

.progress-bar {
    height: 8px;
    background-color: rgba(52, 152, 219, 0.2);
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background-color: #3498db;
    border-radius: 4px;
}

.top-users-list {
    margin: 16px 0 10px 0;
}

.rank-table {
    width: 100%;
    border-collapse: separate; /* erlaubt Zeilen-Schattierung ohne Lücken */
    border-spacing: 0;
    margin-top: 10px;
    table-layout: fixed; /* stabile Spaltenbreiten */
}

.rank-table th, .rank-table td {
    padding: 10px 12px;
    text-align: left;
    border-bottom: none; /* Linien werden zeilenweise gezeichnet */
    vertical-align: middle;
    line-height: 1.3;
}

.rank-table th {
    background-color: #f1f1f1;
    font-weight: bold;
    color: #555;
}

.rank-table tr:last-child td {
    border-bottom: none;
}

/* Durchgehende Linie pro Zeile ohne Lücken */
.rank-table thead tr { box-shadow: inset 0 -1px #ddd; }
.rank-table tbody tr { box-shadow: inset 0 -1px #ddd; }
.rank-table tbody tr:last-child { box-shadow: none; }

.rank-table .user-info {
    display: block; /* verhindert Flex-Höhenabweichungen in Tabellenzellen */
}

.user-license {
    font-size: 0.8em;
    color: #777;
    margin-top: 3px;
}

.current-user {
    background-color: rgba(52, 152, 219, 0.1);
    font-weight: bold;
}

/* Stabilere Breiten/Höhen im Top-Users-Table */
.rank-table .user-name {
    max-width: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.rank-table .rank-position,
.rank-table .user-level,
.rank-table .user-points {
    white-space: nowrap;
}

/* Feste Spaltenbreiten zur Vermeidung von Layout-Shift */
.rank-table th:nth-child(1), .rank-table td:nth-child(1) { width: 64px; }
.rank-table th:nth-child(2), .rank-table td:nth-child(2) { width: auto; }
.rank-table th:nth-child(3), .rank-table td:nth-child(3) { width: 120px; }
.rank-table th:nth-child(4), .rank-table td:nth-child(4) { width: 120px; }

.ranking-info {
    margin-top: 30px;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #3498db;
}

.ranking-info h3 {
    margin-top: 0;
    margin-bottom: 10px;
    color: #333;
}

.ranking-info ul {
    margin: 0;
    padding-left: 20px;
}

.ranking-info li {
    margin-bottom: 8px;
    color: #555;
}

/* Top-Users im Dashboard */
.top-users-container {
    background-color: var(--content-bg);
    border-radius: 10px;
    padding: 15px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
    overflow: hidden; /* verhindert Überstehen */
    overflow: visible; /* Tooltips dürfen überstehen */
}

.top-users-table-container {
    margin-top: 10px;
}

.top-users-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed; /* stabile Spaltenbreiten */
}

.top-users-table tr {
    border-bottom: 1px solid #eee;
}

.top-users-table tr:last-child {
    border-bottom: none;
}

.top-users-table td {
    padding: 8px 10px;
}

.top-users-table .current-user {
    background-color: rgba(52, 152, 219, 0.1);
    font-weight: bold;
    border-radius: 4px;
}

.user-rank {
    font-weight: bold;
    min-width: 30px;
    color: #666;
}

.user-name {
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 150px;
}

.user-level {
    text-align: center;
    color: var(--text-secondary, #666);
    white-space: nowrap;
}

.user-points {
    text-align: right;
    font-weight: bold;
    color: #3498db;
    white-space: nowrap;
}

.show-more {
    text-align: center;
    padding: 10px;
    margin-top: 5px;
}

.show-more a {
    color: #3498db;
    text-decoration: none;
}

.show-more a:hover {
    text-decoration: underline;
}

.top-users-link,
.statistics-link {
    text-decoration: none;
    color: var(--text-color, #333);
}

.top-users-link:hover,
.statistics-link:hover {
    text-decoration: underline;
}

/* Spalten dürfen Tooltips nicht abschneiden und liegen über Far-Boxen */
.left-column,
.middle-column,
.right-column {
    position: relative;
    z-index: 3000;
    overflow: visible;
}

/* Darkmode für Überschriften in Top-Users und Statistiken */
.dark-mode .top-users-container h3,
.dark-mode .stats-container h3 {
    color: #64b5f6;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.dark-mode .top-users-link,
.dark-mode .statistics-link {
    color: #64b5f6;
}

.dark-mode .top-users-link:hover,
.dark-mode .statistics-link:hover {
    color: #90caf9;
}

/* Darkmode für User-Einträge in der Tabelle */
.dark-mode .user-rank {
    color: #aaa;
}

.dark-mode .user-name {
    color: #fff;
}

.dark-mode .user-level {
    color: #bbb;
}

.dark-mode .top-users-table tr { border-bottom: 1px solid #555; }

.premium-badge {
    color: gold;
    margin-left: 5px;
    font-size: 0.8em;
}

.no-data {
    text-align: center;
    color: var(--text-secondary, #666);
    padding: 15px 0;
    font-style: italic;
    font-size: 0.9em;
}

/* Responsive Design für Dashboard */
@media screen and (max-width: 1200px) {
    .dashboard-container {
        grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
        grid-template-areas:
            "left right"
            "middle middle";
    }
}

@media screen and (max-width: 992px) {
    .dashboard-container {
        grid-template-columns: minmax(0, 1fr);
        grid-template-areas:
            "left"
            "middle"
            "right";
    }
}

@media screen and (max-width: 768px) {
    .dashboard-container {
        grid-template-columns: minmax(0, 1fr);
        grid-template-areas:
            "left"
            "right"
            "middle";
    }
}

/* Zusätzliche Feinjustierung für sehr kleine Geräte */
@media (max-width: 360px) {
    .dashboard-container {
        padding: 12px;
    }
    .top-reports-container,
    .feedback-container,
    .stats-container,
    .top-users-container,
    .dashboard-challenge-box {
        padding: 12px !important;
        margin: 6px 0 !important;
    }
}

/* Filterbereich unter dem Hero */
.shop-filter-wrapper {
    margin: 30px auto 10px auto;
    text-align: center;
    background: #f8f9fa;
    padding: 15px 20px;
    border-radius: 8px;
    width: fit-content;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.shop-filter-wrapper label {
    font-weight: bold;
    margin-right: 10px;
    font-size: 16px;
}

.shop-filter-wrapper select {
    padding: 8px 12px;
    font-size: 15px;
    border: 1px solid #ccc;
    border-radius: 5px;
    background-color: white;
    cursor: pointer;
}

/* Dark Mode für Shop-Filter */
.dark-mode .shop-filter-wrapper {
    background: #2f2f2f;
    box-shadow: 0 2px 5px rgba(255,255,255,0.06);
}
.dark-mode .shop-filter-wrapper label { color: #e0e0e0; }
.dark-mode .shop-filter-wrapper select {
    background-color: #3b3b3b;
    color: #fff;
    border-color: #555;
}
.dark-mode .shop-filter-wrapper select option { background-color: #3b3b3b; color: #fff; }

/* Responsive */
@media (max-width: 600px) {
    .shop-filter-wrapper {
        width: 90%;
    }

    .shop-filter-wrapper label,
    .shop-filter-wrapper select {
        display: block;
        margin: 8px auto;
    }
}

.cart-container {
    width: 320px;
    background-color: #fff;
    border: 1px solid #ddd;
    padding: 15px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    margin-left: 25px;
    float: right;
    position: sticky;
    top: 100px;
}
.cart-container h3 {
    font-size: 18px;
    margin-bottom: 15px;
}
#cart-items {
    list-style: none;
    padding: 0;
    margin-bottom: 10px;
}
#cart-items li {
    border-bottom: 1px solid #eee;
    padding: 5px 0;
    font-size: 14px;
}
.cart-total {
    font-weight: bold;
    margin-bottom: 10px;
}
.cart-checkout {
    width: 100%;
}

/* Quiz Styles */
.quiz-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    background-color: #f8f9fa;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}
.quiz-container h1 {
    font-size: 2em;
    color: #2c3e50;
    margin-bottom: 20px;
}
.quiz-question {
    margin-bottom: 20px;
}
.quiz-question p {
    font-size: 1.2em;
    margin-bottom: 10px;
}
.quiz-question ul {
    list-style: none;
    padding: 0;
}
.quiz-question li {
    margin-bottom: 10px;
}
.quiz-feedback {
    margin-top: 20px;
    font-size: 1.1em;
    color: #27ae60;
}
.quiz-progress {
    margin-top: 20px;
}
.progress-bar {
    background-color: #ddd;
    border-radius: 5px;
    overflow: hidden;
}
.progress-fill {
    background-color: #3498db;
    height: 20px;
    width: 0;
    transition: width 0.3s ease;
}
.quiz-score {
    margin-top: 20px;
    font-size: 1.2em;
    text-align: center;
}
.quiz-score button {
    margin-top: 10px;
    padding: 10px 20px;
    background-color: #3498db;
    color: #fff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}
.quiz-score button:hover {
    background-color: #2980b9;
}

/* Ranking Styles */
.ranking-container {
    max-width: 800px;
    margin: 40px auto;
    padding: 20px;
    background-color: #f8f9fa;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}
.ranking-container h2 {
    font-size: 1.8em;
    color: #2c3e50;
    margin-bottom: 20px;
}
.ranking-container ul {
    list-style: none;
    padding: 0;
}
.ranking-container li {
    font-size: 1.1em;
    margin-bottom: 10px;
}

/* Responsive Design for Quiz and Ranking */
@media screen and (max-width: 768px) {
    .quiz-container, .ranking-container {
        padding: 15px;
    }
    .quiz-container h1, .ranking-container h2 {
        font-size: 1.5em;
    }
    .quiz-question p {
        font-size: 1em;
    }
    .quiz-score {
        font-size: 1em;
    }
}

/* Responsive Verbesserungen für Top-Users Seite */
@media screen and (max-width: 768px) {
    .topusers-container { padding: 16px; }
    .rank-table th, .rank-table td { padding: 10px 12px; }
    .top-users-list { margin: 20px 0; }
}

@media (max-width: 600px) {
    .rank-table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
    .rank-table table { width: max-content; }
}

/* Challenges Styles */

/* Abstand unter vorherigem Element in der linken Spalte */
.left-column > * + * {
    margin-top: 25px;
}

/* Quiz-Container im Stil von Top-User-Box */
#quiz-container {
    background-color: var(--content-bg);
    border-radius: 10px;
    padding: 15px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

/* Überschrift */
#quiz-container h3 {
    font-size: 1.3em;
    color: #333;
    margin-bottom: 10px;
    text-shadow: none;
}

/* Link im Quiz */
#quiz-container a {
    color: #3498db;
    text-decoration: none;
}

#quiz-container a:hover {
    color: #2980b9;
    text-decoration: underline;
}

/* Dark Mode */
.dark-mode #quiz-container {
    background-color: #444;
    color: #fff;
    box-shadow: 0 2px 6px rgba(255, 255, 255, 0.1);
}
.dark-mode .top-users-container {
    box-shadow: 0 2px 6px rgba(255,255,255,0.1);
}

.dark-mode #quiz-container h3 {
    color: #64b5f6;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.dark-mode #quiz-container a {
    color: #64b5f6;
}

.dark-mode #quiz-container a:hover {
    color: #90caf9;
}

.dark-mode #quiz-container p {
    color: #ccc;
}

/* Mobile Ansicht */
@media screen and (max-width: 768px) {
    #quiz-container {
        padding: 10px;
    }

    #quiz-container h3 {
        font-size: 1.2em;
    }
}

.quiz-question-container {
    background-color: var(--content-bg);
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    text-align: center;
    margin-bottom: 20px;
}

.quiz-question-container .question-image {
    margin-bottom: 20px;
}

.quiz-question-container .question-text h2 {
    font-size: 1.4em;
    color: var(--text-color, #222);
    margin-bottom: 20px;
}

.quiz-question-container .answer-options label {
    display: block;
    margin: 10px 0;
    font-size: 1em;
    cursor: pointer;
    color: var(--text-color, #222);
}

.quiz-question-container .submit-button {
    margin-top: 20px;
    padding: 10px 20px;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 1em;
    cursor: pointer;
}

.quiz-question-container .submit-button:hover {
    background-color: #2980b9;
}

/* Dark Mode */
.dark-mode .quiz-question-container {
    background-color: #444;
    color: #fff;
    box-shadow: 0 2px 6px rgba(255, 255, 255, 0.1);
}

.dark-mode .quiz-question-container .question-text h2,
.dark-mode .quiz-question-container .answer-options label {
    color: #ecf0f1;
}

.dark-mode .quiz-question-container .submit-button {
    background-color: #2980b9;
}

.dark-mode .quiz-question-container .submit-button:hover {
    background-color: #1c6ea4;
}

.top-teilnehmer-container {
    background-color: var(--content-bg);
    color: var(--text-color);
    border-radius: 10px;
    padding: 15px;
    margin-top: 20px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05); /* angepasst an quiz/top-users */
}

.top-teilnehmer-header,
.top-teilnehmer-row {
    display: flex;
    align-items: center;
    font-size: 0.95em;
    padding: 8px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.top-teilnehmer-header {
    font-weight: bold;
    color: #3498db;
}

.top-teilnehmer-row {
    font-weight: normal;
    color: var(--text-color);
}

/* Dark Mode */
.dark-mode .top-teilnehmer-container {
    background-color: #333;
    color: #fff;
    box-shadow: 0 2px 6px rgba(255, 255, 255, 0.1);
}

.dark-mode .top-teilnehmer-header {
    color: #90caf9;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}



/* === Challenge Layout (analog zu quiz/dashboard) === */
.page-container {
    padding: 20px;
}

.dashboard-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
}

/* Linke Box: Info */
.challenge-info-box {
    flex: 1;
    min-width: 280px;
    max-width: 300px;
    background-color: var(--content-bg);
    color: var(--text-color);
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

.challenge-info-box ul.challenge-meta {
    list-style: none;
    padding-left: 0;
    margin: 10px 0;
}

.challenge-info-box ul.challenge-meta li {
    margin-bottom: 5px;
}

/* Mittlere Box: Fortschritt */
.challenge-main-box {
    flex: 2;
    min-width: 320px;
    background-color: var(--content-bg);
    color: var(--text-color);
    padding: 25px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

.challenge-progress {
    list-style: none;
    padding: 0;
    margin: 15px 0;
}

.challenge-progress li {
    margin-bottom: 10px;
    font-size: 1.1em;
}

.challenge-bar-container {
    margin-top: 20px;
}

.challenge-bar-bg {
    width: 100%;
    background: rgba(255,255,255,0.1);
    height: 20px;
    border-radius: 10px;
    overflow: hidden;
}

.challenge-bar-fill {
    background: #4caf50;
    height: 100%;
    transition: width 0.4s ease;
}

/* Rechte Box: Rangliste */
.challenge-ranking-box {
    flex: 1;
    min-width: 280px;
    max-width: 300px;
    background-color: var(--content-bg);
    color: var(--text-color);
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

.challenge-ranking-box ul.ranking-list {
    list-style: none;
    padding-left: 0;
    margin-top: 10px;
}

.challenge-ranking-box ul.ranking-list li {
    margin-bottom: 8px;
}

/* Button */
.challenge-start-btn {
    margin-top: 15px;
    background-color: #2196f3;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1em;
    transition: background-color 0.2s ease;
}

.challenge-start-btn:hover {
    background-color: #1976d2;
}

/* Light Mode Fallback */
body:not(.dark-mode) .challenge-info-box,
body:not(.dark-mode) .challenge-main-box,
body:not(.dark-mode) .challenge-ranking-box {
    background-color: #f9f9f9;
    color: #222;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

.dashboard-challenge-box {
    background-color: var(--content-bg);
    color: var(--text-color);
    border-radius: 10px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15); /* heller Schatten */
    padding: 15px;
    margin-top: 20px;
    font-size: 0.95em;
}

/* Überschrift: Blau wie bei anderen Boxen */
.dashboard-challenge-box h3 {
    margin-top: 0;
    color: #2196f3;
    font-weight: bold;
}

/* Klassischer Link – kein Button */
.dashboard-challenge-box .challenge-link {
    color: #3498db;
    text-decoration: none;
    font-weight: bold;
}

.dashboard-challenge-box .challenge-link:hover {
    color: #1976d2;
    text-decoration: underline;
}

/* Dark Mode */
.dark-mode .dashboard-challenge-box {
    background-color: #333;
    box-shadow: 0 2px 6px rgba(255, 255, 255, 0.05);
    color: #f0f0f0;
}

.dark-mode .dashboard-challenge-box h3 {
    color: #64b5f6;
}

.dark-mode .dashboard-challenge-box .challenge-link {
    color: #64b5f6;
}

.dark-mode .dashboard-challenge-box .challenge-link:hover {
    color: #90caf9;
}

@media screen and (max-width: 768px) {
    .settings-section {
        margin: 15px auto !important;
        padding: 15px !important;
        width: calc(100% - 20px) !important;
        box-sizing: border-box;
        border-radius: 8px;
        background-color: var(--content-bg, #f9f9f9);
        box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    }

    .settings-section h2 {
        font-size: 1.4em;
        margin-bottom: 15px;
    }

    .settings-section label,
    .settings-section select,
    .settings-section input,
    .settings-section textarea {
        width: 100% !important;
        font-size: 1em;
        margin-bottom: 10px;
        display: block;
        box-sizing: border-box;
    }

    .settings-section .garage-list {
        margin-top: 20px;
    }

    .settings-section .garage-plates {
        padding-left: 20px;
    }

    .settings-section .garage-item {
        flex-direction: column;
        align-items: flex-start;
    }

    .settings-section .license-plate {
        margin-right: 0 !important;
        margin-bottom: 10px;
    }

    .settings-section .delete-button {
        width: 100%;
        text-align: center;
    }
}

@media screen and (max-width: 900px) {
  .dashboard-challenge-box,
  .dashboard-box,
  .feedback-container,
  .stats-container,
  .top-reports-container,
  .top-users-container {
    width: 100% !important;
    margin: 10px 0 !important;
    box-sizing: border-box;
    padding: 16px !important;
    border-radius: 10px !important;
    background-color: var(--content-bg, #fff) !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1) !important;
    flex-shrink: 0 !important;
  }
  .dark-mode .dashboard-challenge-box,
  .dark-mode .dashboard-box,
  .dark-mode .feedback-container,
  .dark-mode .stats-container,
  .dark-mode .top-reports-container,
  .dark-mode .top-users-container {
    background-color: #444 !important;
    color: #fff !important;
    box-shadow: 0 2px 6px rgba(255,255,255,0.05) !important;
  }
}
@media screen and (max-width: 768px) {
  .dashboard-challenge-box,
  .dashboard-box,
  .feedback-container,
  .stats-container,
  .top-reports-container,
  .top-users-container {
    width: 100% !important;
    margin: 10px 0 !important;
    box-sizing: border-box;
    padding: 16px !important;
    border-radius: 10px !important;
    background-color: var(--content-bg, #fff) !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1) !important;
    flex-shrink: 0 !important;
  }
  .dark-mode .dashboard-challenge-box,
  .dark-mode .dashboard-box,
  .dark-mode .feedback-container,
  .dark-mode .stats-container,
  .dark-mode .top-reports-container,
  .dark-mode .top-users-container {
    background-color: #444 !important;
    color: #fff !important;
    box-shadow: 0 2px 6px rgba(255,255,255,0.05) !important;
  }
}
@media (max-width: 600px) {
  .dashboard-challenge-box,
  .dashboard-box,
  .feedback-container,
  .stats-container,
  .top-reports-container,
  .top-users-container {
    width: 100% !important;
    margin: 8px 0 !important;
    padding: 14px !important;
    border-radius: 10px !important;
    background-color: var(--content-bg, #fff) !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1) !important;
    flex-shrink: 0 !important;
  }
  .top-users-table-container { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .dark-mode .dashboard-challenge-box,
  .dark-mode .dashboard-box,
  .dark-mode .feedback-container,
  .dark-mode .stats-container,
  .dark-mode .top-reports-container,
  .dark-mode .top-users-container {
    background-color: #444 !important;
    color: #fff !important;
    box-shadow: 0 2px 6px rgba(255,255,255,0.05) !important;
  }
}
@media (max-width: 480px) {
  .dashboard-challenge-box,
  .dashboard-box,
  .feedback-container,
  .stats-container,
  .top-reports-container,
  .top-users-container {
    width: 100% !important;
    margin: 6px 0 !important;
    padding: 12px !important;
    border-radius: 10px !important;
    background-color: var(--content-bg, #fff) !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1) !important;
    flex-shrink: 0 !important;
  }
  .dark-mode .dashboard-challenge-box,
  .dark-mode .dashboard-box,
  .dark-mode .feedback-container,
  .dark-mode .stats-container,
  .dark-mode .top-reports-container,
  .dark-mode .top-users-container {
    background-color: #444 !important;
    color: #fff !important;
    box-shadow: 0 2px 6px rgba(255,255,255,0.05) !important;
  }
}





/* Settings Container Grundstil */
.settings-container {
    display: flex;
    gap: 30px;
    margin: 20px auto;
    padding: 20px;
    min-height: calc(100vh - 200px); /* Mindesthöhe für den Content */
    position: relative;
    z-index: 1;
}

/* Mobile Anpassungen für Settings */
@media screen and (max-width: 768px) {
    .settings-container {
        flex-direction: column;
        padding: 10px;
    }

    .settings-sidebar {
        flex: none;
        width: 300px;
        margin-bottom: 20px;
    }

    .settings-menu {
        display: flex;
        flex-wrap: wrap;
        gap: 10px;
    }

    .settings-menu li {
        flex: 1 1 calc(50% - 5px);
        margin: 0;
    }

    .settings-menu li a {
        text-align: center;
        padding: 15px 10px;
    }

    .settings-content {
        width: 100%;
    }

    .settings-section {
        margin: 0;
        padding: 15px;
    }

    .form-row {
        flex-direction: column;
        gap: 10px;
    }

    .form-group {
        width: 100%;
    }

    .half {
        width: 100%;
    }

    input[type="text"],
    input[type="email"],
    input[type="password"],
    input[type="tel"],
    input[type="date"],
    textarea {
        width: 100%;
        padding: 12px;
        font-size: 16px;
    }

    input[type="submit"] {
        width: 100%;
        padding: 15px;
        font-size: 16px;
    }

    .garage-item {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }

    .delete-button {
        width: 100%;
        padding: 10px;
    }

    .settings-subsection {
        padding: 15px;
    }
}

.far-wrapper {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 20px;
    max-width: 960px;
    margin: 40px auto 0 auto;
    box-sizing: border-box;
    flex-wrap: wrap;
}

.far-left,
.far-right {
    width: 280px;
    padding: 20px;
    background-color: var(--content-bg, #fff);
    border-radius: 10px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    box-sizing: border-box;
    flex-shrink: 0;
}

/* === Dark Mode === */
.dark-mode .far-left,
.dark-mode .far-right {
    background-color: #444;
    color: #fff;
    box-shadow: 0 2px 6px rgba(255,255,255,0.05);
}

/* === Mobile === */
@media screen and (max-width: 768px) {
    .far-wrapper {
        flex-direction: column;
        align-items: center;
    }

    .far-left,
    .far-right {
        width: calc(100% - 20px);
        margin: 10px 0;
    }
}

.far-wrapper {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 20px;
    max-width: 960px;
    margin: 40px auto 0 auto;
    box-sizing: border-box;
    flex-wrap: wrap;
}

.far-left,
.far-right {
    width: 280px;
    padding: 20px;
    background-color: var(--content-bg, #fff);
    border-radius: 10px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    box-sizing: border-box;
    flex-shrink: 0;
}

/* === Dark Mode === */
.dark-mode .far-left,
.dark-mode .far-right {
    background-color: #444;
    color: #fff;
    box-shadow: 0 2px 6px rgba(255,255,255,0.05);
}

/* === Mobile === */
@media screen and (max-width: 768px) {
    .far-wrapper {
        flex-direction: column;
        align-items: center;
    }

    .far-left,
    .far-right {
        width: calc(100% - 20px);
        margin: 10px 0;
    }
}

/* Floating-Boxen für Far Left und Far Right auf gleiche Höhe und Länge wie dashboard-container */
.floating-box {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 250px;
    background: #2c2c2c;
    color: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    padding: 24px 18px;
    z-index: 900; /* niedriger als Tooltips/Container, damit nichts überdeckt wird */
    height: calc(var(--dashboard-height, 700px)); /* Fallback falls JS nicht greift */
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    transition: width 0.3s ease, left 0.3s ease, right 0.3s ease;
    cursor: pointer;
    user-select: none;
    overflow: visible; /* Tooltips zulassen */
}
.expand-hint {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.6);
    color: #fff;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    line-height: 1;
    pointer-events: none;
    border: 2px solid rgba(255,255,255,0.5);
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}
.far-left .expand-hint { right: -14px; }
.far-right .expand-hint { left: -14px; }

@media (max-width: 1200px) {
  .far-left .expand-hint { right: 6px; }
  .far-right .expand-hint { left: 6px; }
  .expand-hint { width: 28px; height: 28px; }
}
.far-left {
    left: 32px;
}
.far-right {
    right: 32px;
}

/* Hilfe-Icon in Warnkarte oben links platzieren */
#warnkarte-box .help-icon {
    left: 8px;
    right: auto;
}

/* Expand/Collapse States */
.floating-box.expand-left {
    width: 420px;
}
.floating-box.expand-right {
    width: 420px;
}

.floating-box .map-container {
    display: none;
    margin-top: 12px;
    background: #1f1f1f;
    border-radius: 8px;
    height: 260px;
    color: #bbb;
}
#warnkarte-box.expanded { flex-direction: row; gap: 12px; }
#warnkarte-box.expanded .map-container { display: block; }
.de-map-placeholder { width: 100%; text-align: center; font-size: 14px; padding: 12px; }

/* Zweispaltiges Layout in Warnkarten-Box: Text links, Karte rechts */
#warnkarte-box.expanded .floating-content { flex: 1 1 55%; padding-right: 12px; }
#warnkarte-box.expanded .map-container { flex: 0 0 45%; }

/* Sicherstellen, dass die rechte Box Inhalte weiterhin untereinander zeigt */
.far-right.expanded { flex-direction: column; gap: 12px; }

/* Wenn Warnkarte expandiert, reduziere die Breite der rechten Box */
.layout-expand-left .far-right { width: 220px; }
/* Wenn rechte Box expandiert, reduziere Warnkarte */
.layout-expand-right .far-left { width: 220px; }

/* Schiebt die Haupt-Grid-Box beim Expand, damit nichts überlappt */
.layout-expand-left .dashboard-container { transform: translateX(220px); }
.layout-expand-right .dashboard-container { transform: translateX(-220px); }

@media (max-width: 900px) {
    .floating-box {
        position: static;
        transform: none;
        width: 100%;
        max-width: 100%;
        margin: 12px auto 0;
        height: auto;
        z-index: auto;
    }
}

/* Mobile-Optimierung nur für die neuen Floating-/Expand-Elemente */
@media (max-width: 900px) {
  /* Dashboard nicht verschieben auf Mobil */
  .layout-expand-left .dashboard-container,
  .layout-expand-right .dashboard-container { transform: none; }

  /* Pfeil-Hinweise ausblenden auf kleinen Screens (Platz sparen) */
  .expand-hint { display: none; }

  /* Warnkarte: Spalten auf Mobil untereinander anordnen */
  #warnkarte-box.expanded { flex-direction: column; }
  #warnkarte-box.expanded .floating-content,
  #warnkarte-box.expanded .map-container { flex: none; width: 100%; padding-right: 0; }
  #warnkarte-box .map-container { height: 220px; }

  /* Rechte Box: bleibt einspaltig – bereits Standard, hier nur Sicherheit */
  .far-right.expanded { flex-direction: column; }

  /* Auf Mobil keine seitliche Verkleinerung anderer Boxen beim Expand */
  .layout-expand-left .far-right,
  .layout-expand-right .far-left {
    width: 100% !important;
  }

  /* Auf Mobil keine feste Expand-Breite */
  .floating-box.expand-left,
  .floating-box.expand-right {
    width: 100% !important;
  }
}

/* Mobile Carousel (nur mobil aktiv) */
@media (max-width: 900px) {
  #mobile-carousel {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    scroll-behavior: smooth;
    touch-action: auto; /* erlaubt horizontales UND vertikales Scrollen */
    gap: 12px;
    padding: 0 0 28px 0; /* Platz für Pagination-Dots */
    margin: 0 auto;
    width: 100%;
    box-sizing: border-box;
  }
  #mobile-carousel:focus {
    outline: none;
  }
  .mobile-slide {
    scroll-snap-align: start;
    scroll-snap-stop: always;
    flex: 0 0 100%;
    min-width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }

  /* Kombiscreen: Top-5 + Top-10 in einer Slide */
  .top-combo-slide {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    align-items: start;
    width: 100%;
  }
  .top-combo-slide > * { min-width: 0; }
  @media (min-width: 600px) and (max-width: 900px) {
    .top-combo-slide { grid-template-columns: 1fr 1fr; }
  }

  /* Pagination Dots (Striche) */
  .carousel-pagination {
    display: flex;
    justify-content: center;
    gap: 6px;
    position: sticky;
    bottom: env(safe-area-inset-bottom, 0);
    margin: 8px 0 6px 0;
    padding-bottom: calc(env(safe-area-inset-bottom, 0) + 2px);
    z-index: 10;
  }
  .carousel-dot {
    width: 18px;
    height: 4px;
    border-radius: 3px;
    background: rgba(0,0,0,0.25);
    transition: background-color 0.2s ease, width 0.2s ease;
  }
  .carousel-dot[aria-current="true"] {
    background: rgba(0,0,0,0.7);
    width: 26px;
  }
  /* Darkmode Farben für Dots */
  .dark-mode .carousel-dot { background: rgba(255,255,255,0.35); }
  .dark-mode .carousel-dot[aria-current="true"] { background: rgba(255,255,255,0.85); }
}

/* Dynamische Höhe per JS setzen */
:root {
    --dashboard-height: 700px;
}

@media (max-width: 900px) {
    .floating-box {
        position: static;
        width: 100%;
        max-width: 100%;
        margin: 16px auto 0 auto;
        display: block;
        height: auto !important;
        transform: none;
        z-index: auto;
    }
}

/* Dark Mode für Floating-Boxen Far Left/Right */
.dark-mode .floating-box,
.dark-mode .far-left,
.dark-mode .far-right {
    background: #444 !important;
    color: #fff !important;
    box-shadow: 0 2px 8px rgba(255,255,255,0.08);
    border: none;
}

/* Light Mode für Floating-Boxen Far Left/Right */
body:not(.dark-mode) .floating-box,
body:not(.dark-mode) .far-left,
body:not(.dark-mode) .far-right {
    background: #fff !important;
    color: #222 !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.10);
    border: none;
}

/* Subboxen in der rechten Far-Box */
.far-right .subbox {
    background: #fff;
    color: #222;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.10);
    padding: 16px 14px;
    margin-bottom: 18px;
}
.far-right .subbox:last-child {
    margin-bottom: 0;
}
.far-right .subbox h4 {
    margin-top: 0;
    margin-bottom: 8px;
    font-size: 1.08em;
    font-weight: bold;
}

/* Subbox-Listen: bei Überlänge scrollbar machen, um Layout zu schützen */
.far-right .subbox .subbox-list {
    max-height: 180px;
    overflow-y: auto;
    margin: 0;
    padding-left: 18px;
    -webkit-overflow-scrolling: touch;
}

/* Optional: leichtes Innenabstands-Polster für Scrollbereich */
.far-right .subbox .subbox-list li {
    padding: 2px 0;
}

.dark-mode .far-right .subbox {
    background: #444;
    color: #fff;
    box-shadow: 0 2px 6px rgba(255,255,255,0.05);
}

/* Admin: Benutzerrollen – Tools-Zeile */
.admin-user-tools {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 10px 0 5px 0;
    flex-wrap: wrap;
}

.user-search-form {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1 1 auto; /* Formular darf wachsen und Platz belegen */
}

.user-search-input {
    padding: 6px 10px;
    flex: 1 1 420px; /* Basisbreite, wächst bis zum verfügbaren Platz */
    width: auto; /* nicht hart begrenzen */
    max-width: 100%;
    min-width: 220px;
    border: 1px solid #bdc3c7;
    border-radius: 4px;
    background: #fff;
    color: #333;
}

.user-search-button {
    padding: 6px 12px;
    border: none;
    border-radius: 4px;
    background: #3498db;
    color: #fff;
    cursor: pointer;
}

.user-search-button:hover { background: #2980b9; }

.user-stats { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.user-stat { font-weight: bold; color: #2c3e50; }
.user-stat.beta { color: #8e44ad; }
.user-stat.premium { color: #d35400; }

/* Dark Mode für Admin-Tools */
.dark-mode .user-search-input {
    background: #333;
    color: #fff;
    border-color: #555;
}
.dark-mode .user-search-button { background: #1f6fb2; }
.dark-mode .user-search-button:hover { background: #195a8f; }
.dark-mode .user-stat { color: #e0e0e0; }
.dark-mode .user-stat.beta { color: #c39bd3; }
.dark-mode .user-stat.premium { color: #f5b041; }

.custom-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    z-index: 10000;
    padding: 20px;
    width: 300px;
    text-align: center;
    border: 2px solid #3498db;
}

.custom-popup .popup-content {
    margin-bottom: 20px;
    font-size: 1.1em;
    color: #333;
}

.custom-popup button {
    background-color: #3498db;
    color: #fff;
    border: none;
    border-radius: 4px;
    padding: 10px 20px;
    cursor: pointer;
    margin: 5px;
    transition: background-color 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.custom-popup button:hover {
    background-color: #2980b9;
}

.dark-mode .custom-popup {
    background-color: #333;
    color: #fff;
    box-shadow: 0 4px 8px rgba(255, 255, 255, 0.1);
    border: 2px solid #64b5f6;
}

.dark-mode .custom-popup .popup-content {
    color: #ecf0f1;
}

.dark-mode .custom-popup button {
    background-color: #64b5f6;
    color: #fff;
    box-shadow: 0 2px 4px rgba(255, 255, 255, 0.2);
}

@media (max-width: 900px) {
    #warnkarte-box {
        flex-direction: column;
        width: 100%;
        padding: 0;
    }
    .far-right {
        width: 100%;
        margin: 10px 0;
    }
}

@media (max-width: 600px) {
    #warnkarte-box .help-tooltip,
    #far-right-box .help-tooltip {
        width: min(88vw, 320px);
        right: 50%;
        left: 50%;
        transform: translate(-50%, calc(100% + 10px));
    }
    #warnkarte-box .help-tooltip:before,
    #far-right-box .help-tooltip:before {
        top: -6px;
        left: calc(50% - 6px);
        border-width: 0 6px 6px 6px;
        border-color: transparent transparent currentColor transparent;
    }
}

