/* ========================================
   ClipSound Official Website - Styles
   ======================================== */

:root {
  --bg: #1E1F22;
  --bg-light: #2A2B2E;
  --bg-card: #2E2F33;
  --text: #E8E8E8;
  --text-muted: #9CA3AF;
  --accent: #FFD700;
  --accent-dim: #B8960F;
  --purple: #7C3AED;
  --purple-light: #A78BFA;
  --border: #3A3B3F;
  --radius: 12px;
  --radius-lg: 20px;
  --transition: 0.3s ease;
  --max-width: 1200px;
  --nav-height: 64px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
}

.container { max-width: var(--max-width); margin: 0 auto; padding: 0 24px; }

a { color: inherit; text-decoration: none; }
ul { list-style: none; }
img { max-width: 100%; }

/* =================== Navbar =================== */
.navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  background: rgba(30, 31, 34, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  transition: var(--transition);
}

.nav-container {
  max-width: var(--max-width); margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  height: var(--nav-height); padding: 0 24px;
}

.nav-logo {
  display: flex; align-items: center; gap: 8px;
  font-size: 22px; font-weight: 700;
  color: var(--accent);
}

.logo-icon { font-size: 28px; }
.logo-img { width: 32px; height: 32px; border-radius: 6px; }

.nav-links { display: flex; gap: 32px; }
.nav-links a {
  font-size: 15px; color: var(--text-muted);
  transition: var(--transition); position: relative;
}
.nav-links a:hover { color: var(--text); }
.nav-links a::after {
  content: ''; position: absolute; bottom: -4px; left: 0;
  width: 0; height: 2px; background: var(--accent);
  transition: var(--transition);
}
.nav-links a:hover::after { width: 100%; }

.nav-actions { display: flex; align-items: center; gap: 16px; }

.lang-switch { display: flex; align-items: center; gap: 0; font-size: 13px; }
.lang-option {
  cursor: pointer; color: var(--text-muted); padding: 4px 6px;
  transition: var(--transition); border-radius: 4px;
}
.lang-option:hover { color: var(--text); }
.lang-option.active { color: var(--accent); font-weight: 600; }
.lang-divider { color: var(--border); margin: 0 2px; user-select: none; }

.nav-toggle {
  display: none; background: none; border: none;
  color: var(--text); font-size: 24px; cursor: pointer;
}

/* =================== Hero =================== */
.hero {
  min-height: 100vh; display: flex; align-items: center;
  justify-content: space-between; padding: 100px 60px 60px;
  max-width: var(--max-width); margin: 0 auto;
  position: relative; overflow: hidden;
}

.hero-bg {
  position: absolute; top: -50%; left: -20%;
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(255,215,0,0.08) 0%, transparent 70%);
  border-radius: 50%; pointer-events: none;
}

.hero-content { max-width: 560px; position: relative; z-index: 1; }

.hero-title { font-size: clamp(42px, 6vw, 72px); line-height: 1.1; margin-bottom: 8px; }
.gradient-text {
  background: linear-gradient(135deg, var(--accent) 0%, #FFA500 50%, var(--accent) 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  display: block; font-size: 28px; color: var(--text-muted);
  font-weight: 300; margin-top: 4px;
}

.hero-desc {
  font-size: 18px; color: var(--text-muted);
  margin: 24px 0 32px; line-height: 1.7;
}

.hero-buttons { display: flex; gap: 16px; flex-wrap: wrap; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 14px 32px; border-radius: 50px; font-size: 16px; font-weight: 600;
  cursor: pointer; transition: all var(--transition);
  border: none; letter-spacing: 0.5px;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent), #FFA500);
  color: #1E1F22; box-shadow: 0 4px 20px rgba(255,215,0,0.25);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 6px 28px rgba(255,215,0,0.35); }

.btn-outline {
  background: transparent; border: 2px solid var(--border);
  color: var(--text);
}
.btn-outline:hover { border-color: var(--accent); color: var(--accent); }

.hero-stats { display: flex; gap: 40px; margin-top: 40px; }
.stat { display: flex; flex-direction: column; }
.stat-num { font-size: 32px; font-weight: 700; color: var(--accent); }
.stat-label { font-size: 14px; color: var(--text-muted); margin-top: 2px; }

/* Hero Visual - Wave Animation */
.hero-visual { position: relative; width: 360px; height: 300px; }
.wave-box {
  width: 100%; height: 100%; display: flex; align-items: center;
  justify-content: center; gap: 8px;
}
.wave-line {
  width: 6px; border-radius: 4px;
  background: linear-gradient(to top, var(--accent), var(--purple-light));
  animation: waveAnim 1.2s ease-in-out infinite;
}
.w1 { height: 40px; animation-delay: 0s; }
.w2 { height: 70px; animation-delay: 0.15s; }
.w3 { height: 100px; animation-delay: 0.3s; }
.w4 { height: 70px; animation-delay: 0.45s; }
.w5 { height: 40px; animation-delay: 0.6s; }

@keyframes waveAnim {
  0%, 100% { transform: scaleY(1); }
  50% { transform: scaleY(1.8); }
}

/* =================== Sections =================== */
.section { padding: 100px 0; }
.section-dark { background: var(--bg-light); }

.section-title {
  font-size: clamp(28px, 4vw, 40px); text-align: center;
  margin-bottom: 12px; font-weight: 700;
}

.section-subtitle {
  text-align: center; color: var(--text-muted);
  font-size: 17px; margin-bottom: 56px;
}

/* =================== Features Grid =================== */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
}

.feature-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 32px 28px;
  transition: all var(--transition); position: relative; overflow: hidden;
}
.feature-card::before {
  content: ''; position: absolute; top: 0; left: 0;
  width: 100%; height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--purple-light));
  transform: scaleX(0); transition: transform 0.4s ease;
}
.feature-card:hover::before { transform: scaleX(1); }
.feature-card:hover {
  transform: translateY(-4px);
  border-color: rgba(255,215,0,0.3);
  box-shadow: 0 8px 32px rgba(0,0,0,0.3);
}

.feature-icon {
  font-size: 36px; margin-bottom: 16px;
  width: 60px; height: 60px; display: flex; align-items: center;
  justify-content: center; background: rgba(255,215,0,0.08);
  border-radius: var(--radius);
}

.feature-card h3 { font-size: 20px; margin-bottom: 8px; }
.feature-card p { color: var(--text-muted); font-size: 15px; line-height: 1.6; }

/* =================== Instruments =================== */
.instruments-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}

.instrument-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 28px 24px;
  text-align: center; transition: all var(--transition);
}
.instrument-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 32px rgba(0,0,0,0.3);
}

.inst-visual {
  width: 120px; height: 120px; margin: 0 auto 20px;
  border-radius: 50%; display: flex; align-items: center;
  justify-content: center;
  background: rgba(255,215,0,0.06);
  border: 2px solid var(--border);
}

.instrument-card h3 { font-size: 18px; margin-bottom: 8px; }
.instrument-card p { color: var(--text-muted); font-size: 14px; margin-bottom: 12px; }

.tag {
  display: inline-block; padding: 4px 12px;
  background: rgba(124,58,237,0.15); color: var(--purple-light);
  border-radius: 50px; font-size: 12px; font-weight: 500;
}

/* Instrument Visuals */
.drum-kit { display: flex; gap: 4px; align-items: flex-end; }
.drum { font-size: 20px; }
.cymbal-l, .cymbal-r { color: var(--accent); font-size: 24px; }
.snare { color: var(--text-muted); font-size: 28px; }
.kick { color: var(--text); font-size: 32px; }

.piano-keys { display: flex; gap: 2px; align-items: stretch; height: 40px; }
.key { border-radius: 0 0 4px 4px; }
.key.white { width: 16px; height: 100%; background: #E8E8E8; }
.key.black { width: 10px; height: 60%; background: #1E1F22; margin: 0 -5px; z-index: 1; }

.kalimba-tines {
  display: flex; gap: 6px; align-items: flex-end; height: 50px;
}
.tine {
  width: 6px; border-radius: 3px;
  background: linear-gradient(to top, var(--accent-dim), var(--accent));
}
.t1 { height: 30px; } .t2 { height: 40px; }
.t3 { height: 50px; } .t4 { height: 40px; } .t5 { height: 30px; }

.hang-shape { position: relative; width: 60px; height: 60px; }
.center-ding {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 14px; height: 14px; border-radius: 50%;
  border: 2px solid var(--accent); background: transparent;
}
.ding {
  position: absolute; width: 10px; height: 10px; border-radius: 50%;
  border: 1px solid var(--text-muted); background: transparent;
}
.d1 { top: 8px; left: 24px; }
.d2 { top: 8px; right: 24px; }
.d3 { bottom: 8px; left: 50%; transform: translateX(-50%); }

/* =================== AI Tools =================== */
.ai-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
}

.ai-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 32px 28px;
  transition: all var(--transition);
  border-left: 4px solid var(--purple);
}
.ai-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 32px rgba(124,58,237,0.15);
}

.ai-icon { font-size: 40px; margin-bottom: 16px; }
.ai-card h3 { font-size: 20px; margin-bottom: 8px; }
.ai-card p { color: var(--text-muted); font-size: 15px; line-height: 1.6; margin-bottom: 16px; }

.ai-badges { display: flex; gap: 8px; flex-wrap: wrap; }
.badge {
  display: inline-block; padding: 4px 12px;
  background: rgba(255,215,0,0.1); color: var(--accent);
  border-radius: 50px; font-size: 12px; font-weight: 500;
}
.badge-accent { background: rgba(124,58,237,0.15); color: var(--purple-light); }

.badge-online { background: rgba(0,200,83,0.12); color: #4CAF50; }

/* =================== Download =================== */
.download-area {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px; max-width: 700px; margin: 0 auto;
}

.download-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 36px 28px;
  text-align: center; transition: all var(--transition);
}
.download-card:hover {
  border-color: rgba(255,215,0,0.3);
  box-shadow: 0 8px 32px rgba(0,0,0,0.3);
}

.dl-platform { font-size: 48px; margin-bottom: 12px; }
.download-card h3 { font-size: 20px; margin-bottom: 8px; }
.download-card p { color: var(--text-muted); font-size: 14px; margin-bottom: 20px; }

.dl-version {
  display: block; margin-top: 12px;
  font-size: 12px; color: var(--text-muted);
}

.coming-soon {
  display: inline-block; padding: 10px 28px;
  background: rgba(255,215,0,0.08); color: var(--accent-dim);
  border-radius: 50px; font-size: 14px; font-weight: 500;
}

/* =================== Footer =================== */
.footer {
  background: var(--bg-light); border-top: 1px solid var(--border);
  padding: 60px 0 24px;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 40px; margin-bottom: 40px;
}

.footer-col h4 {
  font-size: 16px; margin-bottom: 16px; color: var(--text);
}
.footer-col p { color: var(--text-muted); font-size: 14px; line-height: 1.7; }

.footer-col ul li { margin-bottom: 8px; }
.footer-col ul li a {
  color: var(--text-muted); font-size: 14px; transition: var(--transition);
}
.footer-col ul li a:hover { color: var(--accent); }
.footer-email { color: var(--text-muted); font-size: 13px; }

.footer-bottom {
  border-top: 1px solid var(--border); padding-top: 20px;
  text-align: center;
}
.footer-bottom p { color: var(--text-muted); font-size: 13px; }

/* =================== Back to Top =================== */
.back-to-top {
  position: fixed; bottom: 32px; right: 32px;
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--accent); color: #1E1F22;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; font-weight: 700;
  opacity: 0; visibility: hidden; transform: translateY(12px);
  transition: all var(--transition);
  z-index: 999; box-shadow: 0 4px 16px rgba(255,215,0,0.3);
}
.back-to-top.visible { opacity: 1; visibility: visible; transform: translateY(0); }
.back-to-top:hover { transform: translateY(-2px); }

/* =================== Mobile Nav =================== */
@media (max-width: 768px) {
  .nav-links {
    position: fixed; top: var(--nav-height); left: 0; right: 0;
    background: rgba(30, 31, 34, 0.95);
    backdrop-filter: blur(12px);
    flex-direction: column; gap: 0;
    padding: 16px; border-bottom: 1px solid var(--border);
    transform: translateY(-100%); opacity: 0;
    transition: all var(--transition); pointer-events: none;
  }
  .nav-links.active { transform: translateY(0); opacity: 1; pointer-events: auto; }
  .nav-links a { display: block; padding: 12px 0; font-size: 16px; border-bottom: 1px solid var(--border); }
  .nav-toggle { display: block; }

  .hero {
    flex-direction: column; text-align: center;
    padding: 120px 24px 60px; min-height: auto;
  }
  .hero-buttons { justify-content: center; }
  .hero-stats { justify-content: center; }
  .hero-visual { width: 200px; height: 180px; margin-top: 40px; }

  .features-grid,
  .instruments-grid,
  .ai-grid { grid-template-columns: 1fr; }

  .back-to-top { bottom: 20px; right: 20px; width: 40px; height: 40px; }
}
