:root {
  --bg: #04080f;
  --bg-elevated: #070e1c;
  --bg-panel: #0a1628;
  --line: rgba(110, 193, 228, 0.18);
  --text: #e8f4fb;
  --muted: #8aa3b8;
  --cyan: #6ec1e4;
  --cyan-bright: #8fd6f0;
  --cyan-dim: rgba(110, 193, 228, 0.12);
  --teal: #00bb7f;
  --ink: #04080f;
  --radius: 1rem;
  --font-display: "Syne", sans-serif;
  --font-body: "Manrope", sans-serif;
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background: var(--bg);
  font-family: var(--font-body);
  line-height: 1.6;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

.bg-grid {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(110, 193, 228, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(110, 193, 228, 0.04) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse at center, black 20%, transparent 75%);
  z-index: 0;
}

.bg-glow {
  position: fixed;
  width: 50vw;
  height: 50vw;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.35;
}

.bg-glow-a {
  top: -15%;
  left: -10%;
  background: radial-gradient(circle, rgba(110, 193, 228, 0.35), transparent 70%);
  animation: drift 18s ease-in-out infinite alternate;
}

.bg-glow-b {
  right: -10%;
  bottom: 10%;
  background: radial-gradient(circle, rgba(0, 187, 127, 0.22), transparent 70%);
  animation: drift 22s ease-in-out infinite alternate-reverse;
}

@keyframes drift {
  from { transform: translate(0, 0) scale(1); }
  to { transform: translate(4%, 6%) scale(1.08); }
}

.nav-wrap {
  position: fixed;
  top: 1.25rem;
  left: 0;
  right: 0;
  z-index: 50;
  display: flex;
  justify-content: center;
  padding: 0 1rem;
}

.glass {
  background: rgba(7, 14, 28, 0.72);
  border: 1px solid var(--line);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
}

.nav {
  width: min(920px, 100%);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.7rem 0.85rem 0.7rem 1.1rem;
  border-radius: 999px;
}

.nav-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: 0.08em;
}

.nav-mark {
  width: 0.65rem;
  height: 0.65rem;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--cyan), var(--teal));
  box-shadow: 0 0 16px rgba(110, 193, 228, 0.7);
}

.nav-links {
  display: flex;
  gap: 1.25rem;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 500;
}

.nav-links a:hover {
  color: var(--text);
}

.nav-cta,
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-weight: 700;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.nav-cta {
  padding: 0.55rem 1rem;
  background: var(--cyan);
  color: var(--ink);
  font-size: 0.88rem;
}

.nav-cta:hover,
.btn-primary:hover {
  background: var(--cyan-bright);
  transform: translateY(-1px);
}

main {
  position: relative;
  z-index: 1;
}

.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 7rem 1.25rem 4rem;
}

.hero-eyebrow,
.eyebrow {
  margin: 0 0 1rem;
  color: var(--cyan);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.hero-eyebrow {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.live-dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 14px rgba(0, 187, 127, 0.9);
}

.hero-title {
  margin: 0;
  line-height: 0.95;
}

.hero-title-main,
.hero-title-accent {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(3.3rem, 10vw, 7.2rem);
  font-weight: 800;
  letter-spacing: -0.04em;
}

.hero-title-main {
  background: linear-gradient(180deg, #ffffff 10%, var(--cyan) 85%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 0 80px rgba(110, 193, 228, 0.15);
}

.hero-title-accent {
  color: transparent;
  -webkit-text-stroke: 1px rgba(143, 214, 240, 0.7);
}

.hero-sub {
  max-width: 34rem;
  margin: 1.4rem auto 0;
  color: var(--muted);
  font-size: 1.05rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
  margin-top: 2rem;
}

.btn {
  min-width: 8.5rem;
  padding: 0.85rem 1.35rem;
  font-size: 0.95rem;
}

.btn-primary {
  background: var(--cyan);
  color: var(--ink);
}

.btn-ghost {
  border: 1px solid var(--line);
  background: rgba(10, 22, 40, 0.55);
  color: var(--text);
}

.btn-ghost:hover {
  border-color: rgba(110, 193, 228, 0.45);
  transform: translateY(-1px);
}

.scroll-hint {
  margin-top: 4rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.55rem;
  color: var(--muted);
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  animation: bob 2.4s ease-in-out infinite;
}

.scroll-hint span {
  width: 1px;
  height: 2.2rem;
  background: linear-gradient(to bottom, var(--cyan), transparent);
}

@keyframes bob {
  0%, 100% { transform: translateY(0); opacity: 0.7; }
  50% { transform: translateY(6px); opacity: 1; }
}

.marquee {
  border-block: 1px solid var(--line);
  background: rgba(7, 14, 28, 0.65);
  overflow: hidden;
  white-space: nowrap;
}

.marquee-alt {
  background: rgba(110, 193, 228, 0.06);
}

.marquee-track {
  display: inline-flex;
  min-width: 200%;
  animation: marquee 28s linear infinite;
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(232, 244, 251, 0.55);
  padding: 0.9rem 0;
}

.marquee-track span {
  padding-right: 1rem;
}

@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

.section {
  width: min(1100px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 5rem 0 2rem;
}

.section-head {
  margin-bottom: 2.5rem;
}

.section-head h2,
.about-panel h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3rem);
  letter-spacing: 0.02em;
}

.section-desc {
  max-width: 36rem;
  margin: 0.85rem 0 0;
  color: var(--muted);
}

.group {
  margin-bottom: 2.75rem;
}

.group-title {
  margin: 0 0 1rem;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.link-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.9rem;
}

.link-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  min-height: 118px;
  padding: 1.15rem 1.2rem;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(110, 193, 228, 0.08), transparent 42%),
    rgba(10, 22, 40, 0.72);
  overflow: hidden;
  transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}

.link-card::after {
  content: "";
  position: absolute;
  inset: auto -20% -40% auto;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(110, 193, 228, 0.18), transparent 70%);
  transition: transform 0.35s ease;
}

.link-card:hover {
  transform: translateY(-4px);
  border-color: rgba(110, 193, 228, 0.45);
  background:
    linear-gradient(180deg, rgba(110, 193, 228, 0.14), transparent 48%),
    rgba(10, 22, 40, 0.9);
}

.link-card:hover::after {
  transform: scale(1.35) translate(-8px, -8px);
}

.link-card .tag {
  color: var(--cyan);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.link-card .title {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.link-card .hint {
  color: var(--muted);
  font-size: 0.86rem;
}

.featured .link-card {
  min-height: 140px;
}

.upload-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.55fr);
  gap: 1rem;
}

.upload-panel,
.queue-panel {
  border-radius: 1.35rem;
}

.upload-panel {
  padding: clamp(1.15rem, 3vw, 1.6rem);
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
  margin-bottom: 1rem;
}

.key-row {
  display: flex;
  align-items: end;
  gap: 0.75rem;
  margin-bottom: 0.45rem;
}

.key-field {
  flex: 1;
}

.key-unlock {
  flex: 0 0 auto;
  min-width: 5.5rem;
  padding: 0.8rem 1.1rem;
  border: 0;
  cursor: pointer;
}

.saved-key-hint {
  margin: 0 0 1rem;
  color: var(--muted);
  font-size: 0.76rem;
}

.saved-key-hint.connected {
  color: #65d6ae;
}

.saved-key-hint.error {
  color: #fca5a5;
}

.folder-field {
  display: grid;
  gap: 0.55rem;
  margin-bottom: 1rem;
}

.folder-field > span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.folder-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.folder-chip {
  min-width: 4.6rem;
  padding: 0.55rem 0.95rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(4, 8, 15, 0.55);
  cursor: pointer;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 700;
  transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}

.folder-chip:hover {
  border-color: rgba(110, 193, 228, 0.45);
  color: var(--text);
}

.folder-chip.is-active {
  border-color: rgba(110, 193, 228, 0.7);
  color: var(--ink);
  background: var(--cyan);
}

.field {
  display: grid;
  gap: 0.45rem;
}

.field > span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.field input {
  width: 100%;
  min-width: 0;
  padding: 0.8rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  outline: none;
  background: rgba(4, 8, 15, 0.75);
  color: var(--text);
  font: inherit;
  font-size: 0.9rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.field input:focus {
  border-color: rgba(110, 193, 228, 0.65);
  box-shadow: 0 0 0 3px rgba(110, 193, 228, 0.08);
}

.drop-zone {
  min-height: 235px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  border: 1px dashed rgba(110, 193, 228, 0.38);
  border-radius: 1rem;
  background:
    radial-gradient(circle at center, rgba(110, 193, 228, 0.09), transparent 62%),
    rgba(4, 8, 15, 0.45);
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.drop-zone:hover,
.drop-zone.dragging {
  border-color: var(--cyan);
  background:
    radial-gradient(circle at center, rgba(110, 193, 228, 0.16), transparent 62%),
    rgba(4, 8, 15, 0.65);
}

.drop-zone.dragging {
  transform: scale(1.01);
}

.drop-zone strong {
  font-family: var(--font-display);
  font-size: 1.15rem;
}

.drop-zone > span:last-child {
  color: var(--muted);
  font-size: 0.82rem;
}

.drop-icon {
  width: 3.3rem;
  height: 3.3rem;
  display: grid;
  place-items: center;
  margin-bottom: 0.35rem;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--cyan);
  background: rgba(110, 193, 228, 0.08);
  font-size: 1.7rem;
}

.upload-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1rem;
}

.upload-actions p {
  margin: 0;
  color: var(--muted);
  font-size: 0.84rem;
}

.upload-actions .btn {
  border: 0;
  cursor: pointer;
}

.upload-actions .btn:disabled {
  cursor: not-allowed;
  opacity: 0.45;
  transform: none;
}

.queue-panel {
  min-height: 100%;
  padding: 1.25rem;
  border: 1px solid var(--line);
  background: rgba(7, 14, 28, 0.62);
}

.queue-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.queue-head h3 {
  margin: 0.15rem 0 0;
  font-family: var(--font-display);
  font-size: 1.25rem;
}

.queue-kicker {
  color: var(--cyan);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.14em;
}

.icon-button {
  width: 2.35rem;
  height: 2.35rem;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--cyan);
  background: rgba(110, 193, 228, 0.06);
  cursor: pointer;
  font-size: 1.1rem;
}

.queue-list {
  display: grid;
  gap: 0.65rem;
}

.queue-empty {
  margin: 2rem 0;
  color: var(--muted);
  text-align: center;
  font-size: 0.84rem;
}

.queue-item {
  padding: 0.8rem;
  border: 1px solid rgba(110, 193, 228, 0.12);
  border-radius: 0.8rem;
  background: rgba(4, 8, 15, 0.5);
}

.queue-item-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.queue-name {
  min-width: 0;
  overflow: hidden;
  font-size: 0.86rem;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.queue-meta {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  margin-top: 0.35rem;
  color: var(--muted);
  font-size: 0.7rem;
}

.queue-status {
  flex: 0 0 auto;
  padding: 0.2rem 0.45rem;
  border-radius: 999px;
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
}

.queue-status.pending {
  color: var(--cyan-bright);
  background: rgba(110, 193, 228, 0.1);
}

.queue-status.synced {
  color: #65d6ae;
  background: rgba(0, 187, 127, 0.1);
}

.queue-status.error {
  color: #fca5a5;
  background: rgba(239, 68, 68, 0.1);
}

.queue-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.65rem;
}

.mini-btn {
  padding: 0.28rem 0.55rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(4, 8, 15, 0.55);
  cursor: pointer;
  font: inherit;
  font-size: 0.7rem;
}

.mini-btn:hover {
  color: var(--text);
  border-color: rgba(110, 193, 228, 0.45);
}

.mini-btn.danger:hover {
  color: #fecaca;
  border-color: rgba(248, 113, 113, 0.5);
}

.repo-panel {
  padding: clamp(1.15rem, 3vw, 1.6rem);
  border-radius: 1.35rem;
}

.repo-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.repo-toolbar p {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
}

.repo-list {
  display: grid;
  gap: 0.65rem;
}

.repo-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.75rem;
  align-items: center;
  padding: 0.85rem 0.95rem;
  border: 1px solid rgba(110, 193, 228, 0.12);
  border-radius: 0.85rem;
  background: rgba(4, 8, 15, 0.5);
}

.repo-path {
  overflow: hidden;
  font-size: 0.9rem;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.repo-meta {
  margin-top: 0.25rem;
  color: var(--muted);
  font-size: 0.72rem;
}

.repo-item-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  justify-content: flex-end;
}

.upload-progress {
  height: 3px;
  margin-top: 0.65rem;
  border-radius: 999px;
  background: rgba(110, 193, 228, 0.1);
  overflow: hidden;
}

.upload-progress span {
  display: block;
  width: 100%;
  height: 100%;
  background: var(--cyan);
  animation: upload-pulse 1.2s ease-in-out infinite;
  transform-origin: left;
}

@keyframes upload-pulse {
  0% { transform: scaleX(0.12); opacity: 0.45; }
  50% { transform: scaleX(0.75); opacity: 1; }
  100% { transform: translateX(100%) scaleX(0.2); opacity: 0.25; }
}

.about {
  padding-bottom: 5rem;
}

.about-panel {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(240px, 0.6fr);
  align-items: stretch;
  gap: 2rem;
  padding: clamp(1.5rem, 4vw, 2.5rem);
  border-radius: 1.5rem;
}

.about-panel p {
  max-width: 46rem;
  color: var(--muted);
}

.roadmap-copy {
  align-self: center;
}

.roadmap-card {
  position: relative;
  min-height: 230px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1.4rem;
  border: 1px solid var(--line);
  border-radius: 1.1rem;
  background:
    linear-gradient(145deg, rgba(110, 193, 228, 0.14), transparent 55%),
    rgba(4, 8, 15, 0.7);
  overflow: hidden;
}

.roadmap-number {
  position: absolute;
  right: 1rem;
  top: -1.5rem;
  color: rgba(110, 193, 228, 0.1);
  font-family: var(--font-display);
  font-size: 8rem;
  font-weight: 800;
  line-height: 1;
}

.roadmap-label {
  color: var(--cyan);
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
}

.roadmap-card strong {
  margin: 0.25rem 0 1rem;
  font-family: var(--font-display);
  font-size: 1.45rem;
}

.status-pill {
  width: fit-content;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.35rem 0.65rem;
  border: 1px solid rgba(0, 187, 127, 0.3);
  border-radius: 999px;
  color: #65d6ae;
  background: rgba(0, 187, 127, 0.08);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.status-pill span {
  width: 0.4rem;
  height: 0.4rem;
  border-radius: 50%;
  background: var(--teal);
}

.footer {
  position: relative;
  z-index: 1;
  padding: 2rem 1rem 3rem;
  text-align: center;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.9rem;
}

.footer-muted {
  opacity: 0.7;
  font-size: 0.8rem;
}

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 720px) {
  .nav-links {
    display: none;
  }

  .hero {
    padding-top: 6.5rem;
  }

  .hero-actions {
    width: 100%;
  }

  .btn {
    flex: 1;
  }

  .about-panel {
    grid-template-columns: 1fr;
  }

  .upload-layout,
  .field-row {
    grid-template-columns: 1fr;
  }

  .key-row {
    align-items: stretch;
    flex-direction: column;
    gap: 0.35rem;
  }

  .saved-key-hint {
    padding-bottom: 0;
  }

  .upload-actions {
    align-items: stretch;
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
