/* Reset و تنظیمات پایه */
:root {
  --primary-color: #FFD700;
  --secondary-color: #006B4D;
  --dark-color: #2C3E50;
  --light-color: #ECF0F1;
  --accent-color: #E74C3C;
}

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

body {
  font-family: 'Vazir', sans-serif;
  background-color: #f5f5f5;
  color: #333;
  line-height: 1.6;
  padding-bottom: 80px;
  transition: background-color 0.3s, color 0.3s;
}

/* هدر */
.main-header {
  background: linear-gradient(135deg, var(--secondary-color), #004d38);
  color: white;
  padding: 1rem 0;
  text-align: center;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  position: relative;
}

.logo {
  width: 80px;
  height: auto;
  margin-bottom: 10px;
}

.main-header h1 {
  font-size: 1.1rem;
  font-weight: 500;
  margin: 0 50px;
}

.dark-mode-toggle {
  position: absolute;
  left: 15px;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.1);
  border: none;
  color: white;
  padding: 8px 12px;
  border-radius: 20px;
  font-family: 'Vazir', sans-serif;
  font-size: 0.8rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: background 0.3s;
}

.dark-mode-toggle:hover {
  background: rgba(255,255,255,0.2);
}

/* تب‌ها */
.tab {
  display: none;
  padding: 1rem;
}

.tab.active {
  display: block;
  animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* صفحه اصلی */
.hero-section {
  margin-bottom: 2rem;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0,0,0,0.1);
}

.live-player {
  position: relative;
  padding-top: 56.25%; /* نسبت 16:9 */
}

.live-player iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

.live-badge {
  position: absolute;
  top: 15px;
  left: 15px;
  background-color: var(--accent-color);
  color: white;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  z-index: 10;
  animation: pulse 1.5s infinite;
}

.live-info {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(0,0,0,0.7);
  color: white;
  padding: 12px;
  text-align: center;
}

.live-info h2 {
  font-size: 1.2rem;
  margin-bottom: 5px;
}

.vs {
  color: var(--primary-color);
  margin: 0 8px;
}

/* بخش محتوا */
.content-section {
  display: grid;
  gap: 1.5rem;
}

.about-box, .sponsors-box {
  background: white;
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  transition: background 0.3s, color 0.3s;
}

.about-box h3, .sponsors-box h3 {
  color: var(--secondary-color);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* اسپانسرها */
.sponsors-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-top: 1rem;
}

.sponsor-card {
  background: white;
  border: 1px solid #eee;
  border-radius: 8px;
  padding: 1rem;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: transform 0.3s, box-shadow 0.3s, background 0.3s;
}

.sponsor-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 16px rgba(0,0,0,0.1);
}

.sponsor-card img {
  max-width: 100%;
  max-height: 60px;
  object-fit: contain;
}

/* دکمه اینستاگرام */
.social-box {
  text-align: center;
  margin-top: 1.5rem;
}

.instagram-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(45deg, #405DE6, #5851DB, #833AB4, #C13584, #E1306C, #FD1D1D);
  color: white;
  padding: 12px 24px;
  border-radius: 30px;
  text-decoration: none;
  font-size: 0.95rem;
  transition: transform 0.3s, box-shadow 0.3s;
}

.instagram-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 16px rgba(0,0,0,0.2);
}

/* صفحه اخبار */
.section-title {
  color: var(--secondary-color);
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.3rem;
}

.news-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

.news-card {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  transition: transform 0.3s, background 0.3s, color 0.3s;
}

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

.news-image {
  position: relative;
  height: 180px;
  overflow: hidden;
}

.news-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s;
}

.news-card:hover .news-image img {
  transform: scale(1.05);
}

.news-tag {
  position: absolute;
  top: 12px;
  left: 12px;
  background: var(--primary-color);
  color: var(--dark-color);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: bold;
}

.news-body {
  padding: 1.2rem;
}

.news-body h3 {
  color: var(--dark-color);
  margin-bottom: 0.8rem;
  font-size: 1.1rem;
  transition: color 0.3s;
}

.news-excerpt {
  color: #666;
  margin-bottom: 1rem;
  font-size: 0.9rem;
  line-height: 1.6;
  transition: color 0.3s;
}

.news-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 1rem;
}

.news-date {
  color: #888;
  font-size: 0.85rem;
  transition: color 0.3s;
}

.read-more {
  color: var(--secondary-color);
  text-decoration: none;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: color 0.3s;
}

/* صفحه برنامه مسابقات */
.matches-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

.match-card {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  transition: background 0.3s, color 0.3s;
}

.match-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: var(--secondary-color);
  color: white;
}

.match-stage {
  font-weight: bold;
}

.match-date {
  font-size: 0.9rem;
}

.match-teams {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 1.5rem;
  gap: 1rem;
}

.team {
  font-weight: bold;
  font-size: 0.9rem;
  transition: color 0.3s;
}

.team-home {
  color: var(--secondary-color);
}

.team-away {
  color: var(--dark-color);
}

.match-details {
  padding: 0 1.5rem 1.5rem;
  text-align: center;
}

.match-details p {
  margin-bottom: 0.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: #555;
  transition: color 0.3s;
}

.countdown-box {
  margin-top: 1rem;
}

.countdown {
  font-family: monospace;
  font-size: 1.2rem;
  color: var(--secondary-color);
  margin-bottom: 0.5rem;
}

.match-status {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.85rem;
}

.match-status.live {
  background: var(--accent-color);
  color: white;
  animation: pulse 1.5s infinite;
}

.match-btn {
  display: block;
  width: 100%;
  padding: 12px;
  background: var(--primary-color);
  color: var(--dark-color);
  border: none;
  font-family: 'Vazir', sans-serif;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.3s;
}

.match-btn:hover {
  background: #ffcc00;
}

/* نویگیشن پایین */
.main-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: white;
  display: flex;
  justify-content: space-around;
  box-shadow: 0 -4px 12px rgba(0,0,0,0.1);
  z-index: 100;
  transition: background 0.3s;
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 12px 0;
  text-decoration: none;
  color: #888;
  flex: 1;
  transition: color 0.3s;
}

.nav-item.active {
  color: var(--secondary-color);
}

.nav-item i {
  font-size: 1.4rem;
  margin-bottom: 4px;
}

.nav-item span {
  font-size: 0.8rem;
}

/* انیمیشن‌ها */
@keyframes pulse {
  0% { opacity: 1; }
  50% { opacity: 0.7; }
  100% { opacity: 1; }
}

/* تم دارک */
body.dark-mode {
  --primary-color: #FFD700;
  --secondary-color: #00C896;
  --dark-color: #121212;
  --light-color: #1E1E1E;
  --accent-color: #FF5252;
  background-color: var(--dark-color);
  color: #E0E0E0;
}

body.dark-mode .about-box,
body.dark-mode .sponsors-box,
body.dark-mode .news-card,
body.dark-mode .match-card {
  background: #2D2D2D;
  color: #E0E0E0;
}

body.dark-mode .news-body h3,
body.dark-mode .team {
  color: #FFFFFF;
}

body.dark-mode .news-excerpt,
body.dark-mode .match-details p {
  color: #B0B0B0;
}

body.dark-mode .main-nav {
  background: #252525;
}

body.dark-mode .nav-item {
  color: #B0B0B0;
}

body.dark-mode .sponsor-card {
  background: #252525;
  border-color: #333;
}

body.dark-mode .read-more {
  color: var(--primary-color);
}

/* استایل پخش زنده با برجستگی */
.video-container {
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s, box-shadow 0.3s;
  background: white;
  margin-bottom: 2rem;
}

.video-container:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.15);
}

.live-wrapper {
  position: relative;
  width: 100%;
  height: 0;
  padding-bottom: 56.25%;
  overflow: hidden;
  background: #000;
}

.live-stream {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

.stream-info {
  padding: 12px 15px;
  background: white;
  border-top: 2px solid var(--primary-color);
  transition: background 0.3s, color 0.3s;
}

.teams {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.team {
  font-size: 0.95rem;
  font-weight: bold;
  max-width: 150px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.vs {
  color: var(--accent-color);
  font-weight: bold;
  padding: 0 5px;
}

.match-details {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
  font-size: 0.85rem;
  color: #555;
}

.match-details span {
  display: flex;
  align-items: center;
  gap: 5px;
}

.match-details i {
  color: var(--secondary-color);
}

/* حالت دارک برای پخش زنده */
body.dark-mode .video-container {
  background: #2D2D2D;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

body.dark-mode .stream-info {
  background: #252525;
  border-top-color: var(--accent-color);
}

body.dark-mode .team,
body.dark-mode .match-details {
  color: #e0e0e0;
}

/* ریسپانسیو */
@media (min-width: 768px) {
  .main-header h1 {
    font-size: 1.3rem;
  }
  
  .sponsors-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .news-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 992px) {
  .content-section {
    grid-template-columns: 1fr 1fr;
  }
  
  .sponsors-grid {
    grid-template-columns: repeat(5, 1fr);
  }
  
  .matches-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .main-nav {
    padding: 0 20%;
  }
}