:root {
  --bg: #070b14;
  --bg-elevated: #0d1322;
  --surface: rgba(16, 22, 38, 0.88);
  --surface-border: rgba(255, 255, 255, 0.08);
  --text: #f4f7ff;
  --muted: #8b9bb8;
  --primary: #5b7cff;
  --primary-2: #8b5cf6;
  --primary-hover: #4a6af0;
  --secondary: rgba(255, 255, 255, 0.06);
  --error: #ff6b7a;
  --success: #3dd68c;
  --radius: 20px;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.5);
  --nav-h: 64px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  font-family: "Outfit", system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  overflow-x: hidden;
}

/* Background effects */
.bg-glow {
  position: fixed;
  border-radius: 50%;
  filter: blur(100px);
  pointer-events: none;
  z-index: 0;
}

.bg-glow-1 {
  width: 480px;
  height: 480px;
  top: -140px;
  left: -100px;
  background: rgba(91, 124, 255, 0.28);
}

.bg-glow-2 {
  width: 400px;
  height: 400px;
  right: -120px;
  top: 40%;
  background: rgba(139, 92, 246, 0.18);
}

.bg-glow-3 {
  width: 320px;
  height: 320px;
  left: 30%;
  bottom: -80px;
  background: rgba(61, 214, 140, 0.08);
}

.grid-overlay {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, black, transparent);
}

/* Nav */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--nav-h);
  padding: 0 max(16px, calc(50% - 480px));
  background: rgba(7, 11, 20, 0.75);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
}

.nav-logo {
  width: 40px;
  height: 40px;
  border-radius: 11px;
  object-fit: cover;
  box-shadow: 0 4px 16px rgba(91, 124, 255, 0.35);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  padding: 8px 12px;
  border-radius: 10px;
  transition: color 0.15s, background 0.15s;
}

.nav-links a:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
}

.nav-dash {
  background: rgba(91, 124, 255, 0.12) !important;
  color: #b8c7ff !important;
  border: 1px solid rgba(91, 124, 255, 0.25);
}

/* Layout */
.container {
  position: relative;
  z-index: 1;
  width: min(960px, calc(100% - 32px));
  margin: 0 auto;
  padding: 40px 0 72px;
}

.hero {
  text-align: center;
  margin-bottom: 36px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 999px;
  background: rgba(91, 124, 255, 0.1);
  border: 1px solid rgba(91, 124, 255, 0.28);
  color: #b8c7ff;
  font-size: 0.82rem;
  font-weight: 500;
  margin-bottom: 20px;
}

.badge-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 4px rgba(61, 214, 140, 0.2);
  animation: pulse 2s ease infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.hero h1 {
  font-size: clamp(2.1rem, 5.5vw, 3.4rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.12;
  margin-bottom: 16px;
}

.grad-text {
  background: linear-gradient(135deg, #7b9aff 0%, #a78bfa 50%, #f472b6 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.subtitle {
  color: var(--muted);
  font-size: 1.08rem;
  max-width: 640px;
  margin: 0 auto;
  line-height: 1.65;
}

.subtitle strong {
  color: #d0daf5;
  font-weight: 600;
}

/* Cards */
.card {
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(20px);
}

.input-card {
  padding: 28px;
  margin-bottom: 24px;
}

.label {
  display: block;
  font-size: 0.9rem;
  font-weight: 500;
  color: #d7e0ff;
  margin-bottom: 10px;
}

.input-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
}

.input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon {
  position: absolute;
  left: 14px;
  color: var(--muted);
  pointer-events: none;
}

input[type="url"],
select {
  width: 100%;
  padding: 15px 16px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(5, 8, 16, 0.8);
  color: var(--text);
  font: inherit;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.input-wrap input[type="url"] {
  padding-left: 44px;
}

input[type="url"]:focus,
select:focus {
  border-color: rgba(91, 124, 255, 0.65);
  box-shadow: 0 0 0 4px rgba(91, 124, 255, 0.14);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 52px;
  padding: 0 22px;
  border: none;
  border-radius: 14px;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.2s ease, opacity 0.2s ease, box-shadow 0.2s;
}

.btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.btn:not(:disabled):hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  color: white;
  box-shadow: 0 8px 28px rgba(91, 124, 255, 0.35);
}

.btn-primary:not(:disabled):hover {
  box-shadow: 0 12px 32px rgba(91, 124, 255, 0.45);
}

.btn-secondary {
  background: var(--secondary);
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.error {
  margin-top: 14px;
  color: var(--error);
  font-size: 0.92rem;
  padding: 10px 14px;
  background: rgba(255, 107, 122, 0.08);
  border-radius: 10px;
  border: 1px solid rgba(255, 107, 122, 0.2);
}

.quick-tips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  margin-top: 16px;
  color: var(--muted);
  font-size: 0.85rem;
}

.quick-tips span {
  color: #9be7a4;
}

/* Result */
.result-card {
  padding: 28px;
  margin-bottom: 40px;
  animation: fadeUp 0.35s ease;
}

.result-grid {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 28px;
  align-items: start;
}

.thumb-wrap {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: rgba(255, 255, 255, 0.04);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
}

.thumb-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.platform-badge {
  position: absolute;
  left: 10px;
  bottom: 10px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.7);
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: capitalize;
  backdrop-filter: blur(8px);
}

.meta h2 {
  font-size: 1.35rem;
  line-height: 1.3;
  margin-bottom: 8px;
  letter-spacing: -0.02em;
}

.muted {
  color: var(--muted);
  margin-bottom: 6px;
  font-size: 0.95rem;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 18px;
}

/* Sections */
.section-title {
  text-align: center;
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 12px;
}

.section-sub {
  text-align: center;
  color: var(--muted);
  max-width: 640px;
  margin: 0 auto 28px;
  font-size: 1rem;
}

.features {
  margin: 56px 0 48px;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 28px;
}

.feature-card {
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: 18px;
  padding: 24px;
  transition: transform 0.2s, border-color 0.2s;
}

.feature-card:hover {
  transform: translateY(-3px);
  border-color: rgba(91, 124, 255, 0.3);
}

.feature-num {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  font-weight: 700;
  font-size: 0.95rem;
  margin-bottom: 14px;
}

.feature-card h3 {
  font-size: 1.1rem;
  margin-bottom: 8px;
}

.feature-card p {
  color: var(--muted);
  font-size: 0.92rem;
}

/* Platforms */
.platforms-section {
  margin-bottom: 48px;
}

.platforms {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.platform-pill {
  padding: 11px 18px;
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 600;
  border: 1px solid transparent;
}

.platform-pill.youtube {
  background: rgba(255, 0, 0, 0.12);
  color: #ff8f8f;
  border-color: rgba(255, 0, 0, 0.22);
}

.platform-pill.instagram {
  background: rgba(225, 48, 108, 0.12);
  color: #ff8fc4;
  border-color: rgba(225, 48, 108, 0.22);
}

.platform-pill.tiktok {
  background: rgba(0, 242, 234, 0.1);
  color: #7ef8f4;
  border-color: rgba(0, 242, 234, 0.22);
}

.platform-pill.facebook {
  background: rgba(24, 119, 242, 0.12);
  color: #8fc0ff;
  border-color: rgba(24, 119, 242, 0.22);
}

.platform-pill.twitter {
  background: rgba(29, 155, 240, 0.12);
  color: #8fd0ff;
  border-color: rgba(29, 155, 240, 0.22);
}

.platform-pill.vimeo {
  background: rgba(26, 183, 234, 0.12);
  color: #8ee0f5;
  border-color: rgba(26, 183, 234, 0.22);
}

.platform-pill.reddit {
  background: rgba(255, 69, 0, 0.12);
  color: #ffb08a;
  border-color: rgba(255, 69, 0, 0.22);
}

.platform-pill.more {
  background: rgba(255, 255, 255, 0.05);
  color: var(--muted);
  border-color: rgba(255, 255, 255, 0.1);
}

/* SEO block */
.seo-block {
  padding: 32px;
  margin-bottom: 48px;
}

.seo-block h2 {
  font-size: 1.4rem;
  margin-bottom: 14px;
  letter-spacing: -0.02em;
}

.seo-block p {
  color: var(--muted);
  margin-bottom: 12px;
  font-size: 0.98rem;
}

.seo-block strong {
  color: #d7e0ff;
}

.seo-list {
  margin: 16px 0 0 1.2rem;
  color: var(--muted);
}

.seo-list li {
  margin-bottom: 8px;
}

/* FAQ */
.faq {
  margin-bottom: 56px;
}

.faq-item {
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: 14px;
  margin-top: 10px;
  padding: 4px 18px;
}

.faq-item summary {
  cursor: pointer;
  padding: 16px 0;
  font-weight: 600;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "+";
  color: var(--primary);
  font-size: 1.3rem;
  font-weight: 400;
}

.faq-item[open] summary::after {
  content: "−";
}

.faq-item p {
  color: var(--muted);
  padding-bottom: 16px;
  font-size: 0.95rem;
}

/* Footer */
.footer {
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  margin-bottom: 12px;
}

.footer-brand img {
  border-radius: 8px;
}

.footer p {
  max-width: 520px;
  margin: 0 auto 10px;
}

.footer-links a {
  color: #b8c7ff;
  text-decoration: none;
  font-weight: 500;
}

.footer-links a:hover {
  text-decoration: underline;
}

.footer-copy {
  margin-top: 16px !important;
  font-size: 0.82rem;
  opacity: 0.7;
}

.hidden {
  display: none !important;
}

.spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.25);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

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

@media (max-width: 800px) {
  .nav-links a:not(.nav-dash) {
    display: none;
  }

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

  .input-row {
    grid-template-columns: 1fr;
  }

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

  .actions {
    flex-direction: column;
  }

  .actions .btn {
    width: 100%;
  }

  .container {
    padding-top: 28px;
  }
}
