:root {
    --presale-bg: #04030b;
    --presale-card-bg: rgba(7, 7, 22, 0.9);
    --presale-card-border: rgba(255, 255, 255, 0.08);
    --presale-card-sheen: rgba(255, 255, 255, 0.02);
    --presale-active: #52e717;
    --presale-upcoming: #facc15;
    --presale-expired: #ff4d4d;
    --presale-error: #f43f5e;
    --presale-text: #f7f7fb;
    --presale-muted: #a9a9c4;
    --presale-gradient: linear-gradient(135deg, #fdc830 0%, #f37335 100%);
}

.presale-validator {
    margin: 0 auto;
    padding: clamp(1.5rem, 5vw, 3rem);
    max-width: 720px;
    background: var(--presale-bg);
    border-radius: 32px;
    color: var(--presale-text);
    box-shadow: 0 40px 120px rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.presale-validator__intro {
    text-align: center;
    margin-bottom: 2rem;
}

.presale-validator__intro .eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.3em;
    font-size: 0.75rem;
    color: var(--presale-muted);
    margin-bottom: 0.5rem;
}

.presale-validator__intro h1 {
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    margin-bottom: 0.5rem;
}

.presale-validator__intro .lead {
    color: var(--presale-muted);
    margin: 0 auto;
    max-width: 32rem;
}

.presale-validator__form label {
    font-weight: 600;
    display: block;
    margin-bottom: 0.5rem;
}

.presale-validator__input {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.presale-validator__input input {
    flex: 1;
    min-width: 200px;
    padding: 0.9rem 1.1rem;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.04);
    color: var(--presale-text);
    font-size: 1rem;
}

.presale-validator__input input:focus {
    outline: none;
    border-color: #ffb347;
    box-shadow: 0 0 0 2px rgba(255, 179, 71, 0.35);
}

.presale-validator__submit {
    appearance: none;
    border: none;
    border-radius: 14px;
    padding: 0 1.8rem;
    font-size: 1rem;
    font-weight: 600;
    background: var(--presale-gradient);
    color: #060308;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.presale-validator__submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.presale-validator__submit .spinner {
    width: 1rem;
    height: 1rem;
    border-radius: 50%;
    border: 2px solid rgba(0, 0, 0, 0.15);
    border-top-color: rgba(0, 0, 0, 0.65);
    display: inline-block;
    animation: presale-spin 0.9s linear infinite;
    opacity: 0;
}

.presale-validator.is-loading .presale-validator__submit .spinner {
    opacity: 1;
}

.presale-validator__hint {
    margin-top: 0.5rem;
    font-size: 0.9rem;
    color: var(--presale-muted);
}

.presale-validator__result {
    margin-top: 2rem;
}

.presale-card {
    position: relative;
    display: flex;
    gap: 1.25rem;
    align-items: center;
    border-radius: 24px;
    padding: 1.6rem 1.8rem;
    background: var(--presale-card-bg);
    border: 1px solid var(--presale-card-border);
    box-shadow: 0 35px 90px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.04);
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
}

.presale-card::after {
    content: '';
    position: absolute;
    inset: 1px;
    border-radius: 23px;
    background: var(--presale-card-sheen);
    pointer-events: none;
    opacity: 0.3;
}

.presale-card__icon {
    width: 64px;
    height: 64px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.03);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    position: relative;
    z-index: 1;
}

.presale-card__ticket {
    width: 44px;
    height: 44px;
}

.presale-card__content {
    position: relative;
    z-index: 1;
    flex: 1;
    text-align: left;
}

.presale-card__status {
    font-size: 0.85rem;
    letter-spacing: 0.35em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.75);
    margin: 0 0 0.35rem;
}

.presale-card__description {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0 0 0.35rem;
    color: var(--presale-text);
}

.presale-card__meta {
    margin: 0;
    font-size: 0.95rem;
    color: var(--presale-muted);
}

.presale-card .presale-card__shows,
.presale-card__shows {
    margin-top: 1.25rem;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.6rem 1.4rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.02) !important;
    background-color: rgba(255, 255, 255, 0.02) !important;
    color: var(--presale-text);
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    cursor: pointer;
    transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.presale-card__shows:hover,
.presale-card__shows:focus-visible,
.presale-card .presale-card__shows:hover,
.presale-card .presale-card__shows:focus-visible {
    border-color: rgba(82, 231, 23, 0.65);
    background: rgba(82, 231, 23, 0.12) !important;
    background-color: rgba(82, 231, 23, 0.12) !important;
    box-shadow: 0 0 0 2px rgba(82, 231, 23, 0.18);
}

.presale-card__shows:focus-visible,
.presale-card .presale-card__shows:focus-visible {
    outline: none;
}

.presale-card__shows:active,
.presale-card .presale-card__shows:active {
    background: rgba(82, 231, 23, 0.2) !important;
    background-color: rgba(82, 231, 23, 0.2) !important;
    border-color: rgba(82, 231, 23, 0.8);
}

body.presale-modal-open {
    overflow: hidden;
}

.presale-modal[hidden] {
    display: none;
}

.presale-modal {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    background: rgb(29 28 42 / 85%);
    z-index: 9999;
    backdrop-filter: blur(6px);
}

.presale-modal__backdrop {
    position: absolute;
    inset: 0;
}

.presale-modal__dialog {
    position: relative;
    width: min(640px, 100%);
    max-height: 90vh;
    background: rgba(7, 7, 22, 0.95);
    border-radius: 32px;
    padding: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 45px 90px rgba(0, 0, 0, 0.5);
    overflow: hidden;
}

.presale-modal__body {
    max-height: calc(90vh - 4rem);
    overflow-y: auto;
    padding-right: 0.25rem;
}

.presale-modal__close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.06);
    color: var(--presale-text);
    font-size: 1.35rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.presale-modal__close:focus-visible,
.presale-modal__close:hover {
    border-color: rgba(74, 178, 255, 0.8);
    background: rgba(74, 178, 255, 0.2);
    box-shadow: 0 0 0 2px rgba(74, 178, 255, 0.35);
    outline: none;
}

.presale-modal__close:active {
    transform: scale(0.95);
}

.presale-modal__eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.3em;
    font-size: 0.85rem;
    color: var(--presale-muted);
    margin-bottom: 0.35rem;
}

.presale-modal__title {
    margin: 0 0 1.5rem;
    font-size: 2rem;
    color: #ffffff;
}

.presale-modal__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.presale-modal__item {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.presale-modal__item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.presale-modal__item-copy {
    flex: 1;
}

.presale-modal__show {
    margin: 0 0 0.25rem;
    font-weight: 600;
    color: var(--presale-text);
    font-size: 1.15rem;
}

.presale-modal__details {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    margin-top: 0.5rem;
}

.presale-modal__datetime {
    margin: 0;
    color: var(--presale-text);
    font-size: 1rem;
    font-weight: 600;
}

.presale-modal__location {
    margin: 0;
    color: var(--presale-muted);
    font-size: 0.95rem;
}

.presale-modal__venue {
    margin: 0;
    color: var(--presale-muted);
    font-size: 1rem;
}

/* Legacy styles for backward compatibility */
.presale-modal__date {
    margin: 0 0 0.35rem;
    color: var(--presale-text);
    font-size: 1rem;
}

.presale-modal__cta {
    align-self: center;
    padding: 0.65rem 1.2rem;
    border-radius: 999px;
    border: 1px solid rgba(241, 90, 41, 0.3);
    color: #ffffff !important;
    text-decoration: none;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    background: rgba(241, 90, 41, 0.08);
    transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.presale-modal__cta:hover,
.presale-modal__cta:focus-visible {
    border-color: rgba(241, 90, 41, 0.8);
    background: rgba(241, 90, 41, 0.18);
    box-shadow: 0 0 0 2px rgba(241, 90, 41, 0.2);
    color: #ffffff !important;
    outline: none;
}

.presale-modal__cta:active {
    background: rgba(241, 90, 41, 0.28);
    border-color: #f15a29;
    color: #ffffff !important;
}

.presale-modal__empty {
    margin: 0;
    color: var(--presale-muted);
}

.presale-modal__message {
    margin: 0;
    color: var(--presale-text);
    text-align: center;
    padding: 1rem 0;
}

.presale-validator__tips {
    margin-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-top: 1.25rem;
}

.presale-validator__tips ul {
    list-style: none;
    margin: 0;
    padding: 0;
    color: var(--presale-muted);
    display: grid;
    gap: 0.5rem;
}

.presale-resend {
    margin-top: 2.5rem;
    padding: 2rem;
    border-radius: 24px;
    background: linear-gradient(120deg, rgba(74, 178, 255, 0.12), rgba(6, 4, 16, 0.9));
    border: 1px solid rgba(74, 178, 255, 0.2);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.presale-resend__intro {
    text-align: center;
    margin-bottom: 1.5rem;
}

.presale-resend__intro .eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.3em;
    font-size: 0.75rem;
    color: var(--presale-muted);
    margin-bottom: 0.35rem;
}

.presale-resend__intro h2 {
    margin: 0 0 0.35rem;
    font-size: clamp(1.2rem, 3vw, 1.8rem);
}

.presale-resend__intro p {
    margin: 0;
    color: var(--presale-muted);
}

.presale-resend__form label {
    font-weight: 600;
    display: block;
    margin-bottom: 0.5rem;
}

.presale-resend__fields {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    align-items: center;
}

.presale-resend__fields input[type="email"] {
    flex: 1;
    min-width: 220px;
    padding: 0.9rem 1.1rem;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.04);
    color: var(--presale-text);
    font-size: 1rem;
}

.presale-resend__fields input[type="email"]:focus {
    outline: none;
    border-color: rgba(74, 178, 255, 0.8);
    box-shadow: 0 0 0 2px rgba(74, 178, 255, 0.35);
}

.presale-resend__honeypot {
    position: absolute;
    opacity: 0;
    pointer-events: none;
    height: 0;
    width: 0;
}

.presale-resend__submit {
    appearance: none;
    border: none;
    border-radius: 14px;
    padding: 0.85rem 1.8rem;
    font-size: 1rem;
    font-weight: 600;
    background: linear-gradient(135deg, #4ab2ff, #7c3aed);
    color: #060308;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.presale-resend__submit:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(74, 178, 255, 0.35);
}

.presale-resend__submit:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

.presale-resend__submit .spinner {
    width: 1rem;
    height: 1rem;
    border-radius: 50%;
    border: 2px solid rgba(0, 0, 0, 0.15);
    border-top-color: rgba(0, 0, 0, 0.65);
    animation: presale-spin 0.9s linear infinite;
    opacity: 0;
}

.presale-resend__form.is-loading .spinner {
    opacity: 1;
}

.presale-resend__hint {
    margin-top: 0.75rem;
    font-size: 0.9rem;
    color: var(--presale-muted);
}

.presale-resend__status {
    margin-top: 1rem;
    border-radius: 16px;
    padding: 1rem 1.25rem;
    font-size: 0.95rem;
    line-height: 1.5;
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--presale-text);
    background: rgba(255, 255, 255, 0.04);
    display: none;
}

.presale-resend__status.is-visible {
    display: block;
}

.presale-resend__status.is-success {
    border-color: rgba(82, 231, 23, 0.45);
    background: rgba(82, 231, 23, 0.1);
}

.presale-resend__status.is-error {
    border-color: rgba(244, 63, 94, 0.45);
    background: rgba(244, 63, 94, 0.12);
}

.presale-resend__status.is-warning {
    border-color: rgba(250, 204, 21, 0.45);
    background: rgba(250, 204, 21, 0.12);
    color: var(--presale-text);
}

.presale-resend__status.is-info {
    border-color: rgba(74, 178, 255, 0.45);
    background: rgba(74, 178, 255, 0.12);
}

.presale-card.is-active {
    border-color: rgba(82, 231, 23, 0.4);
    background: linear-gradient(120deg, rgba(82, 231, 23, 0.12), rgba(6, 4, 16, 0.9));
}

.presale-card.is-upcoming {
    border-color: rgba(250, 204, 21, 0.45);
    background: linear-gradient(120deg, rgba(250, 204, 21, 0.12), rgba(6, 4, 16, 0.9));
}

.presale-card.is-expired,
.presale-card.is-missing {
    border-color: rgba(255, 77, 77, 0.5);
    background: linear-gradient(120deg, rgba(255, 77, 77, 0.12), rgba(6, 4, 16, 0.9));
}

.presale-card.is-error {
    border-color: rgba(244, 63, 94, 0.5);
    background: linear-gradient(120deg, rgba(244, 63, 94, 0.12), rgba(6, 4, 16, 0.9));
}

.presale-card__loading {
    align-items: center;
    gap: 1rem;
}

.presale-card__loading .presale-card__icon {
    animation: presale-pulse 1.4s ease-in-out infinite;
}

@keyframes presale-pulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.05);
        opacity: 0.7;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes presale-spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

@media (max-width: 540px) {
    .presale-validator {
        border-radius: 24px;
        padding: 1.5rem;
    }

    .presale-card {
        flex-direction: column;
    }

    .presale-card__icon {
        width: 56px;
        height: 56px;
    }

    .presale-resend {
        padding: 1.5rem;
    }

    .presale-resend__fields {
        flex-direction: column;
        align-items: stretch;
    }

    .presale-resend__submit {
        width: 100%;
        justify-content: center;
    }

    .presale-modal__dialog {
        padding: 1.5rem;
        border-radius: 24px;
    }

    .presale-modal__item {
        flex-direction: column;
        align-items: flex-start;
    }

    .presale-modal__cta {
        width: 100%;
        text-align: center;
    }
}