/* ============================================
   Elzem Sports - Cafe Theme with Black Accents
   تصميم كافي مع لمسات سوداء كما في الصورة
============================================ */

/* المتغيرات الأساسية لثيم الكافي - الوضع الفاتح */
.elzem-matches-wrapper.cafe-theme-enhanced {
    /* الألوان الرئيسية - ثيم الكافي */
    --cafe-primary: #8B4513; /* بني داكن */
    --cafe-secondary: #A0522D; /* بني متوسط */
    --cafe-accent: #D2691E; /* شوكولاتي */
    --cafe-light: #F5DEB3; /* قمح */
    --cafe-lighter: #FFF8DC; /* كورنسيلك */
    --cafe-dark: #654321; /* بني داكن جداً */
    --cafe-darker: #3D2506; /* بني أسود */
    
    /* الألوان الأساسية */
    --elzem-bg-dark: #0A0A0A; /* أسود داكن */
    --elzem-bg-darker: #050505; /* أسود داكن جداً */
    --elzem-bg-card: #1A1A1A; /* أسود رمادي */
    --elzem-bg-light: #2A2A2A; /* رمادي داكن */
    --elzem-bg-hover: #333333; /* رمادي متوسط */
    
    /* ألوان النصوص */
    --elzem-text-white: #FFFFFF; /* أبيض نقي */
    --elzem-text-light: #E0E0E0; /* رمادي فاتح */
    --elzem-text-muted: #AAAAAA; /* رمادي متوسط */
    --elzem-text-dark: #666666; /* رمادي داكن */
    
    /* ألوان الحالات */
    --elzem-live: #FF4444; /* أحمر */
    --elzem-live-bright: #FF6666; /* أحمر فاتح */
    --elzem-live-dark: #CC0000; /* أحمر داكن */
    --elzem-upcoming: #4CAF50; /* أخضر */
    --elzem-upcoming-bright: #66BB6A; /* أخضر فاتح */
    --elzem-upcoming-dark: #388E3C; /* أخضر داكن */
    --elzem-finished: #9E9E9E; /* رمادي */
    --elzem-finished-bright: #BDBDBD; /* رمادي فاتح */
    --elzem-finished-dark: #757575; /* رمادي داكن */
    --elzem-starting: #FF9800; /* برتقالي */
    --elzem-starting-bright: #FFB74D; /* برتقالي فاتح */
    --elzem-starting-dark: #F57C00; /* برتقالي داكن */
    
    /* ألوان إضافية */
    --elzem-blue: #2196F3;
    --elzem-yellow: #FFEB3B;
    --elzem-orange: #FF9800;
    --elzem-purple: #9C27B0;
    
    /* حدود وظلال */
    --elzem-border: #444444;
    --elzem-border-light: #555555;
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.4);
    --radius: 6px;
    --radius-lg: 10px;
    --radius-xl: 14px;
}

/* متغيرات الوضع الداكن */
.elzem-matches-wrapper.cafe-theme-enhanced[data-dark-mode="true"] {
    --cafe-light: #f5e9dc;
    --cafe-dark: #e2d0bd;
    --cafe-darker: #121211;
    --red-dark: #c62828;
    --green-dark: #2e7d32;
    --blue-dark: #1565c0;
    --black-dark: #333333;
    --tab-bg: #1a1a1a;
    --tab-text: #ffffff;
    --tab-active: #5d4037;
    --border-color: #b39c82;
    --table-border: #8d6e63;
    
    background: linear-gradient(135deg, #121212 0%, #1a1a1a 100%);
    color: #e0e0e0;
}

.elzem-matches-wrapper.cafe-theme-enhanced[data-dark-mode="false"] {
    --cafe-light: #f5e9dc;
    --cafe-dark: #e2d0bd;
    --cafe-darker: #121211;
    --red-dark: #c62828;
    --green-dark: #2e7d32;
    --blue-dark: #1565c0;
    --black-dark: #333333;
    --tab-bg: #1a1a1a;
    --tab-text: #ffffff;
    --tab-active: #5d4037;
    --border-color: #b39c82;
    --table-border: #8d6e63;
    
    background: linear-gradient(135deg, #f5f5f5 0%, #e8e8e8 100%);
}

/* ============================================
   Base Styles - الأنماط الأساسية
============================================ */
.elzem-matches-wrapper.cafe-theme-enhanced {
    font-family: 'Cairo', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    direction: rtl;
    text-align: right;
    line-height: 1.6;
    padding: 0;
    margin: 0;
    min-height: 100vh;
    transition: all 0.3s ease;
}

/* Full Width Header with Dark Background */
.elzem-matches-wrapper.cafe-theme-enhanced .full-width-header {
    background-color: var(--tab-bg);
    width: 100%;
    margin: 0;
    padding: 20px 0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.elzem-matches-wrapper.cafe-theme-enhanced .header-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    flex-wrap: nowrap;
    gap: 20px;
}

.elzem-matches-wrapper.cafe-theme-enhanced .page-title {
    font-size: 28px;
    font-weight: bold;
    color: var(--tab-text);
    text-align: right;
    margin: 0;
    flex-shrink: 0;
    white-space: nowrap;
}

.elzem-matches-wrapper.cafe-theme-enhanced .date-tabs {
    display: flex;
    gap: 10px;
    background: rgba(255, 255, 255, 0.1);
    padding: 8px 15px;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    flex-wrap: nowrap;
}

.elzem-matches-wrapper.cafe-theme-enhanced .date-tab {
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
    color: var(--tab-text);
    transition: all 0.3s;
    border: 2px solid transparent;
    font-size: 14px;
    white-space: nowrap;
}

.elzem-matches-wrapper.cafe-theme-enhanced .date-tab:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.elzem-matches-wrapper.cafe-theme-enhanced .date-tab.active {
    background: var(--tab-active);
    border-color: var(--border-color);
    color: var(--tab-text);
    box-shadow: 0 3px 6px rgba(0,0,0,0.3);
}

/* Match Container with Borders */
.elzem-matches-wrapper.cafe-theme-enhanced .match-container {
    max-width: 1200px;
    margin: 30px auto;
    padding: 0 20px;
}

.elzem-matches-wrapper.cafe-theme-enhanced .match-table-wrapper {
    border: 1px solid var(--table-border);
    border-radius: 12px;
    overflow: hidden;
    background: var(--cafe-light);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.elzem-matches-wrapper.cafe-theme-enhanced .match-item {
    background: var(--cafe-light);
    margin: 0;
    padding: 0;
    overflow: hidden;
    border-bottom: 1px solid var(--border-color);
    transition: transform 0.3s, box-shadow 0.3s;
    position: relative;
    cursor: pointer;
}

.elzem-matches-wrapper.cafe-theme-enhanced .match-item:last-child {
    border-bottom: none;
}

.elzem-matches-wrapper.cafe-theme-enhanced .match-item:hover {
    background: var(--cafe-dark);
}

.elzem-matches-wrapper.cafe-theme-enhanced .match-header {
    display: flex;
    justify-content: space-between;
    align-items: stretch;
    height: 170px;
    position: relative;
    padding: 0 20px;
}

.elzem-matches-wrapper.cafe-theme-enhanced .team {
    flex: 1;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 20px;
}

.elzem-matches-wrapper.cafe-theme-enhanced .team-name {
    font-weight: bold;
    font-size: 22px;
    margin-bottom: 15px;
    color: var(--tab-active);
    text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
}

.elzem-matches-wrapper.cafe-theme-enhanced[data-dark-mode="true"] .team-name {
    color: #e0e0e0;
}

.elzem-matches-wrapper.cafe-theme-enhanced .team-logo {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, #fff 0%, var(--cafe-dark) 100%);
    border-radius: 50%;
    margin: 0 auto 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 3px solid #fff;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.elzem-matches-wrapper.cafe-theme-enhanced .team-logo img {
    width: 40px;
    height: 40px;
    object-fit: contain;
    border-radius: 50%;
}

.elzem-matches-wrapper.cafe-theme-enhanced .match-center {
    flex: 1;
    text-align: center;
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
}

.elzem-matches-wrapper.cafe-theme-enhanced .match-top-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    width: 100%;
}

.elzem-matches-wrapper.cafe-theme-enhanced .match-city {
    font-size: 13px;
    color: var(--table-border);
    text-align: right;
    font-weight: 600;
}

.elzem-matches-wrapper.cafe-theme-enhanced .match-competition {
    font-size: 13px;
    color: white;
    font-weight: bold;
    text-align: center;
    background: var(--red-dark);
    padding: 5px 12px;
    border-radius: 15px;
    position: absolute;
    top: 20px;
    right: 20px;
    box-shadow: 0 3px 6px rgba(0,0,0,0.2);
}

.elzem-matches-wrapper.cafe-theme-enhanced .match-time {
    font-size: 28px;
    font-weight: bold;
    color: var(--tab-active);
    margin-bottom: 15px;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
}

.elzem-matches-wrapper.cafe-theme-enhanced[data-dark-mode="true"] .match-time {
    color: #e0e0e0;
}

.elzem-matches-wrapper.cafe-theme-enhanced .match-status {
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 15px;
    color: white;
    display: inline-block;
    margin-bottom: 15px;
    font-weight: bold;
    box-shadow: 0 3px 6px rgba(0,0,0,0.2);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.elzem-matches-wrapper.cafe-theme-enhanced .status-live { 
    background: var(--green-dark);
    animation: pulse 2s infinite;
}

.elzem-matches-wrapper.cafe-theme-enhanced .status-soon { 
    background: var(--blue-dark);
}

.elzem-matches-wrapper.cafe-theme-enhanced .status-ended { 
    background: var(--black-dark);
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(46, 125, 50, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(46, 125, 50, 0); }
    100% { box-shadow: 0 0 0 0 rgba(46, 125, 50, 0); }
}

.elzem-matches-wrapper.cafe-theme-enhanced .match-result {
    font-size: 32px;
    font-weight: bold;
    color: var(--tab-active);
    letter-spacing: 3px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
}

.elzem-matches-wrapper.cafe-theme-enhanced[data-dark-mode="true"] .match-result {
    color: #e0e0e0;
}

.elzem-matches-wrapper.cafe-theme-enhanced .match-footer {
    background: var(--cafe-darker);
    padding: 16px;
    display: flex;
    justify-content: space-around;
    align-items: center;
    font-size: 15px;
    color: #ffffff;
    border-top: 1px solid var(--border-color);
    font-weight: 600;
}

.elzem-matches-wrapper.cafe-theme-enhanced .footer-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.elzem-matches-wrapper.cafe-theme-enhanced .footer-item i {
    color: var(--cafe-dark);
    font-size: 18px;
}

.elzem-matches-wrapper.cafe-theme-enhanced .footer-item .fa-microphone { color: #d32f2f; }
.elzem-matches-wrapper.cafe-theme-enhanced .footer-item .fa-stadium { color: #388e3c; }
.elzem-matches-wrapper.cafe-theme-enhanced .footer-item .fa-tv { color: #1976d2; }

.elzem-matches-wrapper.cafe-theme-enhanced .channel-logo {
    width: 20px;
    height: 20px;
    object-fit: contain;
    margin-left: 5px;
}

/* قسم آخر الأخبار والمقالات */
.elzem-matches-wrapper.cafe-theme-enhanced .news-section {
    max-width: 1200px;
    margin: 40px auto 20px;
    padding: 0 20px;
}

.elzem-matches-wrapper.cafe-theme-enhanced .news-section-title {
    font-size: 24px;
    font-weight: bold;
    color: var(--tab-active);
    margin-bottom: 20px;
    text-align: right;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 10px;
}

.elzem-matches-wrapper.cafe-theme-enhanced[data-dark-mode="true"] .news-section-title {
    color: #e0e0e0;
}

.elzem-matches-wrapper.cafe-theme-enhanced .news-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.elzem-matches-wrapper.cafe-theme-enhanced .news-card {
    background: var(--cafe-light);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    transition: transform 0.3s, box-shadow 0.3s;
    text-decoration: none;
    color: inherit;
    border: 1px solid var(--border-color);
}

.elzem-matches-wrapper.cafe-theme-enhanced[data-dark-mode="true"] .news-card {
    background: var(--cafe-dark);
}

.elzem-matches-wrapper.cafe-theme-enhanced .news-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}

.elzem-matches-wrapper.cafe-theme-enhanced .news-image {
    height: 180px;
    overflow: hidden;
}

.elzem-matches-wrapper.cafe-theme-enhanced .news-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.elzem-matches-wrapper.cafe-theme-enhanced .news-card:hover .news-image img {
    transform: scale(1.05);
}

.elzem-matches-wrapper.cafe-theme-enhanced .news-content {
    padding: 20px;
}

.elzem-matches-wrapper.cafe-theme-enhanced .news-content h3 {
    font-size: 16px;
    font-weight: bold;
    color: var(--tab-active);
    margin-bottom: 10px;
    line-height: 1.4;
}

.elzem-matches-wrapper.cafe-theme-enhanced[data-dark-mode="true"] .news-content h3 {
    color: #e0e0e0;
}

.elzem-matches-wrapper.cafe-theme-enhanced .news-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: var(--table-border);
}

.elzem-matches-wrapper.cafe-theme-enhanced .news-date {
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .elzem-matches-wrapper.cafe-theme-enhanced .header-container {
        max-width: 100%;
    }
    
    .elzem-matches-wrapper.cafe-theme-enhanced .match-container {
        max-width: 100%;
    }
    
    .elzem-matches-wrapper.cafe-theme-enhanced .news-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 992px) {
    .elzem-matches-wrapper.cafe-theme-enhanced .header-container {
        flex-direction: column;
        text-align: center;
    }
    
    .elzem-matches-wrapper.cafe-theme-enhanced .page-title {
        order: 1;
        width: 100%;
        text-align: center;
    }
    
    .elzem-matches-wrapper.cafe-theme-enhanced .date-tabs {
        order: 2;
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .elzem-matches-wrapper.cafe-theme-enhanced .match-header {
        height: auto;
        flex-direction: column;
        padding: 20px 0;
    }
    
    .elzem-matches-wrapper.cafe-theme-enhanced .team {
        flex-direction: row;
        justify-content: space-between;
        padding: 10px 20px;
        text-align: right;
    }
    
    .elzem-matches-wrapper.cafe-theme-enhanced .team:first-child {
        flex-direction: row-reverse;
    }
    
    .elzem-matches-wrapper.cafe-theme-enhanced .team-logo {
        margin: 0;
        width: 50px;
        height: 50px;
    }
    
    .elzem-matches-wrapper.cafe-theme-enhanced .team-name {
        margin: 0 15px;
        flex: 1;
    }
    
    .elzem-matches-wrapper.cafe-theme-enhanced .match-center {
        padding: 20px;
        order: 3;
    }
    
    .elzem-matches-wrapper.cafe-theme-enhanced .match-footer {
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
        padding: 15px;
    }
    
    .elzem-matches-wrapper.cafe-theme-enhanced .footer-item {
        width: 100%;
        justify-content: flex-start;
    }
    
    .elzem-matches-wrapper.cafe-theme-enhanced .match-competition {
        position: relative;
        top: auto;
        right: auto;
        margin: 10px auto;
        display: inline-block;
    }
    
    .elzem-matches-wrapper.cafe-theme-enhanced .news-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .elzem-matches-wrapper.cafe-theme-enhanced {
        padding: 0;
    }
    
    .elzem-matches-wrapper.cafe-theme-enhanced .full-width-header {
        padding: 15px 0;
    }
    
    .elzem-matches-wrapper.cafe-theme-enhanced .match-container {
        padding: 0 15px;
        margin: 20px auto;
    }
    
    .elzem-matches-wrapper.cafe-theme-enhanced .date-tab {
        padding: 8px 15px;
        font-size: 13px;
        flex: 1;
        text-align: center;
        min-width: 100px;
    }
    
    .elzem-matches-wrapper.cafe-theme-enhanced .date-tabs {
        width: 100%;
        flex-wrap: wrap;
    }
    
    .elzem-matches-wrapper.cafe-theme-enhanced .match-result {
        font-size: 26px;
    }
    
    .elzem-matches-wrapper.cafe-theme-enhanced .match-time {
        font-size: 24px;
    }
    
    .elzem-matches-wrapper.cafe-theme-enhanced .match-status {
        font-size: 13px;
        padding: 6px 15px;
    }
    
    .elzem-matches-wrapper.cafe-theme-enhanced .news-grid {
        grid-template-columns: 1fr !important;
    }
    
    .elzem-matches-wrapper.cafe-theme-enhanced .news-section {
        padding: 0 15px;
    }
}

@media (max-width: 576px) {
    .elzem-matches-wrapper.cafe-theme-enhanced .page-title {
        font-size: 22px;
    }
    
    .elzem-matches-wrapper.cafe-theme-enhanced .team-name {
        font-size: 18px;
    }
    
    .elzem-matches-wrapper.cafe-theme-enhanced .match-footer {
        font-size: 13px;
    }
    
    .elzem-matches-wrapper.cafe-theme-enhanced .footer-item i {
        font-size: 16px;
    }
    
    .elzem-matches-wrapper.cafe-theme-enhanced .news-section-title {
        font-size: 20px;
    }
    
    .elzem-matches-wrapper.cafe-theme-enhanced .news-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
}

@media (max-width: 480px) {
    .elzem-matches-wrapper.cafe-theme-enhanced .header-container {
        padding: 0 10px;
    }
    
    .elzem-matches-wrapper.cafe-theme-enhanced .date-tab {
        padding: 6px 10px;
        font-size: 12px;
        min-width: 80px;
    }
    
    .elzem-matches-wrapper.cafe-theme-enhanced .team-name {
        font-size: 16px;
    }
    
    .elzem-matches-wrapper.cafe-theme-enhanced .match-result {
        font-size: 22px;
    }
    
    .elzem-matches-wrapper.cafe-theme-enhanced .match-time {
        font-size: 20px;
    }
    
    .elzem-matches-wrapper.cafe-theme-enhanced .match-header {
        padding: 15px 10px;
    }
}

@media (max-width: 360px) {
    .elzem-matches-wrapper.cafe-theme-enhanced .date-tabs {
        gap: 5px;
    }
    
    .elzem-matches-wrapper.cafe-theme-enhanced .date-tab {
        padding: 6px 8px;
        font-size: 11px;
        min-width: 70px;
    }
}

/* تحسينات للوضع الداكن */
.elzem-matches-wrapper.cafe-theme-enhanced[data-dark-mode="true"] .full-width-header {
    background: linear-gradient(135deg, #1a1a1a 0%, #0a0a0a 100%);
}

.elzem-matches-wrapper.cafe-theme-enhanced[data-dark-mode="true"] .match-table-wrapper {
    background: linear-gradient(135deg, #2a2a2a 0%, #1a1a1a 100%);
    border-color: #4a342e;
}

.elzem-matches-wrapper.cafe-theme-enhanced[data-dark-mode="true"] .match-item {
    background: linear-gradient(135deg, #2a2a2a 0%, #1a1a1a 100%);
    border-color: #4a342e;
}

.elzem-matches-wrapper.cafe-theme-enhanced[data-dark-mode="true"] .match-item:hover {
    background: linear-gradient(135deg, #3a3a3a 0%, #2a2a2a 100%);
}

.elzem-matches-wrapper.cafe-theme-enhanced[data-dark-mode="true"] .match-footer {
    background: linear-gradient(135deg, #121212 0%, #0a0a0a 100%);
    border-color: #4a342e;
}

.elzem-matches-wrapper.cafe-theme-enhanced[data-dark-mode="true"] .news-card {
    background: linear-gradient(135deg, #2a2a2a 0%, #1a1a1a 100%);
    border-color: #4a342e;
}

.elzem-matches-wrapper.cafe-theme-enhanced[data-dark-mode="true"] .news-card:hover {
    background: linear-gradient(135deg, #3a3a3a 0%, #2a2a2a 100%);
}

/* أنماط المباريات الثابتة */
.elzem-match-row-image-style.featured-match {
    border: 2px solid #FFD700 !important;
    border-left: 6px solid #FFD700 !important;
    position: relative;
}

.featured-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: #FFD700;
    color: #333;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: bold;
    z-index: 10;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.elzem-status-badge.featured {
    background: linear-gradient(135deg, #FFD700, #FFA500) !important;
    color: #333 !important;
}

/* تمييز في صفحة التحرير */
.elzem-meta-field input[type="checkbox"] {
    width: auto;
    margin-left: 10px;
}

.featured-info h4 {
    display: flex;
    align-items: center;
    gap: 8px;
}