@import url('https://fonts.googleapis.com/css2?family=Libre+Barcode+128&family=Montserrat:wght@400;500;600;700;800&display=swap');

:root {
    --brand-blue: #2E58A6;
    --brand-orange: #F37021;
    --bg-color: #E2E8F0;
    --ticket-bg: #FFFFFF;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Montserrat', sans-serif;
}

body {
    height: 100vh;
    background-color: var(--bg-color);
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    padding: 20px;
    /* Subtle topographic map pattern for travel feel */
    background-image:
        radial-gradient(#cbd5e1 1px, transparent 1px);
    background-size: 20px 20px;
}

.ticket-container {
    filter: drop-shadow(0 20px 30px rgba(0, 0, 0, 0.15));
    animation: floatTicket 4s ease-in-out infinite;
    max-width: 800px;
    width: 100%;
}

.ticket {
    display: flex;
    background: var(--ticket-bg);
    border-radius: 20px;
    overflow: hidden;
    position: relative;
    /* Perforated edge effect between main and stub */
    mask-image: radial-gradient(circle at 70% 0, transparent 10px, black 11px),
        radial-gradient(circle at 70% 100%, transparent 10px, black 11px);
    /* Fallback for mask support */
    -webkit-mask-image: radial-gradient(circle at 71% 0, transparent 15px, black 16px),
        radial-gradient(circle at 71% 100%, transparent 15px, black 16px);
}

/* Dividing dashed line */
.ticket::after {
    content: '';
    position: absolute;
    top: 20px;
    bottom: 20px;
    left: 71%;
    border-left: 2px dashed #CBD5E1;
}

/* Left Section: Main Info */
.ticket-main {
    flex: 1;
    padding: 2.5rem;
    position: relative;
    padding-right: 4rem;
    /* Space for the cut */
}

.airline-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    border-bottom: 2px solid #F1F5F9;
    padding-bottom: 1rem;
}

.logo img {
    height: 80px;
    width: auto;
}

.class-type {
    font-weight: 800;
    color: var(--brand-blue);
    letter-spacing: 2px;
    text-transform: uppercase;
}

.route {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 3rem;
    margin-bottom: 3rem;
    position: relative;
}

.city-group {
    text-align: left;
}

.city-code {
    font-size: 3.5rem;
    font-weight: 800;
    color: var(--brand-blue);
    line-height: 1;
}

.city-name {
    font-size: 0.9rem;
    color: #64748B;
    font-weight: 600;
    margin-top: 5px;
    text-transform: uppercase;
}

.plane-icon {
    font-size: 2rem;
    color: var(--brand-orange);
    transform: rotate(90deg);
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.info-item label {
    display: block;
    color: #94A3B8;
    font-size: 0.75rem;
    text-transform: uppercase;
    font-weight: 600;
    margin-bottom: 4px;
}

.info-item span {
    color: #1E293B;
    font-weight: 700;
    font-size: 1.1rem;
}

.status-badge {
    color: var(--brand-orange);
}

/* Right Section: Stub */
.ticket-stub {
    width: 29%;
    padding: 2.5rem;
    background: #F8FAFC;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.barcode {
    font-family: 'Libre Barcode 128', cursive;
    font-size: 3.5rem;
    color: #334155;
    margin-top: auto;
    transform: scaleY(1.5);
    opacity: 0.8;
}

.seat-info {
    margin-bottom: 2rem;
}

.seat-number {
    font-size: 2.5rem;
    font-weight: 900;
    color: var(--brand-blue);
    display: block;
}

.small-label {
    font-size: 0.75rem;
    color: #94A3B8;
    text-transform: uppercase;
    font-weight: 600;
}

/* Responsive */
@media (max-width: 768px) {
    .ticket {
        flex-direction: column;
        mask-image: none;
        -webkit-mask-image: none;
    }

    .ticket::after {
        display: none;
    }

    .ticket-stub {
        width: 100%;
        border-top: 2px dashed #CBD5E1;
        padding: 1.5rem;
        flex-direction: row;
        justify-content: space-between;
    }

    .ticket-main {
        padding: 2rem;
        padding-right: 2rem;
    }

    .route {
        gap: 1.5rem;
    }

    .city-code {
        font-size: 2.5rem;
    }

    .barcode {
        display: none;
    }
}

@keyframes floatTicket {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}