/* =====================================================
   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 {

    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);
}

    color: #fff;
    font-size: 9px;
    font-weight: 700;
    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 DESKTOP/TABLET */
@media (max-width: 1100px) {
    .tg-ticket-list {
        grid-template-columns: 1fr;
    }
}

/* =====================================================
   MOBILE - COMPACT SOCCERPREDICTION STYLE
===================================================== */

@media (max-width: 760px) {

    .tg-page {
        padding: 0 8px 28px;
        gap: 12px;
        width: 100%;
        min-width: 0;
    }

    /* Hide big hero on mobile */
    .tg-hero {
        display: none !important;
    }

    .tg-box {
        padding: 12px;
        border-radius: 16px;
        background:
            radial-gradient(circle at top right, rgba(245, 166, 35, 0.08), transparent 34%),
            linear-gradient(180deg, #101722 0%, #07111f 100%);
        border: 1px solid rgba(245, 166, 35, 0.20);
    }

    .tg-box-head {
        align-items: center;
        margin-bottom: 14px;
    }

    .tg-box-head h2 {
        font-size: 19px;
        line-height: 1.15;
        color: #f5a623;
    }

    .tg-box-head p {
        display: none;
    }

    .tg-form {
        max-width: 100%;
        gap: 14px;
    }

    .tg-odds-grid {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .tg-field label,
    .tg-checkbox span {
        font-size: 12px;
    }

    .tg-field input[type="number"] {
        height: 40px;
        border-radius: 11px;
        font-size: 13px;
    }

    .tg-range-row {
        grid-template-columns: 1fr 68px;
        gap: 10px;
    }

    .tg-range-row strong {
        width: 68px;
        height: 38px;
        font-size: 17px;
    }

    .tg-generate-btn {
        width: 100%;
        height: 48px;
        border-radius: 15px;
        font-size: 13px;
        box-shadow: 0 14px 30px rgba(245, 166, 35, 0.18);
    }

    .tg-result {
        margin-top: 14px;
    }

    .tg-loading,
    .tg-message {
        padding: 13px;
        border-radius: 13px;
        font-size: 13px;
    }

    .tg-ticket {
        gap: 12px;
    }

    .tg-ticket-top {
        flex-direction: row !important;
        align-items: center !important;
        padding: 12px 14px;
        border-radius: 14px;
        gap: 10px;
    }

    .tg-ticket-top span {
        font-size: 10px;
        margin-bottom: 3px;
    }

    .tg-ticket-top h3 {
        font-size: 17px;
        line-height: 1.15;
    }

    .tg-ticket-top strong {
        font-size: 26px;
        line-height: 1;
    }

    .tg-ticket-list {
        grid-template-columns: 1fr !important;
        gap: 12px;
    }

    .tg-ticket-card {
        position: relative;
        overflow: hidden;
        padding: 13px 70px 13px 12px;
        min-height: 118px;
        border-radius: 15px;
        background:
            radial-gradient(circle at left center, rgba(18, 87, 145, 0.10), transparent 44%),
            radial-gradient(circle at top right, rgba(245, 166, 35, 0.06), transparent 38%),
            linear-gradient(135deg, #101722 0%, #07111f 100%);
        border: 1px solid rgba(245, 166, 35, 0.45);
        box-shadow: none;
    }

    .tg-ticket-card::after {
        content: "";
        position: absolute;
        top: 52px;
        bottom: 18px;
        right: 66px;
        width: 1px;
        background: rgba(255, 255, 255, 0.12);
        pointer-events: none;
    }

    .tg-ticket-league {
        max-width: 100%;
        margin-bottom: 5px;
        color: #ffffff;
        font-size: 13px;
        line-height: 1.2;
        font-weight: 1000;
        letter-spacing: 0.02em;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .tg-ticket-date {
        margin-top: 0;
        color: #f5a623;
        font-size: 12px;
        line-height: 1.2;
        font-weight: 1000;
    }

    /* Teams in one compact row */
    .tg-ticket-teams {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) 32px minmax(0, 1fr) !important;
        align-items: center !important;
        gap: 6px !important;
        margin: 16px 0 0 !important;
    }

    .tg-ticket-team {
        display: grid !important;
        grid-template-columns: 34px minmax(0, 1fr);
        align-items: center;
        justify-items: start;
        gap: 6px;
        text-align: left;
        min-width: 0;
    }

    .tg-ticket-team:last-child {
        grid-template-columns: minmax(0, 1fr) 34px;
        justify-items: end;
        text-align: right;
    }

    .tg-ticket-team:last-child strong {
        order: 1;
    }

    .tg-ticket-team:last-child img {
        order: 2;
    }

    .tg-ticket-team img {
        width: 32px;
        height: 32px;
        object-fit: contain;
        filter: drop-shadow(0 5px 8px rgba(0, 0, 0, 0.35));
    }

    .tg-ticket-team strong {
        max-width: 100%;
        min-width: 0;
        color: #ffffff;
        font-size: 11px;
        line-height: 1.12;
        font-weight: 1000;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .tg-vs {
        width: 30px;
        height: 30px;
        justify-self: center;
        font-size: 10px;
        border-radius: 999px;
    }

    /* Pick + odds right side */
    .tg-ticket-pick-row {
        position: absolute;
        right: 10px;
        top: 50%;
        transform: translateY(-38%);
        width: 52px;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 7px;
    }

    .tg-pick-badge {
        width: 40px;
        height: 40px;
        min-height: 40px;
        padding: 0;
        border-radius: 999px;
        font-size: 15px;
        background: rgba(245, 166, 35, 0.10);
        border: 1px solid rgba(245, 166, 35, 0.55);
        color: #f5a623;
    }

    .tg-odds-badge {
        width: 54px;
        height: 28px;
        min-height: 28px;
        padding: 0;
        border-radius: 999px;
        font-size: 11px;
        background: rgba(22, 163, 74, 0.12);
        border: 1px solid rgba(22, 163, 74, 0.50);
        color: #22c55e;
    }

    .tg-share-box {
        padding: 12px;
        border-radius: 14px;
    }

    .tg-copy-btn,
    .tg-open-btn {
        width: 100%;
        height: 40px;
    }

    .tg-social-row {
        width: 100%;
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    .tg-social-row a {
        width: 100%;
        min-height: 38px;
    }
}

/* EXTRA SMALL MOBILE */
@media (max-width: 430px) {

    .tg-page {
        padding-left: 5px;
        padding-right: 5px;
    }

    .tg-box {
        padding: 10px;
    }

    .tg-ticket-card {
        padding: 12px 62px 12px 11px;
        min-height: 108px;
        border-radius: 14px;
    }

    .tg-ticket-card::after {
        right: 58px;
        top: 50px;
        bottom: 16px;
    }

    .tg-ticket-league {
        font-size: 12px;
    }

    .tg-ticket-date {
        font-size: 11px;
    }

    .tg-ticket-teams {
        grid-template-columns: minmax(0, 1fr) 28px minmax(0, 1fr) !important;
        gap: 5px !important;
        margin-top: 14px !important;
    }

    .tg-ticket-team {
        grid-template-columns: 28px minmax(0, 1fr);
        gap: 5px;
    }

    .tg-ticket-team:last-child {
        grid-template-columns: minmax(0, 1fr) 28px;
    }

    .tg-ticket-team img {
        width: 28px;
        height: 28px;
    }

    .tg-ticket-team strong {
        font-size: 10px;
    }

    .tg-vs {
        width: 26px;
        height: 26px;
        font-size: 9px;
    }

    .tg-ticket-pick-row {
        right: 8px;
        width: 48px;
        gap: 6px;
    }

    .tg-pick-badge {
        width: 36px;
        height: 36px;
        min-height: 36px;
        font-size: 14px;
    }

    .tg-odds-badge {
        width: 50px;
        height: 26px;
        min-height: 26px;
        font-size: 10px;
    }

    .tg-ticket-top {
        padding: 11px 12px;
    }

    .tg-ticket-top h3 {
        font-size: 16px;
    }

    .tg-ticket-top strong {
        font-size: 24px;
    }
}