:root {
    --primary: #10b981; /* Emerald 500 */
    --primary-hover: #059669; /* Emerald 600 */
    --primary-light: #ecfdf5; /* Emerald 50 */
    --primary-border: #a7f3d0; /* Emerald 200 */
    --surface: #ffffff;
    --background: #f0fdf4;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --border: #e2e8f0;
    --danger: #ef4444;
    --success: #10b981;
    
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-full: 9999px;
    
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-glow: 0 0 20px rgba(16, 185, 129, 0.25);
    
    --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: 'Inter', sans-serif;
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    background-attachment: fixed;
    color: var(--text-main);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
}

/* Typography */
h1, h2, h3, h4 {
    color: var(--text-main);
    font-weight: 600;
}

/* Layout */
.app-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    padding-bottom: 6rem; /* space for mobile sticky button */
}

.app-header {
    text-align: center;
    margin-bottom: 2rem;
    padding: 2.5rem 1.5rem;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%);
    color: white;
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    box-shadow: var(--shadow-lg);
}

.logo-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
    color: white;
}

.logo-container i {
    font-size: 2.5rem;
}

.app-header h1 {
    font-size: 2rem;
    margin: 0;
    letter-spacing: -0.02em;
    color: white;
}

.app-header p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.95rem;
}

.main-layout {
    display: grid;
    grid-template-columns: 380px 1fr;
    gap: 2rem;
    align-items: start;
}

/* Cards */
.card {
    background: var(--surface);
    border-radius: 20px;
    box-shadow: 0 10px 40px -10px rgba(0,0,0,0.08);
    padding: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.8);
}

.form-card h2 {
    margin-bottom: 1.5rem;
    font-size: 1.25rem;
}

/* Forms */
.booking-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-main);
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-wrapper i:not(.select-arrow) {
    position: absolute;
    left: 1rem;
    color: var(--text-muted);
    font-size: 1.25rem;
    pointer-events: none;
}

.input-wrapper .select-arrow {
    position: absolute;
    right: 1rem;
    color: var(--text-muted);
    font-size: 1rem;
    pointer-events: none;
}

input, select {
    width: 100%;
    padding: 0.875rem 1rem 0.875rem 2.75rem;
    border: 1.5px solid #cbd5e1;
    border-radius: var(--radius-md);
    font-family: inherit;
    font-size: 1rem;
    color: var(--text-main);
    background-color: #f8fafc;
    transition: var(--transition);
    appearance: none;
}

input:focus, select:focus {
    outline: none;
    border-color: var(--primary);
    background-color: var(--surface);
    box-shadow: 0 0 0 3px var(--primary-light);
}

input[type="date"]::-webkit-calendar-picker-indicator {
    cursor: pointer;
}

/* Buttons */
.btn-primary {
    width: 100%;
    background-color: var(--primary);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    padding: 1rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: var(--transition);
    box-shadow: var(--shadow-md);
}

.btn-primary:hover:not(:disabled) {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg), var(--shadow-glow);
}

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

.btn-primary:disabled {
    background-color: var(--border);
    color: var(--text-muted);
    cursor: not-allowed;
    box-shadow: none;
}

.btn-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.btn-title {
    font-size: 1rem;
}

.btn-subtitle {
    font-size: 0.75rem;
    font-weight: 400;
    opacity: 0.9;
}

.btn-secondary {
    width: 100%;
    background-color: var(--primary-light);
    color: var(--primary);
    border: 1px solid var(--primary-border);
    border-radius: var(--radius-md);
    padding: 0.75rem;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.btn-secondary:hover {
    background-color: var(--primary-border);
}

/* Slots Section */
.slots-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.slots-header h2 {
    font-size: 1.25rem;
}

.date-display {
    background-color: var(--primary-light);
    color: var(--primary);
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-full);
    font-size: 0.875rem;
    font-weight: 500;
}

.slot-section {
    margin-bottom: 2rem;
}

.slot-section:last-child {
    margin-bottom: 0;
}

.section-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border);
}

.slots-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 0.75rem;
}
@media (max-width: 400px) {
    .slots-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.slot-btn {
    background-color: var(--surface);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-md);
    padding: 1.25rem 0.5rem;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.slot-btn:hover:not(.booked) {
    border-color: var(--primary);
    background-color: var(--primary-light);
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.slot-btn.selected {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%);
    border-color: var(--primary-hover);
    box-shadow: var(--shadow-glow);
    transform: scale(1.03);
}

.slot-btn.selected .slot-time,
.slot-btn.selected .slot-price {
    color: white;
    font-weight: 600;
}

.slot-btn.booked {
    opacity: 0.65;
    background-color: #f1f5f9;
    border-color: #e2e8f0;
    color: #94a3b8;
    cursor: not-allowed;
    background-image: repeating-linear-gradient(45deg, transparent, transparent 10px, #f8fafc 10px, #f8fafc 20px);
}

.slot-time {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-main);
}

.slot-price {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--primary);
    margin-top: 0.1rem;
}

/* Mobile Actions */
.mobile-bottom-action {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--surface);
    padding: 1rem;
    box-shadow: 0 -4px 6px -1px rgb(0 0 0 / 0.1);
    z-index: 50;
    border-top: 1px solid var(--border);
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal {
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 2rem;
    width: 90%;
    max-width: 400px;
    box-shadow: var(--shadow-lg);
    transform: scale(0.95);
    transition: var(--transition);
    text-align: center;
}

.modal-overlay.active .modal {
    transform: scale(1);
}

.confirm-modal {
    max-width: 480px;
    padding: 2.5rem 2rem;
}

.modal-title {
    font-size: 1.5rem;
    color: var(--text-main);
    margin-bottom: 1.5rem;
    font-weight: 700;
}

.confirm-details-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    text-align: left;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.confirm-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

.confirm-row:last-child {
    margin-bottom: 0;
}

.confirm-row i {
    color: #64748b;
    font-size: 1.25rem;
    width: 20px;
    text-align: center;
}

.confirm-row span {
    color: var(--text-main);
}

.confirm-row strong {
    font-weight: 600;
}

.price-highlight {
    font-size: 1.1rem;
    font-weight: 700 !important;
}

.modal-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.btn-cancel {
    background-color: #f1f5f9;
    color: #334155;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s;
}

.btn-cancel:hover {
    background-color: #e2e8f0;
}

.btn-confirm {
    background-color: #1d4ed8;
    color: white;
    border: none;
    padding: 0.75rem 2rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.1s;
    box-shadow: 0 4px 6px rgba(29, 78, 216, 0.2);
}

.btn-confirm:hover {
    background-color: #1e3a8a;
    transform: translateY(-1px);
}
.ticket-modal p {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
}

.success-icon {
    font-size: 4rem;
    color: var(--success);
    margin-bottom: 0.5rem;
}

.qr-container {
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 1rem;
    margin: 0 auto 1.5rem auto;
    width: fit-content;
    box-shadow: var(--shadow-sm);
}

.qr-container img {
    display: block;
    width: 200px;
    height: 200px;
}

.booking-id-box {
    background-color: #f8fafc;
    border: 2px dashed #cbd5e1;
    border-radius: 8px;
    padding: 1.25rem;
    margin-bottom: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.booking-id-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 600;
    letter-spacing: 0.05em;
}

#final-booking-id {
    font-size: 1.75rem;
    color: var(--primary);
    font-family: monospace;
    letter-spacing: 0.1em;
}

/* Responsive */
@media (max-width: 768px) {
    .app-container {
        padding: 1rem;
        padding-bottom: 7rem;
    }

    .main-layout {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .desktop-only, .desktop-action {
        display: none;
    }
    
    .card {
        padding: 1.25rem;
    }

    .app-header {
        padding: 2rem 1rem;
        margin-bottom: 1.5rem;
        border-radius: 0;
    }

    .app-header h1 {
        font-size: 1.5rem;
    }

    .section-title {
        font-size: 0.9rem;
    }

    .slot-btn {
        padding: 1rem 0.5rem;
    }

    .slot-time {
        font-size: 0.8rem;
    }

    .slot-price {
        font-size: 0.85rem;
    }

    .mobile-bottom-action {
        display: block;
        padding: 0.75rem;
    }

    .floating-help-btn {
        bottom: 5.5rem; /* Move up to avoid overlap with sticky button */
        right: 1rem;
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
    }
}

/* Floating Help Button */
.floating-help-btn {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background-color: var(--primary);
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    box-shadow: var(--shadow-lg);
    z-index: 100;
    transition: var(--transition);
    text-decoration: none;
}

.floating-help-btn:hover {
    background-color: var(--primary-hover);
    transform: scale(1.05);
    box-shadow: var(--shadow-glow);
}
