/* ===== Elzem Match Schedule - Match View (match.php) v9.5 ===== */
/* تصميم احترافي مع نيون وتوهج وأنيميشن */

.match-page-wrap { max-width: var(--layout-width, 1200px); margin: 0 auto; }

/* ===== Breadcrumbs ===== */
.breadcrumbs {
    display: flex; flex-wrap: wrap; gap: 6px; align-items: center;
    font-size: 14px; margin-bottom: 18px;
    color: var(--team-name-color, #000);
    background: var(--card-bg, #fff);
    padding: 12px 18px;
    border-radius: var(--card-radius, 16px);
    border: 1px solid var(--border-color, #e0e0e0);
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
.breadcrumbs a {
    color: var(--team-name-color, #000);
    opacity: 0.7; text-decoration: none;
    transition: all var(--anim-speed, 0.3s) ease;
}
.breadcrumbs a:hover { opacity: 1; color: var(--neon-color, #00ffff); }
.breadcrumbs .sep { opacity: 0.4; margin: 0 4px; }
.breadcrumbs .current { font-weight: 700; }

/* ===== Hero Card ===== */
.hero-card {
    background: var(--card-bg, #fff);
    border: 1px solid var(--border-color, #e0e0e0);
    border-radius: var(--card-radius, 16px);
    padding: 32px;
    margin-bottom: 22px;
    box-shadow: 0 var(--card-shadow-y, 4px) var(--card-shadow-blur, 24px) rgba(0,0,0,0.08);
    position: relative;
    overflow: hidden;
}
.hero-card::before {
    content: '';
    position: absolute; top: 0; left: 0; right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--neon-color, #00ffff), var(--glow-color, #ff00ff));
}
body.neon-on .hero-card {
    box-shadow: 0 var(--card-shadow-y, 4px) var(--card-shadow-blur, 24px) rgba(0,0,0,0.08), 0 0 calc(var(--neon-blur, 15px) * 0.2) var(--neon-color);
}
.hero-teams {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 18px; flex-wrap: wrap; gap: 15px;
}
.hero-team {
    text-align: center; flex: 1; min-width: 120px;
    transition: transform var(--anim-speed, 0.3s) ease;
}
.hero-team:hover { transform: scale(1.05); }
.hero-team img {
    width: clamp(60px, 12vw, 100px);
    height: clamp(60px, 12vw, 100px);
    object-fit: contain;
    border-radius: 50%;
    margin-bottom: 10px;
    border: var(--logo-border-width, 0) solid var(--logo-border, transparent);
    background: #fff; padding: 4px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transition: all var(--anim-speed, 0.3s) ease;
}
body.neon-on .hero-team img:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1), 0 0 calc(var(--neon-blur, 15px) * 0.6) var(--neon-color);
}
.hero-team-name {
    font-size: clamp(16px, 3vw, 22px);
    font-weight: var(--team-name-weight, 600);
    color: var(--team-name-color, #000);
}
.hero-center {
    text-align: center;
    padding: 0 20px;
    min-width: 180px;
    flex: 1;
}
.hero-league {
    background: var(--competition-bg, #000);
    color: var(--competition-text, #fff);
    padding: 6px 18px;
    border-radius: 25px;
    font-size: 13px; font-weight: 700;
    margin-bottom: 12px;
    display: inline-block;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
body.neon-on .hero-league {
    box-shadow: 0 2px 8px rgba(0,0,0,0.15), 0 0 calc(var(--neon-blur, 15px) * 0.4) var(--neon-color);
}
.hero-status {
    padding: 8px 22px;
    border-radius: 25px;
    color: #fff;
    font-size: 15px; font-weight: bold;
    margin-bottom: 10px;
    display: inline-block;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
.status-live.hero-status,
.hero-status.status-live {
    animation: elzem-status-pulse 1.5s ease-in-out infinite;
}
@keyframes elzem-status-pulse {
    0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(46, 125, 50, 0.6); }
    50% { transform: scale(1.05); box-shadow: 0 0 0 12px rgba(46, 125, 50, 0); }
}
.hero-result {
    font-size: clamp(28px, 6vw, 40px);
    font-weight: 900;
    letter-spacing: 3px;
    color: var(--result-color, #000);
    text-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
body.neon-on .hero-result {
    text-shadow: 0 0 10px var(--neon-color), 0 2px 8px rgba(0,0,0,0.15);
}
.hero-time {
    color: var(--time-color, #000);
    font-size: 16px;
    margin-top: 8px;
    font-weight: 600;
}
.hero-round {
    color: var(--time-color, #666);
    font-size: 13px;
    margin-top: 4px;
}
.hero-footer {
    display: flex; justify-content: space-around;
    flex-wrap: wrap; gap: 12px;
    padding-top: 18px;
    border-top: 1px solid var(--border-color, #e0e0e0);
    margin-top: 12px;
}
.hero-info-item {
    display: flex; align-items: center; gap: 8px;
    color: var(--team-name-color, #000);
    font-size: 14px;
    padding: 6px 12px;
    border-radius: 8px;
    background: rgba(0,0,0,0.03);
    transition: all var(--anim-speed, 0.3s) ease;
}
body.anim-on .hero-info-item:hover {
    background: rgba(0,0,0,0.06);
    transform: translateY(-2px);
}
.hero-info-item i { color: var(--today-bg, #000); }

/* ===== Stream Section ===== */
.stream-section { margin-bottom: 22px; }
.servers-bar {
    display: flex; flex-wrap: wrap; gap: 10px;
    justify-content: center; margin-bottom: 15px;
}
.server-btn {
    background: var(--card-bg, #fff);
    color: var(--team-name-color, #000);
    border: 2px solid var(--today-bg, #000);
    padding: 10px 22px;
    border-radius: 50px;
    font-size: 14px; font-weight: bold;
    cursor: pointer;
    transition: all var(--anim-speed, 0.3s) ease;
    display: flex; align-items: center; gap: 8px;
    font-family: inherit;
}
body.anim-on .server-btn:hover:not(:disabled) {
    transform: translateY(-3px) scale(1.05);
}
body.neon-on .server-btn {
    border-color: var(--neon-color);
    box-shadow: 0 0 calc(var(--neon-blur, 15px) * 0.3) var(--neon-color);
}
.server-btn.active {
    background: var(--today-bg, #000);
    color: var(--card-bg, #fff);
    border-color: var(--today-bg, #000);
    box-shadow: 0 4px 12px rgba(0,0,0,0.25);
}
body.neon-on .server-btn.active {
    box-shadow: 0 0 calc(var(--neon-blur, 15px) * 0.8) var(--neon-color);
}
.server-btn:disabled { opacity: 0.5; cursor: not-allowed; }

.player-container {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    height: 0;
    background: #000;
    border-radius: var(--card-radius, 16px);
    overflow: hidden;
    border: 3px solid var(--border-color, #e0e0e0);
    box-shadow: 0 8px 24px rgba(0,0,0,0.2);
}
body.neon-on .player-container {
    border-color: var(--neon-color);
    box-shadow: 0 8px 24px rgba(0,0,0,0.2), 0 0 calc(var(--neon-blur, 15px) * 0.4) var(--neon-color);
}
.stream-frame {
    position: absolute; top: 0; left: 0;
    width: 100%; height: 100%;
}
.stream-frame iframe, .stream-frame video {
    width: 100%; height: 100%; border: none;
}
.stream-disabled-overlay {
    position: absolute; inset: 0;
    /* خلفية سوداء داكنة معتمة بالكامل — لا تظهر البث من خلفها */
    background: #000000;
    z-index: 100;
    display: flex; align-items: center; justify-content: center;
    /* لا حاجة للـ blur بعد الآن لأن الخلفية معتمة بالكامل */
}
.stream-disabled-box {
    background: linear-gradient(135deg, #c62828, #8b0000);
    color: white;
    padding: 30px 40px;
    border-radius: var(--card-radius, 16px);
    text-align: center;
    box-shadow: 0 8px 24px rgba(198, 40, 40, 0.4);
}
.controls-bar {
    display: flex; justify-content: center; gap: 15px;
    margin-top: 15px;
}
.ctrl-btn {
    background: var(--today-bg, #000);
    color: #fff; border: none;
    padding: 10px 28px;
    border-radius: var(--card-radius, 16px);
    cursor: pointer; font-weight: bold;
    display: flex; align-items: center; gap: 8px;
    font-family: inherit; font-size: 14px;
    transition: all var(--anim-speed, 0.3s) ease;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}
body.anim-on .ctrl-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.3);
}
body.neon-on .ctrl-btn {
    box-shadow: 0 4px 12px rgba(0,0,0,0.2), 0 0 calc(var(--neon-blur, 15px) * 0.3) var(--neon-color);
}

/* ===== Match Content (محرر المقال فوق البث) ===== */
.match-content-section {
    background: var(--card-bg, #fff);
    border: 1px solid var(--border-color, #e0e0e0);
    border-radius: var(--card-radius, 16px);
    padding: 28px;
    margin-bottom: 22px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.05);
    position: relative;
    overflow: hidden;
}
.match-content-section::before {
    content: '';
    position: absolute; top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--neon-color, #00ffff), var(--glow-color, #ff00ff));
}
.match-content-section h2 {
    font-size: 22px;
    color: var(--team-name-color, #000);
    margin: 0 0 18px 0;
    display: flex; align-items: center; gap: 10px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--border-color, #e0e0e0);
}
.match-content-section h2 i { color: var(--today-bg, #000); }
.match-content-body {
    font-size: 15px; line-height: 1.9;
    color: var(--time-color, #333);
}
.match-content-body p { margin-bottom: 16px; }
.match-content-body h3, .match-content-body h4 {
    color: var(--team-name-color, #000);
    margin-top: 22px; margin-bottom: 12px;
    font-weight: 700;
}
.match-content-body img {
    max-width: 100%; height: auto;
    border-radius: 10px; margin: 14px 0;
}
.match-content-body a {
    color: var(--competition-bg, #1565c0);
    text-decoration: underline;
}

/* ===== Lineup Section ===== */
.lineup-section {
    background: var(--card-bg, #fff);
    border-radius: var(--card-radius, 16px);
    padding: 28px;
    margin-bottom: 22px;
    border: 1px solid var(--border-color, #e0e0e0);
    box-shadow: 0 2px 12px rgba(0,0,0,0.05);
}
.lineup-section h3 {
    text-align: center;
    color: var(--team-name-color, #000);
    margin-bottom: 20px;
    font-size: 20px;
}
.lineup-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.lineup-view {
    font-family: 'Cairo', Arial, sans-serif;
    /* خلفية شفافة تتكيّف مع أي ثيم — لا hardcoded colors */
    background: transparent;
    color: var(--team-name-color, #000) !important;
    padding: 15px;
    border-radius: var(--card-radius, 16px);
    border: 2px solid var(--border-color, #e0e0e0);
    transition: all var(--anim-speed, 0.3s) ease;
}
body.anim-on .lineup-view:hover {
    box-shadow: 0 6px 18px rgba(0,0,0,0.1);
    transform: translateY(-3px);
    border-color: var(--today-bg, #0066cc);
}
.lineup-view table { width: 100%; border-collapse: collapse; margin: 10px 0; }
.lineup-view th {
    background: rgba(127, 127, 127, 0.15);
    padding: 12px;
    border: 1px solid var(--border-color, #e0e0e0);
    text-align: center;
    color: var(--team-name-color, #000);
    font-weight: 700; font-size: 15px;
}
.lineup-view td {
    padding: 10px;
    border: 1px solid var(--border-color, #e0e0e0);
    text-align: center;
    color: var(--team-name-color, #000);
    font-size: 14px;
    background: transparent;
}
.lineup-view .lineup-header {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--border-color, #e0e0e0);
}
.lineup-view .team-title {
    font-size: 18px; font-weight: 800;
    color: var(--team-name-color, #000);
    flex: 1; text-align: center;
}
.lineup-view .formation {
    background: rgba(127, 127, 127, 0.18);
    color: var(--team-name-color, #000);
    padding: 5px 15px;
    border-radius: 20px;
    font-weight: bold; font-size: 14px;
}
.no-lineup { text-align: center; padding: 30px; color: var(--match-footer-text, #8b949e); }

/* الثيم الداكن — تأكيد أن كل النصوص واضحة */
[data-theme="dark"] .lineup-view th,
body.theme-blood-dark .lineup-view th {
    background: rgba(255, 255, 255, 0.06) !important;
    color: var(--dark-team-name-color, #fff) !important;
}
[data-theme="dark"] .lineup-view td,
body.theme-blood-dark .lineup-view td {
    color: var(--dark-team-name-color, #fff) !important;
}
[data-theme="dark"] .lineup-view .formation,
body.theme-blood-dark .lineup-view .formation {
    background: rgba(220, 38, 38, 0.18) !important;
    color: #fff !important;
}
[data-theme="dark"] .match-bottom-card,
body.theme-blood-dark .match-bottom-card {
    background: var(--dark-card-bg, #1a1a25) !important;
    border-color: var(--dark-card-border, #2a2a40) !important;
}
[data-theme="dark"] .match-bottom-card .mbc-info-item,
body.theme-blood-dark .match-bottom-card .mbc-info-item {
    background: rgba(255, 255, 255, 0.04) !important;
}
[data-theme="dark"] .match-bottom-card .mbc-info-item i,
body.theme-blood-dark .match-bottom-card .mbc-info-item i {
    background: rgba(255, 255, 255, 0.08) !important;
    color: var(--dark-time-color, #ff9966) !important;
}
[data-theme="dark"] .match-bottom-card .mbc-info-item .mbc-label,
body.theme-blood-dark .match-bottom-card .mbc-info-item .mbc-label {
    color: rgba(255, 255, 255, 0.6) !important;
}
[data-theme="dark"] .match-bottom-card .mbc-info-item .mbc-value,
body.theme-blood-dark .match-bottom-card .mbc-info-item .mbc-value {
    color: var(--dark-team-name-color, #fff) !important;
}
[data-theme="dark"] .match-bottom-card .mbc-header,
body.theme-blood-dark .match-bottom-card .mbc-header {
    color: var(--dark-team-name-color, #fff) !important;
    border-bottom-color: rgba(255, 255, 255, 0.1) !important;
}

.ad-slot { margin: 20px 0; text-align: center; overflow: hidden; }

/* ===== Match Card (في أسفل الصفحة) ===== */
.match-bottom-card {
    background: var(--card-bg, #fff);
    border: 1px solid var(--border-color, #e0e0e0);
    border-radius: var(--card-radius, 16px);
    padding: 22px;
    margin: 22px 0;
    box-shadow: 0 2px 12px rgba(0,0,0,0.05);
}
.match-bottom-card .mbc-header {
    display: flex; align-items: center; gap: 10px;
    font-size: 16px; font-weight: 700;
    color: var(--team-name-color, #000);
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--border-color, #e0e0e0);
}
.match-bottom-card .mbc-header i { color: var(--today-bg, #000); }
.match-bottom-card .mbc-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 14px;
}
.match-bottom-card .mbc-info-item {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 14px;
    background: rgba(127, 127, 127, 0.06);
    border-radius: 10px;
    font-size: 13px;
}
.match-bottom-card .mbc-info-item i {
    color: var(--today-bg, #000);
    font-size: 18px;
    width: 30px; height: 30px;
    background: rgba(127, 127, 127, 0.12);
    border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
}
.match-bottom-card .mbc-info-item .mbc-label {
    color: var(--match-footer-text, #64748b);
    font-size: 11px;
    display: block;
    margin-bottom: 2px;
    opacity: 0.85;
}
.match-bottom-card .mbc-info-item .mbc-value {
    color: var(--team-name-color, #000);
    font-weight: 700;
}

@media (max-width: 768px) {
    .hero-teams { flex-direction: column; gap: 12px; }
    .hero-center { padding: 12px 0; }
    .lineup-grid { grid-template-columns: 1fr; }
    .servers-bar { gap: 6px; }
    .server-btn { padding: 8px 16px; font-size: 12px; }
    .player-container { padding-bottom: 0; height: 320px; }
    .hero-card { padding: 18px; }
    .match-page-wrap { padding: 0; }
    .match-content-section, .lineup-section { padding: 18px; }
    .match-bottom-card .mbc-info { grid-template-columns: 1fr; }
}
