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

.container {
    max-width: 800px;
    margin: 0 auto;
    background-color: white;
    padding: 30px;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
}

h1 {
    text-align: center;
    color: #333;
    margin-bottom: 30px;
    font-weight: 300;
    font-size: 2.2em;
}

form {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

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

label {
    font-weight: 600;
    color: #555;
    margin-bottom: 8px;
    font-size: 14px;
}

input {
    padding: 12px 16px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
}

input:focus {
    outline: none;
    border-color: #ff4b4b;
    box-shadow: 0 0 0 3px rgba(255, 75, 75, 0.1);
}

button[type="submit"] {
    grid-column: 1 / -1;
    padding: 16px 32px;
    background: linear-gradient(135deg, #ff4b4b 0%, #ff6b6b 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 75, 75, 0.3);
}

button[type="submit"]:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 75, 75, 0.4);
}

/* Ticket Styles - BookMyShow Inspired */
.ticket {
    margin-top: 30px;
    border: none;
    border-radius: 16px;
    background: white;
    box-shadow: 0 8px 32px rgba(0,0,0,0.12);
    overflow: hidden;
    animation: ticketSlideIn 0.6s ease-out;
    position: relative;
}

.ticket.mobile {
    width: 100%;
    max-width: 800px;
}

.ticket.thermal {
    width: 80mm;
    max-width: 80mm;
    margin: 30px auto;
    font-size: 12px;
}

.ticket.thermal .ticket-header {
    padding: 15px 20px;
}

.ticket.thermal .logo-section .logo {
    font-size: 18px;
}

.ticket.thermal .logo-section .tagline {
    font-size: 10px;
}

.ticket.thermal .ticket-type {
    font-size: 10px;
    padding: 6px 12px;
}

.ticket.thermal .ticket-content {
    padding: 20px 15px;
    gap: 15px;
}

.ticket.thermal .ticket-left {
    flex: 0 0 100px;
}

.ticket.thermal .movie-poster {
    width: 80px;
    height: 100px;
}

.ticket.thermal .poster-placeholder {
    font-size: 32px;
}

.ticket.thermal #qrcode {
    width: 80px !important;
    height: 80px !important;
}

.ticket.thermal #qrcode img {
    width: 80px !important;
    height: 80px !important;
}

.ticket.thermal .qr-text {
    font-size: 10px;
}

.ticket.thermal .ticket-right {
    gap: 15px;
}

.ticket.thermal .movie-name {
    font-size: 20px;
}

.ticket.thermal .theater-name {
    font-size: 14px;
}

.ticket.thermal .theater-address {
    font-size: 12px;
}

.ticket.thermal .detail-row .label,
.ticket.thermal .detail-row .value {
    font-size: 12px;
}

.ticket.thermal .detail-row.total-row .label,
.ticket.thermal .detail-row.total-row .value {
    font-size: 14px;
}

.ticket.thermal .ticket-info-section {
    padding: 12px 15px;
    gap: 15px;
}

.ticket.thermal .ticket-id .label,
.ticket.thermal .booking-time .label {
    font-size: 10px;
}

.ticket.thermal .ticket-id .value,
.ticket.thermal .booking-time .value {
    font-size: 12px;
}

.ticket.thermal .terms-section {
    padding: 15px 20px;
}

.ticket.thermal .terms-title {
    font-size: 12px;
}

.ticket.thermal .terms-list li {
    font-size: 10px;
}

.ticket.thermal .ticket-footer {
    padding: 15px 20px;
}

.ticket.thermal .ticket-footer p {
    font-size: 10px;
}

.ticket.thermal .print-button {
    padding: 8px 16px;
    font-size: 12px;
}

.ticket::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 8px;
    background: linear-gradient(90deg, #ff4b4b 0%, #ff6b6b 50%, #ff4b4b 100%);
}

/* Ticket Header */
.ticket-header {
    background: linear-gradient(135deg, #ff4b4b 0%, #ff6b6b 100%);
    color: white;
    padding: 20px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-section .logo {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 4px;
}

.logo-section .tagline {
    font-size: 12px;
    opacity: 0.9;
    font-weight: 400;
}

.ticket-type {
    background: rgba(255, 255, 255, 0.2);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 1px;
}

/* Ticket Content */
.ticket-content {
    display: flex;
    padding: 30px;
    gap: 30px;
}

/* Left Section */
.ticket-left {
    flex: 0 0 180px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.movie-poster {
    width: 120px;
    height: 160px;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.poster-placeholder {
    font-size: 48px;
    opacity: 0.7;
}

.qr-section {
    text-align: center;
}

#qrcode {
    margin-bottom: 8px;
}

.qr-text {
    font-size: 12px;
    color: #666;
    margin: 0;
}

/* Right Section */
.ticket-right {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.movie-details {
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 20px;
}

.movie-name {
    font-size: 28px;
    font-weight: 700;
    color: #333;
    margin: 0 0 15px 0;
    line-height: 1.2;
}

.theater-info .theater-name {
    font-size: 18px;
    font-weight: 600;
    color: #ff4b4b;
    margin: 0 0 8px 0;
}

.theater-info .theater-address {
    font-size: 14px;
    color: #666;
    margin: 0;
    line-height: 1.4;
}

.booking-details {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #f5f5f5;
}

.detail-row:last-child {
    border-bottom: none;
}

.detail-row .label {
    font-weight: 600;
    color: #555;
    font-size: 15px;
}

.detail-row .value {
    font-weight: 500;
    color: #333;
    font-size: 15px;
}

.detail-row.total-row {
    border-bottom: 3px solid #ff4b4b !important;
    padding: 15px 0;
    margin-top: 10px;
}

.detail-row.total-row .label {
    font-size: 18px;
    color: #ff4b4b;
}

.detail-row.total-row .value {
    font-size: 18px;
    font-weight: 700;
    color: #ff4b4b;
}

.ticket-info-section {
    display: flex;
    justify-content: space-between;
    background: #f8f9fa;
    padding: 15px 20px;
    border-radius: 8px;
    gap: 20px;
}

.ticket-id, .booking-time {
    flex: 1;
}

.ticket-id .label, .booking-time .label {
    font-size: 12px;
    color: #666;
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.ticket-id .value, .booking-time .value {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    font-family: 'Courier New', monospace;
}

/* Terms Section */
.terms-section {
    background: #f8f9fa;
    padding: 20px 30px;
    margin: 0;
    border-top: 1px solid #e9ecef;
}

.terms-title {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin: 0 0 10px 0;
}

.terms-list {
    margin: 0;
    padding-left: 20px;
}

.terms-list li {
    font-size: 12px;
    color: #666;
    line-height: 1.5;
    margin-bottom: 4px;
}

/* Footer */
.ticket-footer {
    background: #f8f9fa;
    padding: 20px 30px;
    border-top: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ticket-footer p {
    font-size: 12px;
    color: #666;
    margin: 0;
}

.print-buttons {
    display: flex;
    gap: 10px;
}

.print-button {
    background: linear-gradient(135deg, #ff4b4b 0%, #ff6b6b 100%);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
}

.print-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 75, 75, 0.3);
}

.mobile-btn {
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
}

.mobile-btn:hover {
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
}

.thermal-btn {
    background: linear-gradient(135deg, #2196F3 0%, #1976D2 100%);
}

.thermal-btn:hover {
    box-shadow: 0 4px 12px rgba(33, 150, 243, 0.3);
}

.hidden {
    display: none !important;
}

/* Animations */
@keyframes ticketSlideIn {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }

    .container {
        padding: 20px;
    }

    .ticket-content {
        flex-direction: column;
        padding: 20px;
        gap: 20px;
    }

    .ticket-left {
        flex: none;
        align-self: center;
    }

    .movie-name {
        font-size: 24px;
    }

    .ticket-info-section {
        flex-direction: column;
        gap: 15px;
    }

    .ticket-footer {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }

    .print-buttons {
        flex-direction: column;
        width: 100%;
    }

    .print-button {
        width: 100%;
        padding: 12px;
    }
}

@media print {
    body {
        background: white !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    .container {
        box-shadow: none !important;
        margin: 0 !important;
        max-width: 100% !important;
        padding: 0 !important;
        background: white !important;
        border-radius: 0 !important;
    }

    h1, form {
        display: none !important;
    }

    #ticket.hidden {
        display: block !important;
    }

    .ticket {
        box-shadow: none !important;
        margin: 0 !important;
        padding: 20px !important;
        border: none !important;
        border-radius: 0 !important;
        background: white !important;
        animation: none !important;
    }

    .ticket.mobile {
        width: 100% !important;
        max-width: none !important;
    }

    .ticket.thermal {
        width: 80mm !important;
        max-width: 80mm !important;
        margin: 0 auto !important;
        font-size: 12px !important;
        padding: 15px !important;
    }

    .ticket::before {
        display: none !important;
    }

    .print-button {
        display: none !important;
    }

    .ticket-content {
        padding: 20px !important;
    }

    .ticket.thermal .ticket-content {
        padding: 15px !important;
    }

    .terms-section, .ticket-footer {
        background: white !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
}