/* Genel ayarlar */
body {
  margin: 0;
  font-family: Arial, sans-serif;
  background-color: #121212;
  color: white;
}

/* Konteyner */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
  position: relative;
  z-index: 1;
}

h1 {
  text-align: center;
  margin-bottom: 5px;
  font-size: 2em;
}

.last-update {
  text-align: center;
  margin-bottom: 20px;
  font-size: 0.9em;
  opacity: 0.8;
}

/* Grid sistemi */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
}

/* Kartlar */
.tile {
  background: #1e1e1e;
  border-radius: 20px;
  padding: 15px;
  position: relative;
  box-shadow: 0 4px 10px rgba(0,0,0,0.3);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.tile:hover {
  transform: scale(1.03);
  box-shadow: 0 6px 15px rgba(0,0,0,0.4);
}

/* İçerik */
.tile-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

/* === GÖRSEL ALANI (boşluk yok çözüm) === */
/* Kare oranlı sarmalayıcı */
.avatar-wrap{
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 15px;
  overflow: hidden;
  background: #0b0f14;        /* yüklenene kadar boş görünmesin */
}

/* aspect-ratio desteklemeyen tarayıcılar için yedek */
@supports not (aspect-ratio: 1 / 1){
  .avatar-wrap{ position: relative; padding-top: 100%; }
  .avatar-wrap > img{ position: absolute; inset: 0; }
}

/* Görsel — kenarlarda siyahlık kalmayacak */
.avatar{
  width: 100%;
  height: 100%;
  display: block;              /* satır içi boşluklarını kaldırır */
  object-fit: cover;           /* alanı tam doldurur, taşanı kırpar */
  object-position: center;     /* ortalar */
  border: 0;                   /* önceki radius sarıcıda */
}

/* İsim */
.tile-name {
  margin-top: 4px;
  font-weight: bold;
  font-size: 1.1em;
  text-align: center;
}

/* Skor */
.tile-score {
  font-size: 1.2em;
  font-weight: bold;
  margin-top: 2px;
  text-align: center;
}

/* Şampiyonlar */
.tile.champion {
  border: 2px solid gold;
}

/* Madalya Şeritleri */
.ribbon {
  position: absolute;
  top: 10px;
  right: 10px;
  background: gold;
  color: black;
  padding: 5px 8px;
  font-size: 0.9em;
  font-weight: bold;
  border-radius: 8px;
  box-shadow: 0 4px 10px rgba(0,0,0,.25);
}

.ribbon.gold { background: gold; }
.ribbon.silver { background: silver; }
.ribbon.bronze { background: #cd7f32; }

/* Mobil tek sütun görünümü */
@media (max-width: 768px) {
  .grid { grid-template-columns: 1fr; }
}
