/* Base Reset & Variables */
:root {
    --bg-app: #000000;
    --bg-card: #ffffff;
    --bg-element: #f5f5f5;
    --text-primary: #1a1a1a;
    --text-secondary: #666666;
    --text-on-accent: #ffffff;
    --accent-red: #d32f2f;
    --accent-border: rgba(0, 0, 0, 0.08);
    --card-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --border-radius-lg: 16px;
    --border-radius-md: 10px;
}

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

body {
    background-color: var(--bg-app);
    color: var(--text-primary);
    font-family: var(--font-primary);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

/* App Container */
.app-container {
    width: 100%;
    max-width: 330px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}



/* Ticket Card */
.ticket-card {
    background-color: var(--bg-card);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--card-shadow);
    overflow: hidden;
}

/* Top Section */
.ticket-top {
    padding: 16px 18px 12px 18px;
    display: grid;
    grid-template-columns: 80px 1fr;
    gap: 12px;
    align-items: start;
    position: relative;
}

/* Poster */
.poster-container {
    width: 80px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.poster-img {
    width: 100%;
    height: 120px;
    display: block;
    object-fit: cover;
}

/* Movie Details */
.movie-details {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
    line-height: 1.5;
    min-width: 0;
}

.movie-title {
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 1.2;
    white-space: normal;
}



.movie-rating {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
}

.movie-meta,
.movie-venue {
    font-size: 0.8rem;
    color: var(--text-secondary);
    overflow-wrap: break-word;
}

.movie-time {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* M-Ticket Badge */
.m-ticket-badge {
    font-size: 0.65rem;
    letter-spacing: 0.5px;
    color: var(--text-secondary);
    position: absolute;
    right: -8px;
    top: 65px;
    transform: rotate(-90deg);
    transform-origin: center center;
    white-space: nowrap;
}

/* Tear Section with Support Banner */
.tear-section {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px 0;
    margin-top: 4px;
}

.cutout {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background-color: var(--bg-app);
    position: absolute;
    z-index: 5;
    flex-shrink: 0;
}

.cutout-left {
    left: -8px;
}

.cutout-right {
    right: -8px;
}

/* Support Banner */
.support-banner {
    background-color: var(--bg-element);
    border: none;
    margin: 0;
    padding: 8px 6px;
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--text-primary);
    text-align: center;
    cursor: pointer;
    width: 90%;
    border-radius: 16px;
}

/* QR Section */
.qr-section {
    padding: 12px 18px;
    display: grid;
    grid-template-columns: 80px 1fr;
    gap: 14px;
    align-items: center;
}

.qr-container {
    background: #ffffff;
    padding: 0;
    width: 80px;
    height: 80px;
    justify-self: center;
    margin-left: 50px;
}



.qr-details {
    display: flex;
    flex-direction: column;
    gap: 3px;
    text-align: center;
}

.ticket-count {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.ticket-screen {
    font-size: 1.4rem;
    font-weight: 500;
}

.ticket-seat {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.booking-id {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.3px;
    margin-top: 4px;
}

/* Info Banner */
.info-banner {
    background-color: var(--bg-element);
    margin: 0;
    padding: 10px 14px;
    font-size: 0.75rem;
    line-height: 1.4;
    color: var(--text-secondary);
    text-align: center;
    width: 100%;
}

/* Footer Pricing */
.ticket-footer {
    border-top: 1px solid var(--accent-border);
    padding: 12px 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-label {
    font-size: 0.85rem;
    font-weight: 400;
    color: var(--text-secondary);
}

.footer-value {
    font-size: 1.1rem;
    font-weight: 500;
}

/* Bottom Actions Drawer */
.drawer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 200;
    display: flex;
    justify-content: center;
    align-items: flex-end;
    opacity: 0;
    pointer-events: none;
}

.drawer-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.drawer-container {
    width: 100%;
    max-width: 330px;
    background-color: var(--bg-card);
    border-top-left-radius: var(--border-radius-lg);
    border-top-right-radius: var(--border-radius-lg);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
    transform: translateY(100%);
    transition: transform 0.3s ease;
    padding: 16px 18px 28px 18px;
}

.drawer-overlay.active .drawer-container {
    transform: translateY(0);
}

.drawer-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

.drawer-handle {
    width: 32px;
    height: 3px;
    background-color: #ddd;
    border-radius: 2px;
}

.drawer-header h3 {
    font-size: 1rem;
    font-weight: 600;
}

.drawer-body {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.drawer-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px;
    background-color: var(--bg-element);
    border: none;
    border-radius: var(--border-radius-md);
    color: var(--text-primary);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    text-align: left;
    width: 100%;
}

.drawer-item svg {
    width: 18px;
    height: 18px;
    color: var(--text-secondary);
}

.drawer-item:hover {
    background-color: #eaeaea;
}

.cancel-booking-btn {
    color: #ef4444;
}

.cancel-booking-btn svg {
    color: #ef4444;
}


/* Toast */
.toast {
    position: fixed;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background-color: #1a1a1a;
    color: #ffffff;
    padding: 10px 20px;
    border-radius: 24px;
    font-size: 0.82rem;
    font-weight: 500;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    opacity: 0;
    pointer-events: none;
    z-index: 300;
}

.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* Mobile responsive */
@media (max-width: 400px) {
    body {
        padding: 14px;
    }
    
    .ticket-top {
        grid-template-columns: 75px 1fr;
        gap: 10px;
    }
    
    .poster-container {
        width: 75px;
    }
    
    .poster-img {
        height: 90px;
    }
    
    .movie-title {
        font-size: 1rem;
    }
    
    .qr-section {
        grid-template-columns: 70px 1fr;
        gap: 12px;
    }

    .qr-container {
        width: 70px;
        height: 70px;
    }
    
    .ticket-screen {
        font-size: 1.2rem;
    }
}