.page-turner-container {
  width: 100%;
}

.chart-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.5rem;

  .chart-title {
    flex: 1;

    h3 {
      color: var(--text-color, #ffffff);
      font-size: 1.25rem;
      font-weight: 500;
      margin: 0 0 0.5rem 0;
      display: flex;
      align-items: center;
      gap: 0.5rem;
    }

    .chart-description {
      color: var(--text-secondary-color);
      font-size: 0.9rem;
      margin: 0;
      line-height: 1.4;
    }
  }
}

.page-turner-icon {
  font-size: 1.5rem;
  color: rgba(251, 146, 60, 1);
}

.stats-row {
  display: flex;
  gap: 1rem;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;

  .stat-item {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 0.5rem 0.75rem;
    flex: 1;
    min-width: 100px;

    .stat-value {
      color: #ffffff;
      font-size: 0.95rem;
      font-weight: 600;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }

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

.top-books {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;

  .top-book-card {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 0.5rem 0.75rem;
    flex: 1;
    min-width: 180px;

    .book-rank {
      color: rgba(251, 146, 60, 1);
      font-weight: 700;
      font-size: 1rem;
    }

    .book-info {
      flex: 1;
      overflow: hidden;

      .book-name {
        color: #ffffff;
        font-size: 0.85rem;
        font-weight: 500;
        display: block;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
      }

      .book-indicators {
        display: flex;
        gap: 0.4rem;
        margin-top: 0.2rem;
        flex-wrap: wrap;

        .indicator {
          color: var(--text-secondary-color);
          font-size: 0.7rem;
          display: flex;
          align-items: center;
          gap: 0.2rem;

          &.burst {
            color: rgba(251, 146, 60, 0.9);
          }

          i {
            font-size: 0.65rem;
          }
        }
      }
    }

    .book-score {
      color: rgba(251, 146, 60, 1);
      font-size: 1.25rem;
      font-weight: 700;
      flex-shrink: 0;
    }
  }
}

.chart-wrapper {
  position: relative;
  height: 400px;
  width: 100%;
}

@media (max-width: 768px) {
  .top-books {
    flex-direction: column;

    .top-book-card {
      min-width: unset;
    }
  }
}

@media (max-width: 480px) {
  .chart-header .chart-title h3 {
    font-size: 1.1rem;
  }

  .stats-row {
    gap: 0.5rem;

    .stat-item {
      min-width: 80px;
      padding: 0.4rem 0.5rem;
    }
  }

  .chart-wrapper {
    height: 350px;
  }
}
