@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(24px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes shimmer {
    0%   { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}
@keyframes pulseGlow {
    0%, 100% { box-shadow: 0 0 20px rgba(161, 62, 63, 0); }
    50%      { box-shadow: 0 0 30px rgba(161, 62, 63, .25); }
}

.ticket-glow-clip {
    position: absolute;
    inset: 0;
    overflow: hidden;
    z-index: -10;
    pointer-events: none;
}

.ticket-wrapper {
    max-width: 680px;
    margin: 0 auto;
    padding: 2rem 1rem 5rem;
    box-sizing: border-box;
    animation: fadeInUp .6s ease-out both;
}

.ticket-intro {
    text-align: center;
    margin-bottom: 3rem;
}
.ticket-intro .badge {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    font-size: .8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: #a13e3f;
    background: rgba(161, 62, 63, .12);
    border: 1px solid rgba(161, 62, 63, .25);
    border-radius: 999px;
    padding: .35rem 1rem;
    margin-bottom: 1.25rem;
}
.ticket-intro .badge svg {
    flex-shrink: 0;
}
.ticket-intro h1 {
    font-size: 2.25rem;
    font-weight: 800;
    letter-spacing: -.02em;
    line-height: 1.2;
    background: linear-gradient(to right, rgba(226,232,240,.6), #e2e8f0, rgba(226,232,240,.6));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    margin: 0 0 1rem;
}
.ticket-intro p {
    color: rgb(148 163 184);
    font-size: 1.05rem;
    line-height: 1.7;
    max-width: 540px;
    margin: 0 auto;
}

.ticket-card {
    position: relative;
    background: linear-gradient(145deg, rgba(30,41,59,.85), rgba(15,23,42,.95));
    border: 1px solid rgba(148,163,184,.1);
    border-radius: 1.5rem;
    padding: 2.5rem 2rem;
    box-sizing: border-box;
    max-width: 100%;
    backdrop-filter: blur(12px);
    animation: pulseGlow 4s ease-in-out infinite;
}
.ticket-card::before {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(160deg, rgba(161,62,63,.35), transparent 50%, rgba(148,163,184,.12));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
    z-index: 0;
}

.form-row {
    margin-bottom: 1.75rem;
}
.form-row:last-of-type {
    margin-bottom: 0;
}
.form-row-pair {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-label {
    display: block;
    font-size: .82rem;
    font-weight: 600;
    color: rgb(203 213 225);
    margin-bottom: .55rem;
    letter-spacing: .02em;
}
.form-label .required {
    color: #a13e3f;
    margin-left: .2rem;
}

.form-input {
    width: 100%;
    background: rgba(15,23,42,.6);
    border: 1px solid rgba(148,163,184,.15);
    border-radius: .75rem;
    color: #f1f5f9;
    font-family: inherit;
    font-size: .95rem;
    padding: .75rem 1rem;
    transition: border-color .2s ease, box-shadow .2s ease;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}
.form-input::placeholder {
    color: rgba(148,163,184,.45);
}
.form-input:hover {
    border-color: rgba(148,163,184,.3);
}
.form-input:focus {
    border-color: #a13e3f;
    box-shadow: 0 0 0 3px rgba(161,62,63,.18);
}

textarea.form-input {
    resize: vertical;
    min-height: 120px;
    line-height: 1.6;
}

.phone-group {
    display: flex;
    gap: .5rem;
}
.phone-prefix {
    width: 82px;
    flex-shrink: 0;
    text-align: center;
    letter-spacing: .04em;
    font-weight: 600;
}
.phone-number {
    flex: 1;
}

.upload-zone {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .65rem;
    min-height: 150px;
    border: 2px dashed rgba(148,163,184,.18);
    border-radius: 1rem;
    padding: 1.5rem 1rem;
    cursor: pointer;
    transition: border-color .25s ease, background .25s ease;
    overflow: hidden;
}
.upload-zone:hover {
    border-color: rgba(161,62,63,.45);
    background: rgba(161,62,63,.04);
}
.upload-zone.drag-over {
    border-color: #a13e3f;
    background: rgba(161,62,63,.08);
}
.upload-zone.has-file {
    border-style: solid;
    border-color: rgba(161,62,63,.35);
    background: rgba(161,62,63,.06);
}
.upload-zone input[type="file"] {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
    z-index: 2;
}
.upload-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(161,62,63,.12);
    color: #a13e3f;
    transition: transform .3s ease;
}
.upload-zone:hover .upload-icon {
    transform: translateY(-2px);
}
.upload-label {
    font-size: .88rem;
    color: rgb(148 163 184);
    text-align: center;
    line-height: 1.5;
}
.upload-label strong {
    color: #a13e3f;
    font-weight: 600;
}
.upload-hint {
    font-size: .72rem;
    color: rgba(148,163,184,.5);
}

.file-preview {
    display: none;
    align-items: center;
    gap: .75rem;
    width: 100%;
    padding: .5rem 0 0;
}
.file-preview.visible {
    display: flex;
}
.file-preview-thumb {
    width: 44px;
    height: 44px;
    border-radius: .5rem;
    object-fit: cover;
    border: 1px solid rgba(148,163,184,.15);
}
.file-preview-info {
    flex: 1;
    min-width: 0;
}
.file-preview-name {
    font-size: .8rem;
    color: rgb(203 213 225);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.file-preview-size {
    font-size: .72rem;
    color: rgba(148,163,184,.55);
}
.file-preview-remove {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: none;
    background: rgba(239,68,68,.12);
    color: #ef4444;
    cursor: pointer;
    transition: background .2s ease;
    flex-shrink: 0;
    z-index: 3;
}
.file-preview-remove:hover {
    background: rgba(239,68,68,.25);
}

.submit-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .6rem;
    width: 100%;
    margin-top: 2.25rem;
    padding: .9rem 2rem;
    border: none;
    border-radius: .85rem;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: .01em;
    color: #fff;
    background: linear-gradient(135deg, #a13e3f, #c0585a);
    background-size: 200% 200%;
    cursor: pointer;
    transition: transform .2s ease, box-shadow .2s ease, background-position .4s ease;
    position: relative;
    overflow: hidden;
}
.submit-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,.12), transparent);
    background-size: 200% 100%;
    animation: shimmer 3s linear infinite;
}
.submit-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 30px rgba(161,62,63,.35);
}
.submit-btn:active {
    transform: translateY(0);
}
.submit-btn svg {
    flex-shrink: 0;
    transition: transform .2s ease;
}
.submit-btn:hover svg {
    transform: translateX(3px);
}

.ticket-footer-note {
    text-align: center;
    margin-top: 2rem;
    font-size: .78rem;
    color: rgba(148,163,184,.45);
    line-height: 1.6;
}
.ticket-footer-note svg {
    display: inline-block;
    vertical-align: middle;
    margin-right: .3rem;
    color: rgba(161,62,63,.6);
}

.cf-turnstile {
    display: flex;
    justify-content: center;
    margin: 0 auto;
}

@media (max-width: 640px) {
    .ticket-wrapper {
        padding: 1.5rem .75rem 4rem;
    }
    .ticket-intro h1 {
        font-size: 1.7rem;
    }
    .ticket-card {
        padding: 1.75rem 1.25rem;
    }
    .form-row-pair {
        grid-template-columns: 1fr;
    }
}
@media (min-width: 768px) {
    .ticket-intro h1 {
        font-size: 2.75rem;
    }
    .ticket-card {
        padding: 3rem 2.5rem;
    }
}
