/* منشئ المباريات - ملف CSS مع Bootstrap */

@font-face {
    font-family: 'DINNextLTArabic';
    src: url('../DINNextLTArabic-Regular.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

.matches-generator-container {
    padding: 20px 0;
    direction: rtl;
    font-family: 'DINNextLTArabic', 'Arial', sans-serif;
}

.page-title {
    text-align: center;
    color: #333;
    margin-bottom: 30px;
    font-size: 2.5rem;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
}

/* تحسينات للجدول */
.team-info {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-direction: column;
}

.team-logo {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #e9ecef;
    transition: all 0.3s ease;
}

.team-logo:hover {
    transform: scale(1.1);
    border-color: #0d6efd;
}

.team-name {
    font-weight: bold;
    font-size: 0.9rem;
    color: #333;
}

.match-score {
    font-weight: bold;
    font-size: 1.1rem;
    color: #0d6efd;
}

.status {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: bold;
    text-transform: uppercase;
    display: inline-block;
    text-align: center;
    min-width: 80px;
}

.status.live {
    background-color: #dc3545;
    color: white;
    animation: pulse 2s infinite;
}

.status.over {
    background-color: #6c757d;
    color: white;
}

.status.upcoming {
    background-color: #28a745;
    color: white;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.7; }
    100% { opacity: 1; }
}

/* تحسينات للشاشات الصغيرة */
@media (max-width: 768px) {
    .team-info {
        flex-direction: row;
        gap: 5px;
    }
    
    .team-logo {
        width: 25px;
        height: 25px;
    }
    
    .team-name {
        font-size: 0.8rem;
    }
    
    .match-score {
        font-size: 1rem;
    }
    
    .status {
        font-size: 0.7rem;
        padding: 3px 6px;
    }
}

/* تحسينات إضافية للجدول */
.table th {
    font-size: 0.9rem;
    white-space: nowrap;
}

.table td {
    vertical-align: middle;
    font-size: 0.9rem;
}

/* تأثيرات بصرية */
.matches-container {
    animation: fadeInUp 0.6s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* تحسينات للشاشات الصغيرة */
@media (max-width: 768px) {
    .matches-generator-container {
        padding: 15px 0;
    }
    
    .page-title {
        font-size: 2rem;
        margin-bottom: 20px;
    }
    
    .date-selector {
        padding: 20px;
        margin-bottom: 20px;
    }
    
    .date-selector input[type="date"] {
        margin: 10px 0;
        width: 100%;
        max-width: 300px;
    }
    
    .matches-header {
        flex-direction: column;
        gap: 20px;
        padding: 20px;
    }
    
    .matches-controls {
        justify-content: center;
        width: 100%;
    }
    
    .btn {
        padding: 10px 20px;
        font-size: 12px;
        margin: 5px;
        flex: 1;
        min-width: 120px;
    }
    
    .matches-table th,
    .matches-table td {
        padding: 10px 8px;
        font-size: 0.85rem;
    }
    
    .team-info {
        flex-direction: row;
        gap: 5px;
    }
    
    .team-logo {
        width: 25px;
        height: 25px;
    }
    
    .team-name {
        font-size: 0.8rem;
    }
    
    .match-score {
        font-size: 1rem;
    }
    
    .status {
        font-size: 0.7rem;
        padding: 4px 8px;
        min-width: 60px;
    }
    
    .output-header {
        flex-direction: column;
        gap: 15px;
        padding: 20px;
    }
    
    #generated-html {
        height: 300px;
        padding: 15px;
        font-size: 11px;
    }
}

@media (max-width: 480px) {
    .page-title {
        font-size: 1.5rem;
    }
    
    .date-selector {
        padding: 15px;
    }
    
    .matches-header {
        padding: 15px;
    }
    
    .btn {
        padding: 8px 16px;
        font-size: 11px;
        margin: 3px;
    }
    
    .matches-table th,
    .matches-table td {
        padding: 8px 6px;
        font-size: 0.8rem;
    }
    
    .team-info {
        flex-direction: column;
        gap: 3px;
    }
    
    .team-logo {
        width: 20px;
        height: 20px;
    }
    
    .team-name {
        font-size: 0.75rem;
    }
}

/* تحسينات إضافية */
.matches-table-container::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.matches-table-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.matches-table-container::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

.matches-table-container::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* تأثيرات بصرية إضافية */
.matches-container {
    animation: fadeInUp 0.6s ease-out;
}

.html-output {
    animation: fadeInUp 0.6s ease-out 0.2s both;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* تحسينات للوضع المظلم */
@media (prefers-color-scheme: dark) {
    .matches-generator-container {
        background-color: #1a1a1a;
        color: #e0e0e0;
    }
    
    .matches-container,
    .html-output {
        background: #2d2d2d;
        color: #e0e0e0;
    }
    
    .matches-header,
    .output-header {
        background: linear-gradient(135deg, #3d3d3d 0%, #2d2d2d 100%);
        border-bottom-color: #4d4d4d;
    }
    
    .matches-table th {
        background: linear-gradient(135deg, #3d3d3d 0%, #2d2d2d 100%);
        color: #e0e0e0;
    }
    
    .matches-table tbody tr:hover {
        background: linear-gradient(135deg, #3d3d3d 0%, #2a4d5a 100%);
    }
    
    #generated-html {
        background: #1a1a1a;
        color: #e0e0e0;
    }
}
