/* 戻るリンク */
.back-link-wrapper {
  padding: 20px  10px;
}

.back-link {
  display: inline-block;
  padding: 8px 20px;
  color: #64b94b;
  text-decoration: none;
  border: 2px solid #64b94b;
  border-radius: 20px;
  font-weight: bold;
  transition: all 0.3s;
}

.back-link:hover {
  background: #64b94b;
  color: #fff;
}

.btn-container a{
    display: inline-block;
}

/* ランキングテーブルのスタイル */
.ranking-table-wrapper {
  padding: 20px 100px;
  overflow-x: auto;
}

.ranking-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  border-radius: 8px;
  overflow: hidden;
}

.ranking-table thead {
  background: #64b94b;
  color: #fff;
}

.ranking-table th {
  padding: 15px;
  text-align: left;
  font-weight: bold;
  font-size: 1rem;
}

.ranking-table td {
  padding: 12px 15px;
  border-bottom: 1px solid #e0e0e0;
}

.ranking-table tbody tr:last-child td {
  border-bottom: none;
}

.ranking-table tbody tr:hover {
  background: #f5f5f5;
}

.rank-cell {
  font-weight: bold;
  color: #64b94b;
  font-size: 1.1rem;
  width: 80px;
  text-align: center;
}

.user-info-cell {
  min-width: 250px;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 15px;
}

.user-icon {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.user-icon-placeholder {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: #e0e0e0;
  flex-shrink: 0;
}

.user-details {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nickname {
  font-weight: 500;
  font-size: 1rem;
}

.member-badge {
  display: inline-block;
  padding: 3px 10px;
  font-size: 0.7rem;
  font-weight: bold;
  border-radius: 4px;
  color: #fff;
  align-self: flex-start;
}

.member-badge.vip {
  background: #ffd700;
  color: #333;
}

.member-badge.premium {
  background: #c0c0c0;
  color: #333;
}

.member-badge.standard {
  background: #cd7f32;
  color: #fff;
}

.points-cell {
  font-weight: bold;
  font-size: 1.1rem;
  text-align: right;
  min-width: 120px;
}

.no-data {
  text-align: center;
  padding: 40px;
  color: #999;
  font-style: italic;
}

/* ページネーション */
.pagination-wrapper {
  display: flex;
  justify-content: center;
  margin-top: 30px;
}

.pagination {
  display: flex;
  list-style: none;
  gap: 5px;
}

.pagination li a,
.pagination li span {
  display: block;
  padding: 8px 12px;
  border: 1px solid #64b94b;
  border-radius: 4px;
  text-decoration: none;
  color: #64b94b;
  transition: all 0.3s;
}

.pagination li a:hover {
  background: #64b94b;
  color: #fff;
}

.pagination li.active span {
  background: #64b94b;
  color: #fff;
  font-weight: bold;
}

/* レスポンシブ対応 */
@media screen and (max-width: 1024px) {
  .back-link-wrapper {
    padding: 20px 10px 10px;
  }

  .ranking-table-wrapper {
    padding: 20px 10px;
  }

  .ranking-table th,
  .ranking-table td {
    padding: 10px 8px;
    font-size: 0.9rem;
  }

  .rank-cell {
    width: 50px;
    font-size: 1rem;
  }

  .user-info-cell {
    min-width: 200px;
  }

  .user-info {
    gap: 12px;
  }

  .user-icon {
    width: 40px;
    height: 40px;
  }

  .user-icon-placeholder {
    width: 40px;
    height: 40px;
  }

  .nickname {
    font-size: 0.9rem;
  }
}

@media screen and (max-width: 768px) {
    .btn-container {
        text-align: center;
    }
    .model-button {
        margin-top: 10px;
    }

  .switch-wrapper {
    margin-top: 15px;
  }
}

@media screen and (max-width: 600px) {
  .user-info-cell {
    min-width: 150px;
  }

  .user-info {
    gap: 10px;
  }

  .user-icon {
    width: 35px;
    height: 35px;
  }

  .user-icon-placeholder {
    width: 35px;
    height: 35px;
  }

  .nickname {
    font-size: 0.85rem;
  }

  .member-badge {
    font-size: 0.65rem;
    padding: 2px 6px;
  }

  .points-cell {
    min-width: 80px;
    font-size: 1rem;
  }
}
