@import url('https://fonts.googleapis.com/css2?family=Syne:wght@400;500;600;700;800&family=Inter:wght@300;400;500&display=swap');

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --primary: #6366f1;
  --primary-dark: #4f46e5;
  --bg: #0f0f23;
  --surface: #161628;
  --border: #2a2a50;
  --text: #e8e8ff;
  --muted: #8888bb;
  --radius: 14px;
}
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
}

/* App Shell */
.app-shell { min-height: 100vh; display: flex; flex-direction: column; }

/* Header */
.app-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(15,15,35,.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(99,102,241,.15);
}
.header-content {
  max-width: 1100px; margin: 0 auto;
  padding: .875rem 1.5rem;
  display: flex; align-items: center; justify-content: space-between;
}
.app-logo {
  font-family: 'Syne', sans-serif;
  font-size: 1.1rem; font-weight: 700;
  background: linear-gradient(135deg, #c084fc, #6366f1, #38bdf8);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.header-actions { display: flex; gap: .5rem; align-items: center; }
.icon-btn {
  width: 38px; height: 38px; border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,.04);
  color: var(--muted);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: all .2s; text-decoration: none;
}
.icon-btn:hover { background: rgba(99,102,241,.1); color: var(--text); border-color: rgba(99,102,241,.4); }
.icon-btn svg { width: 18px; height: 18px; }

/* Main */
.app-main { flex: 1; }

/* Hero */
.hero {
  max-width: 1100px; margin: 0 auto;
  padding: 5rem 1.5rem 3rem;
  text-align: center;
}
.hero-badge {
  display: inline-block;
  padding: .35rem 1rem;
  border-radius: 99px;
  background: rgba(99,102,241,.15);
  border: 1px solid rgba(99,102,241,.3);
  color: #a5b4fc;
  font-size: .8rem; font-weight: 600;
  letter-spacing: .05em; text-transform: uppercase;
  margin-bottom: 1.5rem;
  animation: fadeUp .6s ease both;
}
.hero-title {
  font-family: 'Syne', sans-serif;
  font-size: clamp(2.5rem, 8vw, 5rem);
  font-weight: 800;
  line-height: 1.1;
  background: linear-gradient(135deg, #fff 0%, #c084fc 50%, #6366f1 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  margin-bottom: 1.25rem;
  animation: fadeUp .6s .1s ease both;
}
.hero-sub {
  font-size: 1.15rem; color: var(--muted); max-width: 520px; margin: 0 auto 2.5rem;
  line-height: 1.7;
  animation: fadeUp .6s .2s ease both;
}
.hero-actions {
  display: flex; justify-content: center; gap: 1rem; flex-wrap: wrap;
  animation: fadeUp .6s .3s ease both;
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .75rem 1.5rem;
  border-radius: 10px;
  font-family: inherit; font-size: .95rem; font-weight: 600;
  cursor: pointer; transition: all .2s;
  text-decoration: none; border: 1px solid transparent;
}
.btn-primary {
  background: linear-gradient(135deg, var(--primary), #7c3aed);
  color: white;
  box-shadow: 0 0 30px rgba(99,102,241,.3);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 4px 40px rgba(99,102,241,.5); }
.btn-outline {
  background: rgba(255,255,255,.04);
  border-color: var(--border);
  color: var(--text);
}
.btn-outline:hover { background: rgba(255,255,255,.08); border-color: rgba(99,102,241,.4); }

/* Features Grid */
.features-grid {
  max-width: 1100px; margin: 0 auto;
  padding: 0 1.5rem 4rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
}
.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  transition: all .25s;
  animation: fadeUp .6s ease both;
}
.feature-card:hover {
  border-color: rgba(99,102,241,.4);
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(99,102,241,.1);
}
.feature-icon { font-size: 2rem; margin-bottom: 1rem; }
.feature-card h3 { font-size: 1rem; font-weight: 600; margin-bottom: .5rem; }
.feature-card p { font-size: .875rem; color: var(--muted); line-height: 1.6; }

/* Toast */
#toast-container {
  position: fixed; bottom: 1.5rem; right: 1.5rem;
  z-index: 9999; display: flex; flex-direction: column; gap: .5rem;
}
.toast {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: .875rem 1.25rem;
  min-width: 260px; max-width: 360px;
  box-shadow: 0 8px 32px rgba(0,0,0,.4);
  display: flex; align-items: center; gap: .75rem;
  font-size: .9rem;
  animation: slideIn .25s ease;
}
.toast.success { border-color: rgba(16,185,129,.3); }
.toast.error { border-color: rgba(239,68,68,.3); }
.toast.info { border-color: rgba(99,102,241,.3); }

/* Offline banner */
.offline-banner {
  position: fixed; top: 0; left: 0; right: 0;
  background: #f59e0b; color: #000;
  padding: .5rem 1rem; text-align: center;
  font-size: .875rem; font-weight: 600;
  z-index: 9998; display: none;
}

/* Install prompt */
.install-prompt {
  position: fixed; bottom: 1.5rem; left: 50%; transform: translateX(-50%);
  background: var(--surface);
  border: 1px solid rgba(99,102,241,.4);
  border-radius: var(--radius);
  padding: 1rem 1.5rem;
  display: flex; align-items: center; gap: 1rem;
  box-shadow: 0 8px 40px rgba(99,102,241,.2);
  z-index: 999;
  animation: slideUp .4s ease;
}

@keyframes fadeUp { from { opacity:0; transform:translateY(20px); } to { opacity:1; transform:translateY(0); } }
@keyframes slideIn { from { transform:translateX(100%); opacity:0; } to { transform:translateX(0); opacity:1; } }
@keyframes slideUp { from { transform:translateX(-50%) translateY(100%); opacity:0; } to { transform:translateX(-50%) translateY(0); opacity:1; } }

@media (max-width: 600px) {
  .hero { padding: 3rem 1rem 2rem; }
  .features-grid { padding: 0 1rem 2rem; }
  .header-content { padding: .75rem 1rem; }
}
