/* Football11 App - Modern Design based on footba11.co */

/* CSS Variables for theming */
.football11-app {
  --primary-color: #1e40af;
  --secondary-color: #3b82f6;
  --accent-color: #f59e0b;
  --success-color: #10b981;
  --danger-color: #ef4444;
  --warning-color: #f59e0b;
  
  --bg-primary: #ffffff;
  --bg-secondary: #f8fafc;
  --bg-tertiary: #f1f5f9;
  --bg-card: #ffffff;
  
  --text-primary: #1e293b;
  --text-secondary: #64748b;
  --text-muted: #94a3b8;
  
  --border-color: #e2e8f0;
  --border-light: #f1f5f9;
  
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);
  
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  
  direction: rtl;
  font-family: 'Vazir', 'Tahoma', sans-serif;
  background: var(--bg-secondary);
  min-height: 100vh;
  overflow-x: hidden; /* Prevent horizontal scroll */
  width: 100%;
  max-width: 100vw;
}

/* Dark Theme */
.football11-app.dark {
  --bg-primary: #0f172a;
  --bg-secondary: #1e293b;
  --bg-tertiary: #334155;
  --bg-card: #1e293b;
  
  --text-primary: #f8fafc;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;
  
  --border-color: #334155;
  --border-light: #475569;
}

/* Reset and Base Styles */
.football11-app * {
  box-sizing: border-box;
}

.football11-app button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
}

.football11-app input, .football11-app select {
  font-family: inherit;
}

/* Header Styles */
.app-header {
  background: var(--bg-primary);
  border-bottom: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  width: 100%;
  max-width: 100vw;
  overflow: hidden;
}

.header-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--border-light);
  flex-wrap: wrap;
  gap: 1rem;
}

.logo h1 {
  margin: 0;
  font-size: 1.875rem;
  font-weight: 700;
  color: var(--primary-color);
}

.logo .subtitle {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-top: 0.25rem;
  display: block;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.btn-theme {
  padding: 0.5rem;
  border-radius: var(--radius-md);
  background: var(--bg-tertiary);
  color: var(--text-primary);
  transition: all 0.2s;
}

.btn-theme:hover {
  background: var(--border-color);
}

.timezone-display {
  font-size: 0.875rem;
  color: var(--text-secondary);
  padding: 0.5rem 0.75rem;
  background: var(--bg-tertiary);
  border-radius: var(--radius-md);
}

.jalali-date-display {
  font-size: 1rem;
  font-weight: 600;
  color: var(--primary-color);
  margin-right: 1rem;
  padding: 0.5rem 1rem;
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
}

/* Main Navigation */
.main-nav {
  padding: 0 1.5rem;
  width: 100%;
  overflow: hidden;
}

.nav-tabs {
  display: flex;
  gap: 0.5rem;
  border-bottom: 1px solid var(--border-light);
  flex-wrap: wrap;
  overflow-x: auto;
}

.nav-tab {
  padding: 1rem 1.5rem;
  color: var(--text-secondary);
  border-bottom: 2px solid transparent;
  transition: all 0.2s;
  font-weight: 500;
  white-space: nowrap;
  flex-shrink: 0;
}

.nav-tab:hover {
  color: var(--text-primary);
}

.nav-tab.active {
  color: var(--primary-color);
  border-bottom-color: var(--primary-color);
}

/* Tab Panels */
.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
}

/* Date Navigation */
.date-nav {
  background: var(--bg-primary);
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  overflow-x: auto;
  width: 100%;
}

.date-btn {
  padding: 0.5rem 1rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: var(--bg-primary);
  color: var(--text-secondary);
  transition: all 0.2s;
  white-space: nowrap;
  flex-shrink: 0;
}

.date-btn:hover {
  border-color: var(--primary-color);
  color: var(--primary-color);
}

.date-btn.active {
  background: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
}

/* Main Content Layout - Fixed Responsive Grid */
.main-content {
  display: grid;
  grid-template-columns: 300px 1fr 300px;
  gap: 1rem;
  max-width: 100%;
  margin: 0 auto;
  padding: 1rem;
  width: 100%;
  overflow: hidden;
}

/* Responsive breakpoints */
@media (max-width: 1400px) {
  .main-content {
    grid-template-columns: 280px 1fr 280px;
    gap: 0.875rem;
    padding: 0.875rem;
  }
}

@media (max-width: 1200px) {
  .main-content {
    grid-template-columns: 260px 1fr 260px;
    gap: 0.75rem;
    padding: 0.75rem;
  }
}

@media (max-width: 992px) {
  .main-content {
    grid-template-columns: 240px 1fr 240px;
    gap: 0.75rem;
    padding: 0.75rem;
  }
}

@media (max-width: 768px) {
  .main-content {
    grid-template-columns: 1fr;
    gap: 1rem;
    padding: 0.75rem;
  }
  
  .left-sidebar {
    order: 2;
    width: 100%;
  }
  
  .center-content {
    order: 1;
    width: 100%;
  }
  
  .right-sidebar {
    order: 3;
    width: 100%;
  }
}

@media (max-width: 480px) {
  .main-content {
    padding: 0.5rem;
    gap: 0.75rem;
  }
  
  .app-header {
    padding: 0.5rem;
  }
  
  .header-top {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }
  
  .nav-tabs {
    flex-wrap: wrap;
    gap: 0.5rem;
  }
  
  .date-nav {
    flex-wrap: wrap;
    gap: 0.5rem;
  }
  
  .center-content,
  .sidebar {
    padding: 0.75rem;
  }
  
  .match-item {
    padding: 0.75rem;
    flex-direction: column;
    gap: 0.5rem;
    text-align: center;
  }
  
  .match-item .teams {
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .match-item .score {
    order: -1;
  }
  
  .league-item {
    padding: 0.75rem;
    flex-direction: column;
    gap: 0.75rem;
    text-align: center;
  }
  
  .btn {
    padding: 0.5rem 0.75rem;
    font-size: 0.8rem;
  }
  
  .league-tabs {
    flex-wrap: wrap;
    gap: 0.25rem;
  }
  
  .league-tab {
    font-size: 0.75rem;
    padding: 0.5rem 0.25rem;
  }
}

/* Sidebar Styles - Fixed Width Issues */
.sidebar {
  background: var(--bg-primary);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

/* Remove problematic margins */
.left-sidebar {
  margin: 0;
  width: 100%;
}

.right-sidebar {
  margin: 0;
  width: 100%;
}

/* Sidebar Section Improvements */
.sidebar-section {
  margin-bottom: 1.25rem;
  padding: 0.875rem;
  background: var(--bg-primary);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
  width: 100%;
}

.sidebar-section h3 {
  margin: 0 0 0.875rem 0;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--border-light);
}

.sidebar-section:last-child {
  border-bottom: none;
}

/* League Filters - Reduced Spacing */
.league-filters {
  margin-bottom: 1.25rem;
  padding: 1rem;
  background: var(--bg-tertiary);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
  min-height: 130px;
  width: 100%;
}

/* Filter Improvements */
.filter-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.filter-row:last-child {
  margin-bottom: 0;
}

.filter-row label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-primary);
  min-width: 60px;
}

.filter-row select {
  flex: 1;
  padding: 0.5rem;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  background: var(--bg-secondary);
  color: var(--text-primary);
  transition: all 0.2s;
}

.filter-row select:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px rgba(30, 64, 175, 0.1);
}

/* Search Box Improvements */
.search-box {
  margin-bottom: 1rem;
}

.search-box input {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  background: var(--bg-secondary);
  color: var(--text-primary);
  transition: all 0.2s;
}

.search-box input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.1);
}

.search-box input::placeholder {
  color: var(--text-muted);
}

/* League List */
.league-list {
  max-height: 550px;
  min-height: 450px;
  overflow-y: auto;
  width: 100%;
}

/* Responsive improvements for league items */
@media (max-width: 768px) {
  .league-item {
    flex-direction: column;
    gap: 0.75rem;
    text-align: center;
    padding: 1rem;
    width: 100%;
  }
  
  .league-item .team-logo {
    width: 48px;
    height: 48px;
  }
  
  .league-info {
    text-align: center;
    width: 100%;
  }
  
  .favorite-btn {
    align-self: center;
  }
}

/* Right Sidebar Responsive - Override General Responsive */
@media (max-width: 768px) {
  .right-sidebar .league-item {
    flex-direction: row !important;
    text-align: left !important;
    align-items: flex-start !important;
  }
  
  .right-sidebar .league-info {
    text-align: left !important;
  }
  
  .right-sidebar .favorite-btn {
    align-self: flex-start !important;
  }
}

@media (max-width: 480px) {
  .league-item {
    padding: 0.75rem;
  }
  
  .league-item .team-logo {
    width: 40px;
    height: 40px;
  }
  
  .league-name {
    font-size: 0.85rem;
  }
  
  .country-name {
    font-size: 0.75rem;
  }
}

/* Right Sidebar Responsive 480px - Override General Responsive */
@media (max-width: 480px) {
  .right-sidebar .league-item {
    flex-direction: row !important;
    text-align: left !important;
    align-items: flex-start !important;
    padding: 0.75rem !important;
  }
  
  .right-sidebar .league-item .team-logo {
    width: 32px !important;
    height: 32px !important;
  }
  
  .right-sidebar .league-name {
    font-size: 0.9rem !important;
  }
  
  .right-sidebar .country-name {
    font-size: 0.8rem !important;
  }
}

/* Responsive improvements for match items */
@media (max-width: 768px) {
  .match-item {
    flex-direction: column;
    gap: 0.75rem;
    text-align: center;
    padding: 1rem;
    width: 100%;
  }
  
  .match-item .teams {
    flex-direction: column;
    gap: 0.5rem;
    align-items: center;
    width: 100%;
  }
  
  .match-item .score {
    order: -1;
    font-size: 1.1rem;
    padding: 0.5rem 0.75rem;
  }
  
  .match-item .match-status {
    font-size: 0.8rem;
    padding: 0.25rem 0.5rem;
  }
  
  .match-item .btn {
    width: 100%;
    max-width: none;
  }
}

@media (max-width: 480px) {
  .match-item {
    padding: 0.75rem;
  }
  
  .match-item .score {
    font-size: 1rem;
    padding: 0.375rem 0.625rem;
  }
  
  .match-item .match-status {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
  }
}

/* Responsive improvements for header */
@media (max-width: 768px) {
  .app-header {
    padding: 0.5rem;
  }
  
  .header-top {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }
  
  .logo h1 {
    font-size: 1.5rem;
  }
  
  .logo .subtitle {
    font-size: 0.8rem;
  }
  
  .header-actions {
    flex-direction: column;
    gap: 0.75rem;
  }
  
  .nav-tabs {
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
  }
  
  .nav-tab {
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
  }
}

@media (max-width: 480px) {
  .logo h1 {
    font-size: 1.25rem;
  }
  
  .logo .subtitle {
    font-size: 0.75rem;
  }
  
  .nav-tab {
    padding: 0.5rem 0.75rem;
    font-size: 0.8rem;
  }
}

/* Responsive improvements for date navigation */
@media (max-width: 768px) {
  .date-nav {
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
    padding: 0.75rem;
  }
  
  .date-btn {
    padding: 0.5rem 0.75rem;
    font-size: 0.9rem;
  }
}

@media (max-width: 480px) {
  .date-nav {
    padding: 0.5rem;
  }
  
  .date-btn {
    padding: 0.375rem 0.625rem;
    font-size: 0.8rem;
  }
}

/* Responsive improvements for content headers */
@media (max-width: 768px) {
  .content-header {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }
  
  .content-header h2 {
    font-size: 1.25rem;
  }
  
  .season-selector,
  .fixtures-filter,
  .news-filter,
  .leagues-filter {
    flex-direction: column;
    gap: 0.75rem;
    align-items: center;
  }
  
  .season-selector select,
  .fixtures-filter select,
  .news-filter select,
  .leagues-filter select {
    min-width: 200px;
  }
}

/* Responsive improvements for modal */
@media (max-width: 768px) {
  .match-modal {
    padding: 0.5rem;
  }
  
  .modal-content {
    max-width: 95vw;
    max-height: 95vh;
  }
  
  .modal-header {
    padding: 1rem;
  }
  
  .modal-header h3 {
    font-size: 1.1rem;
  }
  
  .modal-tabs {
    flex-wrap: wrap;
    gap: 0.25rem;
    padding: 0.75rem;
  }
  
  .modal-tab {
    padding: 0.375rem 0.75rem;
    font-size: 0.8rem;
  }
  
  .modal-panels {
    max-height: 50vh;
  }
  
  .modal-panel {
    padding: 1rem;
  }
}

@media (max-width: 480px) {
  .modal-header {
    padding: 0.75rem;
  }
  
  .modal-header h3 {
    font-size: 1rem;
  }
  
  .modal-tabs {
    padding: 0.5rem;
  }
  
  .modal-tab {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
  }
  
  .modal-panel {
    padding: 0.75rem;
  }
}

/* Responsive improvements for calendar */
@media (max-width: 768px) {
  .calendar-modal {
    padding: 0.5rem;
  }
  
  .calendar-content {
    max-width: 95vw;
  }
  
  .calendar-header {
    padding: 0.75rem;
  }
  
  .calendar-title {
    font-size: 1rem;
  }
  
  .calendar-body {
    padding: 0.75rem;
    min-height: 250px;
  }
  
  .calendar-day {
    font-size: 0.8rem;
  }
}

/* Responsive improvements for football pitch */
@media (max-width: 768px) {
  .lineups-container {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .football-pitch {
    height: 350px;
  }
  
  .player-marker {
    font-size: 0.7rem;
    min-width: 70px;
    padding: 0.375rem 0.625rem;
  }
  
  .player-marker .number {
    width: 20px;
    height: 20px;
    line-height: 20px;
    font-size: 0.7rem;
  }
}

@media (max-width: 480px) {
  .football-pitch {
    height: 300px;
  }
  
  .player-marker {
    font-size: 0.65rem;
    min-width: 60px;
    padding: 0.25rem 0.5rem;
  }
  
  .player-marker .number {
    width: 18px;
    height: 18px;
    line-height: 18px;
    font-size: 0.65rem;
  }
}

/* Responsive improvements for tables */
@media (max-width: 768px) {
  .standings-table {
    font-size: 0.8rem;
  }
  
  .standings-table th,
  .standings-table td {
    padding: 0.5rem 0.25rem;
  }
  
  .standings-table th:nth-child(3),
  .standings-table th:nth-child(4),
  .standings-table th:nth-child(5),
  .standings-table th:nth-child(6),
  .standings-table th:nth-child(7),
  .standings-table th:nth-child(8) {
    display: none;
  }
  
  .standings-table td:nth-child(3),
  .standings-table td:nth-child(4),
  .standings-table td:nth-child(5),
  .standings-table td:nth-child(6),
  .standings-table td:nth-child(7),
  .standings-table td:nth-child(8) {
    display: none;
  }
}

/* Responsive improvements for grids */
@media (max-width: 768px) {
  .news-grid,
  .leagues-grid,
  .teams-grid {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
    padding: 1rem;
  }
}

@media (max-width: 480px) {
  .news-grid,
  .leagues-grid,
  .teams-grid {
    grid-template-columns: 1fr;
    gap: 0.75rem;
    padding: 0.75rem;
  }
}

/* Responsive improvements for forms and inputs */
@media (max-width: 768px) {
  .filter-row {
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
  }
  
  .filter-row label {
    min-width: auto;
    text-align: center;
  }
  
  .filter-row select {
    width: 100%;
  }
  
  .search-box input {
    padding: 0.625rem;
    font-size: 0.85rem;
  }
}

/* Responsive improvements for buttons */
@media (max-width: 768px) {
  .btn {
    padding: 0.5rem 0.75rem;
    font-size: 0.85rem;
  }
  
  .load-more-btn {
    padding: 0.75rem;
    font-size: 0.9rem;
  }
}

@media (max-width: 480px) {
  .btn {
    padding: 0.375rem 0.625rem;
    font-size: 0.8rem;
  }
  
  .load-more-btn {
    padding: 0.625rem;
    font-size: 0.85rem;
  }
}

/* Responsive improvements for loading states */
@media (max-width: 768px) {
  .section-loading {
    padding: 1.5rem;
  }
  
  .loading-spinner {
    width: 28px;
    height: 28px;
  }
}

/* Responsive improvements for error messages */
@media (max-width: 768px) {
  .no-matches,
  .no-results-message {
    padding: 2rem 1rem;
    font-size: 0.9rem;
  }
}

/* Responsive improvements for utility classes */
@media (max-width: 768px) {
  .hidden-mobile {
    display: none !important;
  }
  
  .visible-mobile {
    display: block !important;
  }
}

/* Responsive improvements for text sizes */
@media (max-width: 768px) {
  .text-large {
    font-size: 1.1rem;
  }
  
  .text-small {
    font-size: 0.8rem;
  }
}

@media (max-width: 480px) {
  .text-large {
    font-size: 1rem;
  }
  
  .text-small {
    font-size: 0.75rem;
  }
}

/* Fixtures Filter */
.fixtures-filter {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.fixtures-filter select {
  padding: 0.5rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: var(--bg-primary);
  color: var(--text-primary);
  min-width: 150px;
}

/* News Filter */
.news-filter {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.news-filter select {
  padding: 0.5rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: var(--bg-primary);
  color: var(--text-primary);
  min-width: 150px;
}

/* Leagues Filter */
.leagues-filter {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.leagues-filter select {
  padding: 0.5rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: var(--bg-primary);
  color: var(--text-primary);
  min-width: 150px;
}

/* News Grid */
.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
  padding: 1.5rem;
}

.news-card {
  background: var(--bg-primary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all 0.2s;
}

.news-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.news-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.news-card-content {
  padding: 1.5rem;
}

.news-card h3 {
  margin: 0 0 1rem 0;
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-primary);
}

.news-card p {
  margin: 0 0 1rem 0;
  color: var(--text-secondary);
  line-height: 1.6;
}

.news-card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.875rem;
  color: var(--text-tertiary);
}

/* Leagues Grid */
.leagues-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
  padding: 1.5rem;
}

.league-card {
  background: var(--bg-primary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  transition: all 0.2s;
  cursor: pointer;
}

.league-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.league-card-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.league-card-logo {
  width: 48px;
  height: 48px;
  object-fit: contain;
}

.league-card-info h3 {
  margin: 0;
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-primary);
}

.league-card-info p {
  margin: 0.25rem 0 0 0;
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.league-card-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-top: 1rem;
}

.stat-item {
  text-align: center;
}

.stat-value {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--primary-color);
}

.stat-label {
  font-size: 0.75rem;
  color: var(--text-secondary);
  text-transform: uppercase;
}

/* Favorite Leagues */
.favorite-leagues {
  margin-bottom: 1.5rem;
  padding: 1.5rem;
  background: var(--bg-secondary);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-light);
  min-height: 180px;
}

/* League Item Improvements */
.league-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  margin-bottom: 0.5rem;
  background: var(--bg-primary);
  transition: all 0.2s;
  min-height: 3.5rem;
}

/* Right Sidebar League Items - Cleaned up and optimized */
.right-sidebar .league-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  width: 100%;
  padding: 0.875rem;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  margin-bottom: 0.75rem;
  background: var(--bg-primary);
  transition: all 0.2s ease;
  min-height: 4rem;
  position: relative;
}

.league-item:hover {
  border-color: var(--primary-color);
  box-shadow: var(--shadow-sm);
}

.right-sidebar .league-item:hover {
  border-color: var(--primary-color);
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
}

.league-info {
  flex: 1;
  min-width: 0;
  max-width: none;
}

.right-sidebar .league-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.league-name {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
  line-height: 1.2;
  word-wrap: break-word;
}

.right-sidebar .league-name {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-primary);
  margin: 0;
  line-height: 1.3;
  word-wrap: break-word;
  overflow-wrap: break-word;
  hyphens: auto;
  text-align: right;
}

.country-name {
  font-size: 0.8rem;
  color: var(--text-secondary);
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
  line-height: 1.2;
  word-wrap: break-word;
}

.right-sidebar .country-name {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.2;
  word-wrap: break-word;
  overflow-wrap: break-word;
  text-align: right;
}

.league-item .team-logo {
  width: 32px;
  height: 32px;
  object-fit: contain;
  border-radius: 50%;
  border: 2px solid var(--border-light);
  flex-shrink: 0;
}

/* Right Sidebar Specific Team Logo */
.right-sidebar .league-item .team-logo {
  width: 32px !important;
  height: 32px !important;
  object-fit: contain !important;
  border-radius: 50% !important;
  border: 2px solid var(--border-light) !important;
  flex-shrink: 0 !important;
}

/* Right Sidebar Specific Country Flag */
.right-sidebar .league-item .country-flag {
  width: 24px !important;
  height: 16px !important;
  object-fit: contain !important;
  border-radius: 2px !important;
  border: 1px solid var(--border-light) !important;
  flex-shrink: 0 !important;
}

/* Right Sidebar Specific Select Button */
.right-sidebar .league-item .btn {
  padding: 0.5rem 0.75rem !important;
  font-size: 0.8rem !important;
  background: var(--primary-color) !important;
  color: white !important;
  border: none !important;
  border-radius: var(--radius-sm) !important;
  cursor: pointer !important;
  transition: all 0.2s !important;
  flex-shrink: 0 !important;
  min-width: 60px !important;
}

/* Favorite Button Improvements */
.favorite-btn {
  font-size: 1.125rem;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s;
  padding: 0.25rem;
  border-radius: 50%;
  min-width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* Right Sidebar Specific Favorite Button */
.right-sidebar .favorite-btn {
  font-size: 1.125rem !important;
  color: var(--text-muted) !important;
  cursor: pointer !important;
  transition: all 0.2s !important;
  padding: 0.25rem !important;
  border-radius: 50% !important;
  min-width: 28px !important;
  height: 28px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-shrink: 0 !important;
}

.favorite-btn:hover {
  color: var(--accent-color);
  background: var(--bg-tertiary);
}

.favorite-btn.active {
  color: var(--accent-color);
}

/* Center Content */
.center-content {
  background: var(--bg-primary);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

/* Center Content Improvements */
.center-content {
  padding: 1.25rem;
}

.content-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid var(--border-light);
}

.content-header h2 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-primary);
}

/* Match Group Improvements */
.match-group {
  margin-bottom: 1.5rem;
  background: var(--bg-primary);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
  overflow: hidden;
}

.match-group-header {
  padding: 0.75rem 1rem;
  background: var(--bg-tertiary);
  border-bottom: 1px solid var(--border-light);
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-primary);
}

.match-group .match-item:last-child {
  margin-bottom: 0;
}

/* Season Selector Improvements */
.season-selector {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.season-selector span {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.season-selector select {
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  background: var(--bg-secondary);
  color: var(--text-primary);
  transition: all 0.2s;
}

.season-selector select:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px rgba(30, 64, 175, 0.1);
}

/* Live Matches */
.live-matches {
  padding: 1.5rem;
}

.match-group {
  margin-bottom: 2rem;
}

.match-group-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem;
  background: var(--bg-tertiary);
  border-radius: var(--radius-md);
  margin-bottom: 1rem;
}

.match-group-header .league-logo {
  width: 24px;
  height: 24px;
  object-fit: contain;
}

.match-group-header .league-name {
  font-weight: 600;
  color: var(--text-primary);
}

.match-group-header .country-flag {
  width: 20px;
  height: 16px;
  object-fit: cover;
  border-radius: 2px;
}

/* Load More Button */
.load-more-btn {
  display: block;
  width: 100%;
  padding: 1rem;
  margin: 1rem 0;
  background: var(--bg-secondary);
  color: var(--text-primary);
  border: 2px dashed var(--border-light);
  border-radius: var(--radius-md);
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
}

.load-more-btn:hover {
  background: var(--bg-tertiary);
  border-color: var(--primary-color);
  color: var(--primary-color);
}

.load-more-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.load-more-btn:disabled:hover {
  background: var(--bg-secondary);
  border-color: var(--border-light);
  color: var(--text-primary);
}

/* Right Sidebar - League Hub - Cleaned up styles */
.league-hub {
  padding: 1.5rem;
  min-height: 600px;
  width: 100%;
  max-width: none;
}

.league-hub h3[data-league-title] {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 1rem 0;
  padding: 0.75rem;
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
  text-align: center;
  word-wrap: break-word;
  white-space: normal;
  line-height: 1.3;
  min-height: 3rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* League Tabs - Improved spacing and Persian text support */
.league-tabs {
  display: flex;
  gap: 0.25rem;
  margin-bottom: 1rem;
  background: var(--bg-tertiary);
  border-radius: var(--radius-md);
  padding: 0.25rem;
  flex-wrap: wrap;
}

.league-tab {
  flex: 1;
  min-width: 80px;
  padding: 0.625rem 0.5rem;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all 0.2s;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
}

.league-tab.active {
  background: var(--bg-primary);
  color: var(--primary-color);
  box-shadow: var(--shadow-sm);
}

.league-tab:hover:not(.active) {
  background: var(--bg-secondary);
  color: var(--text-primary);
}

/* Tab Content */
.tab-content {
  display: none;
  padding: 0.75rem 0;
}

.tab-content.active {
  display: block;
}

/* Modal Styles */
.match-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 1rem;
}

/* Calendar Modal */
.calendar-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 1rem;
}

.calendar-modal.active {
  display: flex;
}

.calendar-content {
  background: var(--bg-primary);
  border-radius: var(--radius-lg);
  max-width: 400px;
  width: 100%;
  box-shadow: var(--shadow-lg);
}

.calendar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  border-bottom: 1px solid var(--border-light);
}

.calendar-title {
  margin: 0;
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-primary);
}

.calendar-nav {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--bg-secondary);
  color: var(--text-secondary);
  font-size: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  border: none;
  cursor: pointer;
}

.calendar-nav:hover {
  background: var(--primary-color);
  color: white;
}

.calendar-body {
  padding: 1rem;
  min-height: 300px;
}

.calendar-month h4 {
  text-align: center;
  margin: 0 0 1rem 0;
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-primary);
}

.calendar-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.25rem;
  margin-bottom: 0.5rem;
}

.weekday {
  text-align: center;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary);
  padding: 0.5rem;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.25rem;
}

.calendar-day {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s;
  font-size: 0.875rem;
  font-weight: 500;
}

.calendar-day:hover {
  background: var(--bg-tertiary);
}

.calendar-day.today {
  background: var(--primary-color);
  color: white;
}

.calendar-day.selected {
  background: var(--secondary-color);
  color: white;
}

.calendar-day.empty {
  background: transparent;
  cursor: default;
}

.calendar-day.empty:hover {
  background: transparent;
}

/* Date Header */
.date-header {
  text-align: center;
  margin-bottom: 2rem;
  padding: 1.5rem;
  background: var(--bg-secondary);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-light);
}

.date-header h3 {
  margin: 0 0 0.5rem 0;
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-primary);
}

.date-header p {
  margin: 0;
  color: var(--text-secondary);
}

/* No Matches Message */
.no-matches {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text-secondary);
  font-size: 1rem;
}

.no-matches p {
  margin: 0;
}

.calendar-footer {
  padding: 1rem;
  border-top: 1px solid var(--border-light);
  text-align: center;
}

.calendar-close {
  padding: 0.5rem 1rem;
  background: var(--primary-color);
  color: white;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.2s;
}

.calendar-close:hover {
  background: var(--secondary-color);
}

.modal-content {
  background: var(--bg-primary);
  border-radius: var(--radius-lg);
  max-width: 1000px;
  width: 100%;
  max-height: 90vh;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem;
  border-bottom: 1px solid var(--border-color);
}

.modal-header h3 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
}

.close-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  font-size: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.close-btn:hover {
  background: var(--danger-color);
  color: white;
}

.modal-tabs {
  display: flex;
  gap: 0.25rem;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--border-color);
  background: var(--bg-secondary);
}

.modal-tab {
  padding: 0.5rem 1rem;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  color: var(--text-secondary);
  transition: all 0.2s;
}

.modal-tab.active {
  background: var(--primary-color);
  color: white;
}

.modal-panels {
  max-height: 60vh;
  overflow-y: auto;
}

.modal-panel {
  display: none;
  padding: 1.5rem;
}

.modal-panel.active {
  display: block;
}

/* Football Pitch */
.lineups-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin: 1rem 0;
}

.team-lineup h4 {
  margin: 0 0 1rem 0;
  text-align: center;
  color: var(--text-primary);
  font-size: 1.125rem;
  font-weight: 600;
}

.football-pitch {
  position: relative;
  height: 450px;
  background: linear-gradient(90deg, #0a7f3f 0%, #0d9f4f 100%);
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.3);
}

.football-pitch::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: 
    repeating-linear-gradient(90deg, rgba(255,255,255,0.08) 0, rgba(255,255,255,0.08) 2px, transparent 2px, transparent 80px),
    repeating-linear-gradient(0deg, rgba(255,255,255,0.08) 0, rgba(255,255,255,0.08) 2px, transparent 2px, transparent 80px);
}

.football-pitch::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 2px;
  background: rgba(255, 255, 255, 0.3);
  transform: translateY(-50%);
}

/* Add penalty areas */
.football-pitch::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: 
    /* Center circle */
    radial-gradient(circle at 50% 50%, transparent 0, transparent 60px, rgba(255,255,255,0.1) 60px, rgba(255,255,255,0.1) 65px, transparent 65px),
    /* Penalty areas */
    linear-gradient(90deg, transparent 0, transparent 20%, rgba(255,255,255,0.05) 20%, rgba(255,255,255,0.05) 80%, transparent 80%),
    /* Goal areas */
    linear-gradient(90deg, transparent 0, transparent 30%, rgba(255,255,255,0.08) 30%, rgba(255,255,255,0.08) 70%, transparent 70%);
}

.player-marker {
  position: absolute;
  background: rgba(0, 0, 0, 0.9);
  color: white;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  white-space: nowrap;
  transform: translate(-50%, -50%);
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.5);
  border: 2px solid rgba(255, 255, 255, 0.3);
  min-width: 80px;
  text-align: center;
  transition: all 0.3s ease;
  cursor: pointer;
  backdrop-filter: blur(4px);
}

.player-marker:hover {
  background: rgba(0, 0, 0, 0.98);
  transform: translate(-50%, -50%) scale(1.1);
  z-index: 20;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.7);
  border-color: rgba(255, 255, 255, 0.6);
}

.player-marker .number {
  display: inline-block;
  width: 24px;
  height: 24px;
  background: rgba(255, 255, 255, 0.95);
  color: #000;
  border-radius: 50%;
  text-align: center;
  line-height: 24px;
  margin-left: 0.5rem;
  font-weight: 700;
  font-size: 0.8rem;
  border: 1px solid rgba(0, 0, 0, 0.2);
}

/* Position-specific styling */
.player-marker[data-position="G"] {
  background: rgba(220, 53, 69, 0.9);
  border-color: rgba(220, 53, 69, 0.8);
}

.player-marker[data-position="D"] {
  background: rgba(40, 167, 69, 0.9);
  border-color: rgba(40, 167, 69, 0.8);
}

.player-marker[data-position="M"] {
  background: rgba(255, 193, 7, 0.9);
  border-color: rgba(255, 193, 7, 0.8);
}

.player-marker[data-position="F"] {
  background: rgba(13, 110, 253, 0.9);
  border-color: rgba(13, 110, 253, 0.8);
}

/* Match Stats */
.team-stats {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  margin-bottom: 1rem;
}

.team-stats h4 {
  margin: 0 0 1rem 0;
  color: var(--primary-color);
  font-size: 1.125rem;
  font-weight: 600;
  text-align: center;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-light);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}

.stat-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem;
  background: var(--bg-tertiary);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-light);
}

.stat-label {
  color: var(--text-secondary);
  font-weight: 500;
}

.stat-value {
  color: var(--text-primary);
  font-weight: 700;
  font-size: 1.1rem;
}

/* Events Timeline */
.events-timeline {
  max-height: 400px;
  overflow-y: auto;
}

.event-item {
  display: grid;
  grid-template-columns: 60px 1fr auto;
  gap: 1rem;
  align-items: center;
  padding: 1rem;
  border-bottom: 1px solid var(--border-light);
  transition: background-color 0.2s;
}

.event-item:hover {
  background: var(--bg-tertiary);
}

.event-item:last-child {
  border-bottom: none;
}

.event-time {
  color: var(--primary-color);
  font-weight: 700;
  text-align: center;
  background: var(--bg-tertiary);
  padding: 0.5rem;
  border-radius: var(--radius-sm);
}

.event-details {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.event-team {
  font-weight: 600;
  color: var(--text-primary);
}

.event-type, .event-detail {
  color: var(--text-secondary);
  font-size: 0.875rem;
}

.event-player {
  color: var(--text-primary);
  font-style: italic;
}

/* H2H History */
.h2h-item {
  padding: 1rem;
  border-bottom: 1px solid var(--border-light);
  transition: background-color 0.2s;
}

.h2h-item:hover {
  background: var(--bg-tertiary);
}

.h2h-item:last-child {
  border-bottom: none;
}

.h2h-teams {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 1rem;
  align-items: center;
  margin-bottom: 0.5rem;
}

.h2h-item .home-team {
  text-align: right;
  font-weight: 500;
}

.h2h-item .away-team {
  text-align: left;
  font-weight: 500;
}

.h2h-item .score {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--primary-color);
  text-align: center;
  background: var(--bg-tertiary);
  padding: 0.5rem;
  border-radius: var(--radius-sm);
}

.h2h-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.h2h-info .league {
  font-weight: 500;
}

.h2h-info .date {
  font-style: italic;
}

/* Match Info Grid */
.match-info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}

.info-item {
  padding: 0.75rem;
  background: var(--bg-tertiary);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-light);
}

.info-item strong {
  color: var(--text-primary);
  display: block;
  margin-bottom: 0.25rem;
}

/* Event Assist */
.event-assist {
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-style: italic;
}

/* Team Title and Coach */
.team-title {
  font-weight: 600;
  font-size: 1.1rem;
  margin-bottom: 0.25rem;
}

.coach-name {
  font-size: 0.875rem;
  color: var(--text-secondary);
  font-style: italic;
}

/* Substitutes */
.substitutes-title {
  font-size: 1rem;
  font-weight: 600;
  margin: 1rem 0 0.5rem 0;
  color: var(--text-primary);
}

.substitutes-list {
  display: grid;
  gap: 0.5rem;
}

.substitute-item {
  padding: 0.5rem;
  background: var(--bg-tertiary);
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  border: 1px solid var(--border-light);
  transition: background-color 0.2s;
}

.substitute-item:hover {
  background: var(--bg-secondary);
}

/* Team Cards Grid */
.teams-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
}

.team-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  text-align: center;
  transition: all 0.2s;
}

.team-card:hover {
  border-color: var(--primary-color);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.team-card .team-logo {
  width: 48px;
  height: 48px;
  margin: 0 auto 1rem auto;
  display: block;
}

.team-card h4 {
  margin: 0 0 0.5rem 0;
  color: var(--text-primary);
  font-size: 1rem;
  font-weight: 600;
}

.team-card .text-muted {
  font-size: 0.875rem;
}

/* Loading Overlay - Removed initial loading */

/* Section Loading Improvements */
.section-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  color: var(--text-secondary);
  font-size: 0.875rem;
}

.loading-spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--border-light);
  border-top: 3px solid var(--primary-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 0.75rem;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Utility Classes */
.hidden { display: none !important; }
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.bg-primary { background: var(--bg-primary); }
.bg-secondary { background: var(--bg-secondary); }

/* Fixtures List */
.fixtures-list {
  min-height: 200px;
}

.fixtures-list:empty::before {
  content: 'هیچ مسابقه‌ای موجود نیست';
  display: block;
  text-align: center;
  padding: 2rem;
  color: var(--text-muted);
  font-style: italic;
}

/* Standings Table */
.standings-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
}

.standings-table th,
.standings-table td {
  padding: 0.75rem;
  text-align: center;
  border-bottom: 1px solid var(--border-light);
}

.standings-table th {
  background: var(--bg-tertiary);
  font-weight: 600;
  color: var(--text-primary);
  font-size: 0.875rem;
}

.standings-table td {
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.standings-table tr:hover {
  background: var(--bg-secondary);
}

/* Teams Grid */
.teams-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.team-card {
  padding: 1rem;
  background: var(--bg-primary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  text-align: center;
  transition: all 0.2s;
}

.team-card:hover {
  border-color: var(--primary-color);
  box-shadow: var(--shadow-sm);
}

.team-card .team-logo {
  width: 64px;
  height: 64px;
  object-fit: contain;
  margin: 0 auto 0.75rem;
  border-radius: 50%;
  border: 2px solid var(--border-light);
}

.team-card h4 {
  margin: 0 0 0.5rem 0;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
}

.team-card p {
  margin: 0;
  font-size: 0.875rem;
  color: var(--text-secondary);
}

/* Results List */
.results-list {
  min-height: 200px;
}

.results-list:empty::before {
  content: 'هیچ نتیجه‌ای موجود نیست';
  display: block;
  text-align: center;
  padding: 2rem;
  color: var(--text-muted);
  font-style: italic;
}

/* Standings Group */
.standings-group {
  margin-bottom: 2rem;
}

.standings-group h4 {
  margin: 0 0 1rem 0;
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-primary);
  padding: 0.75rem;
  background: var(--bg-tertiary);
  border-radius: var(--radius-md);
  border-right: 3px solid var(--primary-color);
}

/* Match Item Styles */
.match-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  margin-bottom: 0.5rem;
  transition: all 0.2s;
  background: var(--bg-secondary);
  width: 100%;
}

.match-item .teams {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 120px;
  flex: 1;
}

.match-item .team-name {
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--text-primary);
  text-align: center;
  min-width: 100px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.match-item .score {
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--primary-color);
  text-align: center;
  padding: 0.5rem 1rem;
  background: var(--bg-tertiary);
  border-radius: var(--radius-sm);
  min-width: 80px;
}

.match-item .match-status {
  font-size: 0.875rem;
  color: white;
  text-align: center;
  padding: 0.25rem 0.75rem;
  background: var(--accent-color);
  border-radius: var(--radius-sm);
  min-width: 60px;
}

.match-item .btn {
  padding: 0.5rem 1rem;
  background: var(--primary-color);
  color: white;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.2s;
  border: none;
  cursor: pointer;
  min-width: 80px;
  text-align: center;
  white-space: nowrap;
}

.match-item .btn:hover {
  background: var(--secondary-color);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

/* Team Logo */
.team-logo {
  width: 32px;
  height: 32px;
  object-fit: contain;
  border-radius: 50%;
  border: 2px solid var(--border-light);
  flex-shrink: 0;
}

/* Country Flag */
.country-flag {
  width: 20px;
  height: 16px;
  object-fit: cover;
  border-radius: 2px;
  flex-shrink: 0;
}

/* League Logo */
.league-logo {
  width: 24px;
  height: 24px;
  object-fit: contain;
  flex-shrink: 0;
}

/* Right Sidebar Match Items - Fixed positioning */
.right-sidebar .fixtures-list .match-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.875rem;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  margin-bottom: 0.75rem;
  transition: all 0.2s ease;
  background: var(--bg-primary);
  width: 100%;
  min-height: 3.5rem;
  position: relative;
}

.right-sidebar .fixtures-list .match-item:hover {
  border-color: var(--primary-color);
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
}

.right-sidebar .fixtures-list .match-item .teams {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
  flex: 1;
  flex-direction: row;
  justify-content: space-between;
  overflow: visible;
}

.right-sidebar .fixtures-list .match-item .team-name {
  font-weight: 500;
  font-size: 0.85rem;
  color: var(--text-primary);
  text-align: center;
  min-width: 0;
  flex: 1;
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
  line-height: 1.2;
  word-wrap: break-word;
  overflow-wrap: break-word;
  padding: 0 0.25rem;
  display: block;
  visibility: visible;
  opacity: 1;
}

.right-sidebar .fixtures-list .match-item .score {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--primary-color);
  text-align: center;
  padding: 0.375rem 0.75rem;
  background: var(--bg-tertiary);
  border-radius: var(--radius-sm);
  min-width: 60px;
  flex-shrink: 0;
  display: block;
  visibility: visible;
  opacity: 1;
}

.right-sidebar .fixtures-list .match-item .match-status {
  font-size: 0.75rem;
  color: white;
  text-align: center;
  padding: 0.25rem 0.5rem;
  background: var(--accent-color);
  border-radius: var(--radius-sm);
  min-width: 50px;
  flex-shrink: 0;
  display: block;
  visibility: visible;
  opacity: 1;
}

.right-sidebar .fixtures-list .match-item .details-btn {
  padding: 0.375rem 0.75rem;
  background: var(--primary-color);
  color: white;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 500;
  transition: all 0.2s;
  border: none;
  cursor: pointer;
  min-width: 60px;
  text-align: center;
  white-space: nowrap;
  flex-shrink: 0;
  display: block;
  visibility: visible;
  opacity: 1;
}

.right-sidebar .fixtures-list .match-item .details-btn:hover {
  background: var(--secondary-color);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.right-sidebar .fixtures-list .match-item .team-logo {
  width: 24px;
  height: 24px;
  object-fit: contain;
  border-radius: 50%;
  border: 1px solid var(--border-light);
  flex-shrink: 0;
  background: var(--bg-secondary);
  display: block;
  visibility: visible;
  opacity: 1;
}

/* Fixtures Header */
.right-sidebar .fixtures-list .fixtures-header {
  margin-bottom: 1rem;
  padding: 0.75rem;
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
  text-align: center;
}

.right-sidebar .fixtures-list .fixtures-header h3 {
  margin: 0 0 0.5rem 0;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
}

.right-sidebar .fixtures-list .fixtures-header p {
  margin: 0;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

/* Fixture Date Header */
.right-sidebar .fixtures-list .fixture-date-header {
  margin: 1rem 0 0.75rem 0;
  padding: 0.5rem 0.75rem;
  background: var(--bg-tertiary);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-light);
}

.right-sidebar .fixtures-list .fixture-date-header h4 {
  margin: 0;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
  text-align: center;
}

/* Ensure all elements are visible */
.right-sidebar .fixtures-list * {
  visibility: visible !important;
  opacity: 1 !important;
  display: block !important;
}

.right-sidebar .fixtures-list .match-item * {
  visibility: visible !important;
  opacity: 1 !important;
}

/* Debug styles - remove after fixing */
.right-sidebar .fixtures-list .match-item {
  border: 2px solid red !important;
  background: yellow !important;
}

.right-sidebar .fixtures-list .match-item .teams {
  border: 1px solid blue !important;
  background: lightblue !important;
}

.right-sidebar .fixtures-list .match-item .team-name {
  border: 1px solid green !important;
  background: lightgreen !important;
  color: black !important;
}

/* Responsive adjustments for right sidebar match items */
@media (max-width: 1024px) {
  .right-sidebar .fixtures-list .match-item {
    padding: 0.75rem;
    gap: 0.5rem;
  }
  
  .right-sidebar .fixtures-list .match-item .teams {
    gap: 0.375rem;
  }
  
  .right-sidebar .fixtures-list .match-item .team-name {
    font-size: 0.8rem;
  }
  
  .right-sidebar .fixtures-list .match-item .score {
    font-size: 1rem;
    padding: 0.25rem 0.5rem;
    min-width: 50px;
  }
}

@media (max-width: 768px) {
  .right-sidebar .fixtures-list .match-item {
    flex-direction: column;
    gap: 0.5rem;
    text-align: center;
    padding: 0.75rem;
  }
  
  .right-sidebar .fixtures-list .match-item .teams {
    flex-direction: row;
    justify-content: center;
    gap: 1rem;
    width: 100%;
  }
  
  .right-sidebar .fixtures-list .match-item .team-name {
    min-width: 80px;
    text-align: center;
  }
  
  .right-sidebar .fixtures-list .match-item .score {
    order: -1;
    margin-bottom: 0.5rem;
  }
}

@media (max-width: 480px) {
  .right-sidebar .fixtures-list .match-item {
    padding: 0.625rem;
    gap: 0.375rem;
  }
  
  .right-sidebar .fixtures-list .match-item .teams {
    gap: 0.75rem;
  }
  
  .right-sidebar .fixtures-list .match-item .team-name {
    font-size: 0.75rem;
    min-width: 70px;
  }
  
  .right-sidebar .fixtures-list .match-item .score {
    font-size: 0.9rem;
    padding: 0.25rem 0.5rem;
    min-width: 45px;
  }
  
  .right-sidebar .fixtures-list .match-item .match-status {
    font-size: 0.7rem;
    padding: 0.25rem 0.375rem;
    min-width: 40px;
  }
  
  .right-sidebar .fixtures-list .match-item .details-btn {
    padding: 0.25rem 0.5rem;
    font-size: 0.7rem;
    min-width: 50px;
  }
}

/* Right Sidebar Standings Table - Fixed positioning and overflow */
.right-sidebar .standings-table {
  width: 100%;
  overflow-x: auto;
  background: var(--bg-primary);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
  max-width: 100%;
  box-sizing: border-box;
}

.right-sidebar .standings-table table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.7rem;
  min-width: 320px;
  max-width: 100%;
  table-layout: auto;
}

.right-sidebar .standings-table th,
.right-sidebar .standings-table td {
  padding: 0.5rem 0.25rem;
  text-align: center;
  border-bottom: 1px solid var(--border-light);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  box-sizing: border-box;
  vertical-align: middle;
}

.right-sidebar .standings-table th {
  background: var(--bg-secondary);
  font-weight: 600;
  color: var(--text-primary);
  font-size: 0.7rem;
  position: sticky;
  top: 0;
  z-index: 10;
}

.right-sidebar .standings-table td {
  color: var(--text-secondary);
  font-size: 0.7rem;
}

.right-sidebar .standings-table tr:hover {
  background: var(--bg-tertiary);
}

/* Column widths for right sidebar standings - Fixed */
.right-sidebar .standings-table .position {
  font-weight: 700;
  color: var(--primary-color);
  width: 25px;
  min-width: 25px;
  max-width: 25px;
}

.right-sidebar .standings-table .team-name {
  text-align: right;
  font-weight: 500;
  color: var(--text-primary);
  width: 140px;
  min-width: 120px;
  max-width: 140px;
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
  word-wrap: break-word;
  overflow-wrap: break-word;
  line-height: 1.2;
}

.right-sidebar .standings-table .points {
  font-weight: 700;
  color: var(--success-color);
  width: 30px;
  min-width: 30px;
  max-width: 30px;
}

.right-sidebar .standings-table .wins {
  width: 20px;
  min-width: 20px;
  max-width: 20px;
}

.right-sidebar .standings-table .draws {
  width: 20px;
  min-width: 20px;
  max-width: 20px;
}

.right-sidebar .standings-table .losses {
  width: 20px;
  min-width: 20px;
  max-width: 20px;
}

.right-sidebar .standings-table .goals-for,
.right-sidebar .standings-table .goals-against,
.right-sidebar .standings-table .goal-difference {
  width: 25px;
  min-width: 25px;
  max-width: 25px;
  font-family: monospace;
}

.right-sidebar .standings-table .form {
  width: 60px;
  min-width: 50px;
  max-width: 60px;
  font-size: 0.6rem;
}

/* Team logo and name container */
.right-sidebar .standings-table .team-cell {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.25rem;
  text-align: right;
  justify-content: flex-end;
}

.right-sidebar .standings-table .team-logo {
  width: 24px;
  height: 24px;
  object-fit: contain;
  border-radius: 50%;
  border: 1px solid var(--border-light);
  flex-shrink: 0;
  background: var(--bg-secondary);
}

.right-sidebar .standings-table .team-name-text {
  font-weight: 500;
  color: var(--text-primary);
  font-size: 0.7rem;
  line-height: 1.2;
  word-wrap: break-word;
  overflow-wrap: break-word;
  text-align: right;
  min-width: 0;
  flex: 1;
}

/* Responsive adjustments for right sidebar standings */
@media (max-width: 1024px) {
  .right-sidebar .standings-table table {
    font-size: 0.65rem;
    min-width: 300px;
  }
  
  .right-sidebar .standings-table th,
  .right-sidebar .standings-table td {
    padding: 0.375rem 0.125rem;
  }
  
  .right-sidebar .standings-table .team-name {
    width: 120px;
    min-width: 100px;
    max-width: 120px;
  }
  
  .right-sidebar .standings-table .form {
    width: 50px;
    min-width: 40px;
    max-width: 50px;
  }
}

@media (max-width: 768px) {
  .right-sidebar .standings-table {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  .right-sidebar .standings-table table {
    min-width: 450px;
    font-size: 0.6rem;
  }
  
  .right-sidebar .standings-table .team-name {
    width: 140px;
    min-width: 120px;
    max-width: 140px;
  }
  
  .right-sidebar .standings-table .team-cell {
    gap: 0.375rem;
  }
  
  .right-sidebar .standings-table .team-logo {
    width: 20px;
    height: 20px;
  }
}

@media (max-width: 480px) {
  .right-sidebar .standings-table table {
    font-size: 0.55rem;
    min-width: 400px;
  }
  
  .right-sidebar .standings-table th,
  .right-sidebar .standings-table td {
    padding: 0.25rem 0.0625rem;
  }
  
  .right-sidebar .standings-table .team-name {
    width: 110px;
    min-width: 90px;
    max-width: 110px;
  }
  
  .right-sidebar .standings-table .form {
    width: 45px;
    min-width: 35px;
    max-width: 45px;
  }
  
  .right-sidebar .standings-table .team-cell {
    gap: 0.25rem;
  }
  
  .right-sidebar .standings-table .team-logo {
    width: 18px;
    height: 18px;
  }
}

/* Right Sidebar Match Items - Fixed positioning, overflow and content display */
.right-sidebar .fixtures-list .match-item,
.right-sidebar .results-list .match-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.75rem;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  margin-bottom: 0.75rem;
  transition: all 0.2s ease;
  background: var(--bg-primary);
  width: 100%;
  max-width: 100%;
  min-height: 3.5rem;
  position: relative;
  box-sizing: border-box;
  overflow: hidden;
}

.right-sidebar .fixtures-list .match-item:hover,
.right-sidebar .results-list .match-item:hover {
  border-color: var(--primary-color);
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
}

.right-sidebar .fixtures-list .match-item .teams,
.right-sidebar .results-list .match-item .teams {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  min-width: 0;
  flex: 1;
  flex-direction: row;
  justify-content: space-between;
  overflow: visible;
  max-width: 100%;
}

.right-sidebar .fixtures-list .match-item .team-name,
.right-sidebar .results-list .match-item .team-name {
  font-weight: 500;
  font-size: 0.75rem;
  color: var(--text-primary);
  text-align: center;
  min-width: 0;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 1.2;
  word-wrap: break-word;
  overflow-wrap: break-word;
  padding: 0 0.125rem;
  display: block;
  visibility: visible;
  opacity: 1;
  max-width: 100%;
}

.right-sidebar .fixtures-list .match-item .score,
.right-sidebar .results-list .match-item .score {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--primary-color);
  text-align: center;
  padding: 0.25rem 0.5rem;
  background: var(--bg-tertiary);
  border-radius: var(--radius-sm);
  min-width: 45px;
  max-width: 60px;
  flex-shrink: 0;
  display: block;
  visibility: visible;
  opacity: 1;
  white-space: nowrap;
  overflow: hidden;
}

.right-sidebar .fixtures-list .match-item .match-status,
.right-sidebar .results-list .match-item .match-status {
  font-size: 0.65rem;
  color: white;
  text-align: center;
  padding: 0.25rem 0.375rem;
  background: var(--accent-color);
  border-radius: var(--radius-sm);
  min-width: 35px;
  max-width: 45px;
  flex-shrink: 0;
  display: block;
  visibility: visible;
  opacity: 1;
  white-space: nowrap;
  overflow: hidden;
}

.right-sidebar .fixtures-list .match-item .details-btn,
.right-sidebar .results-list .match-item .details-btn {
  padding: 0.25rem 0.5rem;
  background: var(--primary-color);
  color: white;
  border-radius: var(--radius-sm);
  font-size: 0.65rem;
  font-weight: 500;
  transition: all 0.2s;
  border: none;
  cursor: pointer;
  min-width: 45px;
  max-width: 55px;
  text-align: center;
  white-space: nowrap;
  flex-shrink: 0;
  display: block;
  visibility: visible;
  opacity: 1;
  overflow: hidden;
}

.right-sidebar .fixtures-list .match-item .details-btn:hover,
.right-sidebar .results-list .match-item .details-btn:hover {
  background: var(--secondary-color);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.right-sidebar .fixtures-list .match-item .team-logo,
.right-sidebar .results-list .match-item .team-logo {
  width: 20px;
  height: 20px;
  object-fit: contain;
  border-radius: 50%;
  border: 1px solid var(--border-light);
  flex-shrink: 0;
  background: var(--bg-secondary);
  display: block;
  visibility: visible;
  opacity: 1;
}

/* Compact layout for right sidebar match items */
.right-sidebar .fixtures-list .match-item,
.right-sidebar .results-list .match-item {
  flex-wrap: nowrap;
  align-items: center;
}

/* Ensure proper spacing and prevent overflow */
.right-sidebar .fixtures-list,
.right-sidebar .results-list {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 0.5rem;
  box-sizing: border-box;
}

/* Responsive adjustments for right sidebar match items */
@media (max-width: 1024px) {
  .right-sidebar .fixtures-list .match-item,
  .right-sidebar .results-list .match-item {
    padding: 0.625rem;
    gap: 0.375rem;
  }
  
  .right-sidebar .fixtures-list .match-item .teams,
  .right-sidebar .results-list .match-item .teams {
    gap: 0.25rem;
  }
  
  .right-sidebar .fixtures-list .match-item .team-name,
  .right-sidebar .results-list .match-item .team-name {
    font-size: 0.7rem;
  }
  
  .right-sidebar .fixtures-list .match-item .score,
  .right-sidebar .results-list .match-item .score {
    font-size: 0.8rem;
    padding: 0.25rem 0.375rem;
    min-width: 40px;
  }
}

@media (max-width: 768px) {
  .right-sidebar .fixtures-list .match-item,
  .right-sidebar .results-list .match-item {
    flex-direction: column;
    gap: 0.375rem;
    text-align: center;
    padding: 0.625rem;
    min-height: 4rem;
  }
  
  .right-sidebar .fixtures-list .match-item .teams,
  .right-sidebar .results-list .match-item .teams {
    flex-direction: row;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    max-width: 100%;
  }
  
  .right-sidebar .fixtures-list .match-item .team-name,
  .right-sidebar .results-list .match-item .team-name {
    min-width: 60px;
    text-align: center;
    max-width: 80px;
  }
  
  .right-sidebar .fixtures-list .match-item .score,
  .right-sidebar .results-list .match-item .score {
    order: -1;
    margin-bottom: 0.25rem;
    min-width: 50px;
  }
}

@media (max-width: 480px) {
  .right-sidebar .fixtures-list .match-item,
  .right-sidebar .results-list .match-item {
    padding: 0.5rem;
    gap: 0.25rem;
    min-height: 3.5rem;
  }
  
  .right-sidebar .fixtures-list .match-item .teams,
  .right-sidebar .results-list .match-item .teams {
    gap: 0.375rem;
  }
  
  .right-sidebar .fixtures-list .match-item .team-name,
  .right-sidebar .results-list .match-item .team-name {
    font-size: 0.65rem;
    min-width: 50px;
    max-width: 70px;
  }
  
  .right-sidebar .fixtures-list .match-item .score,
  .right-sidebar .results-list .match-item .score {
    font-size: 0.75rem;
    padding: 0.25rem 0.375rem;
    min-width: 35px;
  }
  
  .right-sidebar .fixtures-list .match-item .match-status,
  .right-sidebar .results-list .match-item .match-status {
    font-size: 0.6rem;
    padding: 0.25rem 0.25rem;
    min-width: 30px;
  }
  
  .right-sidebar .fixtures-list .match-item .details-btn,
  .right-sidebar .results-list .match-item .details-btn {
    padding: 0.25rem 0.375rem;
    font-size: 0.6rem;
    min-width: 40px;
  }
}

/* Make entire match-item clickable */
.right-sidebar .fixtures-list .match-item,
.right-sidebar .results-list .match-item,
.center-content .match-item {
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
}

.right-sidebar .fixtures-list .match-item:hover,
.right-sidebar .results-list .match-item:hover,
.center-content .match-item:hover {
  border-color: var(--primary-color);
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
  background: var(--bg-secondary);
}

/* Loading Popup Modal */
.loading-popup {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  backdrop-filter: blur(5px);
}

.loading-popup .loading-content {
  background: var(--bg-primary);
  border-radius: var(--radius-lg);
  padding: 2rem;
  text-align: center;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-color);
  max-width: 400px;
  width: 90%;
}

.loading-popup .loading-spinner {
  width: 60px;
  height: 60px;
  border: 4px solid var(--border-light);
  border-top: 4px solid var(--primary-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 1rem;
}

.loading-popup .loading-text {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.loading-popup .loading-subtext {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin: 0;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Loading popup animations */
.loading-popup {
  animation: fadeIn 0.3s ease-out;
}

.loading-popup.fade-out {
  animation: fadeOut 0.3s ease-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes fadeOut {
  from {
    opacity: 1;
    transform: scale(1);
  }
  to {
    opacity: 0;
    transform: scale(0.9);
  }
}

/* Match item click feedback */
.match-item.clickable {
  cursor: pointer;
  user-select: none;
}

.match-item.clickable:active {
  transform: scale(0.98);
  transition: transform 0.1s ease;
}

/* Ensure details button is still clickable */
.match-item .details-btn {
  position: relative;
  z-index: 10;
  cursor: pointer;
}

.match-item .details-btn:hover {
  transform: scale(1.05);
}

/* Loading overlay for match details */
.match-details-loading {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  z-index: 5;
}

.match-details-loading .mini-spinner {
  width: 30px;
  height: 30px;
  border: 3px solid var(--border-light);
  border-top: 3px solid var(--primary-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

/* Responsive loading popup */
@media (max-width: 768px) {
  .loading-popup .loading-content {
    padding: 1.5rem;
    margin: 1rem;
  }
  
  .loading-popup .loading-spinner {
    width: 50px;
    height: 50px;
  }
  
  .loading-popup .loading-text {
    font-size: 1rem;
  }
  
  .loading-popup .loading-subtext {
    font-size: 0.8rem;
  }
}

@media (max-width: 480px) {
  .loading-popup .loading-content {
    padding: 1rem;
    margin: 0.5rem;
  }
  
  .loading-popup .loading-spinner {
    width: 40px;
    height: 40px;
  }
  
  .loading-popup .loading-text {
    font-size: 0.9rem;
  }
  
  .loading-popup .loading-subtext {
    font-size: 0.75rem;
  }
}
