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

body {
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
    background: #f8fafc;
    min-height: 100vh;
    color: #1e293b;
    line-height: 1.5;
    font-weight: 400;
}

.container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 20px;
}

header {
    background: white;
    padding: 30px;
    border-radius: 12px;
    margin-bottom: 30px;
    text-align: center;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    position: relative;
}

h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
    color: #1e293b;
    font-weight: 600;
    letter-spacing: -0.02em;
}

.subtitle {
    color: #64748b;
    font-size: 1.1em;
}

.coffee-link {
    position: absolute;
    top: 20px;
    right: 20px;
}

.coffee-link a {
    display: inline-block;
    background: #f97316;
    color: white;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 0.9em;
    font-weight: 500;
    transition: all 0.2s ease;
}

.coffee-link a:hover {
    background: #ea580c;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.controls {
    background: white;
    padding: 25px;
    border-radius: 12px;
    margin-bottom: 30px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.filters {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.filter-group {
    display: flex;
    flex-direction: column;
}

.filter-group label {
    font-weight: 600;
    margin-bottom: 8px;
    color: #374151;
    font-size: 0.875rem;
    letter-spacing: 0.01em;
}

.filter-group input,
.filter-group select {
    padding: 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 16px;
    transition: all 0.2s ease;
    background: white;
}

.filter-group input:focus,
.filter-group select:focus {
    outline: none;
    border-color: #f97316;
    box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.1);
}

.date-navigation {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-bottom: 8px;
    position: relative;
}

.date-nav-btn {
    background: #f97316;
    color: white;
    border: none;
    border-radius: 6px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 18px;
    font-weight: bold;
    transition: all 0.2s ease;
    user-select: none;
    position: relative;
    z-index: 10;
}

.date-nav-btn:hover:not(.disabled) {
    background: #ea580c;
    transform: translateY(-1px);
}

.date-nav-btn:active:not(.disabled) {
    transform: translateY(0);
}

.date-nav-btn.disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none;
    background: #d1d5db;
}

.date-navigation input[type="date"] {
    flex: 1;
    margin: 0;
    padding: 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 16px;
    transition: border-color 0.2s ease;
    background: white;
    cursor: pointer;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.date-navigation input[type="date"]:focus {
    outline: none;
    border-color: #f97316;
    box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.1);
}

.date-navigation input[type="date"]::-webkit-calendar-picker-indicator {
    background: transparent;
    bottom: 0;
    color: transparent;
    cursor: pointer;
    height: auto;
    left: 0;
    position: absolute;
    right: 0;
    top: 0;
    width: auto;
}

.date-navigation input[type="date"]::-webkit-inner-spin-button,
.date-navigation input[type="date"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.current-date-display {
    font-size: 0.85em;
    color: #f97316;
    font-weight: 600;
    text-align: center;
    margin-top: 4px;
}

.toggle-buttons {
    display: flex;
    gap: 15px;
    margin-top: 15px;
    flex-wrap: wrap;
}

.toggle-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background: white;
    color: #64748b;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
    font-size: 0.9em;
}

.toggle-btn:hover {
    border-color: #f97316;
    color: #f97316;
    transform: translateY(-1px);
}

.toggle-btn.active {
    background: #f97316;
    border-color: #f97316;
    color: white;
}

.toggle-btn .icon {
    font-size: 1.1em;
}

.main-content {
    background: white;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.grid-view {
    padding: 25px;
    overflow-x: auto;
}

.show-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    width: 100%;
    max-width: 100%;
}

/* Responsive grid sizing based on number of active columns */
.show-grid[style*="grid-template-columns: repeat(1, 1fr)"] {
    grid-template-columns: 1fr;
    max-width: 400px;
    margin: 0 auto;
}

.show-grid[style*="grid-template-columns: repeat(2, 1fr)"] {
    grid-template-columns: repeat(2, 1fr);
    max-width: 600px;
    margin: 0 auto;
}

.show-grid[style*="grid-template-columns: repeat(3, 1fr)"] {
    grid-template-columns: repeat(3, 1fr);
    max-width: 900px;
    margin: 0 auto;
}

.show-grid[style*="grid-template-columns: repeat(4, 1fr)"] {
    grid-template-columns: repeat(4, 1fr);
    max-width: 100%;
}

.grid-header {
    display: contents;
}

.grid-header-cell {
    background: #1e293b;
    color: white;
    padding: 12px 10px;
    text-align: center;
    font-weight: 700;
    font-size: 0.875rem;
    border-radius: 8px 8px 0 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    letter-spacing: 0.02em;
    text-transform: uppercase;
    border-bottom: 2px solid #f97316;
}

.time-slot {
    display: contents;
}

.time-cell {
    background: #f8fafc;
    padding: 8px;
    text-align: center;
    vertical-align: top;
    min-height: 80px;
    border-radius: 4px;
    position: relative;
}

.time-label {
    font-weight: 600;
    font-size: 0.9em;
    color: #f97316;
    margin-bottom: 5px;
    background: white;
    padding: 4px 8px;
    border-radius: 4px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.show-cell {
    background: white;
    border-radius: 8px;
    padding: 8px;
    margin: 2px 0;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid #e2e8f0;
    position: relative;
    min-height: 60px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.show-cell:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    border-color: #f97316;
}

.show-cell.available {
    background: linear-gradient(135deg, #f0fdf4, #dcfce7);
    border: 2px solid #10b981;
}

.show-cell.sold-out {
    background: linear-gradient(135deg, #fef2f2, #fee2e2);
    border: 2px solid #ef4444;
    opacity: 0.7;
}

.show-cell.preview {
    background: linear-gradient(135deg, #f0fdf4, #dcfce7);
    border: 2px solid #10b981;
}

.show-cell.free {
    background: linear-gradient(135deg, #eff6ff, #dbeafe);
    border: 2px solid #3b82f6;
}

.show-cell.cancelled {
    background: linear-gradient(135deg, #f9fafb, #f3f4f6);
    border: 2px solid #6b7280;
    opacity: 0.6;
}

.show-cell.unknown {
    background: linear-gradient(135deg, #faf5ff, #f3e8ff);
    border: 2px solid #8b5cf6;
}

.show-name {
    font-weight: 700;
    font-size: 12px;
    line-height: 1.3;
    margin-bottom: 4px;
    color: #1e293b;
    letter-spacing: -0.01em;
}

.show-venue {
    font-size: 10px;
    color: #64748b;
    margin-bottom: 3px;
}

.show-status {
    position: absolute;
    top: 2px;
    right: 3px;
    font-size: 8px;
    padding: 1px 4px;
    border-radius: 3px;
    font-weight: 600;
    text-transform: uppercase;
}

.show-status.available { background: #10b981; color: white; }
.show-status.sold-out { background: #ef4444; color: white; }
.show-status.preview { background: #10b981; color: white; }
.show-status.free { background: #3b82f6; color: white; }
.show-status.cancelled { background: #6b7280; color: white; }
.show-status.unknown { background: #8b5cf6; color: white; }

.accessibility-icon {
    position: absolute;
    bottom: 2px;
    left: 3px;
    font-size: 10px;
    background: #0891b2;
    color: white;
    padding: 1px 3px;
    border-radius: 2px;
}

.show-price {
    font-size: 9px;
    color: #059669;
    font-weight: 600;
    margin-top: 2px;
}

.empty-cell {
    background: #fafafa;
    color: #9ca3af;
    font-style: italic;
    font-size: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 60px;
}

.loading {
    text-align: center;
    padding: 60px;
    color: #f97316;
    font-weight: 600;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #f97316;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.hidden {
    display: none;
}

footer {
    padding: 30px;
    color: #64748b;
    margin-top: 40px;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 30px;
}

.footer-left {
    flex: 1;
}

.footer-right {
    flex: 1;
    text-align: right;
}

.coffee-support {
    max-width: 400px;
    margin-left: auto;
}

.coffee-support p {
    margin-bottom: 10px;
    font-size: 0.9em;
    line-height: 1.4;
}

footer a {
    color: #f97316;
    text-decoration: none;
    padding: 5px 10px;
    border-radius: 5px;
    transition: background 0.2s ease;
}

footer a:hover {
    background: rgba(249, 115, 22, 0.1);
}

.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background: white;
    padding: 30px;
    border-radius: 12px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    color: #999;
}

.close:hover {
    color: #333;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.stat-card {
    text-align: center;
    padding: 20px;
    background: #f8fafc;
    border-radius: 8px;
}

.stat-number {
    font-size: 2em;
    font-weight: bold;
    color: #f97316;
    margin-bottom: 5px;
}

.stat-label {
    color: #64748b;
    font-size: 0.9em;
}

/* Show Details Modal Styles */
.show-details h2 {
    color: #1e293b;
    margin-bottom: 20px;
    font-size: 1.8em;
}

.show-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 25px;
}

.info-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.info-item .label {
    font-weight: 600;
    color: #f97316;
    font-size: 0.9em;
}

.info-item .value {
    color: #1e293b;
    font-size: 1em;
}

.ticket-status {
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.ticket-status h3 {
    margin-bottom: 10px;
    font-size: 1.2em;
}

.ticket-status.available {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.ticket-status.sold-out {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.ticket-status.cancelled {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.ticket-status.free {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

.ticket-status.special-offer {
    background: #e2e3e5;
    color: #383d41;
    border: 1px solid #d6d8db;
}

.ticket-status.clickable {
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.ticket-status.clickable:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.ticket-status.clickable:active {
    transform: translateY(0);
}

.click-hint {
    font-size: 0.9em;
    opacity: 0.8;
    margin-top: 8px;
    font-style: italic;
}

.accessibility-info {
    margin-bottom: 20px;
}

.accessibility-info h3 {
    color: #f97316;
    margin-bottom: 10px;
}

.accessibility-info ul {
    list-style: none;
    padding: 0;
}

.accessibility-info li {
    padding: 5px 0;
    color: #64748b;
}

.booking-link {
    text-align: center;
    margin-top: 20px;
}

.book-button {
    display: inline-block;
    background: #f97316;
    color: white;
    padding: 12px 24px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s ease;
}

.book-button:hover {
    background: #ea580c;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(249, 115, 22, 0.3);
}

.venue-button {
    display: inline-block;
    background: #64748b;
    color: white;
    padding: 12px 24px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s ease;
}

.venue-button:hover {
    background: #475569;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(100, 116, 139, 0.3);
}

.column-filters {
    margin: 20px 0;
    padding: 15px 0;
    border-top: 1px solid #e5e7eb;
    border-bottom: 1px solid #e5e7eb;
}

.column-filters label {
    font-weight: 600;
    margin-bottom: 12px;
    color: #374151;
    font-size: 0.875rem;
    letter-spacing: 0.01em;
    display: block;
}

.column-filter-lozenges {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

.column-lozenge {
    display: inline-flex;
    align-items: center;
    padding: 8px 16px;
    border: 2px solid #d1d5db;
    border-radius: 20px;
    background: white;
    color: #64748b;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
    font-size: 0.85em;
    white-space: nowrap;
}

.column-lozenge:hover {
    border-color: #f97316;
    color: #f97316;
    transform: translateY(-1px);
}

.column-lozenge.active {
    background: #f97316;
    border-color: #f97316;
    color: white;
}

.column-lozenge.active:hover {
    background: #ea580c;
    border-color: #ea580c;
    transform: translateY(-1px);
}

@media (max-width: 1200px) {
    .grid-header-cell,
    .show-cell {
        font-size: 11px;
    }
    
    .show-name {
        font-size: 11px;
    }
    
    .show-venue {
        font-size: 9px;
    }
}

@media (max-width: 1024px) {
    .show-grid[style*="grid-template-columns: repeat(1, 1fr)"] {
        max-width: 500px;
    }
    
    .show-grid[style*="grid-template-columns: repeat(2, 1fr)"] {
        max-width: 700px;
    }
    
    .show-grid[style*="grid-template-columns: repeat(3, 1fr)"] {
        max-width: 100%;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    .filters {
        grid-template-columns: 1fr;
    }
    
    .column-filter-lozenges {
        gap: 8px;
    }
    
    .column-lozenge {
        padding: 6px 12px;
        font-size: 0.8em;
    }
    
    .toggle-buttons {
        justify-content: center;
    }
    
    .main-content {
        border-radius: 12px;
    }
    
    .grid-view {
        padding: 15px;
    }
    
    .show-grid {
        gap: 10px;
    }
    
    /* Mobile-specific grid sizing to maintain consistent column widths */
    .show-grid[style*="grid-template-columns: repeat(1, 1fr)"] {
        grid-template-columns: 1fr;
        max-width: 300px;
        margin: 0 auto;
    }
    
    .show-grid[style*="grid-template-columns: repeat(2, 1fr)"] {
        grid-template-columns: repeat(2, 1fr);
        max-width: 500px;
        margin: 0 auto;
    }
    
    .show-grid[style*="grid-template-columns: repeat(3, 1fr)"] {
        grid-template-columns: repeat(3, 1fr);
        max-width: 700px;
        margin: 0 auto;
    }
    
    .show-grid[style*="grid-template-columns: repeat(4, 1fr)"] {
        grid-template-columns: repeat(4, 1fr);
        max-width: 100%;
        min-width: 800px; /* Only force wide layout for 4 columns */
    }
    
    .grid-header-cell {
        padding: 10px 5px;
        font-size: 0.9rem;
    }
    
    /* Mobile footer layout */
    .footer-content {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
    
    .footer-right {
        text-align: center;
    }
    
    .coffee-support {
        max-width: 100%;
        margin: 0 auto;
    }
    
    .coffee-support p {
        font-size: 0.85em;
    }
}