html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

html {
  position: relative;
  min-height: 100%;
}

body {
  margin-bottom: 60px;
}

/* Dashboard kart boşluk optimizasyonu */
.dashboard-card .card-body {
  padding: 1rem 1.25rem 0.5rem 1.25rem !important;
}

.dashboard-card .card-footer {
  padding: 0.5rem 1.25rem !important;
  margin-top: 0.5rem !important;
}

/* Dashboard satır boşlukları */
.dashboard-card .py-3 {
  padding-top: 0.75rem !important;
  padding-bottom: 0.75rem !important;
}

/* Kart linkleri ve hover efektleri - sade ayarlar */
.clickable-card {
  transition: all 0.2s ease;
  cursor: pointer;
}

.clickable-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Mobil navigation için padding */
@media (max-width: 767.98px) {
  .page-body {
    padding-bottom: 65px !important; /* 85px'den 65px'e düşürüldü */
  }
  
  /* Mobilde tablolar arası boşluk düzeltmesi */
  .row-deck.row-cards.mt-3 {
    margin-top: 1rem !important; /* mt-3 = 1rem */
  }
  
  /* Mobilde kartlar arası boşluk azaltma */
  .row-deck.row-cards .col-md-6:not(:first-child) {
    margin-top: 1rem !important; /* İkinci kartın üst boşluğu */
  }
  
  /* Mobilde row'un kendi margin'ini sıfırla */
  .row-deck.row-cards {
    margin-top: 1rem !important;
  }
}

/* Yaklaşan Maçlar empty state ortalama - tüm cihazlarda */
.dashboard-card .empty {
  position: absolute !important;
  top: 50% !important;
  left: 50% !important;
  transform: translate(-50%, -50%) !important;
  width: 80% !important;
  text-align: center !important;
  margin: 0 !important;
}

.dashboard-card .card-body {
  position: relative !important;
}

/* Takım logo stilleri */
.team-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
}

.team-logo-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 4px;
}

.team-default-icon {
  font-size: 26px;
}

.team-name {
  font-weight: 600;
  font-size: 0.9rem;
}

/* Puanlama kuralları genel stil */
.scoring-rules .scoring-item {
  margin-bottom: 0.3rem;
  line-height: 1.4;
}

.scoring-item .scoring-text,
.scoring-item .scoring-continuation {
  display: inline;
}

/* Mobil cihazlarda takım logoları */
@media (max-width: 767.98px) {
  .team-logo {
    width: 32px;
    height: 32px;
  }
  
  .team-default-icon {
    font-size: 22px;
  }
  
  .team-name {
    font-size: 0.8rem;
  }
  
  /* Prediction page mobil düzeltmeleri */
  .prediction-page {
    padding-bottom: 0.5rem !important;
    min-height: auto !important;
  }
  
  .prediction-page .container {
    margin-bottom: 0 !important;
    padding-bottom: 0.5rem !important;
  }
  
  .prediction-page .card {
    margin-bottom: 0.5rem !important;
  }
  
  /* Mobilde scroll bar'ı kaldır */
  .prediction-page {
    overflow-x: hidden !important;
  }
  
  body.prediction-page {
    overflow-x: hidden !important;
  }
  
  /* Puanlama kuralları mobil düzeni */
  .scoring-rules .scoring-item {
    margin-bottom: 0.5rem;
  }
  
  .scoring-item .scoring-continuation {
    display: block;
    padding-left: 3.15rem;
  }
  
  /* Çok küçük ekranlarda yazıları normal akışa bırak */
  @media (max-width: 400px) {
    .scoring-item .scoring-continuation {
      padding-left: 3.15rem;
      word-wrap: break-word;
    }
    
    .scoring-rules .scoring-item {
      line-height: 1.5;
      margin-bottom: 0.7rem;
    }
  }
  
  /* Çok küçük ekranlarda (320px altı) padding'i azalt */
  @media (max-width: 320px) {
    .scoring-item .scoring-continuation {
      padding-left: 2.8rem;
    }
  }
  
  /* Admin dropdown mobil düzeltmeleri */
  .admin-dropdown-mobile {
    position: absolute !important;
    top: 100% !important;
    right: 0 !important;
    left: auto !important;
    z-index: 1055 !important;
    max-width: 280px !important;
    min-width: 200px !important;
    transform: none !important;
  }
  
  .admin-dropdown-mobile .dropdown-item {
    padding: 0.75rem 1rem !important;
    white-space: nowrap !important;
    font-size: 0.875rem !important;
  }
  
  /* Navbar mobil z-index */
  .navbar {
    z-index: 1050 !important;
  }
  
  .navbar .dropdown {
    position: relative !important;
  }
  
  /* Mobil navigation düzeltmeleri */
  body.modal-open {
    overflow-x: hidden !important;
  }
  
  .navbar-nav {
    z-index: 1051 !important;
  }
  
  /* Admin dropdown açıkken alt navbar görünür kalsın */
  .navbar-collapse {
    z-index: 1049 !important;
  }
  
  .dropdown-menu.show {
    animation: none !important;
    transition: none !important;
  }
  
  /* Bootstrap responsive sınıfları kullanıyoruz */
  
  /* Progress bar visibility for active user row - Web & Mobile */
  .table-active .progress {
    background-color: rgba(0, 0, 0, 0.15) !important;
    border: 1px solid rgba(0, 0, 0, 0.25) !important;
  }
  
  .table-active .progress-bar {
    background-color: #0d6efd !important;
  }
  
  /* Progress bar stilleri artık HTML'de conditional olarak uygulanıyor */
  
  /* Mobilde görünüm değişiklikleri */
  @media (max-width: 767.98px) {
    /* Bootstrap d-* sınıfları kullanıyoruz */
    
    /* Mobil tablo düzenleri */
    .leaderboard-table {
      table-layout: fixed !important;
      width: 100% !important;
    }
    
    .leaderboard-table th:nth-child(1), /* Sıra */
    .leaderboard-table td:nth-child(1) {
      width: 12% !important;
      text-align: center !important;
      padding-left: 0.5rem !important;
    }
    
    .leaderboard-table th:nth-child(2), /* Oyuncu */
    .leaderboard-table td:nth-child(2) {
      width: 35% !important;
      min-width: 10ch !important; /* 10 karakter minimum */
    }
    
    .leaderboard-table th:nth-child(3), /* Toplam Puan */
    .leaderboard-table td:nth-child(3) {
      width: 25% !important;
      text-align: center !important;
    }
    
    .leaderboard-table th:nth-child(4), /* Tahmin Sayısı */
    .leaderboard-table td:nth-child(4) {
      width: 28% !important;
    }
    
    /* Mobilde progress bar stilleri de HTML'de conditional olarak uygulanıyor */
  }
}

/* Prediction History - Mobil düzeltmeleri */
@media (max-width: 767.98px) {
  .table-responsive {
    overflow-x: hidden !important;
  }
  
  /* Prediction History tablosu için kolon genişlikleri */
  .prediction-history-table th:first-child,
  .prediction-history-table td:first-child {
    min-width: 15ch !important; /* Minimum 15 karakter */
    width: 40% !important;
  }
  
  .prediction-history-table th:nth-child(2),
  .prediction-history-table td:nth-child(2) {
    width: 25% !important;
  }
  
  .prediction-history-table th:nth-child(3),
  .prediction-history-table td:nth-child(3) {
    width: 20% !important;
  }
  
  .prediction-history-table th:nth-child(4),
  .prediction-history-table td:nth-child(4) {
    width: 15% !important;
  }
}

/* Çok küçük ekranlar için ekstra responsive (max-width: 400px) */
@media (max-width: 400px) {
  .prediction-history-table {
    font-size: 0.8rem !important;
  }
  
  .prediction-history-table th,
  .prediction-history-table td {
    padding: 0.25rem 0.1rem !important;
  }
  
  .prediction-history-table th:first-child,
  .prediction-history-table td:first-child {
    padding-left: 0.5rem !important;
  }
  
  .prediction-history-table .badge {
    font-size: 0.7rem !important;
    padding: 0.2rem 0.4rem !important;
  }
  
  .prediction-history-table th:first-child,
  .prediction-history-table td:first-child {
    width: 35% !important;
    min-width: 12ch !important;
  }
  
  .prediction-history-table th:nth-child(2),
  .prediction-history-table td:nth-child(2) {
    width: 25% !important;
  }
  
  .prediction-history-table th:nth-child(3),
  .prediction-history-table td:nth-child(3) {
    width: 20% !important;
  }
  
  .prediction-history-table th:nth-child(4),
  .prediction-history-table td:nth-child(4) {
    width: 20% !important;
  }
}

/* Çok çok küçük ekranlar için (max-width: 320px) */
@media (max-width: 320px) {
  .prediction-history-table {
    font-size: 0.75rem !important;
  }
  
  .prediction-history-table .badge {
    font-size: 0.65rem !important;
    padding: 0.15rem 0.3rem !important;
  }
  
  .prediction-history-table th,
  .prediction-history-table td {
    padding: 0.2rem 0.05rem !important;
  }
  
  .prediction-history-table th:first-child,
  .prediction-history-table td:first-child {
    padding-left: 0.5rem !important;
  }
  
  .prediction-history-table th:first-child,
  .prediction-history-table td:first-child {
    width: 38% !important;
    min-width: 10ch !important;
  }
  
  .prediction-history-table th:nth-child(2),
  .prediction-history-table td:nth-child(2) {
    width: 22% !important;
  }
  
  .prediction-history-table th:nth-child(3),
  .prediction-history-table td:nth-child(3) {
    width: 20% !important;
  }
  
  .prediction-history-table th:nth-child(4),
  .prediction-history-table td:nth-child(4) {
    width: 20% !important;
  }
}