:root {
    --primary: #007bff;
    --line: rgba(248, 249, 250, 0.8);
    --dark: #212529;
    --light: #f8f9fa;
    --success: #28a745;
}

body,
html {
    margin: 0;
    padding: 0;
    height: 100%;
    font-family: sans-serif;
    background-color: var(--dark);
    color: white;
    overflow: hidden;
    /* Verhindert Scrollen am Kiosk */
}

/* Obere Navigation */
.top-nav {
    display: flex;
    justify-content: space-around;
    background: #111;
    padding: 20px;
    border-bottom: 2px solid var(--line);
}

.nav-item {
    color: #555;
    text-decoration: none;
    font-size: 1.2rem;
    font-weight: bold;
}

.nav-item.active {
    color: var(--light);
}

/* Container für den Content */
.content-container {
    padding: 20px;
    min-height: calc(100vh - 90px);
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Button Grid: 2 Spalten */
.touch-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    width: 100%;
    max-width: 1200px;
    margin-top: 10px;
}

/* Große Touch Buttons */
.touch-button {
    background: var(--primary);
    color: white;
    border: none;
    padding: 40px 20px;
    font-size: 1.5rem;
    border-radius: 15px;
    text-align: center;
    text-decoration: none;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    justify-content: center;
    transition: transform 0.1s;
}

.touch-button:active {
    transform: scale(0.95);
    background: #0056b3;
}

.back-button {
    margin-top: 30px;
    background-color: var(--primary);
}

.description {
    font-size: 0.9rem;
    opacity: 0.8;
    margin-top: 10px;
}

/* Vollbild-Startseite */
.welcome-screen {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100%;
    width: 100%;
}

.disorder-screen {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100%;
    width: 100%;
    font-size: 1.6rem;
}

/* Spezifisches Styling für Tickets */
.ticket-btn {
    background: #ffffff;
    color: var(--dark);
    border: 3px solid var(--primary);
}

.ticket-name {
    font-weight: bold;
    margin-bottom: 5px;
}

.ticket-price {
    font-size: 1.8rem;
    color: var(--primary);
    font-weight: 900;
}

/* Navigation klickbar machen */
.nav-item {
    text-decoration: none;
    transition: opacity 0.2s;
}

.nav-item:not(.active) {
    color: #bbb;
    /* Etwas heller als vorher, damit man sieht, dass man zurück kann */
}

/* Warenkorb-Elemente */
.cart-item {
    display: flex;
    justify-content: space-between;
    background: #333;
    padding: 20px;
    margin-bottom: 10px;
    border-radius: 10px;
    font-size: 1.2rem;
}

.total-row {
    display: flex;
    justify-content: space-between;
    padding: 20px;
    font-size: 1.8rem;
    font-weight: bold;
    border-top: 2px solid var(--line);
    margin-top: 20px;
}

.total-price {
    color: var(--success);
}

.pay-btn {
    background: var(--success) !important;
    font-weight: bold;
}

.alt-btn {
    background: #444 !important;
}

.btn-cancel-touch {
    margin-top: 40px;
    color: #ff4444;
    text-decoration: none;
    font-size: 1rem;
    border-bottom: 1px solid #ff4444;
}

.success-box {
    text-align: center;
    background: #fff;
    color: #333;
    padding: 40px;
    border-radius: 20px;
    width: 100%;
    max-width: 1000px;
}

.ticket-receipt {
    border: 2px dashed #ccc;
    padding: 15px;
    margin-top: 10px;
    background: #f9f9f9;
    color: #000;
}

.cart-badge {
    background-color: var(--success);
    color: white;
    border-radius: 50%;
    padding: 2px 8px;
    font-size: 0.8rem;
    margin-left: 5px;
    vertical-align: middle;
}

.nav-item.disabled {
    color: #444;
    /* Dunkelgrau/Deaktiviert */
    pointer-events: none;
    /* Nicht anklickbar */
    opacity: 0.5;
}

/* Der Abbrechen-Button */
.btn-abort {
    display: inline-block;
    padding: 12px 25px;
    background-color: transparent;
    color: #888;
    /* Dezentes Grau */
    border: 2px solid #444;
    /* Dunkler Rahmen */
    border-radius: 8px;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: bold;
    transition: all 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Feedback beim Berühren (Touch) */
.btn-abort:hover {
    background-color: #ff4444;
    /* Wird beim Drücken rot */
    border-color: #ff4444;
    color: white;
}

/* Sekundärer Button (z.B. Zurück) */
.btn-secondary {
    display: inline-block;
    padding: 12px 25px;
    background-color: transparent;
    background: #6c757d;
    color: white;
    /* Dezentes Grau */
    border: 2px solid #444;
    /* Dunkler Rahmen */
    border-radius: 8px;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: bold;
    transition: all 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-secondary:hover {
    background: #5a6268;
}

.success-card {
    background: white;
    color: #333;
    padding: 40px;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    width: 100%;
    max-width: 900px;
}

.check-icon {
    font-size: 4rem;
    color: var(--success);
    margin-bottom: 10px;
}

.ticket-stub {
    background: #f0f0f0;
    margin: 10px 0;
    padding: 15px;
    border-left: 5px solid var(--success);
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 5px;
}

.stub-name {
    font-weight: bold;
}

.stub-id {
    font-size: 0.8rem;
    color: #666;
    background: #ddd;
    padding: 2px 5px;
    border-radius: 3px;
}

.hint {
    font-style: italic;
    color: #777;
    margin-top: 20px;
}

.bestseller-grid {
    display: flex;
    flex-wrap: wrap;
    /* Erlaubt Umbruch, falls der Platz echt nicht reicht */
    gap: 15px;
    /* Abstand zwischen den Items */
    margin-bottom: 20px;
    width: 100%;
    max-width: 1200px;
    justify-content: center;
}

.bestseller-item {
    flex: 1 1 calc(25% - 15px);
    /* Basisgröße ist 25% (also 4 Stück), minus Gap */
    min-width: 150px;
    max-width: 250px;
    /* Verhindert, dass sie auf dem Handy zu winzig werden */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 15px;
    background: #2a2a2a;
    /* Beispiel Hintergrundfarbe */
    border: 1px solid var(--primary);
    border-radius: 8px;
    text-decoration: none;
    color: white;
    transition: transform 0.2s;
}

.bestseller-item:hover {
    transform: scale(1.03);
    /* Kleiner Effekt beim Drüberfahren */
    background: #333;
}

.bestseller-item .star {
    color: gold;
    font-size: 1.2rem;
    margin-bottom: 5px;
}

.bestseller-item .name {
    text-align: center;
    font-weight: bold;
}

.cart-list {
    width: 100%;
    max-width: 1000px;
}

.cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.item-details {
    display: flex;
    gap: 10px;
}

.item-controls {
    display: flex;
    align-items: center;
    gap: 15px;
}

.btn-remove,
.btn-add,
.btn-delete {
    display: inline-block;
    /* Wichtig, damit width/height greifen */
    width: 40px;
    /* Feste Breite für alle */
    height: 40px;
    /* Feste Höhe für quadratische Buttons */
    line-height: 28px;
    /* Zentriert den Text vertikal (abhängig von Padding/Border) */
    text-align: center;
    /* Zentriert den Text horizontal */
    text-decoration: none;
    font-weight: bold;
    border-radius: 5px;
    box-sizing: border-box;
    /* Sorgt dafür, dass Border das Maß nicht sprengt */
    padding: 5px;
    /* Kleines Padding für die Optik */
}

.btn-remove {
    color: #ff4444;
    border: 1px solid #ff4444;
}

.btn-add {
    color: #44ff44;
    border: 1px solid #44ff44;
}

.btn-delete {
    color: white;
    border: 1px solid white;
}

.action-footer {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    /* Erzwingt die Reihe */
    justify-content: center;
    /* Zentriert die Buttons nebeneinander */
    align-items: center;
    gap: 0 20px;
    /* Schafft den Abstand zwischen den Buttons */
    margin-top: auto;
    /* Schiebt alles nach unten */
    width: 100%;
    max-width: 1200px;
    box-sizing: border-box;
}

/* Falls die Buttons gleich groß sein sollen */
.action-footer a {
    flex: 1;
    /* Beide Buttons nehmen den gleichen Platz ein */
    text-align: center;
    padding-top: 15px;
    text-decoration: none;
    border-radius: 8px;
    max-width: 50%;
}

.action-footer span {
    width: 100%;
    margin-top: 5px;
    text-align: center;
    color: #888;
    font-size: 0.8rem;
}

.link-footer {
    color: #888;
}

.separate-line {
    margin: 5px 0;
    opacity: 0.8;
    border: 0;
    border-top: 1px solid var(--line);
    width: 1200px;
}

.alert-error {
    color: #a00;
    background: #fdd;
    padding: 10px;
    margin-bottom: 15px;
    border-radius: 4px;
    width: 100%;
    max-width: 1000px;
}