/* ==========================================================================
   VARIABLES & BASE STYLES
   ========================================================================== */
:root {
  --bg-dark: #09090b;
  --bg-card: #121215;
  --bg-card-hover: #18181b;
  --border-color: #27272a;
  --border-glow: rgba(99, 102, 241, 0.3);
  --accent: #6366f1;
  --accent-glow: rgba(99, 102, 241, 0.4);
  --accent-hover: #4f46e5;
  --text-main: #f4f4f5;
  --text-muted: #a1a1aa;
  --text-dim: #71717a;
  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 8px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  -webkit-font-smoothing: antialiased;
}

html {
  scroll-behavior: smooth;
  background-color: var(--bg-dark);
  color: var(--text-main);
}

body {
  overflow-x: hidden;
  line-height: 1.6;
  background: radial-gradient(circle at 50% -20%, rgba(99, 102, 241, 0.15), transparent 70%);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Ambient Background Animated Glow */
.ambient-glow {
  position: fixed;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
  top: -150px;
  left: 50%;
  transform: translateX(-50%);
  filter: blur(80px);
  z-index: -1;
  pointer-events: none;
  animation: pulseGlow 8s ease-in-out infinite alternate;
}

@keyframes pulseGlow {
  0% { opacity: 0.5; transform: translateX(-50%) scale(0.9); }
  100% { opacity: 0.8; transform: translateX(-50%) scale(1.1); }
}

/* Grid pattern */
.grid-pattern {
  position: fixed;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 32px 32px;
  z-index: -1;
  pointer-events: none;
  opacity: 0.6;
}

a {
  color: inherit;
  text-decoration: none;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
  width: 100%;
}

/* ==========================================================================
   HEADER & NAV
   ========================================================================== */
header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  background: rgba(9, 9, 11, 0.78);
  border-bottom: 1px solid rgba(39, 39, 42, 0.6);
}

.nav-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.logo-area {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
}

.app-icon-box {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: #18181b;
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-shadow: 0 0 15px rgba(99, 102, 241, 0.2);
  transition: transform 0.3s ease;
}

.logo-area:hover .app-icon-box {
  transform: scale(1.05) rotate(-3deg);
}

.app-icon-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.app-icon-fallback {
  width: 100%;
  height: 100%;
  background: #18181b;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 20px;
}

.nav-links {
  display: flex;
  gap: 24px;
  align-items: center;
  list-style: none;
}

.nav-links a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: color 0.2s ease;
}

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

/* Language Dropdown */
.lang-dropdown {
  position: relative;
}

.lang-btn {
  background: rgba(24, 24, 27, 0.8);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 8px 12px;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.lang-btn:hover {
  background: var(--bg-card-hover);
  border-color: var(--text-dim);
}

.lang-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: #18181b;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 140px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: all 0.2s ease;
  z-index: 100;
}

.lang-dropdown.open .lang-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.lang-option {
  padding: 8px 12px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.lang-option:hover {
  background: rgba(99, 102, 241, 0.15);
  color: var(--text-main);
}

/* BUTTONS */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 0.25s ease;
  cursor: pointer;
  border: 1px solid transparent;
}

.btn-primary {
  background: var(--accent);
  color: #ffffff;
  box-shadow: 0 4px 20px var(--accent-glow);
}

.btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(99, 102, 241, 0.6);
}

.btn-secondary {
  background: rgba(24, 24, 27, 0.8);
  color: var(--text-main);
  border-color: var(--border-color);
}

.btn-secondary:hover {
  background: var(--bg-card-hover);
  border-color: var(--text-dim);
  transform: translateY(-2px);
}

.btn-github {
  background: #18181b;
  border: 1px solid var(--border-color);
  color: var(--text-main);
}

.btn-github:hover {
  background: #27272a;
}

.btn-download-wide {
  width: 100%;
  max-width: 360px;
  padding: 14px 28px;
  font-size: 1rem;
}

/* ==========================================================================
   HERO SECTION & INTERACTIVE DEMO
   ========================================================================== */
.hero {
  padding: 80px 0 60px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 100px;
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid rgba(99, 102, 241, 0.25);
  color: #a5b4fc;
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 24px;
}

.badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
}

.hero-title {
  font-size: 3.2rem;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 20px;
  background: linear-gradient(180deg, #ffffff 0%, #a1a1aa 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  font-size: 1.1rem;
  color: var(--text-muted);
  margin-bottom: 32px;
  font-weight: 400;
}

.hero-actions {
  display: flex;
}

/* Phone Mockup */
.phone-mockup-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}

.phone-mockup {
  width: 300px;
  height: 580px;
  background: #000;
  border-radius: 40px;
  border: 4px solid #27272a;
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.9), 0 0 40px rgba(99, 102, 241, 0.15);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: 16px;
}

.phone-notch {
  width: 100px;
  height: 18px;
  background: #27272a;
  border-radius: 0 0 12px 12px;
  margin: 0 auto 16px;
}

.phone-screen {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  position: relative;
}

.demo-header {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.75rem;
  color: var(--text-dim);
  padding: 0 4px;
}

/* Swipe Card Stage */
.demo-card-stage {
  width: 100%;
  height: 380px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.demo-card {
  width: 100%;
  height: 100%;
  background: #18181b;
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  text-align: center;
  position: absolute;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.3s ease;
  user-select: none;
}

.demo-album-art {
  width: 140px;
  height: 140px;
  border-radius: 16px;
  background: linear-gradient(135deg, #312e81, #6366f1);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 10px;
  box-shadow: 0 8px 20px rgba(99, 102, 241, 0.3);
}

.demo-track-info {
  margin-top: 10px;
}

.demo-track-title {
  font-weight: 700;
  font-size: 1rem;
  color: var(--text-main);
}

.demo-track-artist {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.demo-actions-hint {
  display: flex;
  gap: 16px;
  margin-top: 10px;
}

.demo-btn-action {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #27272a;
  border: 1px solid #3f3f46;
  color: var(--text-main);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.demo-btn-action:hover {
  background: var(--accent);
  border-color: var(--accent);
  transform: scale(1.1);
}

.demo-badge-status {
  position: absolute;
  padding: 6px 12px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  opacity: 0;
  transition: opacity 0.2s ease;
  pointer-events: none;
}

.status-approve {
  top: 16px;
  background: #22c55e;
  color: #000;
}

.status-reject {
  bottom: 16px;
  background: #ef4444;
  color: #fff;
}

.swipe-up {
  transform: translateY(-400px) rotate(-10deg) !important;
  opacity: 0 !important;
}

.swipe-down {
  transform: translateY(400px) rotate(10deg) !important;
  opacity: 0 !important;
}

.demo-counter-bar {
  width: 100%;
  display: flex;
  justify-content: space-around;
  font-size: 0.75rem;
  padding: 10px 0;
  border-top: 1px solid #27272a;
  color: var(--text-muted);
}

.counter-item span {
  font-weight: 700;
  color: var(--text-main);
}

/* ==========================================================================
   FEATURES SECTION
   ========================================================================== */
.section-title-wrapper {
  text-align: center;
  max-width: 600px;
  margin: 0 auto 50px;
}

.section-subtitle {
  color: var(--accent);
  font-weight: 700;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 8px;
}

.section-title {
  font-size: 2.2rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-bottom: 90px;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 28px;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.feature-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-glow);
  transform: translateY(-4px);
  box-shadow: 0 12px 30px -10px rgba(99, 102, 241, 0.15);
}

.feature-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: rgba(99, 102, 241, 0.12);
  border: 1px solid rgba(99, 102, 241, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  margin-bottom: 20px;
}

.feature-title {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 10px;
}

.feature-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* ==========================================================================
   GESTURES SECTION
   ========================================================================== */
.gestures-banner {
  background: linear-gradient(180deg, #121215 0%, #09090b 100%);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 40px;
  margin-bottom: 90px;
}

.gestures-list {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-top: 30px;
}

.gesture-item {
  background: #18181b;
  border: 1px solid #27272a;
  border-radius: var(--radius-md);
  padding: 20px;
  text-align: center;
}

.gesture-icon-badge {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid rgba(99, 102, 241, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 12px;
}

.gesture-name {
  font-weight: 700;
  font-size: 0.95rem;
  margin-bottom: 4px;
}

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

/* ==========================================================================
   AUTHOR SECTION
   ========================================================================== */
.author-section {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  margin-bottom: 90px;
}

.author-info {
  display: flex;
  align-items: center;
  gap: 20px;
}

.author-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  border: 2px solid var(--accent);
  object-fit: cover;
  box-shadow: 0 0 20px var(--accent-glow);
}

.author-name {
  font-size: 1.25rem;
  font-weight: 700;
}

.author-role {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 2px;
}

/* ==========================================================================
   MODAL DIALOG
   ========================================================================== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: all 0.25s ease;
}

.modal-backdrop.active {
  opacity: 1;
  visibility: visible;
}

.modal-card {
  background: #18181b;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 32px;
  max-width: 440px;
  width: 100%;
  position: relative;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8);
  transform: scale(0.92);
  transition: transform 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.modal-backdrop.active .modal-card {
  transform: scale(1);
}

.modal-close-btn {
  position: absolute;
  top: 16px;
  right: 16px;
  background: transparent;
  border: none;
  color: var(--text-dim);
  font-size: 1.5rem;
  cursor: pointer;
  line-height: 1;
  transition: color 0.2s ease;
}

.modal-close-btn:hover {
  color: var(--text-main);
}

.modal-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: rgba(99, 102, 241, 0.12);
  border: 1px solid rgba(99, 102, 241, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}

.modal-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.modal-text {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 24px;
}

.btn-full-modal {
  width: 100%;
  padding: 12px 20px;
}

/* ==========================================================================
   FOOTER & RESPONSIVE
   ========================================================================== */
footer {
  border-top: 1px solid var(--border-color);
  padding: 40px 0;
  margin-top: auto;
  font-size: 0.85rem;
  color: var(--text-dim);
}

.footer-wrapper {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 40px;
  }
  .hero-title { font-size: 2.4rem; }
  .hero-actions { justify-content: center; }
  .features-grid { grid-template-columns: 1fr; }
  .gestures-list { grid-template-columns: repeat(2, 1fr); }
  .author-section { flex-direction: column; text-align: center; }
  .author-info { flex-direction: column; }
  .nav-links { display: none; }
}