:root {
    /* Palette nach dem INTY-LAN Logo: Rot, Grau, Schwarz */
    --bg-color: #f2f2f2;
    /* Neutrales Hellgrau wie der Logo-Hintergrund */
    --text-color: #232323;
    /* Logo-Schwarz */
    --primary-color: #c8202b;
    /* Logo-Rot, für Text und Buttons leicht abgedunkelt */
    --primary-bright: #e01f28;
    /* Reines Logo-Rot (Herz) */
    --primary-dark: #a3151f;
    /* Hover-Variante */
    --logo-grey: #b3b3b3;
    /* Logo-Grau (rechte Herzhälfte) */
    --secondary-color: #27ae60;
    /* Success green */
    --accent-color: #4a4a4a;
    /* Dunkles Grau für Hervorhebungen */
    --card-bg: #ffffff;
    --free-color: #4ade5a;
    /* Grün - Frei */
    --vorgemerkt-color: #f2e34d;
    /* Gelb - Vorgemerkt */
    --occupied-color: #a32941;
    /* Dunkelrot - Bezahlt/Belegt */
    --plan-bg: #e9e9e9;
    --plan-panel-dark: #7d7d7d;
    --plan-panel-light: #dcdcdc;
    --plan-panel-circle: #efefef;
    --font-family: 'Outfit', sans-serif;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    background-color: var(--bg-color);
    color: var(--text-color);
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: center;

    min-height: 100vh;
}

.container {
    width: 100%;
    max-width: 1200px;
    padding: 20px;
}

header {
    width: 100%;
    text-align: center;
    margin-bottom: 30px;
}

header h1 {
    font-size: 3rem;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
    text-transform: uppercase;
    letter-spacing: 2px;
}

header .date {
    font-size: 1.5rem;
    color: #7f8c8d;
}

main {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 30px;
    align-items: center;
}

.content-section {
    width: 100%;
    max-width: 1200px;
    box-sizing: border-box;
}

#map-section {
    position: relative;
    width: 100%;
    overflow: auto;
    display: flex;
    justify-content: center;
}

/* ==========================================================================
   Sitzplan 2027 (A-Kreis / B-Kreis / Orga)
   Zeichenfläche 736 x 656, alle Elemente sind prozentual positioniert.
   Schriftgrößen in cqw, damit der Plan als Ganzes mitskaliert.
   ========================================================================== */

#seat-map-container {
    position: relative;
    width: 100%;
    /* 656 Design-Pixel abzüglich 44 abgeschnittener Pixel oben */
    aspect-ratio: 736 / 612;
    container-type: inline-size;
    background: var(--plan-bg);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.12);
    font-family: 'Consolas', 'Courier New', monospace;
    user-select: none;
}

/*
   Die Zeichenfläche bleibt intern 736 x 656, damit die Koordinaten aus
   seat_layout unverändert gültig bleiben. Sie wird lediglich um 44 Pixel
   nach oben geschoben, sodass der leere Streifen oben wegfällt.
   -44/612 = -7.1895 %, 656/612 = 107.1895 %
*/
#seat-plan-stage {
    position: absolute;
    left: 0;
    top: -7.1895%;
    width: 100%;
    height: 107.1895%;
}

#seat-plan-stage>div {
    position: absolute;
    box-sizing: border-box;
}

.plan-note {
    display: flex;
    align-items: center;
    font-size: 1.6cqw;
    font-weight: bold;
    letter-spacing: 0.05cqw;
    color: #222;
}

.plan-panel--orga {
    background: var(--plan-panel-dark);
}

.plan-panel--legend {
    background: var(--plan-panel-light);
}

.plan-panel--circle {
    background: var(--plan-panel-circle);
}

.plan-bar {
    background: #111;
}

.plan-server {
    background: #a9a9a9;
    border: 0.15cqw solid #8a8a8a;
}

.plan-swatch {
    border: 0.15cqw solid rgba(0, 0, 0, 0.35);
}

.plan-swatch--free {
    background: var(--free-color);
}

.plan-swatch--vorgemerkt {
    background: var(--vorgemerkt-color);
}

.plan-swatch--occupied {
    background: var(--occupied-color);
}

.plan-caption {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.7cqw;
    font-weight: bold;
    letter-spacing: 0.12cqw;
    color: #222;
    text-align: center;
}

.plan-caption--light {
    color: #f2f2f2;
}

.plan-vlabel {
    display: flex;
    align-items: center;
    justify-content: center;
    writing-mode: vertical-rl;
    font-size: 1.7cqw;
    font-weight: bold;
    letter-spacing: 0.12cqw;
    color: #f2f2f2;
}

.plan-vlabel--dark {
    color: #444;
}

/* --- Sitzplätze -------------------------------------------------------- */

#seats-overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
}

.seat {
    position: absolute;
    box-sizing: border-box;
    border: 0.25cqw solid var(--plan-panel-circle);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 0.2cqw;
    text-align: center;
    overflow: hidden;
    line-height: 1.1;
    transition: filter 0.15s, box-shadow 0.15s;
}

.seat-number {
    font-size: 4cqw;
    font-weight: bold;
    letter-spacing: 0.1cqw;
}

.seat-label {
    font-size: 1.5cqw;
    font-weight: bold;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.seat:hover {
    filter: brightness(1.12);
    box-shadow: inset 0 0 0 0.4cqw rgba(0, 0, 0, 0.45);
    z-index: 10;
}

/* Sitzplan ohne Login: reine Anzeige, keine Interaktion */
.seat--readonly {
    cursor: default;
}

.seat--readonly:hover {
    filter: none;
    box-shadow: none;
    z-index: auto;
}

.seat--readonly.my-seat:hover {
    box-shadow: inset 0 0 0 0.55cqw var(--accent-color);
}

.seat.free {
    background-color: var(--free-color);
    color: #123c1f;
}

.seat.vorgemerkt {
    background-color: var(--vorgemerkt-color);
    color: #4a3c00;
}

.seat.occupied {
    background-color: var(--occupied-color);
    color: #fff;
}

/* Orga-Plätze sitzen im dunklen Bühnenblock – Trennfuge in dessen Farbe */
.seat.orga {
    border-color: var(--plan-panel-dark);
}

.seat.orga .seat-number {
    font-size: 3.4cqw;
}

.seat.my-seat {
    box-shadow: inset 0 0 0 0.55cqw var(--accent-color);
    animation: seat-pulse 2s infinite ease-in-out;
    z-index: 5;
}

@keyframes seat-pulse {

    0%,
    100% {
        box-shadow: inset 0 0 0 0.55cqw var(--accent-color);
    }

    50% {
        box-shadow: inset 0 0 0 0.55cqw rgba(74, 74, 74, 0.35);
    }
}

.tab-btn {
    flex: 1;
    padding: 10px;
    border: none;
    background: none;
    font-family: inherit;
    font-size: 1rem;
    cursor: pointer;
    color: #95a5a6;
    transition: color 0.3s;
}

.tab-btn.active {
    color: var(--primary-color);
    border-bottom: 2px solid var(--primary-color);
    font-weight: bold;
}

.auth-form {
    display: none;
    flex-direction: column;
    gap: 15px;
}

.auth-form.active {
    display: flex;
}

input:not([type="checkbox"]):not([type="radio"]),
select,
textarea {
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-family: inherit;
    font-size: 1rem;
    width: 100%;
    box-sizing: border-box;
}

/* Custom Checkbox Styling */
.checkbox-wrapper input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkmark {
    height: 20px;
    width: 20px;
    background-color: #eee;
    border-radius: 4px;
    position: relative;
    transition: background-color 0.2s;
}

.checkbox-wrapper:hover input~.checkmark {
    background-color: #ccc;
}

.checkbox-wrapper input:checked~.checkmark {
    background-color: var(--secondary-color);
}

.checkmark:after {
    content: "";
    position: absolute;
    display: none;
}

.checkbox-wrapper input:checked~.checkmark:after {
    display: block;
}

.checkbox-wrapper .checkmark:after {
    left: 7px;
    top: 3px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 3px 3px 0;
    transform: rotate(45deg);
}

button {
    padding: 12px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    font-family: inherit;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s;
}

button:hover {
    background-color: var(--primary-dark);
    /* Dunkleres Logo-Rot */
    filter: brightness(1.1);
}

.secondary-btn {
    background-color: #95a5a6;
    width: 100%;
}

/* Umriss-Variante: steht neben dem roten Login-Button im Header, ohne mit ihm
   um Aufmerksamkeit zu konkurrieren */
.outline-btn {
    background-color: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.outline-btn:hover {
    background-color: var(--primary-color);
    color: white;
    filter: none;
}

/* Admin: Benutzerauswahl im Sitzplatz-Modal */
.admin-seat-user-btn {
    width: 100%;
    padding: 12px;
    margin-bottom: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: #fff;
    /* Ohne diese Zeile greift die globale Regel button { color: white } */
    color: var(--text-color, #2c3e50);
    font-weight: normal;
    text-align: left;
    cursor: pointer;
    transition: background-color 0.2s, border-color 0.2s;
}

.admin-seat-user-btn:hover {
    background-color: #f0f0f0;
    border-color: #999;
    filter: none;
}

.admin-seat-user-btn strong {
    color: inherit;
}

.admin-seat-user-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.admin-seat-user-hint {
    display: block;
    margin-top: 4px;
    font-weight: normal;
    color: #b9770e;
}

/* Info-Box beim Mouseover über einen Sitzplatz */
.seat-tooltip {
    display: none;
    position: fixed;
    z-index: 900;
    /* Folgt dem Cursor – darf ihn niemals abfangen */
    pointer-events: none;
    min-width: 160px;
    max-width: 260px;
    padding: 10px 12px;
    border-radius: 8px;
    background: rgba(28, 28, 32, 0.94);
    color: #fff;
    font-family: var(--font-family);
    font-size: 0.85rem;
    line-height: 1.35;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.seat-tooltip.is-visible {
    display: block;
}

.seat-tooltip-seat {
    font-size: 0.75rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #b9b9c2;
    margin-bottom: 3px;
}

.seat-tooltip-name {
    font-size: 1rem;
    font-weight: bold;
    /* Lange Namen umbrechen statt abschneiden – das ist der Zweck der Box */
    overflow-wrap: anywhere;
    margin-bottom: 7px;
}

.seat-tooltip-name.is-empty {
    font-weight: normal;
    font-style: italic;
    color: #b9b9c2;
}

.seat-tooltip-status {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: bold;
}

.seat-tooltip-status--free {
    background-color: var(--free-color);
    color: #123c1f;
}

.seat-tooltip-status--vorgemerkt {
    background-color: var(--vorgemerkt-color);
    color: #4a3c00;
}

.seat-tooltip-status--occupied {
    background-color: var(--occupied-color);
    color: #fff;
}

/* Admin: Statusanzeige im Kopf des Sitzplatz-Modals */
.admin-seat-status-badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 4px;
    font-weight: bold;
}

.admin-seat-status-badge--free {
    background-color: var(--free-color);
    color: #123c1f;
}

.admin-seat-status-badge--vorgemerkt {
    background-color: var(--vorgemerkt-color);
    color: #4a3c00;
}

.admin-seat-status-badge--occupied {
    background-color: var(--occupied-color);
    color: #fff;
}

/* Admin: Statusleiste Frei / Vorgemerkt / Bezahlt */
.admin-seat-holder {
    background: #f5f5f5;
    padding: 12px 15px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.admin-seat-holder-label {
    display: block;
    font-size: 0.85em;
    color: #666;
    margin-bottom: 2px;
}

.admin-seat-holder-name {
    font-size: 1.15em;
    font-weight: bold;
}

.admin-seat-switch-title {
    margin: 0 0 8px 0;
    font-size: 0.95em;
    font-weight: bold;
}

.admin-seat-switch {
    display: flex;
    gap: 8px;
}

.admin-seat-status-btn {
    flex: 1;
    padding: 14px 8px;
    border: 2px solid #ddd;
    border-radius: 8px;
    background-color: #fff;
    /* Ohne diese Zeile greift die globale Regel button { color: white } */
    color: var(--text-color, #2c3e50);
    font-size: 0.95rem;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.15s, border-color 0.15s, transform 0.1s;
}

.admin-seat-status-btn:hover {
    filter: none;
    transform: translateY(-1px);
}

.admin-seat-status-btn--free:hover {
    background-color: var(--free-color);
    border-color: var(--free-color);
    color: #123c1f;
}

.admin-seat-status-btn--vorgemerkt:hover {
    background-color: var(--vorgemerkt-color);
    border-color: var(--vorgemerkt-color);
    color: #4a3c00;
}

.admin-seat-status-btn--occupied:hover {
    background-color: var(--occupied-color);
    border-color: var(--occupied-color);
    color: #fff;
}

/* Aktueller Status: volle Farbe, nicht anklickbar wirkend */
.admin-seat-status-btn.is-active {
    cursor: default;
    transform: none;
}

.admin-seat-status-btn--free.is-active {
    background-color: var(--free-color);
    border-color: #2fae3d;
    color: #123c1f;
}

.admin-seat-status-btn--vorgemerkt.is-active {
    background-color: var(--vorgemerkt-color);
    border-color: #c9b800;
    color: #4a3c00;
}

.admin-seat-status-btn--occupied.is-active {
    background-color: var(--occupied-color);
    border-color: #7a1e30;
    color: #fff;
}

.admin-seat-status-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.admin-seat-switch-hint {
    margin: 12px 0 0 0;
    font-size: 0.85em;
    color: #666;
}

/* Event Info */
.event-details {
    display: flex;
    flex-direction: column;
    gap: 20px;
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

@media (min-width: 768px) {
    .event-details {
        flex-direction: row;
        justify-content: space-around;
        text-align: left;
    }
}

.event-detail-item {
    display: flex;
    align-items: center;
    gap: 15px;
    color: var(--text-color);
}

.event-detail-item svg {
    color: var(--primary-color);
    flex-shrink: 0;
    width: 32px;
    height: 32px;
}

.event-detail-item h3 {
    margin: 0 0 5px 0;
    font-size: 1.1rem;
    color: var(--primary-color);
}

.event-detail-item p {
    margin: 0;
    line-height: 1.4;
    color: #555;
    font-weight: 500;
}

.address-link {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s;
    border-bottom: 1px dashed #999;
}

.address-link:hover {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

/* Deaktivierte Zahlungsart (z. B. PayPal pausiert) */
.payment-disabled {
    color: #999;
}

.payment-disabled .disabled-text {
    text-decoration: line-through;
}

/* Ankündigung zur aktuellen LAN (Home) */
.announcement-card {
    background: var(--card-bg);
    border-left: 6px solid var(--primary-color);
    padding: 20px 25px;
}

.announcement-card h2 {
    margin-top: 0;
    margin-bottom: 15px;
    color: var(--primary-color);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.announcement-card p {
    color: #444;
    line-height: 1.5;
    margin: 0 0 12px;
}

.announcement-card p:last-child {
    margin-bottom: 0;
}

.announcement-highlight {
    color: var(--primary-color);
    font-weight: 700;
    text-transform: uppercase;
}

/* Info Grid (Packing List & Kitchen) */
.info-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

@media (min-width: 768px) {
    .info-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.info-card h3 {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 0;
    margin-bottom: 15px;
    color: var(--primary-color);
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 10px;
}

.info-card h3 .pix {
    width: 24px;
    height: 24px;
    font-size: 1.5rem;
}

.info-list,
.info-card p {
    list-style: none;
    padding: 0;
    margin: 0;
}

.info-card p {
    color: #444;
    line-height: 1.4;
    font-weight: 500;
}

.info-list li {
    padding: 10px 0;
    border-bottom: 1px solid #eee;
    color: #444;
    display: flex;
    align-items: center;
}

.info-list li:before {
    content: "â€¢";
    color: var(--secondary-color);
    font-weight: bold;
    display: inline-block;
    width: 1em;
    margin-left: -1em;
    padding-right: 0.5em;
    opacity: 0;
    /* Hide default bullet */
}

/* Specific bullet for custom look */
.info-list li {
    position: relative;
    padding-left: 15px;
    /* Flex verwirft Leerzeichen zwischen den Kindern (z. B. "Anmeldungen an" + Link),
       daher Abstand ueber column-gap; wrap verhindert Ueberlauf auf schmalen Displays. */
    flex-wrap: wrap;
    column-gap: 0.35em;
}

.info-list li:after {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 6px;
    height: 6px;
    background-color: var(--secondary-color);
    border-radius: 50%;
}

.info-list li:last-child {
    border-bottom: none;
}




.hidden {
    display: none !important;
}

.dashboard-grid {
    display: grid;
    gap: 15px;
}

.card {
    background: #f9f9f9;
    padding: 15px;
    border-radius: 10px;
}

.card h3 {
    margin-top: 0;
    color: var(--primary-color);
    font-size: 1.1rem;
}

.checkbox-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    cursor: pointer;
}

.cost-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 5px;
}

.cost-row.total {
    font-weight: bold;
    font-size: 1.2rem;
    border-top: 1px solid #ddd;
    padding-top: 10px;
    margin-top: 5px;
}

/* Admin & Status Styles */
.full-width {
    grid-column: 1 / -1;
}

.table-responsive {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

th,
td {
    padding: 10px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

th {
    background-color: #f1f1f1;
    color: var(--text-color);
}

.status-badge {
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.9em;
    font-weight: bold;
}

.status-badge.paid {
    background-color: var(--secondary-color);
    color: white;
}

.status-badge.pending {
    background-color: #e74c3c;
    color: white;
}

.admin-input {
    padding: 5px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.save-btn {
    padding: 6px 12px;
    font-size: 0.9em;
    background-color: var(--secondary-color);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.save-btn:hover {
    background-color: #27ae60;
    filter: brightness(1.1);
}

/* ============================================
   Admin-Kennzeichnung
   Alles, was nur Admins sehen, wird sichtbar als
   solches markiert -- damit im Alltag klar ist,
   dass andere Gäste diese Bereiche nicht haben.
   ============================================ */

.admin-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 9px;
    border-radius: 20px;
    background-color: var(--accent-color);
    color: white;
    font-size: 0.7rem;
    font-weight: bold;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    vertical-align: middle;
    margin-right: 8px;
}

.admin-badge .pix {
    font-size: 0.9em;
}

/* Gestrichelter Rahmen als ruhiges, nicht-alarmierendes Admin-Signal */
.admin-only-card {
    border: 2px dashed var(--accent-color);
    background: #fbfbfb;
}

.admin-page-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    margin-bottom: 20px;
}

.admin-page-header h3 {
    margin: 0;
    color: var(--primary-color);
}

.admin-page-header .primary-btn {
    width: auto;
    flex-shrink: 0;
}

.admin-hint {
    margin: 15px 0 0;
    font-size: 0.9em;
    color: #666;
}

/* Admin-Eintrag im Hauptmenü */
.nav-link--admin {
    color: var(--accent-color);
    border: 1px dashed var(--accent-color);
    /* 1px weniger Innenabstand, damit der Rahmen die Pille nicht höher macht */
    padding: 9px 19px;
}

.nav-link--admin:hover {
    background-color: #ebebeb;
    color: var(--accent-color);
}

.nav-link.nav-link--admin.active {
    background-color: var(--accent-color);
    border-color: var(--accent-color);
    color: white;
    box-shadow: 0 2px 5px rgba(74, 74, 74, 0.3);
}

/* ============================================
   Benutzerverwaltung
   ============================================ */

.admin-user-login {
    display: block;
    color: #888;
    font-size: 0.8em;
}

.admin-user-login::before {
    content: '@';
}

/* Deaktivierte Konten bleiben lesbar, treten aber zurück */
.admin-user-row--inactive td {
    opacity: 0.6;
}

/* Anonymisierte Konten sind nur noch Platzhalter für ihre Beiträge */
.admin-user-row--deleted td {
    opacity: 0.5;
    font-style: italic;
}

.status-badge.deleted {
    background-color: var(--accent-color);
    color: white;
}

.admin-user-actions {
    display: flex;
    flex-wrap: wrap;
    /* Der beschriftete Knopf und die Icon-Knöpfe sind unterschiedlich hoch */
    align-items: center;
    gap: 8px;
}

/* .secondary-btn ist global 100% breit (Modal-Buttons) -- in der Tabelle nicht */
.admin-user-actions .secondary-btn {
    width: auto;
}

.admin-table-empty {
    text-align: center;
    color: #999;
    padding: 20px;
}

.role-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    background-color: #e6e6e6;
    color: #555;
    font-size: 0.85em;
    font-weight: bold;
}

.role-badge--admin {
    background-color: var(--primary-color);
    color: white;
}

/* Rollenwechsel direkt in der Tabelle. Admins bleiben farblich erkennbar,
   damit die Zeile auf einen Blick lesbar ist wie vorher das Badge. */
.role-select {
    font-weight: bold;
    cursor: pointer;
}

.role-select--admin {
    border-color: var(--primary-color);
    background-color: #fdecea;
    color: var(--primary-color);
}

.role-select:disabled {
    opacity: 0.6;
    cursor: wait;
}

/* Die globale .btn-danger ist ein Vollbreiten-Button (Profil-Modal) --
   in Tabellen und Karten soll sie sich auf ihren Inhalt beschränken. */
.btn-danger.small-btn {
    width: auto;
}

.form-error {
    margin: 10px 0 0;
    padding: 10px 12px;
    border-radius: 6px;
    background-color: #fdecea;
    color: #a3151f;
    font-size: 0.9em;
}

/* Konto ist bis zum eigenen Passwort praktisch gesperrt */
.status-badge.pending-password {
    display: block;
    margin-top: 5px;
    background-color: var(--vorgemerkt-color);
    color: #4a4a4a;
    font-size: 0.75em;
}

/* ============================================
   Passwort zurücksetzen
   ============================================ */

.password-generate-row {
    display: flex;
    gap: 8px;
    width: 100%;
}

.password-generate-row .admin-input {
    flex: 1;
    min-width: 0;
    /* Generierte Passwörter sind gut lesbar, wenn die Zeichen gleich breit sind */
    font-family: monospace;
    font-size: 1rem;
    letter-spacing: 0.05em;
}

.password-generate-row .secondary-btn {
    width: auto;
    flex-shrink: 0;
}

.password-result-intro {
    margin: 0 0 10px;
}

.password-result-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    padding: 15px;
    margin-bottom: 15px;
    border: 2px dashed var(--secondary-color);
    border-radius: 8px;
    background-color: #f2fbf5;
}

.password-result-row code {
    flex: 1;
    min-width: 0;
    font-family: monospace;
    font-size: 1.4rem;
    font-weight: bold;
    letter-spacing: 0.08em;
    color: var(--text-color);
    /* Lange Passwörter dürfen umbrechen, statt das Modal zu sprengen */
    overflow-wrap: anywhere;
}

.password-result-row .secondary-btn {
    width: auto;
    flex-shrink: 0;
}

/* ============================================
   Sitzplatzpreis (Admin-Karte im Sitzplan)
   ============================================ */

.seat-price-form label {
    display: block;
    margin-bottom: 6px;
    font-size: 0.9em;
    color: #666;
}

.seat-price-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.seat-price-row .admin-input {
    width: 100px;
    font-size: 1rem;
}

.seat-price-currency {
    font-weight: bold;
}

.seat-price-row .save-btn {
    margin-left: auto;
}

.seat-price-feedback {
    margin: 10px 0 0;
    font-size: 0.9em;
    color: var(--secondary-color);
    font-weight: bold;
}

.seat-price-feedback.is-error {
    color: var(--primary-color);
}

.admin-divider {
    margin: 20px 0;
    border: none;
    border-top: 1px dashed #ccc;
}

/* ============================================
   Benutzer löschen
   ============================================ */

.admin-badge--danger {
    background-color: var(--primary-color);
}

/* Aktionen, die nur aus einem Icon bestehen (Tabelle Benutzerverwaltung).
   Umrandet statt gefüllt, damit sie neben dem beschrifteten Knopf nicht
   lauter wirken als die Aktion, die sie auslösen. */
.action-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border-radius: 6px;
    border: 1px solid currentColor;
    background-color: transparent;
    cursor: pointer;
    transition: background-color 0.2s, color 0.2s;
}

.action-icon-btn .pix {
    font-size: 1.15rem;
    line-height: 1;
}

.action-icon-btn:hover:not(:disabled) {
    color: white;
    filter: none;
}

.action-icon-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.action-icon-btn--danger {
    color: var(--primary-color);
}

.action-icon-btn--danger:hover:not(:disabled) {
    background-color: var(--primary-color);
}

.action-icon-btn--warn {
    color: var(--accent-color);
}

.action-icon-btn--warn:hover:not(:disabled) {
    background-color: var(--accent-color);
}

.action-icon-btn--ok {
    color: var(--secondary-color);
}

.action-icon-btn--ok:hover:not(:disabled) {
    background-color: var(--secondary-color);
}

/* Wahl zwischen Anonymisieren und Löschen */
.delete-mode {
    margin: 15px 0;
}

.delete-mode-option {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px;
    margin-bottom: 8px;
    border: 1px solid #ddd;
    border-radius: 8px;
    cursor: pointer;
}

.delete-mode-option:has(input:checked) {
    border-color: var(--secondary-color);
    background-color: #f2fbf5;
}

.delete-mode-option--danger:has(input:checked) {
    border-color: var(--primary-color);
    background-color: #fdecea;
}

.delete-mode-option input {
    margin-top: 3px;
    flex-shrink: 0;
}

.delete-mode-option small {
    display: block;
    margin-top: 4px;
    color: #666;
    line-height: 1.4;
}

.delete-mode-option em {
    color: var(--secondary-color);
    font-weight: bold;
    font-style: normal;
}

.delete-impact {
    margin: 15px 0;
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid var(--primary-color);
    background-color: #fdecea;
}

/* Beim Anonymisieren bleibt alles stehen -- das ist keine Warnung */
.delete-impact--keep {
    border-left-color: var(--secondary-color);
    background-color: #f2fbf5;
}

.delete-impact--keep .delete-impact-mark {
    display: none;
}

.delete-impact-title {
    margin: 0 0 10px;
    font-weight: bold;
}

#admin-delete-impact-list {
    margin: 0;
    padding-left: 20px;
}

#admin-delete-impact-list li {
    margin-bottom: 6px;
}

.delete-impact-loading,
.delete-impact-empty {
    list-style: none;
    margin-left: -20px;
    color: #666;
    font-style: italic;
}

/* Posten, die auch anderen Teilnehmern gehören */
.delete-impact-mark {
    display: inline-block;
    margin-left: 8px;
    padding: 1px 7px;
    border-radius: 10px;
    background-color: var(--primary-color);
    color: white;
    font-size: 0.7rem;
    font-weight: bold;
    white-space: nowrap;
}

.delete-impact-shared {
    margin: 12px 0 0;
    font-size: 0.9em;
    font-weight: bold;
    color: var(--primary-dark);
}

.delete-alternative {
    margin: 15px 0;
    padding: 12px 15px;
    border-radius: 8px;
    background-color: #f2fbf5;
    font-size: 0.9em;
}

/* Sieht aus wie ein Link, ist aber ein Button (globales button{} wird überschrieben) */
.link-btn {
    padding: 0;
    background: none;
    border: none;
    color: var(--secondary-color);
    font-size: inherit;
    font-family: inherit;
    font-weight: bold;
    text-decoration: underline;
    cursor: pointer;
}

.link-btn:hover {
    background: none;
    filter: none;
    color: #1e8449;
}

#admin-delete-confirm-hint {
    padding: 2px 6px;
    border-radius: 4px;
    background-color: #eee;
    font-family: monospace;
    font-weight: bold;
}

/* Responsive User Panel */
#user-panel {
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
}

@media (min-width: 1024px) {
    #user-panel {
        max-width: 800px;
    }
}

/* Profile Section */
.readonly-text {
    display: block;
    padding: 5px 0;
    color: #555;
    font-weight: bold;
}

.btn-danger {
    background-color: #e74c3c;
    color: white;
    padding: 10px;
    width: 100%;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.3s;
}

.btn-danger:hover {
    background-color: #c0392b;
}

.profile-section .form-group {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.profile-section label {
    font-weight: bold;
    min-width: 100px;
    margin-bottom: 0;
}

.profile-section .readonly-text {
    padding: 0;
    margin: 0;
}

/* Icon Button */
.icon-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    color: var(--primary-color);
    vertical-align: middle;
    transition: transform 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Icon buttons with primary/secondary button styles */
.primary-btn.icon-btn,
.secondary-btn.icon-btn {
    background-color: inherit;
    border: inherit;
    padding: 8px 12px;
    min-width: 40px;
    height: auto;
}

.primary-btn.icon-btn {
    background-color: var(--primary-color);
    color: white;
}

.secondary-btn.icon-btn {
    background-color: #95a5a6;
    color: white;
}

.primary-btn.icon-btn:hover,
.secondary-btn.icon-btn:hover {
    filter: brightness(1.1);
    transform: scale(1.05);
}

.pix {
    font-family: 'pixelart-icons-font' !important;
    font-style: normal;
    font-weight: normal;
    font-variant: normal;
    text-transform: none;
    line-height: 1;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-size: 1.5rem;
    image-rendering: pixelated;
}

.icon-btn .pix {
    font-size: 1.25rem;
}

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

/* Modal Styles */
.modal {
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 1;
    transition: opacity 0.3s;
}

.modal.hidden {
    display: none;
    opacity: 0;
    pointer-events: none;
}

.modal-content {
    background-color: #fff;
    padding: 20px;
    border-radius: 10px;
    width: 90%;
    max-width: 500px;
    position: relative;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    animation: slideIn 0.3s;
}

@keyframes slideIn {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 1.8rem;
    cursor: pointer;
    color: #333;
    line-height: 1;
    z-index: 1100;
    transition: all 0.2s ease;
    background: rgba(255, 255, 255, 0.8);
    width: 36px;
    height: 36px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.close-modal:hover {
    color: #000;
    background: #fff;
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Dialoge (Ersatz für alert/confirm/prompt, siehe openDialog in script.js).
   Liegen über den normalen Modals, weil sie oft aus einem Modal heraus
   aufgerufen werden – etwa eine Rückfrage im Bestell-Modal. */
.dialog-modal {
    z-index: 2000;
    background-color: rgba(0, 0, 0, 0.6);
}

.dialog-box {
    max-width: 420px;
    padding: 28px 26px 22px;
    text-align: center;
}

.dialog-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 1.7rem;
    background: rgba(74, 74, 74, 0.1);
    color: var(--accent-color);
}

.dialog-modal--error .dialog-icon {
    background: rgba(200, 32, 43, 0.12);
    color: var(--primary-color);
}

.dialog-modal--success .dialog-icon {
    background: rgba(39, 174, 96, 0.14);
    color: var(--secondary-color);
}

.dialog-modal--warning .dialog-icon {
    background: rgba(242, 227, 77, 0.4);
    color: #8a6d00;
}

.dialog-title {
    margin: 0 0 8px;
    font-size: 1.25rem;
    color: var(--text-color);
}

.dialog-message {
    margin: 0;
    color: #555;
    line-height: 1.5;
    /* pre-line: mehrzeilige Meldungen behalten ihre Umbrüche */
    white-space: pre-line;
    overflow-wrap: anywhere;
}

.dialog-input {
    width: 100%;
    margin-top: 16px;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-family: inherit;
    font-size: 1rem;
    box-sizing: border-box;
}

.dialog-input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.dialog-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 22px;
}

.dialog-actions button {
    min-width: 120px;
}

/* Endgültige Aktionen (löschen, zurücksetzen) heben sich vom normalen Rot ab.
   Der :hover braucht dieselbe Spezifität wie button:hover, sonst gewinnt der. */
.dialog-btn--danger,
.dialog-actions .dialog-btn--danger:hover {
    background-color: var(--occupied-color);
}

@media (max-width: 480px) {

    /* Untereinander, bestätigen bleibt oben (column-reverse) */
    .dialog-actions {
        flex-direction: column-reverse;
    }

    .dialog-actions button {
        width: 100%;
    }
}

/* Game Suggestions */
.games-controls {
    display: flex;
    gap: 10px;
    align-items: center;
}

.view-switch {
    display: flex;
    background: #eee;
    padding: 2px;
    border-radius: 6px;
}

.switch-btn {
    background: none;
    border: none;
    padding: 5px;
    cursor: pointer;
    border-radius: 4px;
    color: #7f8c8d;
    display: flex;
    align-items: center;
    justify-content: center;
}

.switch-btn.active {
    background: white;
    color: var(--primary-color);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: 1200px;
    margin-bottom: 20px;
}

.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    width: 100%;
    max-width: 1200px;
}

/* =========================================
   Game Card Styling - Redesign
   ========================================= */

.game-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    /* Softer shadow */
    transition: transform 0.2s, box-shadow 0.2s;
    border: 1px solid #eee;
}

.game-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.12);
}

/* Image Defaults */
.game-card-image {
    background: #f0f0f0;
    overflow: hidden;
}

.game-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Content Defaults */
.game-card-content {
    padding: 15px;
    display: flex;
    flex-direction: column;
}

.game-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 5px;
    line-height: 1.3;
    display: flex;
    align-items: center;
    gap: 8px;
}

.game-links {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.detail-links {
    display: flex;
    gap: 12px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.link-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    font-size: 0.95rem;
    transition: all 0.2s;
    background-color: var(--primary-color);
    color: white;
    border: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.link-button svg {
    flex-shrink: 0;
}

.link-button:hover {
    filter: brightness(1.1);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    color: white;
}

.steam-link-icon {
    display: flex;
    align-items: center;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.steam-link-icon:hover {
    opacity: 1;
}

.content-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    gap: 10px;
}

.submitted-by {
    font-size: 0.8rem;
    color: #95a5a6;
    font-style: italic;
}

.game-card-content {
    position: relative;
}

.comment-count-indicator {
    position: absolute;
    top: 8px;
    right: 8px;
    font-size: 0.7rem;
    color: #7f8c8d;
    background: #f8f9fa;
    padding: 1px 6px;
    border-radius: 10px;
    border: 1px solid #eee;
    z-index: 10;
}

.comment-count-indicator i {
    font-size: 1.6em;
    line-height: 1;
}

/* Badge Container */
.content-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 5px 0;
}

/* Badge Styling */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 20px;
    /* Pill shape */
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.badge.price {
    background-color: #f1c40f;
    color: #fff;
}

.badge.source.steam {
    background-color: #171a21;
    color: #fff;
}

/* Steam Brand Color */
.badge.source.intylan {
    background-color: var(--primary-color);
    color: #fff;
}

.badge.source.other {
    background-color: #7f8c8d;
    color: #fff;
}

.badge.players {
    background-color: #63997a;
    color: #fff;
}

/* Ausgeblendeter Spielevorschlag -- bekommt nur ein Admin je zu sehen */
.badge.hidden-badge {
    background-color: #34495e;
    color: #fff;
    gap: 4px;
}

/* Actions Defaults */
.game-card-actions {
    padding: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.vote-controls {
    display: flex;
    gap: 15px;
    /* Spacing between circles */
    align-items: center;
}

.vote-btn {
    width: 50px;
    height: 60px;
    border-radius: 4px;
    border: 1px solid #ddd;
    background: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    transition: all 0.2s;
    color: #95a5a6;
    padding: 0;
}

.vote-btn:hover {
    background-color: #f9f9f9;
    transform: scale(1.1);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.vote-btn.active.like {
    border-color: var(--secondary-color);
    color: var(--secondary-color);
    background: #eafaf1;
}

.vote-btn.active.dislike {
    border-color: var(--occupied-color);
    color: var(--occupied-color);
    background: #fdedec;
}

.vote-btn.steam-link-btn:hover {
    background-color: #171a21;
    border-color: #171a21;
}

.admin-controls {
    display: flex;
    gap: 5px;
}

/* Auge-Button auf der Kachel: nur Admins bekommen ihn gerendert */
.game-hide-btn {
    width: 40px;
    height: 40px;
    border-radius: 4px;
    border: 1px solid #ddd;
    background: white;
    color: #95a5a6;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    padding: 0;
    transition: all 0.2s;
}

.game-hide-btn:hover {
    background-color: #f9f9f9;
    border-color: #34495e;
    color: #34495e;
}

.game-hide-btn.is-hidden-state {
    border-color: #34495e;
    background: #eaeef1;
    color: #34495e;
}

/* Ausgeblendete Kachel bleibt lesbar, tritt aber sichtbar zurück */
.game-card.game-card-hidden {
    opacity: 0.6;
    border: 1px dashed #34495e;
}

.game-card.game-card-hidden:hover {
    opacity: 1;
}

/* =========================================
   VIEW SPECIFIC LAYOUTS
   ========================================= */

/* 1. GRID VIEW (Mobile / Default) 
   ----------------------------------------- */
.games-grid:not(.list-view) {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.games-grid:not(.list-view) .game-card {
    display: flex;
    flex-direction: column;
}

.games-grid:not(.list-view) .game-card-image {
    width: 100%;
    height: 180px;
    /* Fixed height for grid images */
}

.games-grid:not(.list-view) .game-card-actions {
    border-top: 1px solid #f0f0f0;
    justify-content: space-between;
    padding: 10px 15px;
}

/* 2. LIST VIEW (Desktop Optimized) 
   ----------------------------------------- */
.games-grid.list-view {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.games-grid.list-view .game-card {
    display: flex;
    flex-direction: row;
    height: 110px;
    /* Fixed height as requested */
    align-items: stretch;
}

/* Left: Image */
.games-grid.list-view .game-card-image {
    width: 250px;
    /* Fixed width */
    flex-shrink: 0;
    position: relative;
}

/* Middle: Content */
.games-grid.list-view .game-card-content {
    flex: 1;
    /* Take remaining space */
    position: relative;
    padding: 10px 20px;
    justify-content: space-between;
    /* Space out title/badges and footer */
}

.games-grid.list-view .content-header {
    margin-bottom: 5px;
}

.games-grid.list-view .game-title {
    font-size: 1.4rem;
    margin: 0;
}

/* Right: Actions */
.games-grid.list-view .game-card-actions {
    width: auto;
    min-width: 120px;
    flex-direction: column;
    /* Stack vertically */
    justify-content: center;
    gap: 15px;
    background-color: #fbfbfb;
    /* Slight distinct background */
    border-left: 1px solid #eee;
}

.games-grid.list-view .vote-controls {
    flex-direction: row;
    /* Keep votes side-by-side or maybe grid? Let's keep row */
    gap: 2px;
}

.games-grid.list-view .admin-controls {
    position: absolute;
    /* Position admin controls distinctly */
    top: 5px;
    right: 5px;
    flex-direction: column;
    gap: 2px;
}

/* Move admin controls out of flux for lists? Use absolute positioning inside the action area for cleaner look */
.games-grid.list-view .game-card-actions {
    position: relative;
}

/* Adjustments for buttons in list view right column */
.games-grid.list-view .edit-game-btn,
.games-grid.list-view .delete-game-btn {
    padding: 4px;
}

.edit-game-btn,
.delete-game-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: #bdc3c7;
    padding: 5px;
    opacity: 0.5;
    transition: opacity 0.2s, color 0.2s;
}

.edit-game-btn:hover {
    color: var(--primary-color);
    opacity: 1;
    background: none;
}

.delete-game-btn:hover {
    color: var(--occupied-color);
    opacity: 1;
    background: none;
}

.inline-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.form-group {
    margin-bottom: 0;
}

.form-actions {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.small-btn {
    padding: 8px 16px;
    font-size: 0.9rem;
}

.main-logo {
    max-height: 90px;
    width: auto;
    display: block;
    object-fit: contain;
    /* Pixel-Logo: harte Kanten, kein weicher Schatten */
    image-rendering: pixelated;
}

.logo-container {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

/* Edition-Emblem "18." links neben dem Hauptlogo */
.logo-lockup {
    display: flex;
    align-items: center;
    gap: 14px;
    text-decoration: none;
}

.edition-logo {
    /* gleiche Höhe wie die Wortmarke */
    max-height: 90px;
    width: auto;
    display: block;
    flex-shrink: 0;
    image-rendering: pixelated;
}

.logo-placeholder {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-bright));
    color: white;
    padding: 15px 30px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 4px 15px rgba(200, 32, 43, 0.3);
    transform: rotate(-2deg);
    transition: transform 0.3s;
}

.logo-placeholder:hover {
    transform: rotate(0deg) scale(1.05);
}

.logo-icon {
    font-size: 2.5rem;
}

.logo-text {
    font-size: 1.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.lan-date {
    font-size: 1.2rem;
    font-weight: 400;
    opacity: 0.9;
    padding-left: 15px;
    border-left: 1px solid rgba(255, 255, 255, 0.4);
}

.header-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    padding: 20px 0;
}

#main-nav ul {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0;
    gap: 10px;
    background: white;
    padding: 5px;
    border-radius: 50px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    /* Bei schmalen Fenstern lieber ganze Einträge umbrechen als
       lange Beschriftungen ("Benutzerverwaltung") mitten im Wort */
    flex-wrap: wrap;
    justify-content: center;
}

.nav-link {
    text-decoration: none;
    color: var(--text-color);
    padding: 10px 20px;
    border-radius: 25px;
    transition: all 0.3s;
    font-weight: 500;
    display: block;
    white-space: nowrap;
}

.nav-link:hover {
    background-color: #f0f0f0;
    color: var(--primary-color);
}

.nav-link.active {
    background-color: var(--primary-color);
    color: white;
    box-shadow: 0 2px 5px rgba(200, 32, 43, 0.3);
}

.user-controls {
    display: flex;
    align-items: center;
    gap: 15px;
}

#mobile-menu-btn {
    color: var(--primary-color);
    padding: 10px;
    z-index: 1001;
    position: relative;
    transition: color 0.3s;
}

#mobile-menu-btn.open {
    color: white !important;
    /* Force white when open */
}

/* Mobile Nav Styles */
@media (max-width: 767px) {
    header {
        position: sticky;
        top: 0;
        z-index: 1000;
        background-color: var(--bg-color);
        /* Match body background */
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
        /* Subtle shadow */
        margin-bottom: 20px;
    }

    .main-logo {
        /* Etwas höher als das alte Breitformat-Logo, damit der
           zweizeilige Schriftzug lesbar bleibt */
        max-height: 64px;
    }

    .logo-lockup {
        gap: 10px;
    }

    .edition-logo {
        max-height: 46px;
    }

    .header-content {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        padding: 10px;
        position: relative;
    }

    .logo-container {
        margin-bottom: 0;
        flex: 1;
        display: flex;
        justify-content: center;
        overflow: hidden;
    }

    .logo-placeholder {
        padding: 5px 15px;
        gap: 8px;
        width: 100%;
        justify-content: center;
        max-width: 250px;
    }

    .logo-icon {
        font-size: 1.2rem;
    }

    .logo-text {
        font-size: 1rem;
        white-space: nowrap;
    }

    .lan-date {
        display: none;
    }

    /* Login + Registrieren müssen sich den schmalen Header teilen */
    .user-controls {
        gap: 6px;
    }

    .user-controls .small-btn {
        padding: 8px 10px;
        font-size: 0.8rem;
        white-space: nowrap;
    }

    #main-nav {
        position: fixed;
        top: 0;
        left: -100%;
        width: 250px;
        height: 100vh;
        background: var(--primary-color);
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
        transition: left 0.3s ease;
        z-index: 1000;
        padding-top: 80px;
        display: block;
    }

    #main-nav.open {
        left: 0;
    }

    #main-nav ul {
        flex-direction: column;
        background: none;
        box-shadow: none;
        border-radius: 0;
        width: 100%;
        padding: 0;
    }

    #main-nav li {
        width: 100%;
    }

    .nav-link {
        border-radius: 0;
        padding: 15px 25px;
        color: white;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .nav-link:hover {
        background-color: rgba(255, 255, 255, 0.1);
        color: white;
    }

    .nav-link.active {
        background-color: rgba(255, 255, 255, 0.2);
        color: white;
        box-shadow: none;
    }

    /* Im mobilen Menü liegt die Navigation auf Rot -- der graue gestrichelte
       Rahmen wird dort zu einem weißen Balken an der Innenkante. */
    .nav-link--admin {
        border: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        border-left: 4px solid rgba(255, 255, 255, 0.6);
        /* 25px minus die 4px Balken -- der Text bleibt auf einer Linie
           mit den übrigen Menüpunkten */
        padding: 15px 25px 15px 21px;
    }

    .nav-link.nav-link--admin.active {
        background-color: rgba(255, 255, 255, 0.2);
        border-left-color: white;
        color: white;
        box-shadow: none;
    }

    #menu-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5);
        z-index: 999;
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.3s;
    }

    #menu-overlay.open {
        opacity: 1;
        visibility: visible;
    }
}

#user-display {
    display: flex;
    align-items: center;
    gap: 10px;
    background: white;
    padding: 5px 15px;
    border-radius: 20px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

#header-user-name {
    font-weight: bold;
    color: var(--primary-color);
    margin-right: 5px;
}

@media (min-width: 768px) {
    .hidden-desktop {
        display: none !important;
    }

    .header-content {
        flex-direction: row;
        justify-content: space-between;
        padding: 20px;
        max-width: 1200px;
        margin: 0 auto;
    }

    .logo-container {
        margin-bottom: 0;
    }
}

/* Image Preview Popup */
#image-preview-popup {
    position: fixed;
    z-index: 9999;
    pointer-events: none;
    /* Ignore mouse events so it doesn't flicker */
    display: none;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    background: white;
    max-width: 400px;
    /* Max width for the popup */
    border: 3px solid white;
}

#image-preview-popup img {
    display: block;
    width: 100%;
    height: auto;
    object-fit: cover;
}

/* Mobile List View Optimization */
@media (max-width: 767px) {
    .games-grid.list-view .game-card {
        height: auto;
        min-height: 80px;
        flex-direction: row;
        /* Ensure it stays row */
    }

    .games-grid.list-view .game-card-image {
        width: 90px;
        min-width: 90px;
        /* Prevent shrinking */
        height: 90px;
    }

    .games-grid.list-view .game-card-content {
        padding: 5px 10px;
    }

    .games-grid.list-view .game-title {
        font-size: 1.3rem;
        margin-bottom: 2px;
    }

    .games-grid.list-view .badge {
        font-size: 0.65rem;
        padding: 2px 6px;
    }

    .games-grid.list-view .submitted-by {
        font-size: 0.7rem;
    }

    .games-grid.list-view .game-card-actions {
        min-width: auto;
        width: auto;
        padding: 3px;
        gap: 5px;
        border-left: 1px solid #eee;
        background: transparent;
    }

    .games-grid.list-view .vote-btn {
        width: 40px;
        height: 60px;
        font-size: 0.9rem;
    }

    .games-grid.list-view .admin-controls button {
        padding: 5px;
        font-size: 1rem;
    }
}

/* Footer Styles */
#main-footer {
    width: 100%;
    margin-top: auto;
    /* Push to bottom if flex column */
    padding: 20px 0;
    text-align: center;
    background-color: #f9f9f9;
    border-top: 1px solid #eee;
    color: #7f8c8d;
    font-size: 0.9rem;
}

.footer-content {
    margin-bottom: 10px;
}

.footer-content a {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.footer-content a:hover {
    color: var(--primary-color);
}

.separator {
    margin: 0 10px;
    color: #ccc;
}

.footer-copyright {
    font-size: 0.8rem;
    color: #aaa;
}

/* Ensure body takes full height for sticky footer effect */
body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
    /* Pushes footer down */
}

/* Game Detail Modal */
.large-modal {
    max-width: 900px;
    width: 95%;
    max-height: 90vh;
    overflow-y: auto;
    padding: 0;
    display: flex;
    flex-direction: column;
}

#detail-header {
    background: #f9f9f9;
    padding: 20px;
    border-bottom: 1px solid #eee;
}

.detail-image-container {
    width: 100%;
    height: 200px;
    overflow: hidden;
    border-radius: 8px;
    margin-bottom: 15px;
    background: #000;
}

.detail-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* Keep aspect ratio fully visible */
    background: #000;
}

.detail-title-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.detail-title-row h2 {
    margin: 0;
    font-size: 1.8rem;
    color: var(--text-color);
}

.edit-input {
    font-size: 1.5rem;
    padding: 5px;
    width: 100%;
}

.detail-meta {
    font-size: 0.9rem;
    color: #7f8c8d;
    margin: 10px 0;
}

.detail-actions,
.edit-actions {
    margin-top: 15px;
    display: flex;
    gap: 10px;
}

.detail-body {
    display: flex;
    flex-direction: column;
    padding: 20px;
    gap: 30px;
}

@media (min-width: 768px) {
    .detail-body {
        flex-direction: row;
    }

    .detail-left {
        flex: 1;
        border-right: 1px solid #eee;
        padding-right: 20px;
    }

    .detail-right {
        flex: 1;
        padding-left: 10px;
    }
}

/* Votes Layout */
.detail-votes-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

@media (min-width: 480px) {
    .detail-votes-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.vote-column h4 {
    margin-top: 0;
    border-bottom: 2px solid #eee;
    padding-bottom: 5px;
    margin-bottom: 10px;
}

.vote-list {
    list-style: none;
    padding: 0;
    margin: 0;
    overflow-y: auto;
}

.vote-list li {
    padding: 5px 0;
    border-bottom: 1px solid #fafafa;
    display: flex;
    justify-content: space-between;
    font-size: 0.9em;
}

.vote-list li .vote-date {
    color: #aaa;
    font-size: 0.8em;
}

/* Comments Logic */
.comments-list {
    max-height: 400px;
    overflow-y: auto;
    margin-bottom: 15px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.comment-item {
    background: #f4f6f7;
    padding: 10px;
    border-radius: 8px;
    font-size: 0.95em;
}

.comment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 5px;
    font-size: 0.85em;
    font-weight: bold;
    color: #555;
}

.comment-meta {
    display: flex;
    gap: 8px;
    align-items: center;
}

.delete-comment-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 2px 5px;
    font-size: 1rem;
    opacity: 0.5;
    transition: opacity 0.2s, transform 0.2s;
}

.delete-comment-btn:hover {
    opacity: 1;
    transform: scale(1.2);
}

.comment-date {
    font-weight: normal;
    color: #999;
}

.comment-text {
    white-space: pre-wrap;
    /* Preserve newlines */
    color: #333;
}

.comment-form textarea {
    width: 100%;
    margin-bottom: 10px;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 8px;
    resize: vertical;
}

.no-comments {
    color: #999;
    font-style: italic;
    text-align: center;
    padding: 20px;
}

/* Inline Edit Helpers */
.hidden {
    display: none !important;
    /* Force hide */
}

body.modal-open {
    overflow: hidden;
}

/* Detail Modal Footer */
.detail-footer {
    padding: 9px 20px;
    background: #f9f9f9;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    bottom: 0;
    flex-direction: row-reverse;
}

.footer-right {
    display: flex;
    gap: 10px;
}

/* Ensure Body scrolls correctly */
.detail-body {
    flex: 1;
    /* Take remaining height */
    overflow-y: auto;
    /* Scroll internally */
}

/* Overwrite large-modal to ensure flex column layout works for sticky footer */
.large-modal {
    height: 90vh;
    /* Fixed height to force internal scrolling */
    max-height: 90vh;
}

/* Side-by-Side Header Layout */
.detail-header-flex {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.detail-info-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

@media (min-width: 768px) {
    .detail-header-flex {
        flex-direction: row;
        align-items: center;
        /* Center vertically if image is taller */
    }

    .detail-image-container {
        width: 300px;
        /* Fixed width on desktop */
        height: 180px;
        margin-bottom: 0;
        /* Remove bottom margin as it's side-by-side */
    }

    .detail-info-container {
        padding-left: 10px;
    }
}

/* =========================================
   Tournament Styles
   ========================================= */

.tournaments-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    width: 100%;
}

.tournament-card {
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: pointer;
    border: 1px solid #eee;
}

.tournament-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.12);
}

.tournament-card h3 {
    margin: 0 0 10px 0;
    color: var(--primary-color);
    font-size: 1.3rem;
}

.tournament-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 10px;
}

.tournament-badge {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
}

.tournament-badge.setup {
    background-color: #3498db;
    color: white;
}

.tournament-badge.ongoing {
    background-color: #f39c12;
    color: white;
}

.tournament-badge.completed {
    background-color: #27ae60;
    color: white;
}

.tournament-info {
    color: #666;
    font-size: 0.95rem;
    line-height: 1.6;
}

.tournament-info p {
    margin: 5px 0;
}

/* Tournament Detail Modal */
.large-modal {
    max-width: 900px;
    max-height: 90vh;
    overflow-y: auto;
}

#tournament-detail-header {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #eee;
}

#tournament-detail-header h2 {
    margin: 0 0 10px 0;
    color: var(--primary-color);
}

.tournament-detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.tournament-detail-meta span {
    color: #666;
    font-size: 0.95rem;
}

/* Player Selection */
.player-selection {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 10px;
    margin-bottom: 15px;
    max-height: 300px;
    overflow-y: auto;
    padding: 10px;
    background: #f9f9f9;
    border-radius: 8px;
}

.player-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px;
    background: white;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s;
}

.player-checkbox:hover {
    background: #f0f0f0;
}

.player-checkbox input[type="checkbox"] {
    cursor: pointer;
}

.player-checkbox label {
    cursor: pointer;
    margin: 0;
    flex: 1;
}

/* Teams Grid */
.teams-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px;
}

.team-card {
    background: #f9f9f9;
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid var(--primary-color);
}

.team-card h4 {
    margin: 0 0 10px 0;
    color: var(--primary-color);
}

.team-card ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.team-card li {
    padding: 5px 0;
    color: #555;
}

/* Team Slots for Drag & Drop */
.team-slots {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.team-slot {
    padding: 10px;
    border: 2px dashed #ddd;
    border-radius: 6px;
    background: #fff;
    min-height: 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.2s;
}

.team-slot.empty {
    cursor: pointer;
}

.team-slot.empty:hover {
    border-color: var(--primary-color);
    background: #f5f5f5;
}

.team-slot.empty.drag-over {
    border-color: var(--primary-color);
    background: #e8e3f5;
    border-style: solid;
}

.team-slot.filled {
    border-style: solid;
    border-color: var(--secondary-color);
    background: #f0f9f4;
}

.team-slot.filled span {
    flex: 1;
    color: #333;
}

.slot-placeholder {
    color: #999;
    font-style: italic;
}

.remove-player-btn {
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.remove-player-btn:hover {
    background: #c82333;
}

/* Player Item for Drag & Drop */
.player-item {
    cursor: move;
    user-select: none;
    transition: opacity 0.2s;
}

.player-item.dragging {
    opacity: 0.5;
}

/* Bracket Container */
.bracket-container {
    overflow-x: auto;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 8px;
}

.bracket {
    display: flex;
    gap: 40px;
    min-width: min-content;
}

.bracket-round {
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    min-width: 200px;
}

.bracket-round h4 {
    text-align: center;
    margin: 0 0 15px 0;
    color: var(--primary-color);
    font-size: 0.9rem;
    text-transform: uppercase;
}

.bracket-matches {
    display: flex;
    flex-direction: column;
    position: relative;
    flex: 1;
    gap: 20px;
    min-height: 100%;
}

.match-wrapper {
    position: relative;
    width: 200px; /* Fixed width to match first round */
}

.match-card {
    background: white;
    border-radius: 8px;
    padding: 10px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    min-height: 80px;
    width: 200px; /* Fixed width for all match cards */
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    border: 2px solid transparent;
    transition: all 0.2s;
    box-sizing: border-box;
}

.match-card.pending {
    border-color: #3498db;
}

.match-card.completed {
    border-color: #27ae60;
}

.match-card.clickable {
    cursor: pointer;
}

.match-card.clickable:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.match-team {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 5px;
    margin: 2px 0;
    border-radius: 4px;
    background: #f9f9f9;
}

.match-team.winner {
    background: #d5f4e6;
    font-weight: bold;
    color: var(--secondary-color);
}

.match-team-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.match-team-name {
    flex: 1;
    font-size: 0.9rem;
    font-weight: 600;
}

.match-team-score {
    font-weight: bold;
    margin-left: 10px;
    min-width: 20px;
    text-align: right;
}

.match-player-names {
    font-size: 0.75rem;
    color: #666;
    margin-top: 2px;
    line-height: 1.3;
    padding-left: 4px;
}

.match-vs {
    text-align: center;
    font-size: 0.75rem;
    color: #999;
    margin: 2px 0;
}

.match-empty {
    text-align: center;
    color: #999;
    font-style: italic;
    font-size: 0.85rem;
}

/* Match Result Form */
.match-result-teams {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.team-score-input {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.team-score-input label {
    font-weight: bold;
    color: var(--text-color);
}

.team-score-input input {
    padding: 10px;
    font-size: 1.2rem;
    text-align: center;
}

.vs-separator {
    font-weight: bold;
    color: var(--primary-color);
    font-size: 1.2rem;
}

.tournament-footer {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: flex-end;
}

.tournament-view {
    margin-top: 20px;
}

.tournament-view h3 {
    color: var(--primary-color);
    margin-bottom: 15px;
}

/* Responsive Tournament Styles */
@media (max-width: 768px) {
    .tournaments-grid {
        grid-template-columns: 1fr;
    }

    .bracket {
        gap: 20px;
    }

    .bracket-round {
        min-width: 150px;
    }

    .match-card {
        min-height: 70px;
        font-size: 0.85rem;
    }

    .player-selection {
        grid-template-columns: 1fr;
    }

    .teams-grid {
        grid-template-columns: 1fr;
    }
}

.form-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.form-actions button {
    flex: 1;
    min-width: 150px;
}

@media (max-width: 600px) {
    .form-actions {
        flex-direction: column;
    }

    .form-actions button {
        width: 100%;
    }
}

/* ==================== ESSEN / FOOD STYLES ==================== */

.food-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    border-bottom: 2px solid #eee;
}

.food-tab-btn {
    padding: 12px 24px;
    background: #e9e4d9; /* Muted background for inactive tabs */
    border: none;
    border-radius: 8px 8px 0 0;
    color: var(--text-color);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    position: relative;
    margin-right: 5px;
}

.food-tab-btn:hover {
    background: #ddd8cc;
    color: var(--primary-color);
}

.food-tab-btn.active {
    background: var(--primary-color);
    color: white;
}

.food-tab-btn.active i {
    color: white !important;
}

.food-tab-btn.active .icon-btn {
    color: white;
}

.food-item-checkbox.disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.food-item-checkbox.disabled input[type="checkbox"] {
    cursor: not-allowed;
}

.food-tab-content {
    display: none;
}

.food-tab-content.active {
    display: block;
}

.search-input {
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
    width: 300px;
    max-width: 100%;
}

.food-items-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
}

.modal-large {
    max-width: 900px;
    width: 95%;
}

.selection-modal-filter-bar {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.modal-item-checkbox {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.food-category-section {
    margin-bottom: 30px;
    width: 100%;
    display: block;
}

.food-category-title {
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 5px;
    margin-bottom: 15px;
    color: var(--primary-color);
    width: 100%;
}

.collapsible-header:hover {
    color: var(--primary-color);
}

.collapsible-header i {
    font-size: 1.2rem;
    color: #999;
}

.food-item-card {
    background: white;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.food-item-content {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.food-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.food-item-checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    flex: 1;
}

.food-item-checkbox input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.food-item-name {
    font-weight: 500;
    font-size: 1rem;
}

.food-item-price {
    font-weight: 600;
    color: var(--primary-color);
    font-size: 1rem;
}

.food-item-description {
    font-size: 0.9rem;
    color: #666;
    margin: 0;
    line-height: 1.4;
}

.food-item-creator {
    font-size: 0.85rem;
    color: #999;
    font-style: italic;
}

.food-selections {
    margin-top: 30px;
    padding-top: 30px;
    border-top: 2px solid #eee;
}

.food-selections h4 {
    margin-bottom: 15px;
    color: var(--primary-color);
}

.my-selection-list,
.all-selections-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 25px;
}

.selection-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    background: #f9f9f9;
    border-radius: 5px;
    gap: 10px;
}

.selection-item > div {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
}

.selection-quantity {
    font-weight: 600;
    color: var(--primary-color);
    min-width: 40px;
    text-align: center;
}

.selection-total {
    font-weight: 600;
    color: var(--secondary-color);
    min-width: 70px;
    text-align: right;
}

.item-price {
    font-size: 0.9rem;
    color: #666;
}

.user-selections-group {
    margin-bottom: 20px;
    padding: 15px;
    background: #f9f9f9;
    border-radius: 8px;
    border-left: 4px solid var(--primary-color);
}

.user-selections-group h5 {
    margin: 0 0 10px 0;
    color: var(--primary-color);
    font-size: 1.1rem;
}

.selections-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.user-selections-group .selection-item {
    background: white;
    margin: 0;
}

.user-total {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #ddd;
    font-weight: 600;
    color: var(--secondary-color);
    text-align: right;
}

.no-selections {
    color: #999;
    font-style: italic;
    padding: 20px;
    text-align: center;
}

.food-category-section {
    margin-bottom: 30px;
}

.food-category-title {
    margin: 0 0 15px 0;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary-color);
    color: var(--primary-color);
    font-size: 1.2rem;
    font-weight: 600;
}

.order-day-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    border-bottom: 2px solid #eee;
}

.order-day-tab-btn {
    padding: 10px 20px;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    color: var(--text-color);
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.order-day-tab-btn:hover {
    color: var(--primary-color);
}

.order-day-tab-btn.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.order-day-selections {
    display: block;
}

.order-day-selections.hidden {
    display: none;
}

@media (max-width: 768px) {
    .food-items-grid {
        grid-template-columns: 1fr;
    }
    
    .search-input {
        width: 100%;
    }
    
    .selection-item {
        flex-wrap: wrap;
    }
    
    #pizza-order-day {
        width: 100% !important;
    }
}