* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #17624a;
    --primary-dark: #17624a ;
    --success-color: #28a745;
    --error-color: #dc3545;
    --warning-color: #ffc107;
    --light-bg: #f8f9fa;
    --border-color: #dee2e6;
    --text-dark: #212529;
    --text-light: #6c757d;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 4px 16px rgba(0, 0, 0, 0.15);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #91a895 0%, #54968c 100%);
    color: var(--text-dark);
    line-height: 1.6;
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    background: white;
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* ===== HEADER ===== */
header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 40px 30px;
    text-align: center;
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    font-weight: 700;
}

header .subtitle {
    font-size: 1.1rem;
    opacity: 0.95;
    font-weight: 300;
}

/* ===== MAIN CONTENT ===== */
main {
    flex: 1;
    padding: 40px 30px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

/* ===== FORMULAR ===== */
.booking-form {
    background: var(--light-bg);
    padding: 30px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.booking-form h2 {
    font-size: 1.5rem;
    margin-bottom: 25px;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    gap: 10px;
}

.booking-form h2::before {
    content: '📝';
    font-size: 1.8rem;
}

.form-group {
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-dark);
    font-size: 0.95rem;
}

.form-group input,
.form-group select {
    padding: 12px 15px;
    border: 2px solid var(--border-color);
    border-radius: 6px;
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.3s ease;
    background: white;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
}

.form-group input:invalid:not(:placeholder-shown),
.form-group select:invalid:not(:placeholder-shown) {
    border-color: var(--error-color);
}

.form-group input::placeholder {
    color: var(--text-light);
}

.error-message {
    color: var(--error-color);
    font-size: 0.85rem;
    margin-top: 5px;
    display: none;
    font-weight: 500;
}

.error-message.show {
    display: block;
}

.btn-submit {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    padding: 14px 30px;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    margin-top: 10px;
    box-shadow: var(--shadow);
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-submit:active {
    transform: translateY(0);
}

.btn-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* ===== SLOTS INFO ===== */
.slots-info {
    display: flex;
    flex-direction: column;
}

.slots-info h2 {
    font-size: 1.5rem;
    margin-bottom: 20px;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    gap: 10px;
}

.slots-info h2::before {
    content: '⏰';
    font-size: 1.8rem;
}

.slot-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-bottom: 25px;
}

.stat {
    background: white;
    border: 2px solid var(--border-color);
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    transition: all 0.3s ease;
}

.stat:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow);
}

.stat-label {
    display: block;
    color: var(--text-light);
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 8px;
}

.stat-value {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
}

.slot-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    max-height: 400px;
    overflow-y: auto;
    padding-right: 10px;
}

.slot-item {
    padding: 12px;
    border: 2px solid var(--border-color);
    border-radius: 6px;
    text-align: center;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    background: white;
    color: var(--text-dark);
}

.slot-item:hover:not(.booked) {
    border-color: var(--primary-color);
    background: rgba(0, 102, 204, 0.05);
    transform: scale(1.05);
}

.slot-item.booked {
    background: var(--light-bg);
    color: var(--text-light);
    cursor: not-allowed;
    opacity: 0.5;
    border-color: var(--border-color);
}

.slot-item.selected {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-dark);
    box-shadow: var(--shadow);
}

/* ===== MODAL ===== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.modal.show {
    display: flex;
}

.modal-content {
    background: white;
    padding: 40px;
    border-radius: 12px;
    text-align: center;
    max-width: 500px;
    box-shadow: var(--shadow-lg);
    animation: slideUp 0.3s ease;
}

.modal-content h2 {
    color: var(--success-color);
    font-size: 1.8rem;
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.modal-content h2::before {
    content: '✓';
    font-size: 2.2rem;
}

.success-details {
    margin-bottom: 30px;
}

.ticket-code {
    font-size: 3.5rem;
    font-weight: 700;
    color: var(--primary-color);
    letter-spacing: 8px;
    font-family: 'Courier New', monospace;
    margin-bottom: 10px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.ticket-label {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 25px;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

.booking-info {
    background: var(--light-bg);
    padding: 20px;
    border-radius: 8px;
    text-align: left;
    margin-bottom: 20px;
}

.booking-info p {
    margin-bottom: 12px;
    font-size: 1rem;
}

.booking-info strong {
    color: var(--text-dark);
    display: inline-block;
    min-width: 80px;
}

.btn-close, .btn-ical, .btn-copy {
    background: var(--primary-color);
    color: white;
    padding: 12px 30px;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-close:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

/* ===== ALERT ===== */
.alert {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 16px 20px;
    border-radius: 8px;
    display: none;
    align-items: center;
    gap: 15px;
    box-shadow: var(--shadow-lg);
    z-index: 999;
    animation: slideInRight 0.3s ease;
    max-width: 400px;
}

.alert.show {
    display: flex;
}

.alert-error {
    background: var(--error-color);
    color: white;
}

.btn-close-alert {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    transition: opacity 0.2s;
}

.btn-close-alert:hover {
    opacity: 0.8;
}

/* ===== SPINNER ===== */
.spinner {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50px;
    height: 50px;
    border: 4px solid var(--light-bg);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    z-index: 1001;
}

.spinner.show {
    display: block;
}

/* ===== FOOTER ===== */
footer {
    background: var(--light-bg);
    padding: 20px 30px;
    text-align: center;
    color: var(--text-light);
    font-size: 0.9rem;
    border-top: 1px solid var(--border-color);
}

/* ===== ANIMATIONS ===== */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes slideInRight {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes spin {
    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    main {
        grid-template-columns: 1fr;
        gap: 30px;
        padding: 20px;
    }

    header {
        padding: 30px 20px;
    }

    header h1 {
        font-size: 1.8rem;
    }

    header .subtitle {
        font-size: 1rem;
    }

    .slot-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .slot-stats {
        grid-template-columns: 1fr;
    }

    .modal-content {
        padding: 30px 20px;
        margin: 20px;
    }

    .ticket-code {
        font-size: 2.5rem;
        letter-spacing: 4px;
    }

    .alert {
        right: 10px;
        left: 10px;
        max-width: none;
    }
}

@media (max-width: 480px) {
    .booking-form {
        padding: 20px;
    }

    .slot-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    header h1 {
        font-size: 1.5rem;
    }

    .ticket-code {
        font-size: 2rem;
    }
}

/* ===== SCROLLBAR STYLING ===== */
.slot-grid::-webkit-scrollbar {
    width: 6px;
}

.slot-grid::-webkit-scrollbar-track {
    background: var(--light-bg);
    border-radius: 10px;
}

.slot-grid::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 10px;
}

.slot-grid::-webkit-scrollbar-thumb:hover {
    background: var(--text-light);
}

/* ===== Booking-Days ===== */

.day-selection {
    margin: 20px 0; /* Space around the selection area */
}

.day-options {
    display: flex;
    flex-direction: column; /* Stack items vertically */
}

.day-radio {
    display: flex;
    align-items: center; /* Align radio button and text */
    cursor: pointer; /* Pointer on hover to indicate clickable area */
    margin: 10px 0; /* Space between options */
    padding: 5px; /* Padding around the option */
    background-color: #f9f9f9; /* Light background for distinction */
    border: 2px solid transparent; /* Border for selected state */
    border-radius: 5px; /* Rounded corners */
    transition: background-color 0.3s ease; /* Smooth background transition */
}

.day-radio input[type="radio"] {
    margin-right: 10px; /* Space between the radio button and text */
}

.day-radio:hover {
    background-color: #e0e0e0; /* Change background on hover */
}

.day-radio input[type="radio"]:checked + span {
    font-weight: bold; /* Make the selected day bold */
    color: #2a9d8f; /* Highlight color for selected text */
}

.day-radio input[type="radio"]:checked {
    background-color: #17624a; /* Background color for selected state */
    border-color: #2a9d8f; /* Border color for selected state */
    outline: none; /* Hide default outline */
}

/* Optional: Style for selected day */
.day-radio input[type="radio"]:checked {
    border-color: #2a9d8f; /* Border color for selected state */
}

/* ===== Close Modal ===== */
.close {
    color: #aaa; /* Farbe für Schließen-Button */
    float: right; /* Rechts positioniert */
    font-size: 28px; /* Textgröße */
    font-weight: bold; /* Fettschrift */
}

.close:hover,
.close:focus {
    color: black; /* Farbe bei Hover */
    text-decoration: none; /* Unterstreichung vermeiden */
    cursor: pointer; /* Zeiger anzeigen */
}
