* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Microsoft YaHei", sans-serif;
}

:root {
  --primary-color: #4a6bff;
  --primary-dark: #3451d1;
  --secondary-color: #ff6b6b;
  --secondary-dark: #e74c3c;
  --light-bg: #f8f9fa;
  --dark-text: #2c3e50;
  --light-text: #ecf0f1;
  --shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  --radius: 12px;
}

body {
  background: linear-gradient(135deg, #f5f7fa 0%, #e4e8f0 100%);
  color: var(--dark-text);
  line-height: 1.6;
  min-height: 100vh;
  padding: 20px 0;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  width: 100%;
  box-sizing: border-box;
}

h1 {
  text-align: center;
  margin-bottom: 25px;
  color: var(--secondary-color);
  font-size: 2.2rem;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
  position: relative;
  padding-bottom: 15px;
}

h1:after {
  content: "";
  position: absolute;
  width: 80px;
  height: 4px;
  background: linear-gradient(
    to right,
    var(--primary-color),
    var(--secondary-color)
  );
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  border-radius: 2px;
}

h2 {
  margin-bottom: 15px;
  color: var(--primary-color);
  font-size: 1.3rem;
  position: relative;
  display: inline-block;
  padding-bottom: 8px;
}

h2:after {
  content: "";
  position: absolute;
  width: 60%;
  height: 3px;
  background: var(--primary-color);
  bottom: 0;
  left: 0;
  border-radius: 2px;
}

.main-content {
  display: flex;
  gap: 30px;
  flex: 1;
  margin-bottom: 20px;
  width: 100%;
  box-sizing: border-box;
}

.sung-songs-panel {
  flex: 0 0 280px;
  display: flex;
  flex-direction: column;
}

.left-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 15px;
  max-width: 35%;
}

.right-panel {
  flex: 1;
  display: flex;
  align-items: stretch;
  max-width: 45%;
}

.form-container,
.wheel-container,
.songs-container {
  background-color: white;
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  transition: transform 0.3s, box-shadow 0.3s;
  width: 100%;
}

.sung-songs-panel .songs-container {
  height: 100%;
  min-height: 500px;
}

.form-container {
  flex: 0 0 auto;
}

.songs-container {
  flex: 1;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 100%;
  position: relative;
}

.wheel-container {
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  height: 100%;
  padding-top: 10px;
}

.wheel-container h2 {
  margin-bottom: 20px;
  align-self: flex-start;
}

.wheel {
  position: relative;
  margin: 0 auto;
  width: 420px;
  height: 420px;
  cursor: pointer;
  transition: transform 0.5s;
  border-radius: 50%;
  box-shadow: 0 0 30px rgba(0, 0, 0, 0.15);
  margin-top: auto;
  margin-bottom: auto;
}

.form-group {
  margin-bottom: 15px;
}

label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: var(--dark-text);
}

input {
  width: 100%;
  padding: 12px 15px;
  border: 2px solid #eaeaea;
  border-radius: var(--radius);
  font-size: 16px;
  transition: border-color 0.3s, box-shadow 0.3s;
}

input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(74, 107, 255, 0.2);
}

.button-group {
  display: flex;
  gap: 15px;
  margin-top: 20px;
}

.form-container button {
  background-color: var(--primary-color);
  color: white;
  border: none;
  padding: 12px 20px;
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 16px;
  font-weight: 600;
  transition: all 0.3s;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  position: relative;
  overflow: hidden;
  flex: 1;
}

.form-container button:hover {
  background-color: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 8px rgba(0, 0, 0, 0.15);
}

.form-container button:active {
  transform: translateY(0);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

#add-btn {
  background: linear-gradient(45deg, var(--primary-color), #7a8fff);
}

#clear-btn {
  background: linear-gradient(45deg, var(--secondary-color), #ff8e8e);
}

#clear-btn:hover {
  background: linear-gradient(45deg, var(--secondary-dark), #ff6b6b);
}

.wheel:hover {
  transform: scale(1.02);
}

.arrow-pointer {
  position: absolute;
  top: -30px;
  left: 50%;
  transform: translateX(-50%);
  width: 30px;
  height: 30px;
  background-color: var(--secondary-color);
  clip-path: polygon(50% 100%, 0 0, 100% 0);
  z-index: 10;
  filter: drop-shadow(0 3px 5px rgba(0, 0, 0, 0.2));
}

.song-list-container {
  background-color: var(--light-bg);
  border-radius: var(--radius);
  padding: 12px;
  flex: 1;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 90%;
  position: absolute;
  top: 70px;
  left: 0;
  right: 0;
  bottom: 0px;
}

#song-list {
  list-style-type: none;
  overflow-y: auto;
  padding-right: 10px;
  margin: 0;
  display: flex;
  flex-direction: column;
  height: 100%;
}

#song-list:empty {
  min-height: 100px;
}

#song-list::-webkit-scrollbar {
  width: 6px;
}

#song-list::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 10px;
}

#song-list::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 10px;
}

#song-list::-webkit-scrollbar-thumb:hover {
  background: #a1a1a1;
}

#song-list li {
  padding: 12px 15px;
  margin-bottom: 10px;
  border-radius: var(--radius);
  background-color: #fff;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
  transition: transform 0.2s, box-shadow 0.2s;
  border-left: 4px solid var(--primary-color);
  font-size: 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

#song-list li .song-actions {
  display: flex;
  gap: 10px;
}

#song-list li .delete-btn {
  color: var(--secondary-dark);
  cursor: pointer;
  padding: 5px;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  width: 24px;
  height: 24px;
}

#song-list li .delete-btn:hover {
  background-color: rgba(231, 76, 60, 0.1);
  transform: scale(1.1);
}

#song-list li:hover {
  transform: translateX(5px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

#song-list li:last-child {
  margin-bottom: 0;
}

#sung-song-list {
  list-style-type: none;
  overflow-y: auto;
  padding-right: 10px;
  margin: 0;
  display: flex;
  flex-direction: column;
  height: 100%;
}

#sung-song-list:empty {
  min-height: 100px;
}

#sung-song-list::-webkit-scrollbar {
  width: 6px;
}

#sung-song-list::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 10px;
}

#sung-song-list::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 10px;
}

#sung-song-list::-webkit-scrollbar-thumb:hover {
  background: #a1a1a1;
}

#sung-song-list li {
  padding: 12px 15px;
  margin-bottom: 10px;
  border-radius: var(--radius);
  background-color: #fff;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
  transition: transform 0.2s, box-shadow 0.2s;
  border-left: 4px solid var(--secondary-color);
  font-size: 14px;
  color: #666;
}

#sung-song-list li:hover {
  transform: translateX(5px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

#sung-song-list li:last-child {
  margin-bottom: 0;
}

.modal {
  display: none;
  position: absolute;
  z-index: 100;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  border-radius: 50%;
}

.modal-content {
  background-color: white;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  padding: 30px;
  border-radius: var(--radius);
  width: 80%;
  max-width: 300px;
  text-align: center;
  animation: modalFadeIn 0.5s;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

@keyframes modalFadeIn {
  from {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
}

.close {
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 24px;
  cursor: pointer;
  color: #aaa;
  transition: all 0.3s;
  height: 30px;
  width: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.close:hover {
  color: var(--secondary-color);
  background-color: rgba(231, 76, 60, 0.1);
  transform: rotate(90deg);
}

.modal h2 {
  color: var(--secondary-color);
  font-size: 1.5rem;
  margin-bottom: 15px;
}

#result-text {
  font-size: 18px;
  margin: 15px 0;
  color: var(--primary-color);
  font-weight: bold;
  padding: 12px;
  background-color: rgba(74, 107, 255, 0.1);
  border-radius: var(--radius);
}

.confetti-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: -1;
  border-radius: 50%;
  overflow: hidden;
}

.footer {
  text-align: center;
  padding: 15px;
  color: #888;
  font-size: 14px;
  margin-top: auto;
  line-height: 1.5;
  background-color: rgba(255, 255, 255, 0.7);
  border-radius: var(--radius);
  max-width: 90%;
  margin-left: auto;
  margin-right: auto;
}

.data-actions {
  display: flex;
  gap: 15px;
  justify-content: center;
  margin-bottom: 15px;
}

.data-btn {
  background: linear-gradient(45deg, var(--primary-color), #7a8fff);
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.3s;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: center;
  gap: 8px;
}

.data-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.15);
}

.data-btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.data-btn i {
  margin-right: 0;
}

i {
  margin-right: 8px;
}

h1 i,
h2 i {
  color: var(--primary-color);
}

@media (max-width: 1200px) {
  .container {
    padding: 20px 15px;
  }

  .left-panel,
  .right-panel {
    max-width: none;
  }

  .wheel {
    width: 380px;
    height: 380px;
  }
}

@media (max-width: 920px) {
  .container {
    padding: 20px 10px;
  }

  .main-content {
    flex-direction: column;
  }

  .sung-songs-panel {
    flex: none;
    width: 100%;
    margin-bottom: 20px;
  }

  .sung-songs-panel .songs-container {
    min-height: 300px;
  }

  .left-panel {
    margin-bottom: 20px;
  }

  .wheel {
    width: 350px;
    height: 350px;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 15px 5px;
  }

  .button-group {
    flex-direction: column;
  }

  .form-container button {
    width: 100%;
  }

  .wheel {
    width: 300px;
    height: 300px;
  }
}

.wheel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.wheel-header h2 {
  margin: 0;
}

.bgm-switch {
  display: flex;
  align-items: center;
  font-size: 14px;
  color: var(--dark-text);
  background-color: rgba(74, 107, 255, 0.1);
  padding: 8px 15px;
  border-radius: var(--radius);
  transition: all 0.3s;
}

.bgm-switch:hover {
  background-color: rgba(74, 107, 255, 0.2);
  transform: translateY(-2px);
}

.bgm-switch span {
  margin-right: 15px;
  font-weight: 600;
}

.radio-group {
  display: flex;
  gap: 10px;
}

.radio-group label {
  display: flex;
  align-items: center;
  cursor: pointer;
  padding: 5px 10px;
  border-radius: var(--radius);
  background-color: rgba(255, 255, 255, 0.5);
  transition: all 0.3s;
}

.radio-group label:has(input:checked) {
  background-color: var(--primary-color);
  color: white;
}

.radio-group label:hover {
  background-color: rgba(74, 107, 255, 0.3);
}

.radio-group input[type="radio"] {
  opacity: 0;
  position: absolute;
}

.radio-group label span {
  margin: 0;
  font-weight: 600;
}

.current-pointing {
  display: flex;
  flex-direction: column;
  margin-bottom: 25px;
  padding: 15px;
  background-color: var(--light-bg);
  border-radius: var(--radius);
  color: var(--dark-text);
  font-size: 15px;
  border-left: 4px solid var(--primary-color);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.current-pointing span {
  margin-bottom: 10px;
  font-weight: 600;
}

#current-song {
  color: var(--primary-color);
  font-weight: 600;
  padding: 10px 15px;
  background-color: rgba(74, 107, 255, 0.1);
  border-radius: var(--radius);
  font-size: 18px;
  transition: all 0.3s;
  text-align: center;
}

#current-song.highlight {
  background-color: rgba(255, 107, 107, 0.2);
  color: var(--secondary-color);
  transform: scale(1.02);
}

.songs-container h2 {
  margin-bottom: 15px;
  color: var(--primary-color);
  font-size: 1.3rem;
  position: relative;
  display: inline-block;
  padding-bottom: 8px;
  z-index: 1;
}

.songs-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
}

.songs-header h2 {
  margin-bottom: 0;
}

.clear-sung-btn {
  background: linear-gradient(45deg, var(--secondary-color), #ff8e8e);
  color: white;
  border: none;
  padding: 8px 15px;
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.3s;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: center;
  gap: 5px;
}

.clear-sung-btn:hover {
  background: linear-gradient(45deg, var(--secondary-dark), #ff6b6b);
  transform: translateY(-2px);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.15);
}

.clear-sung-btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.clear-sung-btn i {
  margin-right: 0;
}
