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

:root {
  color-scheme: dark;
  --bg: #0d0d18;
  --bg-2: #13131f;
  --surface: rgba(255, 255, 255, 0.07);
  --surface-strong: rgba(255, 255, 255, 0.11);
  --surface-solid: #171724;
  --ink: rgba(255, 255, 255, 0.92);
  --muted: rgba(255, 255, 255, 0.56);
  --subtle: rgba(255, 255, 255, 0.28);
  --line: rgba(255, 255, 255, 0.12);
  --line-strong: rgba(255, 255, 255, 0.22);
  --brand: #6600cc;
  --brand-alt: #4432e3;
  --brand-soft: rgba(102, 0, 204, 0.16);
  --accent-cyan: #22d3ee;
  --accent-pink: #ec4899;
  --danger: #ef4444;
  --warning: #f5c542;
  --brand-gradient: linear-gradient(135deg, #6600cc, #4432e3);
  --aurora-gradient: linear-gradient(135deg, #7c3aed 0%, #0891b2 38%, #10b981 72%, #ec4899 100%);
  --hero-gradient: linear-gradient(90deg, #6600cc, #4432e3, #7c5cff, #a78bfa);
  --shadow-md: 0 18px 44px rgba(0, 0, 0, 0.32);
  --shadow-lg: 0 28px 80px rgba(0, 0, 0, 0.46);
  --glow-brand: 0 10px 36px rgba(102, 0, 204, 0.42);
  --focus-ring: 0 0 0 3px rgba(102, 0, 204, 0.28);
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 22px;
  --radius-pill: 999px;
  font-family: "Inter", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

[data-theme="light"] {
  color-scheme: light;
  --bg: #f5f6fb;
  --bg-2: #ffffff;
  --surface: rgba(255, 255, 255, 0.86);
  --surface-strong: rgba(255, 255, 255, 0.96);
  --surface-solid: #ffffff;
  --ink: #191824;
  --muted: #66637a;
  --subtle: #938fb0;
  --line: rgba(68, 50, 227, 0.14);
  --line-strong: rgba(68, 50, 227, 0.26);
  --brand-soft: rgba(102, 0, 204, 0.08);
  --shadow-md: 0 20px 48px rgba(30, 24, 72, 0.1);
  --shadow-lg: 0 32px 90px rgba(30, 24, 72, 0.14);
  --glow-brand: 0 10px 28px rgba(102, 0, 204, 0.18);
}

/* ── Design system semantic aliases (maps to existing tokens) ── */
:root {
  --color-bg:       var(--bg);
  --color-surface:  var(--bg-2);
  --color-glass:    var(--surface);
  --color-glass-hi: var(--surface-strong);
  --color-ink:      var(--ink);
  --color-muted:    var(--muted);
  --color-sub:      var(--subtle);
  --color-line:     var(--line);
  --color-line-hi:  var(--line-strong);
  --color-brand:    var(--brand);
  --color-brand-alt:var(--brand-alt);
  --color-coral:    var(--danger);
  --color-yellow:   var(--warning);

  /* Short semantic aliases */
  --fg1:   var(--ink);
  --fg2:   var(--muted);
  --bg1:   var(--bg);
  --bg2:   var(--bg-2);
  --border:var(--line);
  --accent:var(--brand);
  --accent-alt: var(--brand-alt);
  --accent-hover: var(--brand-alt);
  --accent-gradient: var(--brand-gradient);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

body {
  position: relative;
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 12% 12%, rgba(102, 0, 204, 0.24), transparent 30%),
    radial-gradient(circle at 88% 16%, rgba(34, 211, 238, 0.14), transparent 28%),
    radial-gradient(circle at 54% 92%, rgba(236, 72, 153, 0.14), transparent 32%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 100%);
  color: var(--ink);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.02), transparent 20%),
    linear-gradient(120deg, rgba(102, 0, 204, 0.08), transparent 42%);
  pointer-events: none;
  z-index: 0;
}

a {
  color: inherit;
}

button,
input,
select {
  font: inherit;
}

button,
a,
input,
select {
  transition: border-color 160ms ease, background 160ms ease, color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.landing-page,
.auth-page,
.dashboard-page {
  position: relative;
  z-index: 1;
}

.site-nav,
.topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px clamp(20px, 5vw, 72px);
  background: rgba(13, 13, 24, 0.68);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--line);
}

[data-theme="light"] .site-nav,
[data-theme="light"] .topbar {
  background: rgba(245, 246, 251, 0.78);
}

.brand,
.brand-mark,
.text-link {
  text-decoration: none;
}

.brand-mark,
.brand {
  display: inline-flex;
  align-items: baseline;
  gap: 2px;
  font-weight: 900;
}

.brand-mark strong,
.brand strong {
  font-size: 1.08rem;
  color: var(--ink);
}

.brand-mark span,
.brand span {
  font-size: 1.08rem;
}

.brand-gradient,
.eyebrow {
  background: var(--hero-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.eyebrow {
  margin: 0 0 14px;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.glass-panel,
.auth-panel,
.settings-block,
.link-form,
.link-list-section {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 12px 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  font-weight: 800;
  text-decoration: none;
}

.button.primary {
  border: none;
  background: var(--brand-gradient);
  color: #ffffff;
  box-shadow: var(--glow-brand);
}

.button.primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 42px rgba(102, 0, 204, 0.56);
}

.button.ghost {
  background: rgba(255, 255, 255, 0.04);
}

[data-theme="light"] .button.ghost {
  background: rgba(255, 255, 255, 0.72);
}

.button.ghost:hover,
.button.compact:hover {
  border-color: var(--line-strong);
  background: var(--surface-strong);
}

.button.danger {
  border-color: rgba(239, 68, 68, 0.32);
  background: rgba(239, 68, 68, 0.14);
  color: #ffdede;
}

[data-theme="light"] .button.danger {
  color: #b42318;
}

.button.compact {
  min-height: 38px;
  padding: 8px 16px;
}

.button:disabled {
  cursor: not-allowed;
  opacity: 0.4;
}

.text-link {
  font-weight: 700;
  color: var(--muted);
}

.text-link:hover {
  color: var(--ink);
}

h1,
h2 {
  margin: 0;
  line-height: 1.05;
}

h1 {
  font-size: clamp(2.5rem, 6vw, 5rem);
  font-weight: 900;
}

h2 {
  font-size: 1.06rem;
  font-weight: 800;
}

.lead {
  margin: 0;
  max-width: 680px;
  color: var(--muted);
  font-size: 1.02rem;
  line-height: 1.8;
}

.landing-shell {
  position: relative;
  z-index: 1;
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 56px 0 88px;
}

.landing-hero {
  text-align: center;
  padding: clamp(40px, 8vw, 88px) 0 clamp(32px, 5vw, 56px);
}

.landing-hero h1 {
  margin: 20px 0 16px;
  font-size: clamp(2.4rem, 5.5vw, 4.6rem);
}

.landing-hero .lead {
  margin: 0 auto 32px;
  max-width: 560px;
}

.landing-hero .hero-actions {
  justify-content: center;
}

/* ─── Preview card row below hero ─── */
.landing-preview {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 18px;
  margin-top: 8px;
}

@media (max-width: 700px) {
  .landing-preview {
    grid-template-columns: 1fr;
  }
}

.landing-main {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  gap: 24px;
  align-items: stretch;
}

.hero-panel {
  padding: clamp(28px, 5vw, 56px);
}

.hero-actions,
.site-actions,
.auth-topline,
.topbar-actions,
.section-title-row,
.row-actions,
.hero-stats,
.dashboard-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.hero-actions {
  margin-top: 28px;
}

.hero-stats {
  margin-top: 36px;
}

.hero-stat {
  min-width: 140px;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
}

.hero-stat strong {
  display: block;
  font-size: 1.22rem;
  font-weight: 900;
}

.hero-stat span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.82rem;
}

.preview-column {
  display: grid;
  gap: 18px;
}

.profile-preview {
  padding: 24px;
  text-align: center;
}

.avatar-ring {
  width: 88px;
  height: 88px;
  margin: 0 auto 16px;
  padding: 2px;
  border-radius: 50%;
  background: var(--brand-gradient);
}

.avatar-core {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: var(--surface-solid);
  color: #ffffff;
  font-size: 2rem;
  font-weight: 900;
}

.profile-preview p {
  margin: 8px 0 20px;
  color: var(--muted);
  line-height: 1.7;
}

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

.icon-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.06);
  color: var(--muted);
  font-weight: 800;
  font-size: 0.78rem;
}

.video-preview {
  overflow: hidden;
}

.video-preview-media {
  display: grid;
  place-items: center;
  min-height: 220px;
  background: linear-gradient(135deg, #11071f, #091525 60%, #12263c);
}

.video-preview-media span {
  padding: 14px 18px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.12);
  font-size: 1.4rem;
}

.video-preview-copy {
  padding: 18px 20px 22px;
}

.video-preview-copy p,
.feature-panel p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.landing-features {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 22px;
}

.feature-panel {
  padding: 22px;
}

.feature-panel strong {
  display: inline-block;
  margin-bottom: 14px;
  font-size: 1rem;
}

.auth-layout {
  position: relative;
  z-index: 1;
  display: grid;
  min-height: calc(100vh - 84px);
  place-items: center;
  padding: 36px 20px 56px;
}

.auth-panel {
  width: min(100%, 520px);
  padding: 34px;
}

.auth-topline {
  justify-content: space-between;
  margin-bottom: 24px;
}

.auth-copy {
  margin-bottom: 28px;
}

.auth-copy h1 {
  font-size: clamp(2rem, 4vw, 3.4rem);
}

.tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 26px 0 22px;
}

.tab {
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  padding: 12px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  cursor: pointer;
  font-weight: 800;
}

.tab.is-active {
  border-color: rgba(168, 139, 250, 0.55);
  background: rgba(102, 0, 204, 0.24);
  color: var(--ink);
  box-shadow: inset 0 0 0 1px rgba(168, 139, 250, 0.22);
}

.auth-form,
.link-form,
.settings-block,
.link-fields {
  display: grid;
  gap: 14px;
}

.hidden {
  display: none;
}

label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 700;
}

input,
select {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--ink);
}

[data-theme="light"] input,
[data-theme="light"] select {
  background: rgba(255, 255, 255, 0.8);
}

input::placeholder {
  color: var(--subtle);
}

input:focus,
select:focus,
button:focus-visible,
a:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
  border-color: rgba(102, 0, 204, 0.42);
}

.form-message {
  min-height: 24px;
  margin: 2px 0 0;
  color: var(--accent-cyan);
  font-size: 0.84rem;
  font-weight: 700;
}

.form-message.is-error {
  color: #ff8f8f;
}

.dashboard-shell {
  position: relative;
  z-index: 1;
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 34px 0 72px;
}

.dashboard-head {
  padding: clamp(26px, 4vw, 38px);
}

.dashboard-head .lead {
  margin-top: 12px;
}

.dashboard-meta {
  margin-top: 28px;
}

.dashboard-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.05);
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 700;
}

.settings-grid,
.editor-layout {
  display: grid;
  gap: 18px;
  margin-top: 22px;
}

.settings-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.settings-block,
.link-form,
.link-list-section {
  padding: 22px;
}

.copy-box {
  overflow-wrap: anywhere;
  margin: 10px 0 0;
  padding: 12px 14px;
  border-radius: 0 8px 8px 0;
  border: none;
  border-left: 4px solid var(--brand);
  background: var(--brand-soft);
  color: var(--ink);
  font-size: 0.88rem;
  font-weight: 700;
}

.editor-layout {
  grid-template-columns: minmax(300px, 360px) minmax(0, 1fr);
  align-items: start;
}

.check-row {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
}

.check-row input {
  width: 18px;
  min-height: 18px;
  padding: 0;
  accent-color: var(--brand);
}

.link-list {
  display: grid;
  gap: 14px;
  margin-top: 14px;
}

.link-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: end;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.04);
}

[data-theme="light"] .link-row {
  background: rgba(255, 255, 255, 0.72);
}

.link-fields {
  grid-template-columns: 1.1fr 1.5fr 1fr;
}

.empty-state {
  margin: 0;
  padding: 28px;
  border: 1px dashed var(--line);
  border-radius: 18px;
  color: var(--muted);
  text-align: center;
  background: rgba(255, 255, 255, 0.03);
}

@media (max-width: 980px) {
  .landing-main,
  .settings-grid,
  .editor-layout,
  .landing-features {
    grid-template-columns: 1fr;
  }

  .preview-column {
    order: -1;
  }

  .link-row,
  .link-fields {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .site-nav,
  .topbar {
    flex-direction: column;
    align-items: flex-start;
  }

  .landing-shell,
  .dashboard-shell {
    width: min(100%, calc(100% - 24px));
  }

  .auth-panel {
    padding: 26px 20px;
  }

  .auth-layout {
    padding-inline: 12px;
  }

  .hero-panel,
  .dashboard-head,
  .settings-block,
  .link-form,
  .link-list-section {
    padding: 20px;
  }

  h1 {
    font-size: clamp(2.1rem, 13vw, 3.1rem);
  }
}

/* ── Design system component classes ─────────────────────── */

/* Aurora badge pill (eyebrow variant) */
.badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--line);
  background: var(--surface);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: 0.05em;
}

/* CTA button (alias for .button.primary with pill shape) */
.btn-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 32px;
  border-radius: var(--radius-pill);
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-weight: 800;
  font-size: var(--text-base, 1rem);
  background: var(--brand-gradient);
  color: #ffffff;
  box-shadow: var(--glow-brand);
  transition: box-shadow 180ms ease, transform 180ms ease;
}

.btn-cta:hover {
  box-shadow: 0 12px 40px rgba(102, 0, 204, 0.65);
  transform: translateY(-1px);
}

/* Glass card (alias for .glass-panel with radius-lg) */
.glass-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

/* SNS icon button */
.sns-icon-btn {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-pill);
  background: var(--surface);
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
  cursor: pointer;
  transition: background 150ms, color 150ms, transform 150ms;
}

.sns-icon-btn:hover {
  background: var(--surface-strong);
  color: var(--ink);
  transform: scale(1.08);
}

/* Aurora dot (decorative orb for badges) */
.aurora-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--aurora-gradient);
  display: inline-block;
  flex-shrink: 0;
}
