/**
 * Match of the Day Styles
 * تنسيقات مباراة اليوم - متطابقة مع تصميم القالب الأساسي
 * 
 * @package Match_Management_System
 * @version 1.0.0
 */

/* ===== Featured Match Styles (Hero Section) ===== */
.featured-match {
    background: #4a9d4a;
    border-radius: 20px;
    padding: 30px;
    color: #fff;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    margin-bottom: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: block;
}

.featured-match:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
    color: #fff;
    text-decoration: none;
}

.featured-match::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="rgba(255,255,255,0.05)"/><circle cx="75" cy="75" r="1" fill="rgba(255,255,255,0.05)"/><circle cx="50" cy="10" r="0.5" fill="rgba(255,255,255,0.03)"/><circle cx="20" cy="80" r="0.5" fill="rgba(255,255,255,0.03)"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    pointer-events: none;
}

.match-badge {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 8px 20px;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    margin-bottom: 25px;
    display: inline-block;
    position: relative;
    z-index: 2;
}

.match-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    position: relative;
    z-index: 2;
}

.team {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    flex: 1;
    max-width: 200px;
}

.team-logo {
    width: 80px;
    height: 80px;
    object-fit: contain;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    padding: 10px;
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.team-logo:hover {
    transform: scale(1.05);
    border-color: rgba(255, 255, 255, 0.4);
}

.team-logo-placeholder {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    color: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.team h3 {
    font-size: 18px;
    font-weight: 700;
    margin: 0;
    text-align: center;
    line-height: 1.2;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.match-time {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    margin: 0 20px;
    position: relative;
}

.time {
    font-size: 28px;
    font-weight: 900;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.vs {
    font-size: 16px;
    font-weight: 600;
    opacity: 0.8;
    letter-spacing: 2px;
}

.date {
    font-size: 14px;
    opacity: 0.9;
    font-weight: 500;
}

/* Score Display Styles */
.score-display, .live-score {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 32px;
    font-weight: 900;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.score-home, .score-away {
    min-width: 40px;
    text-align: center;
}

.score-separator {
    opacity: 0.7;
    font-size: 24px;
}

.match-result {
    font-size: 14px;
    opacity: 0.9;
    font-weight: 500;
    margin-top: 5px;
}

.live-status {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    margin-top: 5px;
}

.live-dot {
    color: #ff4444;
    animation: pulse 2s infinite;
    font-size: 8px;
}

.live-indicator {
    background: #ff4444;
    color: #fff;
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: 600;
    animation: pulse 2s infinite;
}

/* Match Title Only (fallback) */
.match-title-only {
    text-align: center;
    flex: 1;
}

.match-title-only h3 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 15px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.match-title-only .match-time {
    margin: 0;
}

/* Match Details */
.match-details {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 20px;
    position: relative;
    z-index: 2;
}

.match-details span {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    opacity: 0.9;
    font-weight: 500;
}

.match-details i {
    font-size: 16px;
}

/* Match Actions */
.match-actions {
    display: flex;
    justify-content: center;
    gap: 15px;
    position: relative;
    z-index: 2;
}

.match-actions .btn {
    padding: 12px 24px;
    border-radius: 25px;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    backdrop-filter: blur(10px);
}

.match-actions .btn-primary {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.3);
}

.match-actions .btn-primary:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    color: #fff;
}

.match-actions .btn-outline-secondary {
    background: transparent;
    color: #fff;
    border-color: rgba(255, 255, 255, 0.3);
}

.match-actions .btn-outline-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
    color: #fff;
}

/* ===== Widget Styles (Sidebar) ===== */
.match-of-the-day-widget {
    background: #fff;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    margin-bottom: 30px;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.motd-header {
    background: #4a9d4a;
    color: #fff;
    padding: 20px;
    text-align: center;
    position: relative;
}

.motd-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="rgba(255,255,255,0.05)"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    pointer-events: none;
}

.motd-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    position: relative;
    z-index: 2;
}

.motd-content {
    padding: 25px;
}

.match-teams {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.match-teams .team {
    flex-direction: column;
    gap: 10px;
    flex: 1;
}

.match-teams .team-logo {
    width: 50px;
    height: 50px;
    padding: 5px;
    background: #f8f9fa;
    border: 2px solid #e9ecef;
}

.match-teams .team-name {
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    color: #333;
    line-height: 1.2;
}

.match-score {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 15px;
}

.score {
    font-size: 24px;
    font-weight: 900;
    color: #667eea;
}

.vs {
    font-size: 16px;
    font-weight: 700;
    color: #666;
    letter-spacing: 1px;
}

.match-datetime {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 15px;
    font-size: 13px;
    color: #666;
}

.match-status {
    text-align: center;
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 20px;
}

.status-scheduled {
    background: #e3f2fd;
    color: #1976d2;
}

.status-live {
    background: #ffebee;
    color: #d32f2f;
    animation: pulse 2s infinite;
}

.status-finished {
    background: #e8f5e8;
    color: #388e3c;
}

.status-postponed {
    background: #fff3e0;
    color: #f57c00;
}

.status-cancelled {
    background: #fce4ec;
    color: #c2185b;
}

.match-actions {
    text-align: center;
}

.view-match-btn {
    display: inline-block;
    background: #4a9d4a;
    color: #fff;
    padding: 12px 24px;
    border-radius: 25px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.view-match-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
    color: #fff;
}

/* ===== Animations ===== */
@keyframes pulse {
    0%, 100% { 
        opacity: 1; 
        transform: scale(1);
    }
    50% { 
        opacity: 0.7; 
        transform: scale(0.95);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.featured-match {
    animation: fadeInUp 0.6s ease-out;
}

/* ===== Responsive Design ===== */
@media (max-width: 768px) {
    .featured-match {
        padding: 20px;
        border-radius: 15px;
    }
    
    .match-info {
        flex-direction: column;
        gap: 20px;
    }
    
    .team {
        flex-direction: row;
        max-width: none;
        gap: 15px;
    }
    
    .team-logo, .team-logo-placeholder {
        width: 60px;
        height: 60px;
    }
    
    .team h3 {
        font-size: 16px;
        text-align: right;
    }
    
    .match-time {
        order: -1;
        margin: 0 0 20px 0;
    }
    
    .time {
        font-size: 24px;
    }
    
    .score-display, .live-score {
        font-size: 28px;
    }
    
    .match-details {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
    
    .match-actions {
        flex-direction: column;
        gap: 10px;
    }
    
    .match-actions .btn {
        padding: 10px 20px;
        font-size: 14px;
    }
    
    /* Widget Mobile Styles */
    .motd-content {
        padding: 20px;
    }
    
    .match-teams {
        flex-direction: column;
        gap: 15px;
    }
    
    .match-teams .team {
        flex-direction: row;
        gap: 12px;
    }
    
    .match-score {
        order: -1;
        margin: 0 0 15px 0;
    }
}

@media (max-width: 480px) {
    .featured-match {
        padding: 15px;
    }
    
    .team-logo, .team-logo-placeholder {
        width: 50px;
        height: 50px;
    }
    
    .team h3 {
        font-size: 14px;
    }
    
    .time {
        font-size: 20px;
    }
    
    .score-display, .live-score {
        font-size: 24px;
    }
    
    .match-details span {
        font-size: 12px;
    }
}

/* ===== RTL Support ===== */
[dir="rtl"] .team {
    text-align: right;
}

[dir="rtl"] .match-details {
    direction: rtl;
}

[dir="rtl"] .match-actions .btn {
    direction: rtl;
}

[dir="rtl"] .vs {
    letter-spacing: 2px;
}

/* ===== Print Styles ===== */
@media print {
    .featured-match {
        background: #f8f9fa !important;
        color: #333 !important;
        box-shadow: none !important;
        border: 2px solid #dee2e6 !important;
    }
    
    .match-badge {
        background: #e9ecef !important;
        color: #333 !important;
    }
    
    .match-actions {
        display: none !important;
    }
    
    .team-logo {
        background: #fff !important;
        border-color: #dee2e6 !important;
    }
}

/* ===== High Contrast Mode ===== */
@media (prefers-contrast: high) {
    .featured-match {
        background: #000 !important;
        color: #fff !important;
        border: 3px solid #fff !important;
    }
    
    .team-logo {
        border-color: #fff !important;
    }
    
    .match-actions .btn {
        border-width: 3px !important;
    }
}

/* ===== Reduced Motion ===== */
@media (prefers-reduced-motion: reduce) {
    .featured-match {
        animation: none;
    }
    
    .live-dot,
    .live-indicator,
    .status-live {
        animation: none;
    }
    
    .team-logo:hover,
    .match-actions .btn:hover {
        transform: none;
    }
}

/* ===== Dark Mode Support ===== */
@media (prefers-color-scheme: dark) {
    .match-of-the-day-widget {
        background: #1a1a1a;
        border-color: #333;
    }
    
    .motd-content {
        color: #fff;
    }
    
    .match-teams .team-name {
        color: #fff;
    }
    
    .match-datetime {
        color: #ccc;
    }
    
    .team-logo {
        background: #333;
        border-color: #555;
    }
}