/* ============================================================
   كأس العالم 2026 — التنسيقات
   نمط واجهة الطقس: خلفية فاتحة، بطاقات بيضاء نظيفة، حواف دائرية،
   أرقام كبيرة، مساحات بيضاء واسعة، ألوان هادئة.
   ============================================================ */

.wc2026 {
    /* لوحة فاتحة مستوحاة من واجهة الطقس */
    --wc-bg:        #f4f6fb;   /* خلفية عامة فاتحة */
    --wc-surface:   #ffffff;   /* بطاقات بيضاء */
    --wc-surface-2: #f7f9fc;   /* صناديق داخلية */
    --wc-ink:       #1c2430;   /* نص أساسي داكن */
    --wc-ink-soft:  #5a6676;   /* نص ثانوي */
    --wc-ink-dim:   #9aa4b2;   /* نص خافت */
    --wc-line:      #e9edf3;   /* حدود فاتحة */
    --wc-line-soft: #f0f3f8;

    /* لمسات لونية هادئة */
    --wc-accent:  #2f6bff;   /* أزرق سماوي للطقس */
    --wc-accent-2:#5aa9ff;
    --wc-warm:    #ff9a3d;   /* برتقالي دافئ (شمس) */
    --wc-live:    #ff4d6d;   /* أحمر/وردي للمباشر */
    --wc-good:    #16a34a;   /* أخضر للتأهل */

    --wc-radius:    22px;
    --wc-radius-sm: 16px;
    --wc-shadow:    0 10px 30px rgba(31, 45, 71, .08);
    --wc-shadow-sm: 0 4px 14px rgba(31, 45, 71, .06);

    direction: rtl;
    text-align: right;
    font-family: "Cairo", "Tahoma", "Segoe UI", system-ui, sans-serif;
    color: var(--wc-ink);
    line-height: 1.6;

    background: var(--wc-bg);
    padding: 20px;
    border-radius: var(--wc-radius);
}

.wc2026 * { box-sizing: border-box; }

/* البطاقة البيضاء النظيفة */
.wc2026-card {
    background: var(--wc-surface);
    border: 1px solid var(--wc-line);
    border-radius: var(--wc-radius);
    margin: 0 0 16px;
    overflow: hidden;
    box-shadow: var(--wc-shadow-sm);
}
.wc2026-card:last-child { margin-bottom: 0; }

.wc2026-card-head {
    font-weight: 800;
    font-size: 1.02rem;
    letter-spacing: .1px;
    color: var(--wc-ink);
    padding: 18px 20px 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ====== العد التنازلي ====== */
.wc2026-countdown { text-align: center; }
.wc2026-countdown .wc2026-card-head { justify-content: center; }

.wc2026-countdown-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    padding: 12px 20px 24px;
}
.wc2026-cd-box {
    background: var(--wc-surface-2);
    border: 1px solid var(--wc-line-soft);
    border-radius: var(--wc-radius-sm);
    padding: 18px 6px;
    transition: transform .2s ease, box-shadow .2s ease;
}
.wc2026-cd-box:hover { transform: translateY(-2px); box-shadow: var(--wc-shadow-sm); }
.wc2026-cd-num {
    display: block;
    font-size: 2.6rem;
    font-weight: 800;
    color: var(--wc-accent);
    line-height: 1;
    font-variant-numeric: tabular-nums;
}
.wc2026-cd-lbl {
    display: block;
    margin-top: 8px;
    font-size: .78rem;
    color: var(--wc-ink-soft);
    font-weight: 600;
}

/* ====== المباريات ====== */
.wc2026-match-list { list-style: none; margin: 0; padding: 8px; }
.wc2026-match {
    background: var(--wc-surface);
    border: 1px solid var(--wc-line);
    border-radius: var(--wc-radius-sm);
    padding: 14px 16px;
    margin-bottom: 10px;
    transition: box-shadow .2s ease, transform .2s ease;
}
.wc2026-match:last-child { margin-bottom: 0; }
.wc2026-match:hover { box-shadow: var(--wc-shadow-sm); transform: translateY(-1px); }
.wc2026-match.live {
    border-color: rgba(255, 77, 109, .35);
    background: linear-gradient(90deg, rgba(255, 77, 109, .06), var(--wc-surface) 60%);
}

.wc2026-match-meta {
    display: flex;
    justify-content: space-between;
    font-size: .76rem;
    color: var(--wc-ink-dim);
    margin-bottom: 10px;
    font-weight: 600;
}

.wc2026-match-main {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 10px;
}
.wc2026-team { display: flex; align-items: center; gap: 9px; font-weight: 700; }
.wc2026-home { justify-content: flex-start; }
.wc2026-away { justify-content: flex-end; }
.wc2026-flag { font-size: 1.7rem; line-height: 1; }
.wc2026-tname { font-size: .95rem; color: var(--wc-ink); }

.wc2026-score {
    background: var(--wc-ink);
    color: #fff;
    border-radius: 13px;
    padding: 7px 14px;
    font-weight: 800;
    font-size: 1.12rem;
    min-width: 70px;
    text-align: center;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}
.wc2026-score .wc2026-sep { margin: 0 5px; opacity: .5; }
.wc2026-time { font-size: .9rem; font-weight: 700; color: var(--wc-accent); }

.wc2026-match-foot { margin-top: 10px; text-align: center; }
.wc2026-badge {
    display: inline-block;
    font-size: .72rem;
    font-weight: 700;
    padding: 4px 14px;
    border-radius: 30px;
}
.wc2026-badge-live { background: var(--wc-live); color: #fff; animation: wc2026-pulse 1.5s infinite; }
.wc2026-badge-done { background: var(--wc-surface-2); color: var(--wc-ink-soft); border: 1px solid var(--wc-line); }
.wc2026-badge-soon { background: rgba(47, 107, 255, .1); color: var(--wc-accent); }

@keyframes wc2026-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(255, 77, 109, .45); }
    50% { box-shadow: 0 0 0 7px rgba(255, 77, 109, 0); }
}

/* ====== المجموعات ====== */
.wc2026-groups-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
    gap: 12px;
    padding: 12px 16px 18px;
}
.wc2026-group-box {
    background: var(--wc-surface-2);
    border: 1px solid var(--wc-line-soft);
    border-radius: var(--wc-radius-sm);
    overflow: hidden;
    transition: transform .2s ease, box-shadow .2s ease;
}
.wc2026-group-box:hover { transform: translateY(-2px); box-shadow: var(--wc-shadow-sm); }
.wc2026-group-title {
    font-weight: 800;
    padding: 11px 14px;
    color: var(--wc-accent);
    border-bottom: 1px solid var(--wc-line);
    background: var(--wc-surface);
}
.wc2026-group-box ul { list-style: none; margin: 0; padding: 8px 14px 12px; }
.wc2026-group-box li {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 6px 0;
    font-size: .92rem;
    color: var(--wc-ink-soft);
}

/* ====== الجداول ====== */
.wc2026-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: .9rem;
    padding: 4px 10px 10px;
}
.wc2026-table th,
.wc2026-table td {
    padding: 11px 8px;
    text-align: center;
    border-bottom: 1px solid var(--wc-line-soft);
}
.wc2026-table thead th {
    color: var(--wc-ink-dim);
    font-weight: 700;
    font-size: .8rem;
    border-bottom: 1px solid var(--wc-line);
}
.wc2026-table tbody tr { transition: background .15s ease; }
.wc2026-table tbody tr:hover { background: var(--wc-surface-2); }
.wc2026-td-team {
    text-align: right !important;
    display: flex;
    align-items: center;
    gap: 9px;
    font-weight: 700;
    color: var(--wc-ink);
    padding-right: 14px !important;
}
.wc2026-table tr.wc2026-qualify { background: rgba(22, 163, 74, .06); }
.wc2026-table tr.wc2026-qualify .wc2026-td-team { position: relative; }
.wc2026-table tr.wc2026-qualify .wc2026-td-team::before {
    content: '';
    position: absolute;
    right: 2px;
    top: 50%;
    transform: translateY(-50%);
    width: 4px; height: 58%;
    border-radius: 4px;
    background: var(--wc-good);
}
.wc2026-table td b { color: var(--wc-ink); }

.wc2026-note {
    font-size: .8rem;
    color: var(--wc-ink-dim);
    padding: 4px 20px 16px;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 7px;
}
.wc2026-dot-q {
    width: 12px; height: 12px;
    border-radius: 4px;
    background: var(--wc-good);
    display: inline-block;
}

/* ====== الأدوار الإقصائية ====== */
.wc2026-knockout { list-style: none; margin: 0; padding: 8px; }
.wc2026-knockout li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 16px;
    margin-bottom: 8px;
    background: var(--wc-surface-2);
    border: 1px solid var(--wc-line-soft);
    border-radius: var(--wc-radius-sm);
}
.wc2026-knockout li:last-child { margin-bottom: 0; }
.wc2026-ko-round { font-weight: 800; color: var(--wc-ink); }
.wc2026-ko-dates { color: var(--wc-ink-soft); font-size: .88rem; }

/* ====== معلومات ====== */
.wc2026-info-list { list-style: none; margin: 0; padding: 8px; }
.wc2026-info-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 13px 16px;
    margin-bottom: 7px;
    background: var(--wc-surface-2);
    border: 1px solid var(--wc-line-soft);
    border-radius: 13px;
    font-size: .92rem;
}
.wc2026-info-list li:last-child { margin-bottom: 0; }
.wc2026-info-list span { color: var(--wc-ink-soft); }
.wc2026-info-list b { color: var(--wc-ink); font-weight: 800; }

/* ====== اللوحة الشاملة ====== */
.wc2026-hub-header {
    text-align: center;
    padding: 10px 18px 22px;
}
.wc2026-hub-header h2 {
    margin: 0 0 8px;
    font-size: 1.9rem;
    font-weight: 800;
    color: var(--wc-ink);
}
.wc2026-hub-header p { margin: 0; color: var(--wc-ink-soft); }

.wc2026-empty {
    padding: 22px;
    color: var(--wc-ink-dim);
    text-align: center;
}

/* شارة التحديث التلقائي */
.wc2026-sync-pill {
    margin-right: auto;
    background: rgba(47, 107, 255, .1);
    color: var(--wc-accent);
    font-size: .68rem;
    font-weight: 700;
    padding: 3px 10px 3px 16px;
    border-radius: 30px;
    position: relative;
}
.wc2026-sync-pill::before {
    content: '';
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    width: 7px; height: 7px;
    border-radius: 50%;
    background: var(--wc-good);
    animation: wc2026-blink 1.5s infinite;
}
@keyframes wc2026-blink {
    0%, 100% { opacity: 1; }
    50% { opacity: .35; }
}

/* ====== تخطيطات الأعمدة (للأكواد المركّبة) ====== */
.wc2026-cols-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 16px;
}
.wc2026-cols-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}
.wc2026-cols-3 .wc2026-card,
.wc2026-cols-2 .wc2026-card { margin-bottom: 0; }

/* قائمة مختصرة (الملاعب في اللوحة المنظّمة) */
.wc2026-mini-list { list-style: none; margin: 0; padding: 8px; }
.wc2026-mini-list li {
    display: flex;
    flex-direction: column;
    padding: 10px 12px;
    margin-bottom: 7px;
    background: var(--wc-surface-2);
    border: 1px solid var(--wc-line-soft);
    border-radius: 12px;
}
.wc2026-mini-list li:last-child { margin-bottom: 0; }
.wc2026-mini-main { font-weight: 700; font-size: .9rem; color: var(--wc-ink); }
.wc2026-mini-sub { font-size: .78rem; color: var(--wc-ink-soft); margin-top: 2px; }

/* على الجوال: الأعمدة تتكدّس عمودياً */
@media (max-width: 720px) {
    .wc2026-cols-3, .wc2026-cols-2 { grid-template-columns: 1fr; }
}

/* زر تحميل المزيد (الأرشيف) */
.wc2026-more-wrap { padding: 4px 10px 14px; text-align: center; }
.wc2026-more-btn {
    display: inline-block;
    background: var(--wc-accent);
    color: #fff;
    border: none;
    border-radius: 30px;
    padding: 11px 26px;
    font-family: inherit;
    font-weight: 700;
    font-size: .92rem;
    cursor: pointer;
    transition: filter .2s ease, transform .15s ease;
}
.wc2026-more-btn:hover { filter: brightness(1.08); }
.wc2026-more-btn:active { transform: scale(.97); }
.wc2026-more-btn:disabled { opacity: .65; cursor: default; }

/* احترام تقليل الحركة */
@media (prefers-reduced-motion: reduce) {
    .wc2026 *, .wc2026 *::before, .wc2026 *::after {
        animation: none !important;
        transition: none !important;
    }
}

/* استجابة الجوال */
@media (max-width: 480px) {
    .wc2026 { padding: 14px; border-radius: 18px; }
    .wc2026-countdown-grid { gap: 8px; padding: 8px 14px 18px; }
    .wc2026-cd-num { font-size: 2rem; }
    .wc2026-tname { font-size: .84rem; }
    .wc2026-flag { font-size: 1.4rem; }
    .wc2026-hub-header h2 { font-size: 1.45rem; }
}
