:root {
  --bg-deep: #09111f;
  --bg-mid: #14233f;
  --panel: rgba(255, 245, 222, 0.9);
  --ink: #2a1f12;
  --accent: #ee7241;
  --accent-strong: #cf4920;
  --line: rgba(38, 21, 9, 0.18);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Noto Sans SC", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: radial-gradient(circle at 0% 0%, #35598e, transparent 50%),
    linear-gradient(150deg, var(--bg-deep), var(--bg-mid) 55%, #0e1729);
  overflow-x: hidden;
}

.bg-shape {
  position: fixed;
  border-radius: 999px;
  filter: blur(50px);
  z-index: 0;
  opacity: 0.4;
  pointer-events: none;
}

.bg-shape-a {
  width: 260px;
  height: 260px;
  background: #ff8f4c;
  top: -60px;
  right: -30px;
}

.bg-shape-b {
  width: 220px;
  height: 220px;
  background: #57a8e1;
  bottom: -80px;
  left: -60px;
}

.page {
  position: relative;
  z-index: 1;
  max-width: 1080px;
  margin: 0 auto;
  padding: 28px 16px 36px;
}

.hero {
  color: #fff9ef;
  margin-bottom: 18px;
  animation: rise-in 0.55s ease;
}

.hero-badge {
  margin: 0;
  letter-spacing: 0.12em;
  font-size: 12px;
  font-weight: 700;
  opacity: 0.82;
}

h1 {
  margin: 8px 0;
  font-family: "ZCOOL XiaoWei", serif;
  font-size: clamp(34px, 6vw, 52px);
  line-height: 1.05;
  text-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
}

.hero-sub {
  margin: 0;
  opacity: 0.9;
}

.layout {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 14px;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px;
  backdrop-filter: blur(8px);
  box-shadow: 0 14px 34px rgba(8, 9, 11, 0.24);
}

.panel h2 {
  margin: 0;
  font-size: 20px;
}

.panel-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
}

.panel-head p {
  margin: 0;
  color: rgba(42, 31, 18, 0.6);
  font-size: 12px;
}

.ranking-list,
.comment-list {
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
}

.ranking-item {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.46);
  transform: translateY(8px);
  opacity: 0;
  animation: card-in 0.4s ease forwards;
}

.ranking-item.active {
  border-color: rgba(207, 73, 32, 0.65);
  background: linear-gradient(135deg, rgba(255, 240, 226, 0.95), rgba(255, 227, 193, 0.86));
}

.item-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.name {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
}

.rank {
  margin-right: 6px;
  color: var(--accent-strong);
}

.score {
  font-weight: 700;
  color: #5f3812;
}

.reason {
  margin: 8px 0 10px;
  color: #513d2c;
  line-height: 1.45;
}

button,
input,
textarea {
  font: inherit;
}

button {
  border: 0;
  border-radius: 10px;
  padding: 7px 11px;
  color: #fff;
  cursor: pointer;
  background: var(--accent);
  transition: transform 0.14s ease, background-color 0.14s ease;
}

button:hover {
  transform: translateY(-1px);
  background: var(--accent-strong);
}

.actions {
  display: flex;
  gap: 8px;
}

.actions .down-btn {
  background: #406f98;
}

.comment-target {
  margin: 10px 0;
  color: #513d2c;
  min-height: 20px;
}

.comment-form {
  display: grid;
  gap: 8px;
}

input,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 9px 10px;
  background: rgba(255, 255, 255, 0.72);
}

textarea {
  resize: vertical;
}

.comment-item {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.58);
}

.comment-meta {
  margin: 0;
  color: #6a5747;
  font-size: 12px;
}

.comment-content {
  margin: 8px 0 0;
  line-height: 1.5;
  white-space: pre-wrap;
  color: #2a1f12;
}

.empty {
  border: 1px dashed var(--line);
  border-radius: 10px;
  padding: 10px;
  color: #6a5747;
}

.status {
  margin: 12px 0 0;
  min-height: 20px;
  color: rgba(255, 249, 239, 0.9);
  font-size: 13px;
}

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes card-in {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 900px) {
  .layout {
    grid-template-columns: 1fr;
  }
}
