.song-section {
  background: var(--card);
  border-radius: 26px;
  padding: 72px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 32px;
}

.flower-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  z-index: 30;
  overflow: hidden;
  background: radial-gradient(circle at top, rgba(255, 230, 240, 0.5), rgba(255, 230, 240, 0));
}

.flower-overlay.active {
  opacity: 1;
}

.flower-overlay span {
  position: absolute;
  width: 18px;
  height: 18px;
  border-radius: 50% 50% 50% 0;
  background: linear-gradient(135deg, rgba(255, 182, 193, 0.9), rgba(255, 105, 180, 0.8));
  transform: rotate(45deg);
  animation: flowerFall 2.6s linear forwards;
  box-shadow: 0 10px 20px rgba(255, 105, 180, 0.3);
}

@keyframes flowerFall {
  0% {
    transform: translateY(-10vh) rotate(0deg) scale(0.8);
    opacity: 0;
  }
  15% {
    opacity: 1;
  }
  100% {
    transform: translateY(110vh) rotate(260deg) scale(1.1);
    opacity: 0;
  }
}

.song-stage {
  position: relative;
  background: linear-gradient(135deg, rgba(255, 239, 224, 0.96), rgba(255, 226, 238, 0.92));
  border-radius: 26px;
  padding: 52px 64px;
  text-align: center;
  overflow: hidden;
}

.song-stage.fail-flash {
  animation: failFlash 0.9s ease;
}

@keyframes failFlash {
  0% {
    box-shadow: 0 0 0 rgba(239, 68, 68, 0.0);
  }
  30% {
    box-shadow: 0 0 0 8px rgba(239, 68, 68, 0.4);
  }
  60% {
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.0);
  }
  100% {
    box-shadow: 0 0 0 rgba(239, 68, 68, 0.0);
  }
}

.song-stage::after {
  content: "";
  position: absolute;
  inset: -30%;
  background: radial-gradient(circle, rgba(228, 63, 90, 0.12), transparent 55%);
  opacity: 0.8;
}

.song-meta {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  font-size: clamp(22px, 2vw, 36px);
  font-weight: 600;
  color: rgba(46, 46, 46, 0.7);
}

.table-tag,
.round-tag {
  background: rgba(255, 255, 255, 0.75);
  border-radius: 999px;
  padding: 12px 26px;
  border: 1px solid rgba(228, 63, 90, 0.15);
  box-shadow: 0 12px 24px rgba(228, 63, 90, 0.08);
}

.song-title {
  position: relative;
  z-index: 1;
  margin-top: 28px;
  font-size: clamp(52px, 5vw, 92px);
  font-weight: 800;
  letter-spacing: 3px;
  text-shadow: 0 18px 26px rgba(228, 63, 90, 0.16);
}

.song-hint {
  position: relative;
  z-index: 1;
  margin-top: 12px;
  font-size: clamp(22px, 2.2vw, 38px);
  color: rgba(46, 46, 46, 0.65);
}

.song-status {
  position: relative;
  z-index: 1;
  margin: 26px auto 0;
  padding: 12px 32px;
  border-radius: 999px;
  font-size: clamp(20px, 1.8vw, 32px);
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(228, 63, 90, 0.2);
  box-shadow: 0 12px 24px rgba(228, 63, 90, 0.1);
}

.song-status.playing {
  color: #1d4ed8;
  border-color: rgba(37, 99, 235, 0.35);
  box-shadow: 0 12px 24px rgba(37, 99, 235, 0.18);
}

.song-status.success {
  color: #15803d;
  border-color: rgba(22, 163, 74, 0.35);
  box-shadow: 0 12px 24px rgba(22, 163, 74, 0.18);
}

.song-status.fail {
  color: #b91c1c;
  border-color: rgba(239, 68, 68, 0.35);
  box-shadow: 0 12px 24px rgba(239, 68, 68, 0.18);
}

.song-status.hold {
  color: #b45309;
  border-color: rgba(245, 158, 11, 0.4);
  box-shadow: 0 12px 24px rgba(245, 158, 11, 0.2);
}

.song-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 24px;
}

.table-panel {
  background: rgba(255, 255, 255, 0.7);
  border-radius: 22px;
  padding: 26px 30px;
  display: grid;
  gap: 14px;
  box-shadow: 0 16px 30px rgba(228, 63, 90, 0.08);
  border: 1px solid rgba(228, 63, 90, 0.12);
}

.table-panel-title {
  font-size: clamp(22px, 2vw, 34px);
  font-weight: 700;
  letter-spacing: 1px;
}

.table-config {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: clamp(18px, 1.8vw, 28px);
  color: rgba(46, 46, 46, 0.7);
}

.table-config input {
  width: 120px;
  border-radius: 999px;
  border: 1px solid rgba(228, 63, 90, 0.2);
  padding: 10px 16px;
  font-size: inherit;
  background: rgba(255, 255, 255, 0.85);
}

.table-panel-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
}

.table-select {
  flex: 1;
  min-width: 200px;
  border-radius: 999px;
  border: 1px solid rgba(228, 63, 90, 0.2);
  padding: 14px 20px;
  font-size: clamp(18px, 1.8vw, 28px);
  background: rgba(255, 255, 255, 0.85);
  color: var(--text);
}

.table-hint {
  font-size: clamp(16px, 1.6vw, 24px);
  color: rgba(46, 46, 46, 0.65);
}

.song-primary {
  font-size: clamp(24px, 2.4vw, 40px);
  padding: 20px 60px;
}

.song-secondary {
  font-size: clamp(20px, 2vw, 32px);
  padding: 18px 44px;
}

.judge-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
}

.judge-btn {
  border: none;
  border-radius: 22px;
  padding: 28px 20px;
  font-size: clamp(26px, 2.8vw, 44px);
  font-weight: 800;
  cursor: pointer;
  letter-spacing: 2px;
  box-shadow: 0 20px 36px rgba(0, 0, 0, 0.12);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.judge-btn:hover {
  transform: translateY(-2px) scale(1.01);
  box-shadow: 0 24px 44px rgba(0, 0, 0, 0.16);
}

.judge-btn.success {
  background: linear-gradient(135deg, #34d399, #16a34a);
  color: #fff;
}

.judge-btn.fail {
  background: linear-gradient(135deg, #fb7185, #ef4444);
  color: #fff;
}

.song-history h2 {
  margin: 0 0 12px;
  font-size: clamp(30px, 2.4vw, 46px);
  letter-spacing: 1px;
}

.song-history .history-list {
  display: grid;
  gap: 12px;
  max-height: 420px;
  overflow-y: auto;
}

.song-history .history-item {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(255, 248, 250, 0.92));
  border-radius: 18px;
  padding: 18px 24px;
  display: grid;
  gap: 6px;
  border: 1px solid rgba(228, 63, 90, 0.15);
  box-shadow: 0 14px 30px rgba(228, 63, 90, 0.08);
  font-size: clamp(18px, 1.6vw, 26px);
}

.song-history .history-item .meta {
  color: rgba(46, 46, 46, 0.6);
  font-size: clamp(14px, 1vw, 18px);
}

.song-history .history-item .result.success {
  color: #15803d;
  font-weight: 700;
}

.song-history .history-item .result.fail {
  color: #b91c1c;
  font-weight: 700;
}

@media (max-width: 900px) {
  .song-stage {
    padding: 36px 24px;
  }

  .song-meta {
    flex-direction: column;
    align-items: center;
  }
}
