/* Megabot Suno — мини-приложение
   Современная тёмная тема, без эмодзи. Лендинг + редактор. */

:root {
  --bg: #0b0d12;
  --bg-soft: #11141c;
  --card: rgba(255, 255, 255, 0.04);
  --border: rgba(255, 255, 255, 0.09);
  --border-strong: rgba(255, 255, 255, 0.16);
  --text: #eef1f6;
  --text-dim: #9aa3b2;
  --text-faint: #6b7382;
  --accent: #7c6cff;
  --accent-2: #4ecdc4;
  --gradient: linear-gradient(135deg, #7c6cff 0%, #4ecdc4 100%);
  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-pill: 999px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

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

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

.wordmark {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.22em;
  color: var(--text-dim);
}

/* ============ ЛЕНДИНГ ============ */

.landing {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 32px 20px;
  position: relative;
  overflow: hidden;
}

.glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.35;
  pointer-events: none;
}

.glow-a {
  width: 420px; height: 420px;
  background: #7c6cff;
  top: -140px; left: -120px;
}

.glow-b {
  width: 380px; height: 380px;
  background: #4ecdc4;
  bottom: -160px; right: -100px;
  opacity: 0.22;
}

.hero {
  position: relative;
  max-width: 520px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  animation: rise 0.6s ease both;
}

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

.hero h1 {
  font-size: clamp(30px, 7vw, 44px);
  line-height: 1.12;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-top: 10px;
  background: linear-gradient(180deg, #ffffff 30%, #b9c0d0 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero .sub {
  font-size: 16px;
  line-height: 1.55;
  color: var(--text-dim);
  max-width: 400px;
}

.cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
  padding: 16px 30px;
  font-size: 16px;
  font-weight: 700;
  color: #0b0d12;
  text-decoration: none;
  background: var(--gradient);
  border-radius: var(--radius-pill);
  box-shadow: 0 8px 32px rgba(124, 108, 255, 0.35);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.cta:hover { transform: translateY(-2px); box-shadow: 0 12px 40px rgba(124, 108, 255, 0.45); }
.cta:active { transform: translateY(0); }

.cta-arrow { font-weight: 400; }

.features {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 0;
  list-style: none;
  margin-top: 22px;
  color: var(--text-dim);
  font-size: 14px;
}

.features li { display: flex; align-items: center; }
.features li:not(:last-child)::after {
  content: "";
  display: inline-block;
  width: 4px; height: 4px;
  border-radius: 50%;
  background: var(--text-faint);
  margin: 0 14px;
}

.landing-footer {
  position: absolute;
  bottom: 18px;
  font-size: 13px;
}

.landing-footer a { color: var(--text-faint); text-decoration: none; }
.landing-footer a:hover { color: var(--text-dim); }

/* ============ РЕДАКТОР ============ */

.app-page { padding-bottom: 120px; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  padding: 14px 20px;
  background: rgba(11, 13, 18, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.container {
  max-width: 600px;
  margin: 0 auto;
  padding: 20px 16px;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px;
}

.card-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 12px;
}

h1 { font-size: 19px; font-weight: 700; letter-spacing: -0.01em; }

h2 {
  font-size: 17px;
  font-weight: 700;
  margin: 26px 0 4px;
  letter-spacing: -0.01em;
}

h3 {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  margin: 18px 0 4px;
}

.hint { color: var(--text-faint); font-size: 13px; line-height: 1.45; margin-top: 6px; }

.save-indicator {
  font-size: 12px;
  color: var(--accent-2);
  opacity: 0;
  transition: opacity 0.3s;
}

.save-indicator.visible { opacity: 1; }
.save-indicator.error { color: #ff6b6b; }

textarea {
  width: 100%;
  background: var(--bg-soft);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.55;
  resize: vertical;
  transition: border-color 0.15s, box-shadow 0.15s;
}

textarea::placeholder { color: var(--text-faint); }

textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(124, 108, 255, 0.18);
}

.styles-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.style-chip {
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--text-dim);
  border-radius: var(--radius-pill);
  padding: 9px 16px;
  font-family: var(--font);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}

.style-chip:hover { border-color: var(--border-strong); color: var(--text); }

.style-chip.selected {
  background: var(--gradient);
  border-color: transparent;
  color: #0b0d12;
  font-weight: 700;
}

.style-chip.disabled {
  opacity: 0.3;
  pointer-events: none;
}

/* Нижняя панель с кнопкой */

.bottom-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 20;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  background: rgba(11, 13, 18, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.status {
  font-size: 13px;
  color: var(--text-dim);
  text-align: center;
  min-height: 17px;
  line-height: 1.35;
}

#generate-btn {
  width: 100%;
  max-width: 600px;
  margin: 0 auto;
  padding: 16px;
  font-family: var(--font);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: #0b0d12;
  background: var(--gradient);
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  box-shadow: 0 6px 24px rgba(124, 108, 255, 0.35);
  transition: transform 0.12s ease, box-shadow 0.15s ease, opacity 0.15s;
  -webkit-tap-highlight-color: transparent;
}

#generate-btn:not(:disabled):hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 32px rgba(124, 108, 255, 0.45);
}

#generate-btn:not(:disabled):active { transform: translateY(0); }

#generate-btn:disabled {
  opacity: 0.35;
  cursor: default;
  box-shadow: none;
}
