/* style.css - استایل‌شیت اصلی */
@font-face {
    font-family: 'Vazir';
    src: url('../fonts/Vazir.eot');
    src: url('../fonts/Vazir.eot?#iefix') format('embedded-opentype'),
         url('../fonts/Vazir.woff2') format('woff2'),
         url('../fonts/Vazir.woff') format('woff'),
         url('../fonts/Vazir.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Vazir', tahoma, Arial, sans-serif;
    background-color: #f4f7fa;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* هدر و ناوبری */
header {
    background-color: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    padding: 15px 0;
    margin-bottom: 30px;
}

header h1 {
    margin: 0 0 15px;
    color: #2c3e50;
    text-align: center;
}

nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
}

nav ul li {
    margin: 0 10px;
}

nav ul li a {
    text-decoration: none;
    color: #34495e;
    font-weight: bold;
    transition: color 0.3s;
    padding: 5px 10px;
}

nav ul li a:hover, nav ul li a.active {
    color: #3498db;
}

/* بخش قهرمان */
.hero {
    background-color: #3498db;
    color: #fff;
    text-align: center;
    padding: 50px 20px;
    border-radius: 10px;
    margin-bottom: 30px;
}

.hero h2 {
    font-size: 28px;
    margin-bottom: 15px;
}

.hero p {
    font-size: 18px;
    max-width: 800px;
    margin: 0 auto;
}

/* بخش‌های محتوا */
section {
    margin-bottom: 40px;
}

section h2 {
    margin-bottom: 20px;
    color: #2c3e50;
    text-align: center;
    position: relative;
    padding-bottom: 10px;
}

section h2:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background-color: #3498db;
}

/* کارت‌های تورنمنت */
.tournament-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.tournament-item {
    background-color: #fff;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s;
}

.tournament-item:hover {
    transform: translateY(-5px);
}

.tournament-item h3 {
    margin-bottom: 10px;
    color: #2c3e50;
}

.tournament-item p {
    margin-bottom: 10px;
    color: #7f8c8d;
}

/* نمایش تورنمنت */
.tournament-card {
    position: relative;
    background-color: #fff;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
    margin-bottom: 20px;
    overflow: hidden;
}

.tournament-status {
    position: absolute;
    top: 0;
    right: 0;
    padding: 5px 15px;
    font-size: 12px;
    color: #fff;
    border-radius: 0 10px 0 10px;
}

.status-active {
    background-color: #2ecc71;
}

.status-pending {
    background-color: #f39c12;
}

.status-completed {
    background-color: #e74c3c;
}

.tournament-title {
    margin: 20px 0 15px;
    color: #2c3e50;
    font-size: 22px;
}

.tournament-info {
    margin-bottom: 15px;
}

.tournament-info p {
    margin-bottom: 8px;
    color: #7f8c8d;
}

.tournament-info p i {
    margin-left: 5px;
    color: #3498db;
    width: 20px;
    text-align: center;
}

.tournament-actions {
    margin-top: 15px;
    text-align: center;
}

/* لیست مسابقات */
.match-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.match-item {
    background-color: #fff;
    border-radius: 10px;
    padding: 15px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
}

.match-teams {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.team {
    font-weight: bold;
    color: #2c3e50;
    text-decoration: none;
}

.team:hover {
    color: #3498db;
}

.team-highlight {
    color: #3498db;
}

.match-score {
    font-size: 20px;
    font-weight: bold;
    color: #e74c3c;
    padding: 0 15px;
}

.match-info {
    display: flex;
    justify-content: space-between;
    color: #7f8c8d;
    font-size: 14px;
}

/* تیم‌ها */
.teams-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

.team-card {
    background-color: #fff;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s;
    text-align: center;
}

.team-card:hover {
    transform: translateY(-5px);
}

.team-logo {
    width: 80px;
    height: 80px;
    object-fit: contain;
    margin-bottom: 15px;
}

.team-logo-placeholder {
    width: 80px;
    height: 80px;
    background-color: #f1f1f1;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto 15px;
    color: #95a5a6;
    font-size: 30px;
}

.team-name {
    margin-bottom: 10px;
    color: #2c3e50;
}

.team-info {
    margin-bottom: 15px;
    text-align: right;
}

.team-info p {
    margin-bottom: 5px;
    color: #7f8c8d;
}

.team-description {
    font-style: italic;
    color: #95a5a6;
    margin-top: 10px;
}

.team-actions {
    margin-top: 15px;
}

/* جدول رده‌بندی */
.standings-section table {
    width: 100%;
    border-collapse: collapse;
    background-color: #fff;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
    border-radius: 10px;
    overflow: hidden;
}

.standings-section th, .standings-section td {
    padding: 12px 10px;
    text-align: center;
}

.standings-section th {
    background-color: #34495e;
    color: #fff;
    font-weight: bold;
}

.standings-section tr:nth-child(even) {
    background-color: #f9f9f9;
}

.standings-section tr:hover {
    background-color: #f1f1f1;
}

/* براکت حذفی */
.knockout-bracket {
    margin-bottom: 40px;
}

.knockout-round {
    margin-bottom: 30px;
}

.knockout-round h4 {
    margin-bottom: 15px;
    padding-bottom: 5px;
    border-bottom: 1px solid #ddd;
}

.knockout-matches {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 15px;
}

.knockout-match {
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 3px 8px rgba(0,0,0,0.05);
}

.team-container {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
}

.team-container .team {
    flex: 1;
}

.team-container .score {
    width: 30px;
    text-align: center;
    font-weight: bold;
}

.match-result, .match-date {
    font-size: 12px;
    color: #7f8c8d;
    text-align: center;
    margin-top: 10px;
}

/* نتایج تیم */
.team-results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #fff;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

.team-info {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.tournament-info {
    text-align: right;
}

.stats-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
}

.stat-item {
    background-color: #fff;
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    box-shadow: 0 3px 8px rgba(0,0,0,0.05);
}

.stat-label {
    display: block;
    margin-bottom: 5px;
    font-size: 14px;
    color: #7f8c8d;
}

.stat-value {
    font-size: 24px;
    font-weight: bold;
    color: #2c3e50;
}

.team-summary {
    background-color: #fff;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
}

.summary-stats {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    margin-top: 15px;
}

.summary-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 14%;
    margin-bottom: 15px;
}

.summary-stat span {
    font-size: 14px;
    color: #7f8c8d;
    margin-bottom: 5px;
}

.summary-stat strong {
    font-size: 20px;
    color: #2c3e50;
}

.result-win {
    border-right: 4px solid #2ecc71;
}

.result-draw {
    border-right: 4px solid #f39c12;
}

.result-loss {
    border-right: 4px solid #e74c3c;
}

.navigation-links {
    display: flex;
    justify-content: space-between;
    margin-top: 30px;
}

/* فیلترها */
.filters {
    background-color: #fff;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.filter-group {
    display: flex;
    align-items: center;
}

.filter-group label {
    margin-left: 10px;
    font-weight: bold;
}

.filter-group select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    background-color: #f8f9fa;
}

.search-bar {
    background-color: #fff;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
}

.search-group {
    display: flex;
}

.search-group input {
    flex: 1;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 5px 0 0 5px;
    font-family: 'Vazir', tahoma, Arial, sans-serif;
}

.search-group button {
    border-radius: 0 5px 5px 0;
}

/* دکمه‌ها */
.btn {
    display: inline-block;
    background-color: #3498db;
    color: #fff;
    padding: 8px 15px;
    border-radius: 5px;
    text-decoration: none;
    transition: background-color 0.3s;
    border: none;
    cursor: pointer;
    font-size: 14px;
    font-family: 'Vazir', tahoma, Arial, sans-serif;
}

.btn:hover {
    background-color: #2980b9;
}

.btn-primary {
    background-color: #3498db;
}

.btn-secondary {
    background-color: #95a5a6;
}

.btn-success {
    background-color: #2ecc71;
}

.btn-danger {
    background-color: #e74c3c;
}

.btn-sm {
    padding: 5px 10px;
    font-size: 12px;
}

/* فرم‌ها */
.form-container {
    background-color: #fff;
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
    max-width: 600px;
    margin: 0 auto;
}

.form-container h2 {
    margin-bottom: 30px;
    text-align: center;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: #2c3e50;
}

.form-group input[type="text"],
.form-group input[type="password"],
.form-group input[type="email"],
.form-group input[type="date"],
.form-group input[type="datetime-local"],
.form-group input[type="number"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-family: 'Vazir', tahoma, Arial, sans-serif;
    font-size: 14px;
}

.form-group textarea {
    height: 150px;
}

.form-group select {
    cursor: pointer;
}

/* جدول داده‌ها */
.data-table {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    background-color: #fff;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
    border-radius: 10px;
    overflow: hidden;
}

table th, table td {
    padding: 12px 15px;
    text-align: right;
}

table th {
    background-color: #34495e;
    color: #fff;
    font-weight: bold;
}

table tr:nth-child(even) {
    background-color: #f9f9f9;
}

table tr:hover {
    background-color: #f1f1f1;
}

.actions {
    display: flex;
    gap: 5px;
}

/* هشدارها */
.alert {
    padding: 12px 15px;
    margin-bottom: 20px;
    border-radius: 5px;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* پاورقی */
footer {
    text-align: center;
    margin-top: 50px;
    padding: 20px 0;
    color: #7f8c8d;
    border-top: 1px solid #ddd;
}

/* ریسپانسیو */
@media (max-width: 768px) {
    .tournament-list {
        grid-template-columns: 1fr;
    }
    
    nav ul {
        flex-direction: column;
        align-items: center;
    }
    
    nav ul li {
        margin-bottom: 10px;
    }
    
    .team-selection {
        grid-template-columns: 1fr;
    }
    
    .team-results-header {
        flex-direction: column;
    }
    
    .stats-container {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .summary-stat {
        width: 30%;
    }
    
    .navigation-links {
        flex-direction: column;
        gap: 10px;
    }
    
    .filters {
        flex-direction: column;
        align-items: stretch;
    }
}

@media (max-width: 480px) {
    .stats-container {
        grid-template-columns: 1fr;
    }
    
    .summary-stat {
        width: 45%;
    }
}

/* کد مربوط به دکمه تغییر حالت */
.theme-toggle {
    position: fixed;
    bottom: 20px;
    left: 20px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: #3498db;
    box-shadow: 0 3px 10px rgba(0,0,0,0.2);
    display: flex;
    justify-content: center;
    align-items: center;
    color: #fff;
    cursor: pointer;
    z-index: 9999;
    transition: all 0.3s ease;
}

.theme-toggle:hover {
    transform: scale(1.1);
    background-color: #2980b9;
}

.theme-toggle i {
    font-size: 1.5rem;
}

/* استایل‌های حالت تاریک */
body.dark-mode {
    background-color: #1a1a2e;
    color: #e6e6e6;
}

body.dark-mode header {
    background-color: #16213e;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

body.dark-mode nav ul li a {
    color: #e6e6e6;
}

body.dark-mode nav ul li a:hover, 
body.dark-mode nav ul li a.active {
    color: #3498db;
}

body.dark-mode .hero {
    background-color: #16213e;
}

body.dark-mode .tournament-item,
body.dark-mode .match-item,
body.dark-mode .team-card,
body.dark-mode .form-container,
body.dark-mode .tournament-card,
body.dark-mode .week-section,
body.dark-mode .team-summary,
body.dark-mode .quick-actions,
body.dark-mode .recent-activities,
body.dark-mode .activity-item,
body.dark-mode .search-bar,
body.dark-mode .filters,
body.dark-mode .weekly-matches,
body.dark-mode .knockout-match,
body.dark-mode .team-item {
    background-color: #16213e;
    box-shadow: 0 3px 10px rgba(0,0,0,0.3);
}

body.dark-mode .tournament-item h3,
body.dark-mode .match-item h3,
body.dark-mode .team-card h3,
body.dark-mode .team-name,
body.dark-mode .tournament-title,
body.dark-mode section h2,
body.dark-mode .tournament-meta p {
    color: #e6e6e6;
}

body.dark-mode .team-info p,
body.dark-mode .tournament-info p,
body.dark-mode .match-info,
body.dark-mode .match-details,
body.dark-mode footer,
body.dark-mode .team-description {
    color: #a4b0be;
}

body.dark-mode .btn {
    background-color: #2568a3;
}

body.dark-mode .btn:hover {
    background-color: #1e5a8d;
}

body.dark-mode table {
    background-color: #16213e;
}

body.dark-mode table th {
    background-color: #0f3460;
}

body.dark-mode table tr:nth-child(even) {
    background-color: #1b2a4a;
}

body.dark-mode table tr:hover {
    background-color: #233554;
}

body.dark-mode input,
body.dark-mode select,
body.dark-mode textarea {
    background-color: #1b2a4a;
    color: #e6e6e6;
    border-color: #364f6b;
}

body.dark-mode .team-logo-placeholder,
body.dark-mode .team-logo-placeholder-small {
    background-color: #1b2a4a;
    color: #a4b0be;
}

body.dark-mode .match-score {
    background-color: #233554;
    color: #e6e6e6;
}

body.dark-mode .week-button {
    background-color: #1b2a4a;
    color: #e6e6e6;
}

body.dark-mode .week-button:hover {
    background-color: #233554;
}

body.dark-mode .week-selector {
    background-color: #16213e;
}

body.dark-mode footer {
    border-top-color: #233554;
}

/* کد مربوط به دکمه تغییر حالت - با پشتیبانی از همه مرورگرها */
.theme-toggle {
    position: fixed;
    bottom: 20px;
    left: 20px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: #3498db;
    -webkit-box-shadow: 0 3px 10px rgba(0,0,0,0.2);
    -moz-box-shadow: 0 3px 10px rgba(0,0,0,0.2);
    box-shadow: 0 3px 10px rgba(0,0,0,0.2);
    display: -webkit-flex;
    display: -moz-flex;
    display: -ms-flex;
    display: flex;
    -webkit-justify-content: center;
    -moz-justify-content: center;
    -ms-justify-content: center;
    justify-content: center;
    -webkit-align-items: center;
    -moz-align-items: center;
    -ms-align-items: center;
    align-items: center;
    color: #fff;
    cursor: pointer;
    z-index: 9999;
    -webkit-transition: all 0.3s ease;
    -moz-transition: all 0.3s ease;
    -ms-transition: all 0.3s ease;
    transition: all 0.3s ease;
}

.theme-toggle:hover {
    -webkit-transform: scale(1.1);
    -moz-transform: scale(1.1);
    -ms-transform: scale(1.1);
    transform: scale(1.1);
    background-color: #2980b9;
}

.theme-toggle i {
    font-size: 1.5rem;
}