/* =====================================================
   Ticket Generator
===================================================== */

.tg-page {
    display: grid;
    gap: 18px;
}

/* HERO */
.tg-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 26px 28px;
    border-radius: 18px;
    background:
        radial-gradient(circle at top right, rgba(245, 166, 35, 0.13), transparent 34%),
        linear-gradient(135deg, #111827 0%, #07111f 100%);
    border: 1px solid rgba(245, 166, 35, 0.45);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.25);
}

.tg-kicker {
    display: inline-flex;
    margin-bottom: 8px;
    color: #f5a623;
    font-size: 12px;
    font-weight: 1000;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.tg-hero h1 {
    margin: 0;
    color: #fff;
    font-size: 38px;
    line-height: 1.05;
    font-weight: 1000;
    letter-spacing: -0.04em;
}

.tg-hero p {
    max-width: 720px;
    margin: 8px 0 0;
    color: #cbd5e1;
    font-size: 14px;
    line-height: 1.55;
    font-weight: 750;
}

.tg-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex: 0 0 auto;
    padding: 12px 15px;
    border-radius: 999px;
    background: rgba(245, 166, 35, 0.12);
    border: 1px solid rgba(245, 166, 35, 0.48);
    color: #f5a623;
    font-size: 13px;
    font-weight: 1000;
    white-space: nowrap;
}

.tg-hero-badge span {
    font-size: 18px;
}

/* MAIN BOX */
.tg-box {
    padding: 22px;
    border-radius: 18px;
    background:
        radial-gradient(circle at top right, rgba(245, 166, 35, 0.10), transparent 34%),
        linear-gradient(180deg, #111827 0%, #07111f 100%);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.tg-box-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 18px;
}

.tg-box-head h2 {
    margin: 0;
    color: #fff;
    font-size: 24px;
    font-weight: 1000;
    letter-spacing: -0.02em;
}

.tg-box-head p {
    margin: 6px 0 0;
    color: #9fb0c7;
    font-size: 13px;
    line-height: 1.5;
    font-weight: 750;
}

/* FORM */
.tg-form {
    display: grid;
    gap: 18px;
    max-width: 780px;
}

.tg-field {
    display: grid;
    gap: 8px;
}

.tg-field label,
.tg-checkbox span {
    color: #eaf1ff;
    font-size: 13px;
    font-weight: 950;
}

.tg-range-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 76px;
    gap: 14px;
    align-items: center;
}

.tg-range-row input[type="range"] {
    width: 100%;
    accent-color: #f5a623;
}

.tg-range-row strong {
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: rgba(245, 166, 35, 0.12);
    border: 1px solid rgba(245, 166, 35, 0.45);
    color: #f5a623;
    font-size: 20px;
    font-weight: 1000;
}

.tg-odds-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 180px));
    gap: 14px;
}

.tg-field input[type="number"] {
    width: 100%;
    height: 44px;
    padding: 0 13px;
    border-radius: 12px;
    background: #020617;
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #fff;
    outline: none;
    font-size: 14px;
    font-weight: 850;
}

.tg-field input[type="number"]:focus {
    border-color: rgba(245, 166, 35, 0.7);
}

.tg-checkbox {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    width: fit-content;
    cursor: pointer;
}

.tg-checkbox input {
    width: 17px;
    height: 17px;
    accent-color: #f5a623;
}

.tg-generate-btn {
    width: fit-content;
    min-width: 170px;
    height: 46px;
    padding: 0 18px;
    border: 0;
    border-radius: 13px;
    background: linear-gradient(135deg, #f5a623 0%, #ffbd4a 100%);
    color: #07111f;
    font-size: 13px;
    font-weight: 1000;
    text-transform: uppercase;
    cursor: pointer;
    box-shadow: 0 14px 28px rgba(245, 166, 35, 0.18);
}

.tg-generate-btn:hover {
    filter: brightness(1.05);
}

.tg-generate-btn:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

/* RESULT */
.tg-result {
    margin-top: 22px;
}

.tg-loading,
.tg-message {
    padding: 16px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #dbeafe;
    font-size: 14px;
    font-weight: 850;
}

.tg-message-error {
    background: rgba(239, 68, 68, 0.10);
    border-color: rgba(239, 68, 68, 0.35);
    color: #fecaca;
}

/* TICKET */
.tg-ticket {
    display: grid;
    gap: 16px;
}

.tg-ticket-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 18px;
    border-radius: 16px;
    background:
        radial-gradient(circle at top right, rgba(245, 166, 35, 0.14), transparent 34%),
        linear-gradient(180deg, #151f2e 0%, #0b1220 100%);
    border: 1px solid rgba(245, 166, 35, 0.42);
}

.tg-ticket-top span {
    display: block;
    margin-bottom: 4px;
    color: #f5a623;
    font-size: 12px;
    font-weight: 1000;
    text-transform: uppercase;
}

.tg-ticket-top h3 {
    margin: 0;
    color: #fff;
    font-size: 22px;
    font-weight: 1000;
}

.tg-ticket-top strong {
    color: #f5a623;
    font-size: 34px;
    font-weight: 1000;
    line-height: 1;
}

.tg-ticket-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.tg-ticket-card {
    padding: 16px;
    border-radius: 17px;
    background:
        radial-gradient(circle at top right, rgba(245, 166, 35, 0.10), transparent 34%),
        linear-gradient(180deg, #121922 0%, #07111f 100%);
    border: 1px solid rgba(245, 166, 35, 0.40);
    box-shadow: 0 14px 28px rgba(0, 0, 0, 0.22);
}

.tg-ticket-league {
    color: #fff;
    font-size: 12px;
    font-weight: 1000;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.tg-ticket-date {
    margin-top: 5px;
    color: #f5a623;
    font-size: 12px;
    font-weight: 900;
}

.tg-ticket-teams {
    display: grid;
    grid-template-columns: 1fr 46px 1fr;
    gap: 10px;
    align-items: center;
    margin: 18px 0;
}

.tg-ticket-team {
    display: grid;
    justify-items: center;
    gap: 8px;
    text-align: center;
    min-width: 0;
}

.tg-ticket-team img {
    width: 58px;
    height: 58px;
    object-fit: contain;
    filter: drop-shadow(0 8px 14px rgba(0, 0, 0, 0.45));
}

.tg-ticket-team strong {
    color: #fff;
    font-size: 13px;
    font-weight: 1000;
    line-height: 1.2;
}

.tg-vs {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: rgba(245, 166, 35, 0.10);
    border: 1px solid rgba(245, 166, 35, 0.45);
    color: #f5a623;
    font-size: 13px;
    font-weight: 1000;
}

.tg-ticket-pick-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.tg-pick-badge,
.tg-odds-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 0 13px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 1000;
}

.tg-pick-badge {
    background: rgba(245, 166, 35, 0.13);
    border: 1px solid rgba(245, 166, 35, 0.45);
    color: #f5a623;
}

.tg-odds-badge {
    background: rgba(22, 163, 74, 0.12);
    border: 1px solid rgba(22, 163, 74, 0.40);
    color: #22c55e;
}

/* SHARE */
.tg-share-box {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    padding: 14px;
    border-radius: 15px;
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.tg-copy-btn,
.tg-open-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 38px;
    padding: 0 14px;
    border-radius: 11px;
    font-size: 12px;
    font-weight: 1000;
    text-decoration: none;
    cursor: pointer;
}

.tg-copy-btn {
    border: 0;
    background: #f5a623;
    color: #07111f;
}

.tg-open-btn {
    border: 1px solid rgba(245, 166, 35, 0.42);
    background: rgba(245, 166, 35, 0.10);
    color: #f5a623;
}

#ticketShareInput {
    position: absolute;
    left: -9999px;
    opacity: 0;
}

.tg-social-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.tg-social-row a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 0 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #dbeafe;
    font-size: 12px;
    font-weight: 900;
    text-decoration: none;
}

.tg-social-row a:hover {
    border-color: rgba(245, 166, 35, 0.48);
    color: #f5a623;
}

/* RESPONSIVE */
@media (max-width: 1100px) {
    .tg-ticket-list {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 760px) {
    .tg-hero {
        align-items: flex-start;
        flex-direction: column;
        padding: 22px;
    }

    .tg-hero h1 {
        font-size: 30px;
    }

    .tg-box {
        padding: 16px;
    }

    .tg-odds-grid {
        grid-template-columns: 1fr;
    }

    .tg-range-row {
        grid-template-columns: 1fr;
    }

    .tg-range-row strong {
        width: 86px;
    }

    .tg-ticket-top {
        align-items: flex-start;
        flex-direction: column;
    }

    .tg-ticket-top strong {
        font-size: 30px;
    }

    .tg-ticket-teams {
        grid-template-columns: 1fr;
    }

    .tg-vs {
        justify-self: center;
    }

    .tg-generate-btn {
        width: 100%;
    }
}