/* =================================
   DEDE Decibel Meter - Product Website
   Modern Dark Theme with Glassmorphism
   ================================= */

/* ========== CSS Variables ========== */
:root {
  /* Primary Colors */
  --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --primary-color: #667eea;
  --secondary-color: #764ba2;
  --accent-color: #00d4ff;

  /* Background Colors */
  --bg-dark: #0a0a1a;
  --bg-card: rgba(255, 255, 255, 0.05);
  --bg-glass: rgba(255, 255, 255, 0.1);

  /* Text Colors */
  --text-primary: #ffffff;
  --text-secondary: rgba(255, 255, 255, 0.7);
  --text-muted: rgba(255, 255, 255, 0.5);

  /* Effects */
  --glass-blur: blur(20px);
  --border-glass: 1px solid rgba(255, 255, 255, 0.1);
  --shadow-glow: 0 0 40px rgba(102, 126, 234, 0.3);
  --shadow-card: 0 8px 32px rgba(0, 0, 0, 0.3);

  /* Spacing */
  --section-padding: 100px 0;
  --container-width: 1200px;

  /* Transitions */
  --transition-fast: 0.3s ease;
  --transition-slow: 0.6s ease;
}

/* ========== Base Styles ========== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg-dark);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
}

/* Background gradient overlay */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background:
    radial-gradient(ellipse at 20% 20%, rgba(102, 126, 234, 0.15) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 80%, rgba(118, 75, 162, 0.15) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 50%, rgba(0, 212, 255, 0.05) 0%, transparent 50%);
  pointer-events: none;
  z-index: -1;
}

/* ========== Typography ========== */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: 700;
  line-height: 1.2;
}

h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  margin-bottom: 1rem;
}

h3 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

p {
  color: var(--text-secondary);
}

a {
  color: var(--accent-color);
  text-decoration: none;
  transition: var(--transition-fast);
}

a:hover {
  color: var(--primary-color);
}

/* ========== Layout ========== */
.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 20px;
}

section {
  padding: var(--section-padding);
}

/* ========== Navigation ========== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 1rem 0;
  background: rgba(10, 10, 26, 0.8);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-bottom: var(--border-glass);
  transition: var(--transition-fast);
}

.navbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
}

.nav-logo .logo-icon {
  font-size: 2rem;
}

.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
}

.nav-links a {
  color: var(--text-secondary);
  font-weight: 500;
  position: relative;
  padding: 0.5rem 0;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary-gradient);
  transition: var(--transition-fast);
}

.nav-links a:hover {
  color: var(--text-primary);
}

.nav-links a:hover::after {
  width: 100%;
}

.lang-switch {
  display: flex;
  gap: 0.5rem;
  background: var(--bg-glass);
  padding: 0.25rem;
  border-radius: 8px;
  border: var(--border-glass);
}

.lang-switch button {
  padding: 0.5rem 1rem;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  border-radius: 6px;
  font-weight: 500;
  transition: var(--transition-fast);
}

.lang-switch button.active {
  background: var(--primary-gradient);
  color: var(--text-primary);
}

.lang-switch button:hover:not(.active) {
  color: var(--text-primary);
}

/* Mobile menu */
.mobile-menu-btn {
  display: none;
  flex-direction: column;
  gap: 6px;
  padding: 0.5rem;
  background: transparent;
  border: none;
  cursor: pointer;
}

.mobile-menu-btn span {
  display: block;
  width: 25px;
  height: 2px;
  background: var(--text-primary);
  transition: var(--transition-fast);
}

/* ========== Hero Section ========== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 80px;
  position: relative;
  overflow: hidden;
}

.hero .container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.hero-content {
  z-index: 1;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: var(--bg-glass);
  border: var(--border-glass);
  border-radius: 50px;
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  backdrop-filter: var(--glass-blur);
}

.hero-badge .badge-icon {
  color: var(--accent-color);
}

.hero h1 {
  margin-bottom: 1.5rem;
}

.hero-description {
  font-size: 1.25rem;
  margin-bottom: 2rem;
  max-width: 500px;
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem 2rem;
  border-radius: 12px;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: var(--transition-fast);
  border: none;
  text-decoration: none;
}

.btn-primary {
  background: var(--primary-gradient);
  color: var(--text-primary);
  box-shadow: var(--shadow-glow);
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 0 60px rgba(102, 126, 234, 0.5);
}

.btn-secondary {
  background: var(--bg-glass);
  color: var(--text-primary);
  border: var(--border-glass);
  backdrop-filter: var(--glass-blur);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: translateY(-3px);
}

.hero-image {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero-phone {
  max-width: 100%;
  height: auto;
  max-height: 80vh;
  border-radius: 24px;
  box-shadow: var(--shadow-card);
  animation: float 6s ease-in-out infinite;
}

@keyframes float {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-20px);
  }
}

/* Glow effect behind phone */
.hero-image::before {
  content: '';
  position: absolute;
  width: 300px;
  height: 300px;
  background: var(--primary-gradient);
  filter: blur(100px);
  opacity: 0.5;
  z-index: -1;
}

/* ========== Features Section ========== */
.features {
  background: rgba(0, 0, 0, 0.3);
  position: relative;
}

.section-header {
  text-align: center;
  margin-bottom: 4rem;
}

.section-header p {
  font-size: 1.125rem;
  max-width: 600px;
  margin: 0 auto;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
}

.feature-card {
  background: var(--bg-card);
  border: var(--border-glass);
  border-radius: 20px;
  padding: 2rem;
  backdrop-filter: var(--glass-blur);
  transition: var(--transition-fast);
  position: relative;
  overflow: hidden;
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--primary-gradient);
  transform: scaleX(0);
  transition: var(--transition-fast);
}

.feature-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-card);
  border-color: rgba(102, 126, 234, 0.3);
}

.feature-card:hover::before {
  transform: scaleX(1);
}

.feature-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  display: block;
}

.feature-card h3 {
  color: var(--text-primary);
  margin-bottom: 0.75rem;
}

.feature-card p {
  font-size: 0.95rem;
}

/* ========== Screenshots Section ========== */
.screenshots {
  position: relative;
}

.screenshots-container {
  display: flex;
  gap: 2rem;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 3rem;
}

.screenshot-item {
  position: relative;
  transition: var(--transition-fast);
}

.screenshot-item:hover {
  transform: scale(1.05);
}

.screenshot-item img {
  max-width: 280px;
  height: auto;
  border-radius: 24px;
  box-shadow: var(--shadow-card);
}

.screenshot-item:nth-child(2) {
  transform: scale(1.1);
  z-index: 1;
}

.screenshot-item:nth-child(2):hover {
  transform: scale(1.15);
}

/* ========== Stats Section ========== */
.stats {
  background: var(--bg-glass);
  border-top: var(--border-glass);
  border-bottom: var(--border-glass);
  padding: 60px 0;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  text-align: center;
}

.stat-item {
  padding: 1rem;
}

.stat-number {
  font-size: 3rem;
  font-weight: 700;
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.5rem;
}

.stat-label {
  color: var(--text-secondary);
  font-size: 1rem;
}

/* ========== CTA Section ========== */
.cta {
  text-align: center;
  position: relative;
}

.cta-content {
  background: var(--bg-card);
  border: var(--border-glass);
  border-radius: 30px;
  padding: 4rem;
  backdrop-filter: var(--glass-blur);
  max-width: 800px;
  margin: 0 auto;
  position: relative;
  overflow: hidden;
}

.cta-content::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: var(--primary-gradient);
  opacity: 0.05;
  transform: rotate(30deg);
}

.cta h2 {
  position: relative;
  z-index: 1;
}

.cta p {
  font-size: 1.25rem;
  margin-bottom: 2rem;
  position: relative;
  z-index: 1;
}

.cta .btn {
  position: relative;
  z-index: 1;
}

/* ========== Footer ========== */
.footer {
  background: rgba(0, 0, 0, 0.5);
  padding: 60px 0 30px;
  border-top: var(--border-glass);
}

.footer-content {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 4rem;
  margin-bottom: 3rem;
}

.footer-brand h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.footer-brand p {
  font-size: 0.95rem;
  max-width: 300px;
}

.footer-links h4,
.footer-contact h4 {
  color: var(--text-primary);
  margin-bottom: 1rem;
  font-size: 1rem;
}

.footer-links ul {
  list-style: none;
}

.footer-links li {
  margin-bottom: 0.5rem;
}

.footer-links a {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.footer-links a:hover {
  color: var(--text-primary);
}

.footer-contact p {
  font-size: 0.95rem;
  margin-bottom: 0.5rem;
}

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  border-top: var(--border-glass);
}

.footer-bottom p {
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* ========== Animations ========== */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ========== Responsive Design ========== */
@media (max-width: 992px) {
  .hero .container {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero-content {
    order: 1;
  }

  .hero-image {
    order: 0;
    margin-bottom: 2rem;
  }

  .hero-phone {
    max-height: 50vh;
  }

  .hero-description {
    margin: 0 auto 2rem;
  }

  .hero-buttons {
    justify-content: center;
  }

  .footer-content {
    grid-template-columns: 1fr;
    gap: 2rem;
    text-align: center;
  }

  .footer-brand p {
    max-width: none;
  }
}

@media (max-width: 768px) {
  :root {
    --section-padding: 60px 0;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(10, 10, 26, 0.95);
    backdrop-filter: var(--glass-blur);
    flex-direction: column;
    padding: 1rem;
    gap: 0;
    border-bottom: var(--border-glass);
  }

  .nav-links.active {
    display: flex;
  }

  .nav-links li {
    border-bottom: var(--border-glass);
  }

  .nav-links a {
    display: block;
    padding: 1rem;
  }

  .mobile-menu-btn {
    display: flex;
  }

  .lang-switch {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(10, 10, 26, 0.95);
    backdrop-filter: var(--glass-blur);
    padding: 0.75rem;
    border-bottom: var(--border-glass);
    justify-content: center;
    display: none;
  }

  .nav-links.active+.lang-switch,
  .lang-switch.active {
    display: flex;
  }

  .screenshots-container {
    flex-direction: column;
  }

  .screenshot-item:nth-child(2) {
    transform: none;
  }

  .screenshot-item:nth-child(2):hover {
    transform: scale(1.05);
  }

  .cta-content {
    padding: 2rem;
  }
}

@media (max-width: 480px) {
  .hero-buttons {
    flex-direction: column;
    width: 100%;
  }

  .btn {
    width: 100%;
    justify-content: center;
    padding: 0.875rem 1.5rem;
    font-size: 0.9rem;
  }

  .stats-grid {
    grid-template-columns: 1fr 1fr;
  }

  .feature-card {
    padding: 1.5rem;
  }

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

  .hero-description {
    font-size: 1rem;
  }

  .hero-badge {
    font-size: 0.75rem;
    padding: 0.4rem 0.8rem;
  }

  .section-header h2 {
    font-size: 1.75rem;
  }

  .screenshot-item img {
    max-width: 220px;
    border-radius: 16px;
  }

  .stat-number {
    font-size: 2rem;
  }

  .stat-label {
    font-size: 0.85rem;
  }

  .navbar .container {
    padding: 0 15px;
  }

  .nav-logo {
    font-size: 1.25rem;
  }

  .nav-logo .logo-icon {
    font-size: 1.5rem;
  }

  /* Language selector page mobile */
  .language-card {
    padding: 2rem 1.5rem;
    margin: 1rem;
    border-radius: 20px;
  }

  .language-card h1 {
    font-size: 1.75rem;
  }

  .language-card .app-icon {
    font-size: 3.5rem;
  }

  .language-buttons {
    flex-direction: column;
    gap: 1rem;
  }

  .lang-btn {
    min-width: 100%;
    padding: 1.5rem 2rem;
  }

  .lang-btn .flag {
    font-size: 2.5rem;
  }

  /* Privacy page mobile */
  .privacy-content {
    padding: 1.5rem;
    margin: 0 1rem;
    border-radius: 16px;
  }

  .privacy-content h1 {
    font-size: 1.75rem;
  }

  .privacy-content h2 {
    font-size: 1.25rem;
  }

  .privacy-page {
    padding-top: 80px;
  }

  /* Footer mobile */
  .footer {
    padding: 40px 0 20px;
  }

  .footer-brand h3 {
    font-size: 1.25rem;
  }
}

/* ========== Privacy Page Styles ========== */
.privacy-page {
  padding-top: 100px;
  min-height: 100vh;
}

.privacy-content {
  max-width: 800px;
  margin: 0 auto;
  background: var(--bg-card);
  border: var(--border-glass);
  border-radius: 20px;
  padding: 3rem;
  backdrop-filter: var(--glass-blur);
}

.privacy-content h1 {
  font-size: 2.5rem;
  margin-bottom: 2rem;
  text-align: center;
}

.privacy-content h2 {
  font-size: 1.5rem;
  margin-top: 2rem;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.privacy-content h3 {
  font-size: 1.25rem;
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
  color: var(--text-primary);
}

.privacy-content p {
  margin-bottom: 1rem;
}

.privacy-content ul {
  margin-bottom: 1rem;
  padding-left: 1.5rem;
}

.privacy-content li {
  margin-bottom: 0.5rem;
  color: var(--text-secondary);
}

.privacy-content hr {
  border: none;
  border-top: var(--border-glass);
  margin: 3rem 0;
}

.privacy-content strong {
  color: var(--text-primary);
}

/* Language toggle for content */
[data-lang] {
  display: none;
}

[data-lang="en"] {
  display: block;
}

body.lang-zh [data-lang="en"] {
  display: none;
}

body.lang-zh [data-lang="zh"] {
  display: block;
}