@import url('/assets/css/fonts.css');

:root {
    --bg-a: #000e2f;
    --bg-b: #00153b;
    --card: #f8f8f7;
    --text: #031a42;
    --muted: #435a76;
    --primary: #009adf;
    --primary-hover: #0079be;
    --accent: #c9815c;
    --accent-soft: #dfa289;
    --border: #cad4df;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; font-family: "TikTok Sans", "Segoe UI", "Helvetica Neue", Arial, sans-serif; color: var(--text); min-height: 100%; }

.page-bg {
    position: fixed;
    inset: 0;
    background:
        radial-gradient(circle at 18% 22%, rgba(0, 154, 223, 0.26), transparent 34%),
        radial-gradient(circle at 83% 84%, rgba(201, 129, 92, 0.18), transparent 30%),
        linear-gradient(165deg, var(--bg-a), var(--bg-b));
    z-index: -2;
}

.page-bg::before,
.page-bg::after {
    content: "";
    position: absolute;
    top: 0;
    right: 8vw;
    width: min(8vw, 44px);
    height: 100%;
    border-radius: 0 0 12px 12px;
    opacity: 0.95;
}

.page-bg::before {
    background: linear-gradient(180deg, #dfa289, #c9815c);
    transform: translateX(-56px);
}

.page-bg::after {
    background: linear-gradient(180deg, #1ca9ea, #009adf);
}

.app-shell {
    width: min(100%, 640px);
    margin: 0 auto;
    padding: 20px 14px 38px;
}

.brand {
    padding: 12px 8px 18px;
    text-align: left;
}

.brand__title {
    display: inline-block;
    font-size: 0.92rem;
    font-weight: 700;
    color: #0d3e70;
    background: #fff;
    border-radius: 10px;
    border: 1px solid #dce6ef;
    padding: 8px 12px;
    box-shadow: 0 10px 30px rgba(3, 21, 42, 0.2);
}

.brand__logo-wrap {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border-radius: 12px;
    border: 1px solid #dce6ef;
    padding: 10px 12px;
    box-shadow: 0 10px 30px rgba(3, 21, 42, 0.2);
}

.brand__logo {
    display: block;
    max-width: min(62vw, 300px);
    max-height: 72px;
    width: auto;
    height: auto;
}

.card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 22px;
    padding: 20px;
    box-shadow: 0 16px 38px rgba(6, 25, 45, 0.24);
}

.card h1, .card h2 {
    margin: 0 0 12px;
    line-height: 1.2;
    font-weight: 700;
}

.card p {
    margin: 0 0 12px;
    line-height: 1.5;
    font-size: 0.98rem;
}

.hidden { display: none !important; }

label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: var(--text);
}

input[type="text"],
input[type="email"],
input[type="number"],
textarea,
select {
    width: 100%;
    border: 1px solid #bfd0df;
    border-radius: 12px;
    padding: 12px;
    font-size: 1rem;
    margin-top: 6px;
    background: #fbfdff;
}

.consent {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    font-size: 0.94rem;
    font-weight: 500;
}

.consent input { margin-top: 4px; }

.error {
    color: #b91c1c;
    min-height: 1.05rem;
    font-size: 0.85rem;
    margin-top: -4px;
    margin-bottom: 7px;
}

.btn {
    width: 100%;
    appearance: none;
    border: none;
    border-radius: 12px;
    background: linear-gradient(180deg, #24b8f3, var(--primary));
    color: white;
    font-size: 1rem;
    font-weight: 700;
    padding: 12px 14px;
    cursor: pointer;
    transition: transform .15s ease, background .15s ease;
}

.btn:hover { background: linear-gradient(180deg, #14a9e5, var(--primary-hover)); }
.btn:active { transform: translateY(1px); }

.btn--outline {
    background: #fff;
    color: var(--text);
    border: 1px solid #bfc9d5;
}

.btn--outline:hover {
    background: #f2f8ff;
}

.method-grid {
    display: grid;
    gap: 10px;
}

.hint {
    color: var(--muted);
    font-size: 0.92rem;
}

.hint.strong {
    font-weight: 600;
    color: #2c4456;
}

.ticket {
    margin: 10px 0 12px;
    border-radius: 15px;
    background: linear-gradient(180deg, #0f3155, #103a63);
    color: #ecfbff;
    text-align: center;
    font-size: clamp(2.4rem, 12vw, 3.7rem);
    letter-spacing: 0.26em;
    font-family: "Courier New", monospace;
    padding: 12px 14px 14px;
    border: 1px solid #5d82a7;
    box-shadow: inset 0 8px 20px rgba(255, 255, 255, 0.08);
}

.ticket--blur {
    filter: blur(3px) grayscale(0.2);
    opacity: 0.8;
}

.status-badge {
    background: #f2f7fc;
    border: 1px solid #d6e2ef;
    border-radius: 12px;
    padding: 10px 12px;
    color: #2f5672;
    font-size: 0.93rem;
}

.link-btn {
    display: inline-block;
    padding: 10px 14px;
    border-radius: 10px;
    border: 1px solid #a0bad0;
    text-decoration: none;
    color: #18405b;
    font-weight: 600;
    background: #f8fbff;
}

.status-grid {
    margin: 8px 0 14px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.status-card {
    border: 1px solid #d8e4ef;
    background: #f4faff;
    border-radius: 12px;
    padding: 10px 12px;
    min-height: 84px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.status-card--accent {
    border-color: #e8d4cc;
    background: #fff5f1;
}

.status-card__label {
    font-size: 0.8rem;
    color: var(--muted);
    margin-bottom: 4px;
}

.status-card__value {
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 1.25;
}

.countdown-panel {
    border: 1px solid #1f4f7f;
    border-radius: 16px;
    padding: 14px;
    background: linear-gradient(180deg, #0f355f, #154875);
    box-shadow: inset 0 9px 14px rgba(255, 255, 255, 0.08), 0 12px 24px rgba(8, 26, 45, 0.2);
}

.countdown-label {
    font-size: 0.85rem;
    color: #c8dcf3;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.countdown-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.count-unit {
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.97);
    border: 1px solid #89aed4;
    text-align: center;
    padding: 8px 6px;
}

.count-unit__num {
    font-size: clamp(1.5rem, 7vw, 2.2rem);
    font-weight: 700;
    color: #003769;
    line-height: 1;
}

.count-unit__txt {
    margin-top: 4px;
    font-size: 0.74rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #4f6478;
}

#screen-ticket h2 {
    font-size: clamp(2rem, 7vw, 2.4rem);
}

#attendance-hint {
    margin-top: 4px;
    padding-left: 10px;
    border-left: 3px solid #8eb5de;
    font-size: 0.97rem;
    line-height: 1.45;
}

.notice {
    border: 1px solid #e5c7bd;
    background: #fcf5f2;
    border-radius: 12px;
    padding: 10px 12px;
    color: #7f4334;
    font-weight: 600;
}

.toast {
    position: fixed;
    left: 50%;
    bottom: 20px;
    transform: translateX(-50%) translateY(12px);
    min-width: min(92vw, 420px);
    max-width: min(92vw, 520px);
    background: #113862;
    color: #fff;
    border-radius: 12px;
    padding: 12px 14px;
    font-size: 0.94rem;
    box-shadow: 0 12px 26px rgba(0, 0, 0, 0.2);
    opacity: 0;
    transition: opacity .2s ease, transform .2s ease;
    z-index: 60;
}

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

.toast--error {
    background: #9f503c;
}

.app-footer {
    margin-top: 14px;
    padding-bottom: 6px;
    display: flex;
    gap: 14px;
    justify-content: center;
    align-items: center;
}

.app-footer a {
    font-size: 0.78rem;
    color: rgba(227, 240, 252, 0.76);
    text-decoration: none;
}

.app-footer a:hover {
    color: #ffffff;
}

@media (min-width: 768px) {
    .app-shell {
        padding-top: 44px;
    }
    .card {
        padding: 26px;
    }
    #screen-ticket p {
        font-size: 1rem;
    }
}

@media (max-width: 520px) {
    .status-grid {
        grid-template-columns: 1fr;
    }
}
