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

body {
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.15);
    padding: 40px;
    backdrop-filter: blur(10px);
}

h1 {
    text-align: center;
    color: #2d3748;
    margin-bottom: 40px;
    font-size: 2.8em;
    font-weight: 700;
    text-shadow: none;
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.title{
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}

/* Header and Form Row Container */
.header-and-form-row {
    display: flex;
    gap: 30px;
    margin-bottom: 50px;
    align-items: flex-start;
    justify-content: space-between;
    width: 100%;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

/* Left Column: Controls and Seat Selection */
.left-column {
    flex: 0 0 60%;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Session, Date, and Location Selectors */
.header {
    flex: none;
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 30px;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    margin-bottom: 0;
}

.session-selector,
.date-selector,
.location-selector {
    margin-bottom: 0;
    display: flex;
    flex-direction: column;
    align-items: stretch;
}

.session-selector label,
.date-selector label,
.location-selector label {
    display: block;
    margin-bottom: 12px;
    font-weight: 600;
    color: #4a5568;
    font-size: 16px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.session-selector select,
.date-selector select,
.date-selector input,
.location-selector select {
    padding: 16px 20px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 500;
    background: white;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.session-selector select:focus,
.date-selector select:focus,
.date-selector input:focus,
.location-selector select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
    transform: translateY(-1px);
}

/* Predefined Event Date Styling */
.date-selector select:disabled,
.date-selector input:disabled {
    background-color: #f0f8ff;
    border-color: #667eea;
    color: #333;
    cursor: not-allowed;
    opacity: 0.9;
}

/* Multi-day event styling */
.date-selector select:not(:disabled).event-enabled,
.date-selector input:not(:disabled).event-enabled {
    background-color: #f0f8ff;
    border-color: #667eea;
    color: #333;
}

.date-selector select:not(:disabled).event-enabled:focus,
.date-selector input:not(:disabled).event-enabled:focus {
    background-color: #ffffff;
    border-color: #4a5cba;
}

.date-selector label.event-label {
    color: #667eea;
    font-weight: 700;
}

/* Screen Indicator */
.screen {
    background: linear-gradient(135deg, #2d3748, #4a5568);
    color: white;
    text-align: center;
    padding: 20px;
    margin: 0 auto 20px auto;
    border-radius: 15px;
    font-weight: 700;
    font-size: 18px;
    max-width: 100%;
    width: 90%;
    box-shadow: 0 8px 25px rgba(45, 55, 72, 0.3);
    display: block;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.seat-row-flex {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 30px;
    width: 100%;
}



/* Main grid container for seat grid and booking form */
.main-content {
    display: flex;
    flex-direction: column;
    gap: 30px;
    align-items: center;
    margin-bottom: 30px;
    width: 100%;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.seat-section {
    width: 100%;
    max-width: 1200px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Seat Grid */
.seat-grid {
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    gap: 12px;
    width: 100%;
    padding: 30px;
    background: linear-gradient(135deg, #f7fafc 0%, #edf2f7 100%);
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.08);
    border: 1px solid rgba(226, 232, 240, 0.8);
    margin: 0 auto;
}

.seat {
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 700;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    text-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.seat:hover:not(.booked):not(.disabled) {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.seat.available {
    background: linear-gradient(135deg, #48bb78, #38a169);
    color: white;
    box-shadow: 0 4px 15px rgba(72, 187, 120, 0.3);
}

.seat.available:hover {
    background: linear-gradient(135deg, #38a169, #2f855a);
    box-shadow: 0 8px 25px rgba(72, 187, 120, 0.4);
}

.seat.selected {
    background: linear-gradient(135deg, #4299e1, #3182ce);
    color: white;
    transform: scale(1.1);
    box-shadow: 0 8px 25px rgba(66, 153, 225, 0.4);
    border: 3px solid white;
}

.seat.booked {
    background: linear-gradient(135deg, #e53e3e, #c53030);
    color: white;
    cursor: not-allowed;
    box-shadow: 0 4px 15px rgba(229, 62, 62, 0.3);
}

.seat.booked:hover {
    transform: none;
    box-shadow: 0 4px 15px rgba(229, 62, 62, 0.3);
}

.seat.disabled {
    background: linear-gradient(135deg, #e2e8f0, #cbd5e0);
    color: #a0aec0;
    cursor: not-allowed;
    box-shadow: none;
}

/* Legend */
.legend {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin: 20px 0 0 0;
    flex-wrap: wrap;
    padding: 20px;
    background: linear-gradient(135deg, #f7fafc 0%, #edf2f7 100%);
    border-radius: 15px;
    border: 1px solid #e2e8f0;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 12px;
}

.seat-example {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 700;
    color: white;
    text-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.seat-example.available {
    background: linear-gradient(135deg, #48bb78, #38a169);
}

.seat-example.selected {
    background: linear-gradient(135deg, #4299e1, #3182ce);
    border: 2px solid white;
}

.seat-example.booked {
    background: linear-gradient(135deg, #e53e3e, #c53030);
}

.legend-item span {
    font-weight: 600;
    color: #4a5568;
    font-size: 14px;
}

/* Booking Form */
.booking-form {
    flex: 0 0 38%;
    position: static;
    z-index: auto;
    min-width: 320px;
    max-width: none;
    flex-shrink: 0;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
    padding: 30px;
    display: none;
    backdrop-filter: blur(10px);
    height: fit-content;
    margin-left: auto;
}

.booking-form.show {
    display: flex;
    flex-direction: column;
}

.booking-form h3 {
    color: #2d3748;
    margin-bottom: 25px;
    text-align: center;
    font-size: 1.5em;
    font-weight: 700;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #4a5568;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-group input {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 16px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: #f7fafc;
}

.form-group input:focus {
    outline: none;
    border-color: #667eea;
    background: white;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
    transform: translateY(-1px);
}

.form-group input.invalid {
    border-color: #e53e3e;
    background: #fed7d7;
    box-shadow: 0 0 0 4px rgba(229, 62, 62, 0.1);
}

.form-group input.invalid:focus {
    border-color: #e53e3e;
    background: #fed7d7;
    box-shadow: 0 0 0 4px rgba(229, 62, 62, 0.2);
}

.selected-info {
    background: linear-gradient(135deg, #f7fafc 0%, #edf2f7 100%);
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 25px;
    border: 1px solid #e2e8f0;
}

.selected-info p {
    margin-bottom: 8px;
    color: #4a5568;
    font-weight: 500;
}

.selected-info strong {
    color: #2d3748;
}

/* Form actions */
.form-actions {
    text-align: center;
}

/* Buttons */
.submit-btn,
.cancel-btn {
    padding: 14px 28px;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    width: 100%;
}

.submit-btn {
    background: linear-gradient(135deg, #48bb78, #38a169);
    color: white;
    margin-bottom: 15px;
    box-shadow: 0 6px 20px rgba(72, 187, 120, 0.3);
}

.submit-btn:hover {
    background: linear-gradient(135deg, #38a169, #2f855a);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(72, 187, 120, 0.4);
}

.cancel-btn {
    background: linear-gradient(135deg, #e53e3e, #c53030);
    color: white;
    margin-top: 10px;
    box-shadow: 0 6px 20px rgba(229, 62, 62, 0.3);
}

.cancel-btn:hover {
    background: linear-gradient(135deg, #c53030, #9c2626);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(229, 62, 62, 0.4);
}

/* Refresh Controls */
.refresh-controls {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-top: 10px;
}

.refresh-btn {
    padding: 12px 20px;
    border: none;
    border-radius: 10px;
    background: linear-gradient(135deg, #4299e1, #3182ce);
    color: white;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 15px rgba(66, 153, 225, 0.3);
    min-width: 120px;
}

.refresh-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #3182ce, #2c5282);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(66, 153, 225, 0.4);
}

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

.refresh-btn.syncing {
    background: linear-gradient(135deg, #ed8936, #dd6b20);
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.sync-controls {
    display: none;
    flex-direction: column;
    gap: 14px;
    padding: 20px;
    background: linear-gradient(135deg, #f3f4ff 0%, #e2e8f0 100%);
    border-radius: 16px;
    border: 1px solid rgba(102, 126, 234, 0.2);
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.15);
}

.sync-controls.active {
    display: flex;
}

.sync-controls.is-syncing {
    opacity: 0.9;
}

.sync-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.sync-btn {
    padding: 12px 20px;
    border-radius: 12px;
    border: none;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 6px 18px rgba(102, 126, 234, 0.2);
    color: white;
}

.sync-btn.primary {
    background: linear-gradient(135deg, #667eea, #764ba2);
}

.sync-btn.secondary {
    background: linear-gradient(135deg, #4299e1, #3182ce);
}

.sync-btn.tertiary {
    background: #f7fafc;
    color: #4a5568;
    border: 1px solid rgba(160, 174, 192, 0.6);
    box-shadow: none;
}

.sync-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 10px 28px rgba(102, 126, 234, 0.25);
}

.sync-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.sync-status-text {
    font-size: 14px;
    font-weight: 600;
    color: #4a5568;
}

.sync-status-text.success {
    color: #2f855a;
}

.sync-status-text.error {
    color: #c53030;
}

.sync-status-text.warning {
    color: #b7791f;
}

.sync-status-text.info {
    color: #2b6cb0;
}

.sync-status-text a {
    margin-left: 6px;
    color: inherit;
    text-decoration: underline;
}

.sync-status {
    font-size: 12px;
    color: #718096;
    font-weight: 500;
    min-width: 80px;
}

.sync-status.syncing {
    color: #ed8936;
}

.sync-status.success {
    color: #48bb78;
}

.sync-status.error {
    color: #e53e3e;
}

/* Status Message */
.status-message {
    padding: 18px 24px;
    border-radius: 12px;
    margin-top: 30px;
    font-weight: 500;
    text-align: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 15px;
}

.status-message.success {
    background: linear-gradient(135deg, #c6f6d5, #9ae6b4);
    color: #22543d;
    border: 1px solid #9ae6b4;
    box-shadow: 0 4px 15px rgba(154, 230, 180, 0.3);
}

.status-message.error {
    background: linear-gradient(135deg, #fed7d7, #feb2b2);
    color: #742a2a;
    border: 1px solid #feb2b2;
    box-shadow: 0 4px 15px rgba(254, 178, 178, 0.3);
}

.status-message.info {
    background: linear-gradient(135deg, #bee3f8, #90cdf4);
    color: #2c5282;
    border: 1px solid #90cdf4;
    box-shadow: 0 4px 15px rgba(144, 205, 244, 0.3);
}

.status-message.warning {
    background: linear-gradient(135deg, #fef5e7, #fed7aa);
    color: #9c4221;
    border: 1px solid #fed7aa;
    box-shadow: 0 4px 15px rgba(254, 215, 170, 0.3);
}

/* Responsive Design */
@media (max-width: 1020px) {
    .header-and-form-row {
        flex-direction: column;
        gap: 25px;
        margin-bottom: 30px;
    }
    
    .left-column {
        flex: none;
        width: 100%;
    }
    
    .header {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 25px;
    }
    
    .seat-row-flex {
        flex-direction: column;
        gap: 30px;
        align-items: center;
        width: 100%;
    }
    
    .booking-form {
        max-width: 100%;
        width: 100%;
    }

    .sync-buttons {
        flex-direction: column;
        align-items: stretch;
    }

    .sync-btn {
        width: 100%;
    }
}

@media (max-width: 1019px) {
    .container {
        padding: 20px;
        margin: 10px;
        border-radius: 15px;
    }
    
    h1 {
        font-size: 2.2em;
        margin-bottom: 30px;
    }
    
    .main-content {
        flex-direction: column;
        gap: 20px;
        align-items: center;
    }
    
    .seat-section {
        max-width: 100%;
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    
    .header-and-form-row {
        flex-direction: column;
        gap: 20px;
        margin-bottom: 25px;
        width: 100%;
        max-width: 600px;
    }
    
    .left-column {
        flex: none;
        width: 100%;
        gap: 15px;
    }
    
    .header {
        grid-template-columns: 1fr;
        gap: 15px;
        padding: 20px;
    }
    
    .session-selector,
    .date-selector,
    .location-selector {
        width: 100%;
    }
    
    .session-selector select,
    .date-selector select,
    .date-selector input,
    .location-selector select {
        width: 100%;
    }
    
    .screen {
        font-size: 16px;
        padding: 15px;
        margin-bottom: 15px;
        width: 90%;
        max-width: 500px;
    }
    
    .seat-row-flex {
        flex-direction: column;
        gap: 25px;
        align-items: center;
        width: 100%;
    }
    
    .seat-grid {
        grid-template-columns: repeat(8, 1fr);
        max-width: 500px;
        width: 100%;
        margin: 0;
        padding: 20px;
        gap: 10px;
    }
    
    .seat {
        width: 42px;
        height: 42px;
        font-size: 11px;
    }
    
    .legend {
        gap: 25px;
        margin: 15px 0 0 0;
        flex-wrap: wrap;
        justify-content: center;
        padding: 15px;
    }
    
    .legend-item {
        gap: 8px;
    }
    
    .seat-example {
        width: 24px;
        height: 24px;
        font-size: 9px;
    }
    
    .booking-form {
        max-width: 100%;
        width: 100%;
        min-width: unset;
        padding: 25px;
        margin-top: 0;
    }
    
    .booking-form h3 {
        font-size: 1.3em;
    }
    
    .form-group input {
        padding: 12px 14px;
        font-size: 16px;
    }
    
    .submit-btn,
    .cancel-btn {
        font-size: 16px;
        padding: 12px 20px;
        width: 100%;
        display: block;
    }
    
    .status-message {
        font-size: 14px;
        padding: 15px 20px;
        margin-top: 20px;
    }

    .sync-controls {
        padding: 16px;
    }

    .sync-buttons {
        flex-direction: column;
        gap: 10px;
    }

    .sync-btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 15px;
        margin: 5px;
        border-radius: 12px;
    }
    
    h1 {
        font-size: 1.9em;
        margin-bottom: 25px;
    }
    
    .header-and-form-row {
        gap: 15px;
        margin-bottom: 20px;
        max-width: 100%;
    }
    
    .header {
        gap: 12px;
        padding: 15px;
    }
    
    .screen {
        font-size: 14px;
        padding: 12px;
        margin-bottom: 20px;
        max-width: 100%;
    }
    
    .seat-grid {
        grid-template-columns: repeat(6, 1fr);
        max-width: 100%;
        gap: 8px;
        padding: 15px;
    }
    
    .seat {
        width: 36px;
        height: 36px;
        font-size: 10px;
    }
    
    .legend {
        gap: 20px;
        margin: 20px 0 15px 0;
        justify-content: center;
        padding: 12px;
    }
    
    .legend-item span {
        font-size: 12px;
    }
    
    .seat-example {
        width: 20px;
        height: 20px;
    }
    
    .booking-form {
        padding: 20px;
        max-width: 100%;
    }
    
    .booking-form h3 {
        font-size: 1.2em;
        margin-bottom: 20px;
    }
    
    .form-group {
        margin-bottom: 16px;
    }
    
    .form-group label {
        font-size: 12px;
        margin-bottom: 6px;
    }
    
    .form-group input {
        padding: 12px 14px;
        font-size: 16px;
    }
    
    .selected-info {
        padding: 15px;
        margin-bottom: 20px;
    }
    
    .selected-info p {
        font-size: 13px;
        margin-bottom: 6px;
    }
    
    .submit-btn,
    .cancel-btn {
        padding: 12px 16px;
        font-size: 15px;
    }
    
    .status-message {
        font-size: 13px;
        padding: 12px 16px;
        margin-top: 15px;
    }

    .sync-controls {
        padding: 14px;
        gap: 10px;
    }

    .sync-buttons {
        flex-direction: column;
        gap: 8px;
    }

    .sync-btn {
        width: 100%;
        padding: 10px 16px;
        font-size: 13px;
    }
}