/* General Styles */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;500;600;700&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #ff2c55;
    --secondary-color: #6c63ff;
    --accent-color: #00c8ff;
    --text-color: #333;
    --light-text: #666;
    --bg-color: #f9f9f9;
    --card-bg: #fff;
    --success-color: #28a745;
    --error-color: #dc3545;
    --border-radius: 8px;
    --box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

body {
    font-family: 'Montserrat', sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    color: var(--text-color);
    line-height: 1.6;
    padding: 0;
    margin: 0;
    min-height: 100vh;
}

.container {
    max-width: 900px;
    margin: 40px auto;
    padding: 0 20px;
}

.form-container {
    background-color: var(--card-bg);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 30px;
    position: relative;
    overflow: hidden;
}

.form-container::before {
    content: '';
    position: absolute;
    top: -10px;
    left: -10px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--primary-color);
    opacity: 0.1;
    z-index: 0;
}

.form-container::after {
    content: '';
    position: absolute;
    bottom: -10px;
    right: -10px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: var(--secondary-color);
    opacity: 0.1;
    z-index: 0;
}

/* Form Headers */
h1, h2, h3 {
    margin-bottom: 20px;
    color: var(--text-color);
    text-align: center;
}

.movie-title {
    font-size: 28px;
    margin-bottom: 30px;
    position: relative;
    display: inline-block;
    width: 100%;
}

.movie-title::after {
    content: '';
    position: absolute;
    width: 80px;
    height: 4px;
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 2px;
}

.highlight {
    color: var(--primary-color);
    font-weight: 700;
}

/* Movie Banner */
.movie-banner {
    margin-bottom: 30px;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
    position: relative;
}

.movie-banner img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.5s ease;
}

.movie-banner:hover img {
    transform: scale(1.02);
}

.movie-banner::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 50%;
    background: linear-gradient(to top, rgba(0,0,0,0.7), transparent);
    opacity: 0.7;
}

/* Form Groups */
.form-group {
    margin-bottom: 25px;
    position: relative;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-color);
}

input, select {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: var(--border-radius);
    font-size: 16px;
    transition: var(--transition);
}

input:focus, select:focus {
    border-color: var(--secondary-color);
    outline: none;
    box-shadow: 0 0 0 3px rgba(108, 99, 255, 0.2);
}

.mobile-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.mobile-group input {
    flex: 1;
}

.otp-input-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.otp-input-group input {
    flex: 1;
    letter-spacing: 4px;
    font-size: 18px;
    text-align: center;
}

.otp-status {
    margin-top: 5px;
    font-size: 14px;
}

.otp-status .success {
    color: var(--success-color);
}

.otp-status .error {
    color: var(--error-color);
}

/* Buttons */
.btn {
    padding: 10px 20px;
    background-color: var(--secondary-color);
    color: white;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-weight: 500;
    font-size: 16px;
    transition: var(--transition);
}

.btn:hover {
    background-color: #5a52e0;
    transform: translateY(-2px);
}

.btn-primary {
    background-color: var(--primary-color);
}

.btn-primary:hover {
    background-color: #e01b42;
}

.disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Seat Selection */
.seat-selection {
    margin-top: 30px;
}

.seat-map {
    margin-top: 15px;
    background-color: #f5f5f5;
    padding: 20px;
    border-radius: var(--border-radius);
    position: relative;
    overflow-x: auto;
}

.seat-map::before {
    content: 'SCREEN';
    display: block;
    text-align: center;
    margin-bottom: 20px;
    padding: 8px;
    background: linear-gradient(to right, transparent, rgba(0,0,0,0.1), transparent);
    color: var(--light-text);
    font-weight: 600;
    letter-spacing: 8px;
    border-bottom: 2px solid #ddd;
}

.seat-row {
    display: flex;
    margin-bottom: 10px;
    align-items: center;
}

.row-label {
    width: 30px;
    text-align: center;
    font-weight: 600;
    color: var(--light-text);
}

.seats {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.seat {
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 5px;
    cursor: pointer;
    transition: var(--transition);
    font-size: 12px;
    position: relative;
    overflow: hidden;
}

.seat.available {
    background-color: white;
    border: 1px solid #ddd;
}

.seat.available:hover {
    background-color: rgba(108, 99, 255, 0.2);
    border-color: var(--secondary-color);
}

.seat.selected {
    background-color: var(--secondary-color);
    color: white;
    border-color: var(--secondary-color);
}

.seat.booked {
    background-color: #e0e0e0;
    color: #999;
    cursor: not-allowed;
    opacity: 0.5;
}

.seat.booked::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background-image: linear-gradient(45deg, transparent 46%, #999 47%, #999 53%, transparent 54%);
}

.no-seats {
    text-align: center;
    padding: 20px;
    color: var(--light-text);
}

/* Selected Seats Display */
.selected-seats {
    margin-top: 30px;
}

#selected-seats-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 15px;
}

.selected-seat {
    padding: 8px 30px 8px 15px;
    background-color: var(--secondary-color);
    color: white;
    border-radius: 20px;
    position: relative;
    animation: fadeIn 0.3s ease;
}

.remove-seat {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    font-size: 12px;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.remove-seat:hover {
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
}

/* Billing */
.bill-container {
    margin-top: 30px;
    background-color: #f8f9fa;
    border-radius: var(--border-radius);
    padding: 20px;
    box-shadow: var(--box-shadow);
}

.bill-details {
    margin-top: 15px;
}

.bill-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px dashed #e0e0e0;
}

.bill-row.total {
    border-top: 2px solid #ddd;
    border-bottom: none;
    margin-top: 10px;
    padding-top: 15px;
    font-weight: 700;
    font-size: 18px;
    color: var(--primary-color);
}

/* Form Actions */
.form-actions {
    margin-top: 30px;
    display: flex;
    justify-content: center;
}

.form-actions .btn {
    min-width: 150px;
    padding: 15px 30px;
    font-size: 18px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Utility Classes */
.hidden {
    display: none;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Design */
@media screen and (max-width: 768px) {
    .container {
        margin: 20px auto;
    }
    
    .form-container {
        padding: 20px;
    }
    
    .movie-title {
        font-size: 24px;
    }
    
    .mobile-group, .otp-input-group {
        flex-direction: column;
    }
    
    .mobile-group .btn, .otp-input-group .btn {
        width: 100%;
        margin-top: 10px;
    }
    
    .seat {
        width: 30px;
        height: 30px;
        font-size: 10px;
    }
}

/* Additional Animations */
.animate__animated {
    animation-duration: 0.8s;
}

.form-container {
    animation: fadeInScale 0.6s ease;
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Fade-in animations for form elements */
.form-group {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.5s ease forwards;
}

.form-group:nth-child(2) {
    animation-delay: 0.1s;
}

.form-group:nth-child(3) {
    animation-delay: 0.2s;
}

.form-group:nth-child(4) {
    animation-delay: 0.3s;
}

.form-group:nth-child(5) {
    animation-delay: 0.4s;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Button hover effects */
.btn {
    position: relative;
    overflow: hidden;
}

.btn:after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 5px;
    height: 5px;
    background: rgba(255, 255, 255, 0.5);
    opacity: 0;
    border-radius: 100%;
    transform: scale(1, 1) translate(-50%);
    transform-origin: 50% 50%;
}

.btn:hover:after {
    animation: ripple 1s ease-out;
}

@keyframes ripple {
    0% {
        transform: scale(0, 0);
        opacity: 0.5;
    }
    20% {
        transform: scale(25, 25);
        opacity: 0.3;
    }
    100% {
        opacity: 0;
        transform: scale(40, 40);
    }
}

/* Hover effects for form fields */
input:hover, select:hover {
    border-color: #ccc;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

/* Pulse animation for selected seats */
.seat.selected {
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(108, 99, 255, 0.7);
    }
    70% {
        box-shadow: 0 0 0 5px rgba(108, 99, 255, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(108, 99, 255, 0);
    }
}

/* Shimmer effect for the bill total */
.bill-row.total span:last-child {
    position: relative;
    overflow: hidden;
}

.bill-row.total span:last-child::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}

/* 3D effect for the form container on hover */
.form-container:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}
/* Modern date picker styling */
.flatpickr-calendar {
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    border-radius: 10px;
    font-family: "Segoe UI", Arial, sans-serif;
}
.flatpickr-day.selected {
    background: #ff5733;
    border-color: #ff5733;
}
.flatpickr-day.today {
    border-color: #ff5733;
    color: #ff5733;
}
.flatpickr-day:hover {
    background: rgba(255, 87, 51, 0.2);
}

/* Show time dropdown styling */
#show_time {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23333' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 16px;
    padding-right: 40px;
    cursor: pointer;
}
#show_time option {
    padding: 10px;
}

/* Booking date field styles */
#booking_date {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23333' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='18' rx='2' ry='2'%3E%3C/rect%3E%3Cline x1='16' y1='2' x2='16' y2='6'%3E%3C/line%3E%3Cline x1='8' y1='2' x2='8' y2='6'%3E%3C/line%3E%3Cline x1='3' y1='10' x2='21' y2='10'%3E%3C/line%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 16px;
    padding-right: 40px;
    cursor: pointer;
}

/* Seat layout enhancements */
.seat-layout {
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    gap: 8px;
    margin: 30px auto;
    max-width: 700px;
}

.seat {
    position: relative;
    width: 40px;
    height: 40px;
    border-radius: 8px 8px 0 0;
    background-color: #ddd;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: bold;
}

.seat.available {
    background-color: #6fd08c;
}

.seat.selected {
    background-color: #ff5733;
    color: white;
}

.seat.unavailable {
    background-color: #999;
    cursor: not-allowed;
    color: #666;
}

.seat:hover:not(.unavailable) {
    transform: scale(1.1);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.seat::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 3px;
    background: #555;
    border-radius: 0 0 3px 3px;
}

/* Screen representation */
.screen {
    height: 10px;
    background: linear-gradient(to right, transparent, #fff, transparent);
    margin: 30px auto 40px;
    width: 80%;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
    position: relative;
}

.screen::before {
    content: 'SCREEN';
    position: absolute;
    top: -25px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 14px;
    color: #666;
    letter-spacing: 2px;
}

/* Booking summary section */
.booking-summary {
    background-color: #f8f8f8;
    border-radius: 10px;
    padding: 20px;
    margin-top: 30px;
    border-left: 4px solid #ff5733;
}

.booking-summary h3 {
    color: #333;
    margin-top: 0;
    border-bottom: 1px solid #ddd;
    padding-bottom: 10px;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-size: 16px;
}

.summary-total {
    font-weight: bold;
    margin-top: 15px;
    padding-top: 10px;
    border-top: 1px dashed #ddd;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .seat-layout {
        grid-template-columns: repeat(8, 1fr);
    }
    
    .seat {
        width: 35px;
        height: 35px;
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .seat-layout {
        grid-template-columns: repeat(5, 1fr);
    }
    
    .seat {
        width: 30px;
        height: 30px;
        font-size: 10px;
    }
}

/* Form input general styling */
.form-group {
    margin-bottom: 20px;
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.form-control:focus {
    border-color: #ff5733;
    outline: none;
    box-shadow: 0 0 0 3px rgba(255, 87, 51, 0.2);
}

/* Submit button styling */
.btn-book {
    background-color: #ff5733;
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 6px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: block;
    width: 100%;
    margin-top: 20px;
}

.btn-book:hover {
    background-color: #e04726;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.btn-book:active {
    transform: translateY(0);
    box-shadow: none;
}