/* ==========================================================================
   TrueSpt MatchCenter v6.0.0 Upgrade Styles
   RTL Arabic | Light & Dark Theme Ready | Zero CLS
   ========================================================================== */

/* 1. Key Takeaways Box ("الخلاصة في 30 ثانية") */
.ts-v60-takeaways {
    background: linear-gradient(135deg, var(--emerald-soft), var(--surface-alt));
    border: 1px solid var(--border);
    border-right: 4px solid var(--emerald);
    border-radius: var(--radius);
    padding: 16px 18px;
    margin: 0 0 22px;
}
.ts-v60-tk-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}
.ts-v60-tk-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--emerald);
    color: #FFFFFF;
    font-size: 0.82rem;
    font-weight: 800;
    padding: 3px 11px;
    border-radius: 999px;
}
.ts-v60-tk-sub {
    font-size: 0.78rem;
    color: var(--text-light);
    font-weight: 700;
}
.ts-v60-tk-list {
    margin: 0;
    padding: 0 18px 0 0;
    display: grid;
    gap: 7px;
}
.ts-v60-tk-list li {
    font-size: 0.94rem;
    font-weight: 700;
    color: var(--text);
    line-height: 1.55;
}

/* 2. Smart In-Article Ad Container (CLS Safe) */
.ts-v60-inarticle-ad {
    margin: 22px auto;
    text-align: center;
    max-width: 100%;
    overflow: hidden;
    border-radius: var(--radius-sm);
}
.ts-v60-inarticle-ad:empty {
    display: none;
    margin: 0;
}

/* 3. Auto-Load Next Post Sentinel & Divider */
.ts-v60-next-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0 0 18px;
    color: var(--emerald);
    font-size: 0.82rem;
    font-weight: 900;
}
.ts-v60-next-divider::before,
.ts-v60-next-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}
.ts-v60-loaded-article {
    margin-top: 28px;
    animation: tsV60FadeIn 0.35s ease;
}
@keyframes tsV60FadeIn {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}
.ts-v60-autoload-status {
    text-align: center;
    padding: 16px;
    color: var(--text-muted);
    font-size: 0.88rem;
    font-weight: 700;
}
.ts-v60-spinner {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2.5px solid var(--border);
    border-top-color: var(--emerald);
    border-radius: 50%;
    animation: tsV60Spin 0.7s linear infinite;
    vertical-align: middle;
    margin-left: 8px;
}
@keyframes tsV60Spin {
    to { transform: rotate(360deg); }
}

/* 4. Reading Time Remaining Floating Chip */
.ts-v60-read-left {
    position: fixed;
    bottom: 78px;
    left: 18px;
    z-index: 790;
    background: var(--dark-bar);
    color: #F8FAFC;
    border: 1px solid rgba(0, 200, 117, 0.45);
    padding: 6px 13px;
    border-radius: 999px;
    font-size: 0.76rem;
    font-weight: 800;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.25s ease, transform 0.25s ease;
    pointer-events: none;
}
.ts-v60-read-left.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* 5. Interactive Score Predictor Widget */
.ts-v60-predictor {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px;
    margin: 22px 0;
    box-shadow: var(--shadow);
}
.ts-pred-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}
.ts-pred-badge {
    background: var(--emerald);
    color: #FFFFFF;
    font-size: 0.8rem;
    font-weight: 800;
    padding: 4px 12px;
    border-radius: 999px;
}
.ts-pred-league {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--text-muted);
}
.ts-pred-points {
    font-size: 0.8rem;
    background: var(--blue-soft);
    color: var(--blue);
    padding: 4px 10px;
    border-radius: 8px;
    font-weight: 800;
}
.ts-pred-board {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 14px;
    background: var(--surface-alt);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 16px 12px;
}
.ts-pred-team {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}
.ts-pred-tname {
    font-weight: 900;
    font-size: 1rem;
    text-align: center;
}
.ts-pred-stepper {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 4px 8px;
}
.ts-step-btn {
    width: 30px;
    height: 30px;
    border: none;
    border-radius: 7px;
    background: var(--emerald-soft);
    color: var(--emerald);
    font-size: 1.1rem;
    font-weight: 900;
    cursor: pointer;
    font-family: inherit;
}
.ts-step-btn:hover {
    background: var(--emerald);
    color: #FFFFFF;
}
.ts-step-val {
    min-width: 24px;
    text-align: center;
    font-size: 1.25rem;
    font-weight: 900;
}
.ts-pred-vs {
    font-weight: 900;
    color: var(--text-light);
    font-size: 0.9rem;
}
.ts-pred-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 14px;
    flex-wrap: wrap;
}
.ts-pred-submit {
    background: var(--emerald);
    color: #FFFFFF;
    border: none;
    border-radius: 9px;
    padding: 10px 20px;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 800;
    cursor: pointer;
    transition: background 0.2s ease;
}
.ts-pred-submit:hover {
    background: var(--emerald-dark);
}
.ts-pred-submit:disabled {
    opacity: 0.65;
    cursor: default;
}
.ts-pred-msg {
    font-size: 0.84rem;
    font-weight: 700;
    color: var(--emerald);
}
.ts-pred-stats {
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px dashed var(--border);
}
.ts-pred-stat-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-bottom: 6px;
    gap: 6px;
    flex-wrap: wrap;
}
.ts-pred-bar {
    display: flex;
    height: 9px;
    border-radius: 999px;
    overflow: hidden;
    background: var(--border);
}
.ts-bar-h { background: var(--emerald); transition: width 0.4s ease; }
.ts-bar-d { background: #94A3B8; transition: width 0.4s ease; }
.ts-bar-a { background: var(--blue); transition: width 0.4s ease; }
.ts-pred-total {
    margin-top: 6px;
    font-size: 0.76rem;
    color: var(--text-light);
    text-align: left;
}

/* 6. Shareable Card Button & Modal */
.ts-v60-card-trigger {
    background: linear-gradient(135deg, #0A1224, #1E293B) !important;
    color: #00C875 !important;
    border: 1px solid rgba(0, 200, 117, 0.5) !important;
}
.ts-v60-modal {
    position: fixed;
    inset: 0;
    z-index: 1200;
    background: rgba(10, 18, 36, 0.84);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}
.ts-v60-modal[hidden] {
    display: none;
}
.ts-v60-modal-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    width: 100%;
    max-width: 680px;
    padding: 18px;
    box-shadow: 0 24px 50px rgba(0, 0, 0, 0.45);
}
.ts-v60-modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}
.ts-v60-modal-close {
    background: var(--surface-alt);
    border: 1px solid var(--border);
    color: var(--text);
    width: 34px;
    height: 34px;
    border-radius: 50%;
    font-size: 1.3rem;
    cursor: pointer;
    line-height: 1;
}
.ts-v60-canvas-wrap {
    border-radius: var(--radius-sm);
    overflow: hidden;
    border: 1px solid var(--border);
    background: #0A1224;
}
#ts-v60-share-canvas {
    width: 100%;
    height: auto;
    display: block;
}
.ts-v60-modal-actions {
    display: flex;
    gap: 10px;
    margin-top: 14px;
    flex-wrap: wrap;
}
.ts-v60-btn-primary,
.ts-v60-btn-secondary {
    flex: 1;
    min-width: 160px;
    padding: 11px 16px;
    border-radius: 9px;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 800;
    cursor: pointer;
    border: none;
}
.ts-v60-btn-primary {
    background: var(--emerald);
    color: #FFFFFF;
}
.ts-v60-btn-secondary {
    background: var(--surface-alt);
    color: var(--text);
    border: 1px solid var(--border);
}

/* 7. Club & Player Hub (tag.php) */
.ts-v60-hub-hero {
    background: linear-gradient(135deg, #0A1224 0%, #152444 100%);
    color: #F8FAFC;
    border-radius: var(--radius);
    padding: 24px;
    margin: 16px 0 24px;
    border: 1px solid rgba(0, 200, 117, 0.28);
}
.ts-hub-hero-main {
    display: flex;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
}
.ts-hub-emblem {
    width: 68px;
    height: 68px;
    border-radius: 16px;
    background: linear-gradient(135deg, #00C875, #059669);
    color: #0A1224;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.55rem;
    font-weight: 900;
    flex-shrink: 0;
    box-shadow: 0 8px 20px rgba(0, 200, 117, 0.3);
}
.ts-hub-meta {
    flex: 1;
    min-width: 220px;
}
.ts-hub-kicker {
    display: inline-block;
    font-size: 0.76rem;
    font-weight: 800;
    color: #34D399;
    margin-bottom: 4px;
}
.ts-hub-title {
    margin: 0 0 6px;
    font-size: 1.65rem;
    font-weight: 900;
    color: #FFFFFF;
}
.ts-hub-desc {
    margin: 0;
    color: #CBD5E1;
    font-size: 0.92rem;
}
.ts-hub-stats-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-top: 18px;
    padding-top: 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    flex-wrap: wrap;
}
.ts-hub-stat {
    display: inline-flex;
    align-items: baseline;
    gap: 6px;
}
.ts-hub-stat strong {
    font-size: 1.35rem;
    color: #00C875;
}
.ts-hub-stat span {
    font-size: 0.85rem;
    color: #94A3B8;
}
.ts-hub-follow-btn {
    background: #00C875;
    color: #0A1224;
    border: none;
    border-radius: 999px;
    padding: 9px 18px;
    font-family: inherit;
    font-size: 0.86rem;
    font-weight: 900;
    cursor: pointer;
    transition: transform 0.15s ease, opacity 0.2s ease;
}
.ts-hub-follow-btn.is-following {
    background: rgba(255, 255, 255, 0.14);
    color: #FFFFFF;
    border: 1px solid rgba(255, 255, 255, 0.3);
}
.ts-hub-tabs {
    display: flex;
    gap: 8px;
    margin-top: 16px;
    flex-wrap: wrap;
}
.ts-hub-tab {
    padding: 7px 14px;
    border-radius: 8px;
    font-size: 0.84rem;
    font-weight: 800;
    background: rgba(255, 255, 255, 0.08);
    color: #CBD5E1;
}
.ts-hub-tab.is-active,
.ts-hub-tab:hover {
    background: #00C875;
    color: #0A1224;
}
.ts-hub-spotlight {
    display: grid;
    grid-template-columns: 1.15fr 1fr;
    gap: 20px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    margin-bottom: 22px;
    box-shadow: var(--shadow);
}
.ts-hub-spot-img img {
    width: 100%;
    height: 100%;
    min-height: 240px;
    object-fit: cover;
}
.ts-hub-spot-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 10px;
}
.ts-hub-spot-body h2 {
    margin: 0;
    font-size: 1.3rem;
    line-height: 1.4;
}
.ts-hub-spot-body p {
    margin: 0;
    font-size: 0.92rem;
    color: var(--text-muted);
}

@media (max-width: 768px) {
    .ts-hub-spotlight {
        grid-template-columns: 1fr;
    }
    .ts-v60-read-left {
        bottom: 68px;
        left: 12px;
    }
}
