.ranking-section {
  margin: 0 auto;
  max-width: 1320px;
}

.ranking-pin {
  margin-bottom: 48px;
  text-align: center;
  line-height: normal;
}

.ranking-title {
  font-size: 30px;
  color: #1976d2;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin: 0;
}

.ranking-sub {
  font-size: 15px;
  color: #121212;
  font-weight: normal;
}

.ranking-columns {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.ranking-box {
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 5px;
  padding: 20px 15px;
  width: 25%;
}

.ranking-header {
  font-size: 20px;
  font-weight: 600;
  text-align: center;
  margin: 0;
}

.ranking-realtime .ranking-main-title { color: #c00; }
.ranking-daily .ranking-main-title { color: #008b8b; }
.ranking-weekly .ranking-main-title { color: #cc6600; }

.ranking-update-time {
  font-size: 12px;
  font-weight: 600;
  text-align: center;
}

.ranking-list {
  margin-top: auto;
  padding: 0;
}

.ranking-list li {
  position: relative;
  align-items: center;
  display: flex;
  gap: 8px;
  padding: 10px 0px;
  border-bottom: 1px solid #ddd;
}

.ranking-img {
  width: 50px;
  height: 50px;
  border-radius: 5px;
  object-fit: cover;
  flex-shrink: 0;
}

.ranking-song-info {
  flex: 1;
}

.ranking-song-title, .ranking-artist-name {
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 14px;
  font-weight: 600;
  color: #121212;
  margin: 0;
}

.ranking-rank-number {
  font-size: 28px;
  font-weight: 600;
  color: #ccc;
  margin-right: 5px;
}

.ranking-tabs-mobile {
  display: none;
}

.ranking-tab-button {
  padding: 8px 12px;
  background: #eee;
  border-radius: 4px;
  color: #121212;
  cursor: pointer;
  transition: background 0.2s ease;
  font-size: 14px;
  font-weight: 600;
  text-align: center;
  width: 30%;
}

.ranking-tab-button.active {
  position: relative;
  background: #1976d2;
  color: #fff;
}

.ranking-tab-button.active::after {
  content: "";
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 10px solid transparent;
  border-right: 10px solid transparent;
  border-top: 10px solid #1976d2;
}

.ranking-tab-button.active:hover {
  color: #fff;
}

@media screen and (max-width: 992px) {
  .ranking-pin {
    margin-bottom: 20px;
  }

  .ranking-columns {
    flex-direction: column;
  }

  .ranking-box {
    width: 100%;
    padding: 0 15px;
  }

  .ranking-realtime {
    order: 1;
  }

  .ranking-daily {
    order: 2;
  }

  .ranking-weekly {
    order: 3;
  }
}

@media screen and (max-width: 768px) {
  .ranking-header {
    display: none;
  }
  
  .ranking-title {
    font-size: 26px;
  }
  .ranking-update-time {
    display: none;
  }
  
  .ranking-tabs-mobile {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 15px;
  }

  .ranking-columns {
    margin-top: auto;
    flex-direction: column;
  }

  .ranking-box {
    display: none;
    width: 100%;
    padding: 0 15px;
  }

  .ranking-box.ranking-tab-content.active {
    display: flex;
    flex-direction: column;
  }
}