/* Version: 6.0.0 — Minimal Redesign */
:root {
    --tc-bg-primary: #ffffff;
    --tc-bg-secondary: #f7f7f5;
    --tc-bg-card: #ffffff;
    --tc-text-primary: #ffffff;
    --tc-text-secondary: #888888;
    --tc-text-dark: #111111;
    --tc-text-muted: #555555;
    --tc-border-color: rgba(0, 0, 0, 0.08);
    --tc-shadow: rgba(0, 0, 0, 0.06);
    --tc-shadow-light: rgba(0, 0, 0, 0.03);

    --tc-primary: #FF5C35;
    --tc-accent: #FF1F3D;
    --tc-success: #3DAA6B;
    --tc-warning: #F59E0B;
    --tc-danger: #FF1F3D;
    --tc-special: #F59E0B;

    --tc-border-radius: 16px;
    --tc-border-radius-sm: 8px;
    --tc-border-radius-pill: 999px;
    --tc-gap: 10px;
    --tc-padding: 16px;
    --tc-padding-sm: 10px;

    --tc-transition: all 0.18s ease;
    --tc-transition-slow: all 0.28s ease;
}

/* ─── Brand List ─── */
.tc-brand-list {
    display: flex;
    flex-direction: column;
    gap: var(--tc-gap);
    margin: 1.5rem auto;
}

/* ─── Card ─── */
.tc-card {
    position: relative;
    display: flex;
    align-items: center;
    gap: 14px;
    background: var(--tc-bg-card);
    padding: var(--tc-padding);
    border-radius: var(--tc-border-radius);
    border: 0.5px solid var(--tc-border-color);
    box-shadow: 0 1px 6px var(--tc-shadow-light);
    transition: box-shadow 0.2s ease, transform 0.2s ease;
    flex-wrap: nowrap;
}

.tc-card:hover {
    box-shadow: 0 4px 20px var(--tc-shadow);
    transform: translateY(-1px);
}

/* Rank #1 highlight */
.tc-card[data-rank="1"] {
    border: 1.5px solid rgba(255, 92, 53, 0.28);
    background: #ffffff;
    box-shadow: 0 2px 16px rgba(255, 92, 53, 0.08);
}

/* ─── Rank Badge ─── */
.tc-rank {
    position: absolute;
    top: -10px;
    left: 14px;
    background: var(--tc-primary);
    color: #ffffff;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.06em;
    padding: 2px 10px;
    border-radius: var(--tc-border-radius-pill);
    line-height: 18px;
    white-space: nowrap;
}

.tc-card[data-rank="1"] .tc-rank {
    background: linear-gradient(135deg, var(--tc-primary), var(--tc-accent));
    content: "Top Pick";
}

/* ─── Logo ─── */
.tc-logo {
    width: 56px;
    min-width: 56px;
    height: 56px;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    background: #e4e4e4;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-weight: 900;
    flex-shrink: 0;
}

.tc-logo img {
    padding: 6px;
    height: 100% !important;
    width: 100%;
    object-fit: contain;
    object-position: center;
    position: absolute;
    inset: 0;
    box-sizing: border-box;
    background: inherit !important;
    margin: auto;
}

/* ─── Info ─── */
.tc-info {
    flex: 1;
    min-width: 0;
    padding-left: 2px;
}

.tc-info .h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--tc-text-dark);
    margin: 0 0 3px;
    text-align: left;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tc-info button {
    background: none;
    border: none;
    padding: 0;
    font: inherit;
    font-weight: 600;
    color: var(--tc-text-dark) !important;
    cursor: pointer;
    text-align: left;
}

.tc-info button:hover {
    opacity: 0.75;
}

.tc-info p {
    font-size: 13px;
    font-weight: 500;
    color: var(--tc-text-muted) !important;
    background: none;
    border-radius: 0;
    padding: 0;
    margin: 0 0 4px;
    min-width: 0;
    max-width: none;
}

.tc-info p::before {
    content: none;
}

.tc-rating {
    display: flex;
    align-items: center;
    gap: 2px;
    font-size: 12px;
    color: var(--tc-warning) !important;
    margin-top: 2px;
}

/* ─── Bottom Actions ─── */
.tc-info-bottom {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

/* ─── Buttons ─── */
button {
    background: none;
    border: none;
    padding: 0;
    font: inherit;
    cursor: pointer;
    outline: none;
}

.tc-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 18px;
    border-radius: var(--tc-border-radius-pill);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    text-decoration: none !important;
    transition: var(--tc-transition);
    white-space: nowrap;
}

.tc-btn.visit,
.tc-btn[onclick] {
    background: var(--tc-primary);
    color: #ffffff !important;
}

.tc-card[data-rank="1"] .tc-btn.visit {
    background: linear-gradient(135deg, var(--tc-primary), var(--tc-accent));
}

.tc-btn:hover {
    opacity: 0.88;
    transform: scale(1.03);
}

.tc-btn.review {
    background: var(--tc-bg-secondary) !important;
    color: var(--tc-text-muted) !important;
    border: 0.5px solid var(--tc-border-color) !important;
}

/* ─── Toggle Details ─── */
.tc-toggle-details {
    cursor: pointer;
    width: 100%;
    background: none;
    border: none;
    border-top: 0.5px solid var(--tc-border-color);
    color: var(--tc-text-secondary);
    font-size: 12px;
    font-weight: 600;
    padding: 10px 0 0;
    margin-top: 12px;
    text-align: center;
    transition: color 0.15s;
}

.tc-toggle-details:hover {
    color: var(--tc-primary);
}

.tc-details {
    width: 100%;
    padding-top: 12px;
}

.tc-details-info-items {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0 24px;
}

.tc-details-info-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 6px 0;
    border-bottom: 0.5px solid var(--tc-border-color);
    font-size: 13px;
}

.tc-details-info-name strong {
    color: var(--tc-text-dark) !important;
    font-weight: 600;
}

.tc-details-info-value {
    color: var(--tc-text-muted) !important;
    font-size: 13px;
}

/* ─── Floating Banner ─── */
.tc-floating-banner {
    max-width: 900px;
    border-radius: var(--tc-border-radius);
    width: 100%;
    margin: 0.8rem auto;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    /* background: #111111; */
    color: #ffffff;
    padding: 12px 16px;
    z-index: 9999;
    transform: translateY(100%);
    opacity: 0;
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1),
        opacity 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
    will-change: transform, opacity;
    border-top: 0.5px solid rgba(255, 255, 255, 0.08);
}

.tc-floating-banner.show {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
}

.banner-container {
    /* max-width: 720px;
    width: 100%; */
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.tc-banner-content {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.tc-banner-content img {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    object-fit: contain;
    background: #222 !important;
    flex-shrink: 0;
    cursor: pointer;
}

.tc-banner-info strong {
    display: block;
    font-size: 16px;
    font-weight: 600;
    color: #ffffff;
    cursor: pointer;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tc-banner-info span {
    display: block;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.5);
    background: rgb(37 37 37 / 50%);
    padding: 4px 8px;
    border-radius: 1rem;
    margin-top: 1px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tc-banner-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.tc-banner-actions .tc-btn.visit {
    background: var(--tc-primary);
    border-radius: var(--tc-border-radius-pill);
    padding: 7px 16px;
    font-size: 12px;
    font-weight: 700;
    color: #ffffff !important;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.tc-banner-close {
    background: rgba(255, 255, 255, 0.1) !important;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    width: 30px;
    height: 30px;
    border-radius: var(--tc-border-radius-pill);
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s;
}

.tc-banner-close:hover {
    background: rgba(255, 255, 255, 0.18) !important;
}

/* ─── States ─── */
.tc-loading {
    text-align: center;
    padding: 2rem;
    color: var(--tc-text-muted);
}

.tc-loading .tc-spinner {
    width: 32px;
    height: 32px;
    border: 2px solid var(--tc-border-color);
    border-top-color: var(--tc-primary);
    border-radius: 50%;
    animation: tc-spin 0.8s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes tc-spin {
    to {
        transform: rotate(360deg);
    }
}

.tc-error,
.tc-no-data,
.tc-no-matches {
    text-align: center;
    padding: 2rem;
    color: var(--tc-text-secondary);
    font-size: 14px;
}

.tc-error-message {
    text-align: center;
    padding: 1.5rem;
    background: #fff5f5;
    border: 0.5px solid rgba(255, 31, 61, 0.2);
    border-radius: var(--tc-border-radius);
    color: var(--tc-danger);
    font-size: 14px;
}

.tc-retry-btn {
    margin-top: 1rem;
    padding: 8px 20px;
    background: var(--tc-primary);
    color: #fff;
    border: none;
    border-radius: var(--tc-border-radius-pill);
    cursor: pointer;
    font-weight: 700;
    font-size: 13px;
    transition: var(--tc-transition);
}

.tc-retry-btn:hover {
    opacity: 0.85;
}

/* ─── Matches ─── */
.matches h2 {
    text-align: center;
    padding: 1.5rem 1rem;
    font-size: 18px;
    font-weight: 600;
    color: var(--tc-text-dark);
}

.matches-container {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    max-width: 100%;
    margin: 0 auto;
    justify-content: center;
}

.match-card {
    max-width: 300px;
    width: 100%;
    background: var(--tc-bg-card);
    border: 0.5px solid var(--tc-border-color);
    border-radius: var(--tc-border-radius);
    padding: 16px;
    box-shadow: 0 1px 6px var(--tc-shadow-light);
    transition: box-shadow 0.2s ease;
    display: flex;
    flex-direction: column;
}

.match-card:hover {
    box-shadow: 0 4px 16px var(--tc-shadow);
}

.match-card p {
    margin: 4px 0;
    font-size: 11px;
    text-align: center;
    color: var(--tc-text-muted);
}

.match-date {
    text-align: center;
    font-size: 12px;
    color: var(--tc-text-secondary);
    margin-bottom: 4px;
}

.match-league {
    text-align: center;
    font-style: italic;
    font-size: 11px;
    color: var(--tc-text-secondary);
    margin-bottom: 10px;
}

.teams {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 24px;
    margin: 10px 0;
}

.team {
    max-width: 100px;
    width: 100%;
    text-align: center;
}

.team img {
    width: 40px;
    height: 40px;
    margin: 0 auto 6px;
    display: block;
}

.team span {
    display: block;
    font-weight: 600;
    font-size: 13px;
    color: var(--tc-text-dark);
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    min-height: 40px;
}

.vs {
    font-size: 12px;
    font-weight: 700;
    color: var(--tc-text-secondary);
    letter-spacing: 0.05em;
}

.match-result {
    background: var(--tc-bg-secondary);
    border-radius: var(--tc-border-radius-sm);
    padding: 8px 12px;
    text-align: center;
    margin: 10px 0;
}

.match-result strong {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--tc-text-dark);
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
}

.match-odds {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 10px;
    padding: 6px 0;
}

.match-odds span {
    padding: 7px 12px;
    border-radius: var(--tc-border-radius-sm);
    font-weight: 700;
    font-size: 13px;
    min-width: 50px;
    text-align: center;
    border: 0.5px solid var(--tc-border-color);
    background: var(--tc-bg-secondary);
    color: var(--tc-text-dark);
    transition: var(--tc-transition);
    position: relative;
}

.match-odds span::after {
    content: attr(data-type);
    display: block;
    font-size: 9px;
    font-weight: 500;
    color: var(--tc-text-secondary);
    margin-top: 1px;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.match-odds span:hover {
    background: var(--tc-primary);
    color: #fff;
    border-color: var(--tc-primary);
    transform: translateY(-1px);
}

.match-odds span:hover::after {
    color: rgba(255, 255, 255, 0.7);
}

.visit-btn {
    display: block;
    background: var(--tc-primary);
    color: #ffffff;
    text-decoration: none !important;
    text-transform: uppercase;
    font-weight: 700;
    font-size: 12px;
    letter-spacing: 0.05em;
    padding: 10px 20px;
    text-align: center;
    border-radius: var(--tc-border-radius-pill);
    transition: var(--tc-transition);
    margin-top: auto;
}

.visit-btn:hover {
    opacity: 0.88;
    color: #fff;
}

/* ─── Brand Wrapper Layout ─── */
.brand-wrapper {
    display: flex;
    gap: 24px;
    align-items: flex-start;
}

.brand-wrapper .matches {
    max-width: 280px;
    width: 100%;
    order: 2;
}

.tc-brands-wrap {
    margin-top: 1rem;
    margin-bottom: 1rem;
}

.brand-wrapper .tc-brand-list {
    order: 1;
    flex: 1;
}

/* ─── Debug ─── */
.geo-debug {
    background: #1e1e1e;
    color: #d4d4d4 !important;
    padding: 12px;
    border-radius: var(--tc-border-radius-sm);
    margin-top: 16px;
    font-family: monospace;
    font-size: 11px;
}

.geo-debug summary {
    cursor: pointer;
    font-weight: 700;
}

.debug-content {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid #333;
}

/* ─── Responsive ─── */
@media (max-width: 768px) {
    .tc-details-info-items {
        grid-template-columns: 1fr;
    }

    .brand-wrapper {
        flex-direction: column;
    }

    .brand-wrapper .matches {
        max-width: 100%;
        order: -1;
    }
}

@media (max-width: 600px) {
    .tc-card {
        flex-wrap: wrap;
    }

    .tc-info .h3 {
        text-align: center;
    }

    .tc-info {
        text-align: center;
        width: 100%;
        padding: 0;
    }

    .tc-rating {
        justify-content: center;
    }

    .tc-info-bottom {
        width: 100%;
        justify-content: center;
    }

    .tc-btn.visit {
        width: 100%;
        text-align: center;
    }

    .banner-container {
        flex-wrap: wrap;
        justify-content: center;
        text-align: center;
    }

    .tc-banner-content {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .tc-info p {
        min-width: auto;
    }

    .match-odds {
        gap: 6px;
    }

    .match-odds span {
        padding: 6px 8px;
        font-size: 12px;
        min-width: 42px;
    }

    .teams {
        gap: 16px;
    }
}