/* === RADIO TOP5 STYLE === */

.radio-top5 {
  max-width: 750px;
  margin: 30px auto;
  background: #FFCC99;
  color: #000000;
  border-radius: 26px;
  padding: 25px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
  font-family: "Poppins", "Segoe UI", Arial, sans-serif;
  transition: box-shadow 0.3s ease;
}

.radio-top5:hover {
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.12);
}

.radio-top5 h3 {
  text-align: center;
  color: #000000;
  font-size: 1.9em;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 25px;
  position: relative;
}

.radio-top5 h3::after {
  content: "";
  width: 60px;
  height: 3px;
  background: #ff6600;
  display: block;
  margin: 10px auto 0;
  border-radius: 2px;
}

/* --- Każdy element listy --- */
.top5-item {
  display: flex;
  align-items: center;
  background: #f2f2f2;
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 12px;
  border: 3px solid #0099CC;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.top5-item:hover {
  background: #fff;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
  transform: translateY(-3px);
}

/* --- Lewa część (numer + okładka) --- */
.top5-left {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 60px;
  margin-right: 14px;
}

.top5-left .pos {
  font-size: 1.4em;
  font-weight: bold;
  color: #ff6600;
  margin-bottom: 6px;
}

.top5-left img {
  width: 55px;
  height: 55px;
  border-radius: 8px;
  object-fit: cover;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

/* --- Prawa część (info + linki) --- */
.top5-right {
  flex: 1;
}

.top5-right strong {
  display: block;
  color: #222;
  font-size: 1.05em;
  margin-bottom: 2px;
}

.top5-right .song-title {
  color: #555;
  font-size: 0.95em;
  margin-bottom: 4px;
}

.top5-right .links {
  margin-top: 6px;
}

.top5-right .links a {
  display: inline-block;
  font-size: 0.85em;
  background: #ff6600;
  color: #fff;
  padding: 4px 10px;
  border-radius: 6px;
  text-decoration: none;
  margin-right: 5px;
  transition: background 0.2s ease, transform 0.2s ease;
}

.top5-right .links a:hover {
  background: #ff8533;
  transform: translateY(-2px);
}

.top5-right .votes {
  font-size: 0.85em;
  color: #777;
  margin-top: 6px;
}

/* --- Efekt wjazdu elementów --- */
.top5-item {
  opacity: 0;
  transform: translateY(20px);
  animation: slideIn 0.4s ease forwards;
}
.top5-item:nth-child(1) { animation-delay: 0.1s; }
.top5-item:nth-child(2) { animation-delay: 0.2s; }
.top5-item:nth-child(3) { animation-delay: 0.3s; }
.top5-item:nth-child(4) { animation-delay: 0.4s; }
.top5-item:nth-child(5) { animation-delay: 0.5s; }

@keyframes slideIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* --- Meta + trendy (strzałki) --- */
.top5-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
}

.trend {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
}

.trend svg {
  width: 16px;
  height: 16px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

/* Kolory trendów */
.trend-up svg {
  fill: #2ecc71;
  animation: pulseUp 1.5s infinite ease-in-out;
}

.trend-down svg {
  fill: #e74c3c;
  animation: pulseDown 1.5s infinite ease-in-out;
}

.trend-equal svg {
  fill: #999;
  opacity: 0.7;
}

/* Animacja awansu */
@keyframes pulseUp {
  0%, 100% {
    transform: translateY(0);
    opacity: 1;
  }
  50% {
    transform: translateY(-3px) scale(1.1);
    opacity: 0.8;
  }
}

/* Animacja spadku */
@keyframes pulseDown {
  0%, 100% {
    transform: translateY(0);
    opacity: 1;
  }
  50% {
    transform: translateY(3px) scale(1.1);
    opacity: 0.8;
  }
}

/* --- Responsywność --- */
@media (max-width: 500px) {
  .radio-top5 {
    padding: 18px;
  }
  .top5-item {
    flex-direction: row;
  }
  .top5-left {
    width: 50px;
  }
  .top5-left img {
    width: 45px;
    height: 45px;
  }
}
.trend {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  margin-right: 4px;
}

.trend svg {
  width: 16px;
  height: 16px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.trend-up svg {
  fill: #2ecc71;
  animation: pulseUp 1.5s infinite ease-in-out;
}

.trend-down svg {
  fill: #e74c3c;
  animation: pulseDown 1.5s infinite ease-in-out;
}

.trend-equal svg {
  fill: #999;
  opacity: 0.7;
}

/* Animacje */
@keyframes pulseUp {
  0%, 100% { transform: translateY(0); opacity: 1; }
  50% { transform: translateY(-3px) scale(1.1); opacity: 0.8; }
}

@keyframes pulseDown {
  0%, 100% { transform: translateY(0); opacity: 1; }
  50% { transform: translateY(3px) scale(1.1); opacity: 0.8; }
}
