
body {
  margin: 0;
  padding: 0;
  background: linear-gradient(145deg, #0d0d0d, #1a1a1a);
  font-family: 'Segoe UI', sans-serif;
  color: #fff;
  overflow-x: hidden;
}

.ranking-container {
  max-width: 900px;
  margin: 60px auto;
  padding: 40px 30px;
  background: linear-gradient(145deg, #1a1a1a, #000);
  border-radius: 20px;
  box-shadow: 0 0 50px gold, inset 0 0 30px #fff2;
  position: relative;
  z-index: 1;
  overflow: hidden;
}

.ranking-container::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255, 215, 0, 0.15) 0%, transparent 70%);
  animation: swirl 20s linear infinite;
  z-index: 0;
}

@keyframes swirl {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

h1 {
  text-align: center;
  font-size: 2.5em;
  color: gold;
  margin-bottom: 30px;
  text-shadow: 0 0 10px #fff, 0 0 20px gold, 0 0 40px gold;
  position: relative;
  z-index: 1;
}

.ranking-list {
  list-style: none;
  padding: 0;
  margin: 0;
  z-index: 1;
  position: relative;
}

.ranking-item {
  display: flex;
  align-items: center;
  background: linear-gradient(90deg, #333, #111);
  margin: 15px 0;
  padding: 20px;
  border-radius: 15px;
  border-left: 6px solid gold;
  box-shadow: 0 0 20px rgba(255, 215, 0, 0.4);
  position: relative;
  transition: transform 0.3s, box-shadow 0.3s;
}

.ranking-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 0 30px rgba(255, 255, 255, 0.3), 0 0 60px rgba(255, 215, 0, 0.7);
}

.rank-number {
  font-size: 1.6em;
  font-weight: bold;
  color: gold;
  width: 60px;
  text-align: center;
  text-shadow: 0 0 10px gold, 0 0 5px white;
}

.avatar {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 50%;
  margin: 0 20px;
  border: 3px solid gold;
  box-shadow: 0 0 10px gold;
  background-color: #222;
}

.username {
  flex: 1;
  font-size: 1.3em;
  font-weight: 600;
  color: #fff;
  text-decoration: none;
  transition: color 0.3s;
}

.username:hover {
  color: gold;
  text-shadow: 0 0 10px gold;
}

.count {
  font-weight: bold;
  font-size: 1.1em;
  color: #ffd700;
  text-shadow: 0 0 5px #ffd700;
}

.rank-number::before {
  content: '';
  display: inline-block;
  margin-right: 6px;
}

.ranking-item:nth-child(1) .rank-number::before {
  content: '🥇';
}
.ranking-item:nth-child(2) .rank-number::before {
  content: '🥈';
}
.ranking-item:nth-child(3) .rank-number::before {
  content: '🥉';
}

.user-actions {
  margin-top: 5px;
  text-align: right;
}

.user-actions a {
  font-size: 0.85em;
  color: #aaa;
  text-decoration: underline;
}

.user-actions a:hover {
  color: gold;
}


.rate-up {
  color: #0f0;
  font-weight: bold;
}
.rate-down {
  color: #f66;
  font-weight: bold;
}

.period-info {
  font-size: 0.9em;
  color: #bbb;
  margin-top: -10px;
}

.period-info {
  font-size: 0.95em;
  color: #bbb;
  margin-bottom: 10px;
}

.last-post {
  font-size: 0.9em;
  color: #aaa;
  margin-top: 4px;
}

.rate-up {
  color: #0f0;
  font-weight: bold;
  margin-left: 6px;
}

.rate-down {
  color: #f55;
  font-weight: bold;
  margin-left: 6px;
}

.pagination {
  margin-top: 20px;
  text-align: center;
}

.pagination a {
  color: #ffd700;
  margin: 0 5px;
  text-decoration: none;
}

.pagination a.active {
  font-weight: bold;
  text-shadow: 0 0 5px gold;
}

.ranking-container a {
  color: gold;
  text-decoration: none;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 5px;
  transition: background 0.3s;
}

.ranking-container a:hover {
  background: rgba(255, 215, 0, 0.1);
}

.ranking-container a.active {
  background: gold;
  color: #000;
  font-weight: bold;
  pointer-events: none;
}

body {
  margin: 0;
  background: linear-gradient(145deg, #0d0d0d, #1a1a1a);
  font-family: 'Segoe UI', sans-serif;
  color: #fff;
}

.ranking-container {
  max-width: 900px;
  margin: 60px auto;
  padding: 40px;
  background: linear-gradient(135deg, #111, #000);
  border-radius: 20px;
  box-shadow: 0 0 40px gold, inset 0 0 20px #fff2;
  position: relative;
  text-align: center;
}

.ranking-container h1 {
  font-size: 2em;
  color: gold;
  text-shadow: 0 0 10px #fff, 0 0 20px gold;
}

.period-info {
  font-size: 0.95em;
  color: #bbb;
  margin-bottom: 10px;
}

.ranking-container a {
  color: gold;
  text-decoration: none;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 5px;
  transition: background 0.3s;
}

.ranking-container a:hover {
  background: rgba(255, 215, 0, 0.1);
}

.ranking-container a.active {
  background: gold;
  color: #000;
  font-weight: bold;
  pointer-events: none;
}

.ranking-list {
  list-style: none;
  padding: 0;
  margin: 20px 0;
}

.ranking-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: #222;
  margin: 10px 0;
  padding: 20px;
  border-radius: 15px;
  border-left: 6px solid gold;
  box-shadow: 0 0 10px rgba(255, 215, 0, 0.3);
  position: relative;
}

.rank-number {
  font-size: 1.5em;
  font-weight: bold;
  color: gold;
  margin-bottom: 5px;
}

.ranking-item:nth-child(1) .rank-number::before { content: '🥇 '; }
.ranking-item:nth-child(2) .rank-number::before { content: '🥈 '; }
.ranking-item:nth-child(3) .rank-number::before { content: '🥉 '; }

.avatar {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 50%;
  margin: 10px 0;
  border: 3px solid gold;
  background-color: #000;
}

.username {
  font-size: 1.2em;
  margin-bottom: 5px;
}

.gold-name { color: gold; }
.silver-name { color: silver; }
.green-name { color: limegreen; }

.count {
  font-weight: bold;
  font-size: 1.1em;
  color: #ffd700;
}

.last-post {
  font-size: 0.9em;
  color: #aaa;
  margin-top: 4px;
}

.rate-up {
  color: #0f0;
  font-weight: bold;
  margin-left: 6px;
}
.rate-down {
  color: #f55;
  font-weight: bold;
  margin-left: 6px;
}

.pagination {
  margin-top: 20px;
}

.pagination a {
  color: #ffd700;
  margin: 0 5px;
  text-decoration: none;
}

.pagination a.active {
  font-weight: bold;
  text-shadow: 0 0 5px gold;
}

/* スマホ対応 - ranking-style.cssの追加CSS */
@media (max-width: 768px) {
  .ranking-container {
    max-width: 95%;
    margin: 30px auto;
    padding: 20px 15px;
  }

  .ranking-container h1,
  h1 {
    font-size: 1.8em;
  }

  .period-info {
    font-size: 0.85em;
  }

  .ranking-item {
    flex-direction: column;
    padding: 15px;
    text-align: center;
  }

  .rank-number {
    font-size: 1.3em;
    width: auto;
    margin-bottom: 10px;
  }

  .avatar {
    width: 50px;
    height: 50px;
    margin: 10px auto;
  }

  .username {
    font-size: 1.1em;
    margin-bottom: 8px;
  }

  .count {
    font-size: 1em;
  }

  .last-post {
    font-size: 0.8em;
  }

  .user-actions {
    text-align: center;
    margin-top: 10px;
  }
}

@media (max-width: 480px) {
  .ranking-container {
    padding: 15px 10px;
    margin: 20px auto;
  }

  h1 {
    font-size: 1.5em;
  }

  .ranking-item {
    padding: 12px;
    margin: 8px 0;
  }

  .rank-number {
    font-size: 1.2em;
  }

  .username {
    font-size: 1em;
  }

  .pagination a {
    margin: 0 3px;
    font-size: 0.9em;
  }
}
