/* CSS Reset & Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary-color: #e60026;
  --primary-gradient: linear-gradient(135deg, #e60026 0%, #ff4757 100%);
  --secondary-color: #2c3e50;
  --accent-color: #3498db;
  --success-color: #27ae60;
  --warning-color: #f39c12;
  --text-primary: #2c3e50;
  --text-secondary: #7f8c8d;
  --text-light: #bdc3c7;
  --bg-primary: #f8f9fa;
  --bg-secondary: #ffffff;
  --border-color: #e9ecef;
  --shadow-sm: 0 2px 4px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 6px rgba(0,0,0,0.07);
  --shadow-lg: 0 10px 15px rgba(0,0,0,0.1);
  --shadow-xl: 0 20px 25px rgba(0,0,0,0.15);
  --border-radius: 12px;
  --border-radius-lg: 16px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.6;
  color: var(--text-primary);
  background: linear-gradient(135deg, #ffb3ba 0%, #ffdfba 50%, #ffffba 100%);
  min-height: 100vh;
  overflow-x: hidden;
}

/* App Container */
.app-container {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Header */
.header {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  padding: 1.5rem 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--primary-gradient);
  opacity: 0.05;
  z-index: -1;
}

.header-content {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 2rem;
}

.logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 0.5rem;
}

.logo i {
  font-size: 2.5rem;
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.header h1 {
  font-size: 2rem;
  font-weight: 700;
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin: 0;
}

.subtitle {
  font-size: 1rem;
  color: var(--text-secondary);
  font-weight: 400;
}

/* Main Content */
.main-content {
  flex: 1;
  padding: 1.5rem 0;
}

.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Common Card Styles */
.upload-card,
.info-card,
.progress-card,
.result-card {
  background: var(--bg-secondary);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-md);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  border: 1px solid var(--border-color);
  transition: var(--transition);
}

.upload-card:hover,
.info-card:hover,
.result-card:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-lg);
}

/* Upload Section */
.upload-area {
  border: 2px dashed var(--border-color);
  border-radius: var(--border-radius);
  padding: 2rem 1.5rem;
  text-align: center;
  transition: var(--transition);
  position: relative;
  background: rgba(255, 255, 255, 0.5);
}

.upload-area.dragover {
  border-color: var(--primary-color);
  background: rgba(230, 0, 38, 0.05);
  transform: scale(1.02);
}

.upload-icon {
  font-size: 4rem;
  color: var(--text-light);
  margin-bottom: 1rem;
}

.upload-area h3 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.upload-area p {
  color: var(--text-secondary);
  margin-bottom: 2rem;
}

.upload-btn {
  background: var(--primary-gradient);
  color: white;
  border: none;
  padding: 1rem 2rem;
  border-radius: var(--border-radius);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  box-shadow: var(--shadow-md);
}

.upload-btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

/* Info Section */
.info-content {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  text-align: center;
}

.info-content i {
  font-size: 1.5rem;
  color: var(--primary-color);
}

.info-content p {
  margin: 0;
  font-weight: 500;
  color: var(--text-secondary);
}



/* Progress Section */
.progress-section {
  display: none;
}

.progress-section.show {
  display: block;
}

.progress-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.progress-header h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.progress-text {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--primary-color);
}

.progress-bar-container {
  margin-bottom: 1rem;
}

.progress-bar {
  width: 100%;
  height: 12px;
  background: var(--border-color);
  border-radius: 6px;
  overflow: hidden;
  position: relative;
}

.progress-fill {
  height: 100%;
  background: var(--primary-gradient);
  width: 0%;
  transition: width 0.3s ease;
  position: relative;
}

.progress-fill::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
  animation: shimmer 2s infinite;
}

@keyframes shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

.progress-status {
  color: var(--text-secondary);
  font-size: 0.875rem;
  text-align: center;
}

/* Result Section */
.result-section {
  display: none;
}

.result-section.show {
  display: block;
}

.result-content {
  text-align: center;
}

.album-cover {
  position: relative;
  width: 160px;
  height: 160px;
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  margin: 0 auto 2rem auto;
}

.album-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cover-placeholder {
  width: 100%;
  height: 100%;
  background: var(--primary-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 3rem;
}

/* Audio Player */
.audio-player-container {
  margin-bottom: 2rem;
}

.audio-player-container audio {
  width: 100%;
  height: 60px;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-sm);
}

/* Action Buttons */
.action-buttons {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.btn {
  padding: 1rem 2rem;
  border-radius: var(--border-radius);
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  box-shadow: var(--shadow-md);
  flex: 1;
  justify-content: center;
  min-width: 160px;
}

.btn-primary {
  background: var(--primary-gradient);
  color: white;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn-secondary {
  background: var(--bg-primary);
  color: var(--text-primary);
  border: 2px solid var(--border-color);
}

.btn-secondary:hover {
  background: var(--border-color);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

/* Footer */
.footer {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  padding: 1.5rem 0;
  text-align: center;
  color: var(--text-secondary);
  margin-top: auto;
}

/* Hidden class */
.hidden {
  display: none !important;
}

/* 音乐装饰动画 */
.music-decorations {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
  overflow: hidden;
}

/* 飘动音符 */
.floating-notes {
  position: absolute;
  width: 100%;
  height: 100%;
}

.floating-notes::before {
  content: '♪ ♫ ♪ ♫ ♪ ♫ ♪ ♫ ♪ ♫';
  position: absolute;
  font-size: 20px;
  color: rgba(220, 20, 60, 0.8);
  animation: floatNotes 25s linear infinite;
  white-space: nowrap;
  letter-spacing: 80px;
  text-shadow: 0 0 12px rgba(220, 20, 60, 0.6);
  top: 40%;
  left: -100%;
  animation-delay: 0s;
}

@keyframes floatNotes {
  0% { transform: translateX(0); }
  100% { transform: translateX(calc(100vw + 200px)); }
}

/* 音乐粒子效果 */
.music-particles {
  position: absolute;
  width: 100%;
  height: 100%;
}

.music-particles::before {
  content: '';
  position: absolute;
  width: 4px;
  height: 4px;
  background: radial-gradient(circle, rgba(220, 20, 60, 0.7) 0%, transparent 70%);
  border-radius: 50%;
  animation: particles 8s ease-in-out infinite;
  box-shadow: 
    20px 10px 0 rgba(220, 20, 60, 0.5),
    40px 30px 0 rgba(178, 34, 34, 0.6),
    60px 50px 0 rgba(139, 0, 0, 0.4),
    80px 20px 0 rgba(205, 92, 92, 0.5),
    100px 60px 0 rgba(220, 20, 60, 0.45),
    120px 40px 0 rgba(178, 34, 34, 0.4);
}

@keyframes particles {
  0%, 100% { transform: translateY(0) rotate(0deg); opacity: 0; }
  50% { transform: translateY(-100px) rotate(180deg); opacity: 1; }
}



/* 进度条音符动画 */
.progress-notes {
  position: absolute;
  top: -25px;
  left: 0;
  width: 100%;
  display: flex;
  justify-content: space-between;
  pointer-events: none;
}

.progress-notes i {
  color: var(--primary-color);
  font-size: 12px;
  animation: bounceNote 2s ease-in-out infinite;
  opacity: 0;
}

.progress-notes i:nth-child(1) { animation-delay: 0s; }
.progress-notes i:nth-child(2) { animation-delay: 0.5s; }
.progress-notes i:nth-child(3) { animation-delay: 1s; }

@keyframes bounceNote {
  0%, 80%, 100% { 
    transform: translateY(0); 
    opacity: 0; 
  }
  40% { 
    transform: translateY(-10px); 
    opacity: 1; 
  }
}

/* 当进度条激活时显示音符 */
.progress-section.show .progress-notes i {
  animation-play-state: running;
}

/* 上传区域悬停音符效果 */
.upload-area::before {
  content: '♪';
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 24px;
  color: rgba(230, 0, 38, 0.3);
  animation: rotateNote 3s ease-in-out infinite;
}

@keyframes rotateNote {
  0%, 100% { transform: rotate(0deg) scale(1); }
  50% { transform: rotate(15deg) scale(1.1); }
}

/* 按钮悬停音乐效果 */
.upload-btn::after {
  content: '♫';
  position: absolute;
  right: -20px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 16px;
  color: rgba(255, 255, 255, 0.7);
  opacity: 0;
  transition: var(--transition);
}

.upload-btn {
  position: relative;
  overflow: visible;
}

.upload-btn:hover::after {
  opacity: 1;
  right: -25px;
  animation: slideNote 0.6s ease-in-out;
}

@keyframes slideNote {
  0% { transform: translateY(-50%) translateX(-10px); }
  100% { transform: translateY(-50%) translateX(0); }
}

/* 卡片脉冲动画 */
@keyframes cardPulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.02); }
  100% { transform: scale(1); }
}

/* 点击音符上浮动画 */
@keyframes floatUp {
  0% {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
  100% {
    transform: translateY(-50px) scale(1.5);
    opacity: 0;
  }
}



/* 音符装饰增强 */
.upload-area.dragover::before {
  animation: rotateNote 0.5s ease-in-out infinite;
  color: var(--primary-color);
}

/* 进度条完成时的特效 */
.progress-fill[style*="100%"] + .progress-notes i {
  animation: celebration 1s ease-in-out;
  color: var(--success-color);
}

@keyframes celebration {
  0%, 100% { transform: translateY(0) scale(1); }
  25% { transform: translateY(-15px) scale(1.2); }
  50% { transform: translateY(-10px) scale(1.1); }
  75% { transform: translateY(-15px) scale(1.2); }
}

/* Responsive Design */
@media (max-width: 768px) {
  .container {
    padding: 0 1rem;
  }
  
  .header h1 {
    font-size: 2rem;
  }
  
  .subtitle {
    font-size: 1rem;
  }
  
  .upload-card,
  .info-card,
  .progress-card,
  .result-card {
    padding: 1.5rem;
  }
  
  .upload-area {
    padding: 2rem 1rem;
  }
  
  .upload-icon {
    font-size: 3rem;
  }
  
  .album-cover {
    width: 140px;
    height: 140px;
  }
  
  .action-buttons {
    flex-direction: column;
  }
  
  .btn {
    min-width: auto;
  }
}

@media (max-width: 480px) {
  .logo {
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .logo i {
    font-size: 2rem;
  }
  
  .header h1 {
    font-size: 1.75rem;
  }
  
  .upload-area h3 {
    font-size: 1.25rem;
  }
} 