/* Reset و تنظیمات پایه */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}


  @font-face {
  font-family: vazir;
  src: url('../../music/font/Vazir.eot');
  src: url('../../music/font/Vazir.eot?#iefix') format('FontName-opentype'),
       url('../../music/font/Vazir.woff') format('woff'),
       url('../../music/font/Vazir.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
        
 }





body {
    font-family: vazir;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    background-attachment: fixed;
    color: #333;
    line-height: 1.6;
    min-height: 100vh;
    padding: 20px;
}

/* استایل شیشه‌ای */
.glass-container {
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.15);
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.18);
    overflow: hidden;
    margin: 0 auto;
    max-width: 1400px;
}

/* هدر */
.glass-header {
    background: rgba(255, 255, 255, 0.2);
    padding: 20px 30px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.logo-section h1 {
    color: white;
    font-size: 1.8rem;
    font-weight: 700;
    margin-top: -85px;
    margin-right: 101px;

}

.tournament-subtitle {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
    margin-right: 175px;
}

/* منوی ناوبری */
.main-nav ul {
    display: flex;
    list-style: none;
    gap: 15px;
    flex-wrap: wrap;
}

.nav-link {
    color: white;
    text-decoration: none;
    padding: 10px 20px;
    border-radius: 50px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    background: rgba(255, 255, 255, 0.1);
}

.nav-link:hover, .nav-link.active {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
}

.nav-link.admin {
    background: rgba(46, 204, 113, 0.2);
}

.nav-link.logout {
    background: rgba(231, 76, 60, 0.2);
}

.nav-link.login {
    background: rgba(52, 152, 219, 0.2);
}

/* محتوای اصلی */
.main-content {
    padding: 30px;
}

/* گروه‌بندی و جدول‌ها */
.groups-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.group-container {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 25px;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: transform 0.3s ease;
}

.group-container:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.15);
}

.group-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.group-title {
    color: white;
    font-size: 1.4rem;
    font-weight: 600;
}

.group-info {
    color: rgba(255, 255, 255, 0.8);
    background: rgba(0, 0, 0, 0.2);
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
}

/* جدول تیم‌ها */
.teams-table {
    width: 100%;
    border-collapse: collapse;
    color: white;
}

.teams-table th {
    text-align: center;
    padding: 12px 8px;
    font-weight: 600;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.1);
}

.teams-table td {
    padding: 12px 8px;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.teams-table tr:hover {
    background: rgba(255, 255, 255, 0.1);
}

.team-cell {
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: flex-start;
}

.team-logo {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.team-name {
    font-weight: 500;
    cursor: pointer;
    transition: color 0.2s;
}

.team-name:hover {
    color: #f1c40f;
    text-decoration: underline;
}

/* جدول مسابقات */
.matches-section {
    margin-top: 10px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 25px;
}

.section-title {
    color: white;
    font-size: 1.5rem;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    gap: 10px;
}

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

.match-card {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 15px;
    transition: all 0.3s ease;
    cursor: pointer;
    border: 1px solid transparent;
}

.match-card:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-3px);
}

.match-info {
    display: flex;
    justify-content: space-between;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.85rem;
    margin-bottom: 10px;
}

.match-teams {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: white;
    font-weight: 500;
}

.team-score {
    display: flex;
    align-items: center;
    gap: 10px;
}

.score {
    background: rgba(255, 255, 255, 0.2);
    padding: 5px 15px;
    border-radius: 20px;
    font-weight: 700;
}

/* بخش آمار */
.stats-section {
    margin-top: 40px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
}

.stat-card {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 25px;
    backdrop-filter: blur(5px);
}

.stat-card h3 {
    color: white;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
}

.stat-name {
    display: flex;
    align-items: center;
    gap: 10px;
}

.stat-value {
    font-weight: 600;
    background: rgba(255, 255, 255, 0.2);
    padding: 5px 15px;
    border-radius: 20px;
    min-width: 60px;
    text-align: center;
}

/* پاپ‌آپ‌ها */
.popup-overlay {
    position: fixed;
    top: -250px;
    left: 0;
    right: 0;
    bottom: 0;
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    backdrop-filter: blur(5px);
}

.popup-content {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    width: 90%;
    max-width: 800px;
    max-height: 200vh;
    overflow-y: auto;
    padding: 30px;
    position: relative;
    color: #333;
}

.close-popup {
  position: absolute;
  top: 34px;
  left: 48px;
  background: rgba(231, 76, 60, 0.8);
  color: white;
  border: none;
  width: 60px;
  height: 60px;
  border-radius: 34%;
  cursor: pointer;
  font-size: 37px;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* صفحه مدیریت */
.admin-container {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 30px;
    margin-top: 20px;
}

.admin-section {
    margin-bottom: 40px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    padding: 20px;
}

.admin-title {
    color: white;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

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

.form-label {
    display: block;
    color: white;
    margin-bottom: 8px;
    font-weight: 500;
}

.form-input {
    width: 100%;
    padding: 12px 15px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.1);
    font-family: vazir;
    font-size: 1rem;
}

.form-input:focus {
    outline: none;
    border-color: rgba(52, 152, 219, 0.8);
    background: rgba(255, 255, 255, 0.15);
}

.btn {
    padding: 12px 25px;
    border-radius: 10px;
    border: none;
    font-family: vazir;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary {
    background: rgba(52, 152, 219, 0.8);
    color: white;
}

.btn-primary:hover {
    background: rgba(52, 152, 219, 1);
    transform: translateY(-2px);
}

.btn-success {
    background: rgba(46, 204, 113, 0.8);
    color: white;
}

.btn-success:hover {
    background: rgba(46, 204, 113, 1);
    transform: translateY(-2px);

}

/* استایل‌های اضافی برای پنل مدیریت */

.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.95);
    padding: 15px 20px;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-width: 300px;
    max-width: 400px;
    z-index: 10000;
    animation: slideIn 0.3s ease;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.notification-success {
    border-right: 4px solid #27ae60;
}

.notification-error {
    border-right: 4px solid #e74c3c;
}

.notification-info {
    border-right: 4px solid #3498db;
}

.notification-content {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #333;
}

.notification-success .notification-content i {
    color: #27ae60;
}

.notification-error .notification-content i {
    color: #e74c3c;
}

.notification-info .notification-content i {
    color: #3498db;
}

.notification-close {
    background: none;
    border: none;
    color: #777;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s;
}

.notification-close:hover {
    background: rgba(0, 0, 0, 0.1);
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* استایل برای فیلدهای رویداد */
.events-section {
    background: rgba(255, 255, 255, 0.03);
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 15px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.btn-add-event {
    background: rgba(52, 152, 219, 0.2);
    color: #3498db;
    border: 1px solid #3498db;
    padding: 8px 15px;
    border-radius: 5px;
    cursor: pointer;
    font-family: vazir;
    font-size: 0.9rem;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.btn-add-event:hover {
    background: rgba(52, 152, 219, 0.3);
    transform: translateY(-1px);
}

.event-field {
    display: flex;
    gap: 10px;
    align-items: center;
    background: rgba(255, 255, 255, 0.05);
    padding: 10px;
    border-radius: 5px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s;
}

.event-field:hover {
    background: rgba(255, 255, 255, 0.08);
}

.event-field select,
.event-field input {
    flex: 1;
    padding: 8px 10px;
    border-radius: 5px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.1);
    color: white;
    font-family: vazir;
    font-size: 0.9rem;
}

.event-field select:focus,
.event-field input:focus {
    outline: none;
    border-color: rgba(52, 152, 219, 0.8);
    background: rgba(255, 255, 255, 0.15);
}

.minute-input {
    width: 80px;
    text-align: center;
}

.player-select {
    min-width: 200px;
}

.remove-event {
    background: rgba(231, 76, 60, 0.2);
    color: #e74c3c;
    border: 1px solid #e74c3c;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
    flex-shrink: 0;
}

.remove-event:hover {
    background: rgba(231, 76, 60, 0.4);
}

/* استایل برای کارت‌های مسابقه در حالت مدیریت */
.admin-match-card {
    transition: all 0.3s ease;
}

.admin-match-card:hover {
    background: rgba(255, 255, 255, 0.08) !important;
    transform: translateY(-2px);
}

/* استایل برای دکمه‌های عملیات */
.btn-action {
    padding: 8px 15px;
    border-radius: 5px;
    border: none;
    font-family: vazir;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.9rem;
}

.btn-edit {
    background: rgba(52, 152, 219, 0.2);
    color: #3498db;
    border: 1px solid #3498db;
}

.btn-edit:hover {
    background: rgba(52, 152, 219, 0.3);
}

.btn-delete {
    background: rgba(231, 76, 60, 0.2);
    color: #e74c3c;
    border: 1px solid #e74c3c;
}

.btn-delete:hover {
    background: rgba(231, 76, 60, 0.3);
}

/* رسپانسیو */
@media (max-width: 768px) {
    .event-field {
        flex-direction: column;
        align-items: stretch;
    }
    
    .player-select,
    .minute-input {
        width: 100% !important;
        min-width: unset !important;
    }
    
    .remove-event {
        align-self: flex-end;
    }
    
    .notification {
        min-width: 250px;
        max-width: 300px;
        right: 10px;
        left: 10px;
    }
}




/* نمودار حذفی */
.bracket-container {
    display: flex;
    justify-content: center;
    padding: 30px;
    overflow-x: auto;
}

.bracket {
    display: flex;
    gap: 40px;
}

.round {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.matchup {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 15px;
    width: 250px;
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.matchup-team {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* فوتتر */
.glass-footer {
    background: rgba(255, 255, 255, 0.1);
    padding: 20px 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
}

/* رسپانسیو */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 20px;
    }
    
    .main-nav ul {
        justify-content: center;
    }
    
    .groups-section {
        grid-template-columns: 1fr;
    }
    
    .matches-container {
        grid-template-columns: 1fr;
    }
    
    .stats-section {
        grid-template-columns: 1fr;
    }
}