/* =============================================
   Music Gift Station - Mother's Day Edition
   Bright, warm, floral theme
   ============================================= */

/* --- Reset & Base --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg-primary: #fef7f0;
  --bg-secondary: #fff5ee;
  --surface: rgba(255, 255, 255, 0.7);
  --surface-hover: rgba(255, 255, 255, 0.85);
  --border: rgba(219, 166, 166, 0.25);
  --text-primary: #4a3228;
  --text-secondary: #7a5c50;
  --text-muted: #b8998e;
  --accent-1: #e8729a;
  --accent-2: #f4a0b5;
  --accent-3: #f6c667;
  --accent-warm: #ff8a80;
  --gradient: linear-gradient(135deg, #e8729a, #f4a0b5, #f6c667);
  --gradient-soft: linear-gradient(135deg, #fce4ec, #fff3e0, #fff9c4);
  --radius-sm: 12px;
  --radius-md: 20px;
  --radius-lg: 28px;
  --shadow-soft: 0 8px 32px rgba(232, 114, 154, 0.12);
  --shadow-card: 0 4px 24px rgba(232, 114, 154, 0.10), 0 1px 4px rgba(0,0,0,0.04);
  --font-sans: 'Inter', 'Noto Sans JP', -apple-system, BlinkMacSystemFont, sans-serif;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-sans);
  background: var(--bg-primary);
  background-image: var(--gradient-soft);
  background-attachment: fixed;
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

/* --- Background Orbs (soft warm blobs) --- */
.bg-orbs {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.5;
}

.orb-1 {
  width: 450px;
  height: 450px;
  background: radial-gradient(circle, rgba(244, 160, 181, 0.35), transparent);
  top: -120px;
  right: -120px;
  animation: float-1 20s ease-in-out infinite;
}

.orb-2 {
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(246, 198, 103, 0.25), transparent);
  bottom: -100px;
  left: -100px;
  animation: float-2 25s ease-in-out infinite;
}

.orb-3 {
  width: 350px;
  height: 350px;
  background: radial-gradient(circle, rgba(232, 114, 154, 0.2), transparent);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  animation: float-3 18s ease-in-out infinite;
}

@keyframes float-1 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(-30px, 40px) scale(1.1); }
  66% { transform: translate(20px, -20px) scale(0.9); }
}

@keyframes float-2 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(40px, -30px) scale(1.05); }
  66% { transform: translate(-20px, 30px) scale(0.95); }
}

@keyframes float-3 {
  0%, 100% { transform: translate(-50%, -50%) scale(1); }
  50% { transform: translate(-50%, -50%) scale(1.2); }
}

/* --- Floating Petals --- */
.petals {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.petal {
  position: absolute;
  top: -30px;
  font-size: 1.2rem;
  opacity: 0.5;
  animation: petal-fall linear infinite;
}

@keyframes petal-fall {
  0% {
    transform: translateY(-10vh) rotate(0deg) translateX(0);
    opacity: 0;
  }
  10% {
    opacity: 0.6;
  }
  90% {
    opacity: 0.4;
  }
  100% {
    transform: translateY(110vh) rotate(720deg) translateX(80px);
    opacity: 0;
  }
}

/* --- Container --- */
.container {
  position: relative;
  z-index: 1;
  max-width: 560px;
  margin: 0 auto;
  padding: 2rem 1.25rem;
}

/* --- Hero --- */
.hero {
  text-align: center;
  margin-bottom: 2rem;
}

.logo-icon {
  font-size: 3.5rem;
  margin-bottom: 0.5rem;
  animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.hero h1 {
  font-size: 2rem;
  font-weight: 700;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.5rem;
  letter-spacing: -0.02em;
}

.subtitle {
  font-size: 0.95rem;
  color: var(--text-secondary);
  font-weight: 300;
}

/* --- Glass Card --- */
.card {
  border-radius: var(--radius-lg);
  margin-bottom: 1.5rem;
}

.glass-card {
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 2rem;
  box-shadow: var(--shadow-card);
}

.glass-card h2 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  text-align: center;
  color: var(--text-primary);
}

/* --- Form Elements --- */
.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 0.4rem;
  font-weight: 500;
}

.input-field {
  width: 100%;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.6);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  outline: none;
  transition: all 0.3s ease;
}

.input-field::placeholder {
  color: var(--text-muted);
}

.input-field:focus {
  border-color: var(--accent-1);
  box-shadow: 0 0 0 3px rgba(232, 114, 154, 0.15);
  background: rgba(255, 255, 255, 0.8);
}

/* --- Drop Zone --- */
.drop-zone {
  border: 2px dashed var(--border);
  border-radius: var(--radius-md);
  padding: 2.5rem 1.5rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-bottom: 1.25rem;
  background: rgba(255, 255, 255, 0.3);
}

.drop-zone:hover,
.drop-zone.drag-over {
  border-color: var(--accent-1);
  background: rgba(232, 114, 154, 0.06);
}

.drop-zone.has-file {
  border-style: solid;
  border-color: rgba(232, 114, 154, 0.35);
  background: rgba(232, 114, 154, 0.04);
  padding: 1.5rem;
}

.drop-zone-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.drop-zone.has-file .drop-zone-content {
  display: none;
}

.drop-icon {
  color: var(--accent-1);
  margin-bottom: 0.25rem;
}

.drop-text {
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.drop-subtext {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.drop-hint {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
}

/* --- File Info --- */
.file-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  background: rgba(255, 255, 255, 0.5);
  border-radius: var(--radius-sm);
  margin-bottom: 1.25rem;
  border: 1px solid var(--border);
}

.file-icon {
  font-size: 1.5rem;
}

.file-details {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.file-name {
  font-size: 0.9rem;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text-primary);
}

.file-size {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* --- Progress --- */
.progress-container {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.progress-bar {
  flex: 1;
  height: 6px;
  border-radius: 3px;
  background: rgba(232, 114, 154, 0.12);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  width: 0%;
  border-radius: 3px;
  background: var(--gradient);
  transition: width 0.3s ease;
}

.progress-text {
  font-size: 0.8rem;
  color: var(--text-secondary);
  min-width: 36px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-sm);
  border: none;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
}

.btn-primary {
  width: 100%;
  background: var(--gradient);
  color: white;
  padding: 0.85rem;
  border-radius: var(--radius-md);
  font-weight: 600;
  box-shadow: 0 4px 16px rgba(232, 114, 154, 0.3);
}

.btn-primary:hover:not(:disabled) {
  box-shadow: 0 6px 24px rgba(232, 114, 154, 0.45);
  transform: translateY(-1px);
}

.btn-primary:active:not(:disabled) {
  transform: translateY(0);
}

.btn-primary:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.7);
  color: var(--text-primary);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.9);
  border-color: var(--accent-2);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border: none;
}

.btn-ghost:hover {
  color: var(--accent-1);
}

.btn-icon {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.25rem;
  font-size: 1.1rem;
  transition: color 0.2s;
}

.btn-icon:hover {
  color: var(--accent-1);
}

.btn-copy {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.5rem 0.75rem;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 0.8rem;
  border-radius: var(--radius-sm);
  white-space: nowrap;
}

.btn-copy:hover {
  background: rgba(255, 255, 255, 0.9);
  color: var(--accent-1);
  border-color: var(--accent-2);
}

/* --- Result Section --- */
.success-animation {
  margin-bottom: 1rem;
  display: flex;
  justify-content: center;
}

.checkmark-circle {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, #e8729a, #f4a0b5);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  animation: pop 0.5s ease;
}

@keyframes pop {
  0% { transform: scale(0); }
  60% { transform: scale(1.15); }
  100% { transform: scale(1); }
}

.result-title {
  text-align: center;
  font-size: 1.1rem;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
}

.url-box {
  margin-bottom: 1.5rem;
}

.url-box label {
  display: block;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
  font-weight: 500;
}

.url-display {
  display: flex;
  gap: 0.5rem;
}

.url-input {
  flex: 1;
  padding: 0.65rem 0.85rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.6);
  color: var(--accent-1);
  font-family: 'Inter', monospace;
  font-size: 0.85rem;
  outline: none;
}

/* --- QR Section --- */
.qr-section {
  text-align: center;
  margin-bottom: 1.5rem;
}

.qr-label {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

.qr-code {
  display: flex;
  justify-content: center;
}

.qr-code canvas {
  border-radius: var(--radius-sm);
}

/* --- Action Buttons --- */
.action-buttons {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  align-items: center;
}

.action-buttons .btn {
  width: 100%;
  justify-content: center;
}

/* --- Spinner --- */
.spinner {
  width: 20px;
  height: 20px;
  border: 2px solid rgba(232, 114, 154, 0.2);
  border-top-color: var(--accent-1);
  border-radius: 50%;
  animation: spinner-rotate 0.7s linear infinite;
  display: inline-block;
}

@keyframes spinner-rotate {
  to { transform: rotate(360deg); }
}

/* --- Footer --- */
.footer {
  text-align: center;
  padding: 2rem 0 1rem;
  color: var(--text-muted);
  font-size: 0.8rem;
}

/* --- Utilities --- */
.hidden {
  display: none !important;
}

.fade-in {
  animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

/* --- Responsive --- */
@media (max-width: 480px) {
  .container {
    padding: 1.5rem 1rem;
  }

  .glass-card {
    padding: 1.5rem;
  }

  .hero h1 {
    font-size: 1.6rem;
  }

  .drop-zone {
    padding: 2rem 1rem;
  }

  .url-display {
    flex-direction: column;
  }
}
