body {
    background-color: #121212;
    color: #e0e0e0;
}

.festival-timetable {
    margin-top: 1.5rem;
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
}

.day-section {
    position: relative;
    margin-bottom: 2rem;
}

.day-header {
    position: -webkit-sticky; /* For Safari */
    position: sticky;
    top: 0;
    z-index: 1000;  /* Higher z-index to ensure header appears above other content */
    padding: 0.5rem 0;
    margin: 0.75rem 0;
    background-color: #1a1a1a;
    color: white;
    border-radius: 0.25rem;
    border-left: 4px solid #ff5500;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
    transition: opacity 0.3s, transform 0.3s;
    -webkit-transform: translate3d(0,0,0); /* Force hardware acceleration */
    transform: translate3d(0,0,0);
    -webkit-backface-visibility: hidden; /* Prevent flickering on some mobile browsers */
    backface-visibility: hidden;
}

.day-header.sticky-visible {
    background-color: rgba(26, 26, 26, 0.95);
}

.day-header h2 {
    margin: 0;
}

.stage-header {
    background-color: #2c2c2c;
    color: white;
    padding: 0.4rem 0.8rem;
    margin-bottom: 0.3rem;
    border-radius: 0.25rem;
    border-left: 3px solid #ff5500;
}

.timeline-container {
    margin-bottom: 1.2rem;
}

.timeline-table {
    font-size: 0.9rem;
    margin-bottom: 0;
    background-color: #1f1f1f;
    color: #e0e0e0;
}

.timeline-table th {
    background-color: #2c2c2c;
    border-bottom: 2px solid #444;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: #ff5500;
}

.timeline-table tbody tr {
    border-bottom: 1px solid #444;
}

.timeline-table tbody tr:nth-child(odd) {
    background-color: #252525;
}

.timeline-table tbody tr:nth-child(even) {
    background-color: #2a2a2a;
}

.timeline-table tbody tr:hover {
    background-color: #333 !important;
}

.artist-name {
    font-weight: 500;
    color: #ffffff;
}

.badge {
    font-weight: 500;
    padding: 0.35em 0.65em;
    border-radius: 0.25rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.badge.bg-primary {
    background-color: #222 !important;
    color: #ff5500 !important;
    border: 1px solid #ff5500;
}

.badge.bg-secondary {
    background-color: #222 !important;
    color: #e0e0e0 !important;
    border: 1px solid #666;
}

.badge.bg-info {
    background-color: #222 !important;
    color: #66ccff !important;
    border: 1px solid #66ccff;
}

.badge.bg-warning {
    background-color: #222 !important;
    color: #ffcc00 !important;
    border: 1px solid #ffcc00;
}

.card {
    background-color: #1a1a1a;
    border: 1px solid #333;
    color: #e0e0e0;
}

.card-header {
    background-color: #2c2c2c;
    border-bottom: 1px solid #444;
}

.alert-info {
    background-color: #223240;
    border-color: #274a5a;
    color: #b3d9ff;
}

.form-control, .form-select {
    background-color: #2c2c2c;
    border: 1px solid #444;
    color: #e0e0e0;
}

.form-control:focus, .form-select:focus {
    background-color: #2c2c2c;
    color: #e0e0e0;
    border-color: #ff5500;
    box-shadow: 0 0 0 0.25rem rgba(255, 85, 0, 0.25);
}

.btn-primary {
    background-color: #ff5500;
    border-color: #ff5500;
}

.btn-primary:hover {
    background-color: #cc4400;
    border-color: #cc4400;
}

.btn-outline-primary {
    color: #ff5500;
    border-color: #ff5500;
}

.btn-outline-primary:hover {
    background-color: #ff5500;
    border-color: #ff5500;
}

.btn-outline-secondary {
    color: #e0e0e0;
    border-color: #666;
}

.btn-outline-secondary:hover {
    background-color: #444;
    border-color: #666;
    color: #fff;
}

.btn-outline-dark {
    color: #e0e0e0;
    border-color: #555;
}

.btn-outline-dark:hover {
    background-color: #555;
    border-color: #666;
    color: #fff;
}

a {
    color: #ff7733;
}

a:hover {
    color: #ff5500;
}

.modal-content {
    background-color: #1a1a1a;
    color: #e0e0e0;
}

.favorited {
    color: #ff5500;
}

.navbar-dark {
    background-color: #000000 !important;
    border-bottom: 1px solid #333;
}

/* Override Bootstrap table styles with important to force dark backgrounds */
.table, 
table, 
.table-striped,
.table-hover {
    background-color: #1f1f1f !important;
    color: #e0e0e0 !important;
    border-color: #444 !important;
}

.table tbody tr,
table tbody tr,
.table-striped tbody tr,
tbody tr {
    background-color: #252525 !important;
    color: #e0e0e0 !important;
}

.table tbody tr:nth-of-type(even),
table tbody tr:nth-of-type(even),
.table-striped tbody tr:nth-of-type(even),
tbody tr:nth-of-type(even) {
    background-color: #2a2a2a !important;
    color: #e0e0e0 !important;
}

.table tr:hover,
table tr:hover,
.table-hover tr:hover,
tr:hover {
    background-color: #333 !important;
    color: #e0e0e0 !important;
}

.table th,
.table td,
table th, 
table td,
th, td {
    background-color: transparent !important;
    color: #e0e0e0 !important;
    border-color: #444 !important;
}

/* Override Bootstrap's table-light class that's causing the light backgrounds */
.table-light,
.table thead.table-light,
.table-striped thead.table-light,
thead.table-light,
.table-light th,
.table-light td {
    background-color: #2c2c2c !important;
    color: #ff5500 !important;
    border-color: #444 !important;
}

/* Fix text-muted color for better readability on dark backgrounds */
.text-muted {
    color: #aaaaaa !important;
}

/* Ensure small text is still readable */
small, .small {
    color: #cccccc !important;
}

small.text-muted, .small.text-muted {
    color: #aaaaaa !important;
}

/* Enhanced mobile optimizations */
@media (max-width: 767.98px) {
    /* Base font adjustments */
    .timeline-table {
        font-size: 0.8rem;
    }
    
    /* Badge positioning */
    .badge {
        display: block;
        text-align: center;
        font-size: 0.7rem;
    }
    
    /* Header size adjustments */
    .stage-header h3 {
        font-size: 1.25rem;
    }
    
    .day-header h2 {
        font-size: 1.5rem;
    }
    
    /* Table optimizations for small screens */
    .timeline-table th:nth-child(3),
    .timeline-table td:nth-child(3) {
        display: none; /* Hide country column on mobile */
    }
    
    .timeline-table th:last-child,
    .timeline-table td:last-child {
        display: table-cell !important;
    }
    
    /* Make delete buttons more touch-friendly on mobile */
    .btn-danger.btn-sm {
        min-height: 38px;
        min-width: 38px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    /* Improve spacing for mobile */
    .container-fluid {
        padding-left: 10px;
        padding-right: 10px;
    }
    
    /* Better button spacing */
    .btn {
        margin-bottom: 0.5rem;
        white-space: nowrap;
    }
    
    /* Optimize forms for mobile */
    .form-control, .form-select {
        font-size: 16px; /* Prevents iOS zoom on input */
    }
    
    /* Card styling for mobile */
    .card {
        margin-bottom: 1rem;
    }
    
    /* More touch-friendly buttons */
    .btn-sm {
        padding: 0.4rem 0.6rem;
        min-height: 38px; /* Better touch target */
    }
    
    /* Fixed position elements */
    .fixed-bottom {
        padding-bottom: env(safe-area-inset-bottom); /* For iPhone X+ */
    }
}

/* Custom styling for form switch to match Wacken theme */
.form-switch .form-check-input {
    background-color: #333;
    border-color: #444;
}

.form-switch .form-check-input:checked {
    background-color: #ff5500;
    border-color: #ff5500;
}

.form-switch .form-check-input:focus {
    box-shadow: 0 0 0 0.25rem rgba(255, 85, 0, 0.25);
    border-color: #ff5500;
}
