:root {
    --bg-color: #060606;
    --text-main: #FFFFFF;
    --text-dim: #888888;
    --border-color: #333333;

    --font-mono: 'Space Mono', monospace;
    --font-lcd: 'VT323', monospace;
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    font-family: var(--font-mono);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow-x: hidden;
    position: relative;
    animation: crtFlicker 0.15s infinite;
}

/* CRT monitor flicker animation applied to the whole body */
@keyframes crtFlicker {
    0% {
        opacity: 0.98;
    }

    50% {
        opacity: 0.95;
    }

    100% {
        opacity: 1;
    }
}

/* Chromatic aberration / Red-Blue shift effect classes */
.glitch {
    position: relative;
    display: inline-block;
}

.glitch::before,
.glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.8;
}

.glitch::before {
    color: #ff003c;
    z-index: -1;
    animation: glitchRed 3s infinite linear alternate-reverse;
}

.glitch::after {
    color: #00ffff;
    z-index: -2;
    animation: glitchBlue 2.5s infinite linear alternate-reverse;
}

@keyframes glitchRed {
    0% {
        transform: translate(1px, 0);
    }

    20% {
        transform: translate(-1px, 1px);
    }

    40% {
        transform: translate(1px, -1px);
    }

    60% {
        transform: translate(-2px, 0);
    }

    80% {
        transform: translate(2px, 1px);
    }

    100% {
        transform: translate(-1px, -1px);
    }
}

@keyframes glitchBlue {
    0% {
        transform: translate(-1px, 0);
    }

    20% {
        transform: translate(1px, -1px);
    }

    40% {
        transform: translate(-1px, 1px);
    }

    60% {
        transform: translate(2px, 0);
    }

    80% {
        transform: translate(-2px, -1px);
    }

    100% {
        transform: translate(1px, 1px);
    }
}

/* Optional CRT scanline effect */
.scanlines {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.25) 50%), linear-gradient(90deg, rgba(255, 0, 0, 0.06), rgba(0, 255, 0, 0.02), rgba(0, 0, 255, 0.06));
    background-size: 100% 4px, 6px 100%;
    pointer-events: none;
    z-index: 100;
}

.container {
    width: 100%;
    max-width: 900px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 10;
}

.secret-link {
    color: var(--text-dim);
    text-decoration: none;
    font-size: 12px;
    margin-bottom: 20px;
    letter-spacing: 2px;
    transition: color 0.2s;
}

.nav-links {
    display: flex;
    gap: 30px;
    margin-bottom: 20px;
}

.secret-link:hover {
    color: var(--text-main);
}

.mission-link {
    color: #ff003c;
    border-bottom: 1px solid transparent;
}

.mission-link:hover {
    border-bottom: 1px solid #ff003c;
}

/* --- TICKET COMPONENT --- */
.ticket {
    display: flex;
    flex-direction: row;
    width: 100%;
    background-color: #0A0A0A;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    position: relative;
}

/* Shared corner markers */
.corner-marker {
    position: absolute;
    width: 6px;
    height: 6px;
    border: 1px solid var(--text-dim);
    border-radius: 50%;
}

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

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

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

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

/* Left Stub */
.ticket-left {
    width: 40px;
    border-right: 1px dashed var(--border-color);
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.vertical-text {
    transform: rotate(-90deg);
    white-space: nowrap;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 4px;
    color: var(--text-main);
}

/* Center Main Area */
.ticket-center {
    flex: 1;
    padding: 24px 30px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.data-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.label {
    font-size: 10px;
    color: var(--text-dim);
    letter-spacing: 1px;
    margin-bottom: 4px;
}

.value {
    font-size: 16px;
    font-weight: 700;
}

.uppercase {
    text-transform: uppercase;
}

.mt-4 {
    margin-top: 16px;
}

/* Font specifics */
.lcd {
    font-family: var(--font-lcd);
}

.big-lcd {
    font-size: 42px;
    letter-spacing: 2px;
    line-height: 1;
}

.huge-lcd {
    font-size: 56px;
    letter-spacing: 2px;
    line-height: 0.8;
}

.small-tm {
    font-size: 12px;
    font-family: var(--font-mono);
    vertical-align: top;
    margin-right: 4px;
    color: var(--text-dim);
}

/* Mid Row Specifics */
.row-mid {
    margin: 10px 0;
    align-items: center;
    justify-content: flex-start;
    gap: 40px;
}

.striped-box {
    width: 100px;
    height: 50px;
    background: repeating-linear-gradient(-45deg,
            transparent,
            transparent 4px,
            #333 4px,
            #333 8px);
    border: 1px solid var(--border-color);
    position: relative;
    display: flex;
    align-items: flex-end;
    padding: 4px;
}

.coords {
    font-size: 9px;
    line-height: 1.2;
    background-color: #0A0A0A;
    padding: 2px;
}

.status-box {
    display: flex;
    align-items: center;
    gap: 10px;
}

.icon-arrow {
    font-size: 24px;
    border: 1px solid var(--border-color);
    padding: 2px 6px;
}

.status-text {
    font-size: 11px;
    line-height: 1.3;
}

.status-text .label {
    margin-bottom: 0;
}

.dot-matrix {
    border: 1px solid var(--border-color);
    padding: 4px;
    border-radius: 4px;
}

.dots {
    width: 60px;
    height: 30px;
    background-image: radial-gradient(var(--text-main) 1px, transparent 1px);
    background-size: 6px 6px;
}

/* Bottom Row */
.row-bot {
    margin-top: 10px;
}

/* Footer Tape */
.footer-tape {
    margin-top: 20px;
    border: 1px solid var(--border-color);
    padding: 4px 8px;
    border-radius: 2px;
}

.tape-text {
    font-size: 9px;
    color: var(--text-dim);
    letter-spacing: 1px;
}

/* Right Stub */
.ticket-right {
    width: 250px;
    border-left: 2px dashed #444;
    padding: 24px;
    position: relative;
    display: flex;
    flex-direction: column;
    background-color: #111;
    /* Slightly lighter black */
    border-radius: 0 12px 12px 0;
}

.gate-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    color: var(--text-dim);
    font-size: 14px;
}

.white-box {
    background-color: #FFF;
    height: 30px;
    width: 100%;
    margin: 15px 0;
}

.barcode-section {
    margin-bottom: 15px;
}

.tiny {
    font-size: 8px;
}

.barcode {
    font-size: 20px;
    letter-spacing: 1px;
    font-weight: 900;
    line-height: 1;
    margin: 4px 0;
    color: var(--text-main);
    user-select: none;
    font-family: monospace;
    /* Fallback for barcode vertical lines */
}

.barcode-text {
    font-family: var(--font-lcd);
    font-size: 18px;
    text-align: center;
    letter-spacing: 4px;
}

.enjoy-flight {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-top: 10px;
}

.seat-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.globe-icons {
    color: var(--text-dim);
    font-size: 18px;
}

.seat-val {
    font-family: var(--font-lcd);
    font-size: 28px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.vert-label {
    font-family: var(--font-mono);
    font-size: 9px;
    color: var(--text-dim);
    transform: rotate(-90deg);
    display: inline-block;
    width: 15px;
}

.vertical-edge-text {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%) rotate(-90deg);
    font-size: 10px;
    color: var(--text-dim);
    letter-spacing: 2px;
}

/* Responsive */
@media (max-width: 800px) {
    .ticket {
        flex-direction: column;
    }

    .ticket-left {
        width: 100%;
        height: 40px;
        border-right: none;
        border-bottom: 1px dashed var(--border-color);
    }

    .vertical-text {
        transform: none;
    }

    .ticket-right {
        width: 100%;
        border-left: none;
        border-top: 2px dashed #444;
        border-radius: 0 0 12px 12px;
    }

    .vertical-edge-text {
        bottom: 8px;
        top: auto;
        right: auto;
        left: 50%;
        transform: translateX(-50%);
    }
}