:root {
  --bg: #0b1020;
  --bg-soft: #141a33;
  --fg: #e6e8f2;
  --fg-dim: #a0a6c3;
  --border: rgba(255, 255, 255, 0.08);
  --card: rgba(20, 26, 51, 0.6);
  --card-hover: rgba(20, 26, 51, 0.8);
  --accent: #5da9ff;
  --accent-2: #4a8fd8;
  --accent-3: #6bb5ff;
  --radius: 10px;
  --shadow: 0 20px 60px -20px rgba(93, 169, 255, 0.3);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto,
    sans-serif;
  background: var(--bg);
  color: var(--fg);
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  position: relative;
}

body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: 
    linear-gradient(rgba(93, 169, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(93, 169, 255, 0.03) 1px, transparent 1px);
  background-size: 50px 50px;
  pointer-events: none;
  z-index: 1;
  opacity: 0.4;
}

body::after {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(ellipse at 50% 50%, transparent 0%, var(--bg) 100%);
  pointer-events: none;
  z-index: 1;
}

/* Floating gradient orbs */
.bg-orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.55;
  pointer-events: none;
  z-index: 0;
  animation: float 18s ease-in-out infinite;
}
.bg-orb--a {
  width: 520px;
  height: 520px;
  background: var(--accent);
  top: -180px;
  left: -120px;
}
.bg-orb--b {
  width: 460px;
  height: 460px;
  background: var(--accent-2);
  top: 30%;
  right: -140px;
  animation-delay: -6s;
}
.bg-orb--c {
  width: 420px;
  height: 420px;
  background: var(--accent-3);
  bottom: -160px;
  left: 30%;
  animation-delay: -12s;
}

@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(40px, -30px) scale(1.08); }
}

/* Nav */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 40px;
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  background: rgba(11, 16, 32, 0.6);
  border-bottom: 1px solid var(--border);
}
.brand {
  font-weight: 700;
  font-size: 20px;
  color: var(--fg);
  text-decoration: none;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.brand-logo {
  display: flex;
  align-items: center;
  text-decoration: none;
}
.brand-logo img {
  height: 60px;
  width: auto;
  filter: brightness(1.1) contrast(1.05);
  transition: filter 0.2s;
}
.brand-logo:hover img {
  filter: brightness(1.2) contrast(1.1);
}
.brand-logo-nav {
  display: flex;
  align-items: center;
  text-decoration: none;
}
.brand-logo-nav img {
  height: 40px;
  width: auto;
  transition: opacity 0.2s;
}
.brand-logo-nav:hover img {
  opacity: 0.8;
}
.nav nav {
  display: flex;
  gap: 8px;
  align-items: center;
}
.nav nav a {
  color: var(--fg-dim);
  text-decoration: none;
  padding: 8px 14px;
  border-radius: 10px;
  font-size: 14px;
  transition: color 0.2s, background 0.2s;
}
.nav nav a:hover {
  color: var(--fg);
  background: var(--card);
}
.nav-cta {
  background: linear-gradient(135deg, var(--accent), var(--accent-2)) !important;
  color: #fff !important;
  font-weight: 500;
}
.nav-cta:hover {
  filter: brightness(1.1);
}

/* Layout */
main {
  position: relative;
  z-index: 1;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Hero */
.hero {
  padding: 120px 0 100px;
  text-align: center;
  max-width: 780px;
  margin: 0 auto;
}
.hero-logo {
  width: 400px;
  max-width: 80%;
  height: auto;
  margin: 0 auto 40px;
  display: block;
  filter: brightness(1.1) contrast(1.05) drop-shadow(0 10px 30px rgba(93, 169, 255, 0.2));
}
.eyebrow {
  display: inline-block;
  padding: 6px 14px;
  border: 0;
  border-radius: 999px;
  font-size: 13px;
  color: var(--fg-dim);
  background: transparent;
  margin-bottom: 28px;
}
.eyebrow:empty {
  display: none;
}
.hero h1 {
  font-size: clamp(40px, 7vw, 72px);
  line-height: 1.05;
  margin: 0 0 24px;
  letter-spacing: -0.03em;
  font-weight: 700;
  background: linear-gradient(180deg, #fff 0%, #b0b0c8 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.lede {
  font-size: 19px;
  color: var(--fg-dim);
  max-width: 580px;
  margin: 0 auto 40px;
}
.cta-row {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}
.btn {
  display: inline-flex;
  align-items: center;
  padding: 14px 26px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  transition: transform 0.15s, filter 0.2s, background 0.2s;
  border: 1px solid transparent;
  cursor: pointer;
}
.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  box-shadow: var(--shadow);
}
.btn-primary:hover {
  transform: translateY(-2px);
  filter: brightness(1.1);
}
.btn-ghost {
  background: var(--card);
  color: var(--fg);
  border-color: var(--border);
}
.btn-ghost:hover {
  background: var(--card-hover);
}

/* Features */
.features {
  padding: 80px 0;
}
.features h2,
.about h2 {
  font-size: clamp(28px, 4vw, 40px);
  margin: 0 0 40px;
  letter-spacing: -0.02em;
  text-align: center;
}
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}
.feature-card {
  padding: 28px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: transform 0.2s, background 0.2s, border-color 0.2s;
}
.feature-card:hover {
  transform: translateY(-4px);
  background: var(--card-hover);
  border-color: rgba(124, 92, 255, 0.3);
}
.feature-card .icon {
  font-size: 28px;
  margin-bottom: 16px;
}
.feature-card h3 {
  margin: 0 0 8px;
  font-size: 18px;
}
.feature-card p {
  margin: 0;
  color: var(--fg-dim);
  font-size: 15px;
}

/* About */
.about {
  padding: 40px 0 100px;
}
.about-card {
  padding: 60px 40px;
  background: linear-gradient(
    135deg,
    rgba(124, 92, 255, 0.1),
    rgba(255, 92, 168, 0.08)
  );
  border: 1px solid var(--border);
  border-radius: 24px;
  text-align: center;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.about-card p {
  max-width: 560px;
  margin: 0 auto 28px;
  color: var(--fg-dim);
  font-size: 17px;
}

/* Tools Section */
.tools-section {
  position: relative;
  z-index: 1;
  padding: 80px 0;
}
.tools-section h2 {
  text-align: center;
  font-size: 36px;
  margin: 0 0 48px;
  letter-spacing: -0.02em;
}
.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 24px;
  max-width: 1100px;
  margin: 0 auto;
}
.tool-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: all 0.3s ease;
}
.tool-card:hover {
  background: var(--card-hover);
  border-color: rgba(93, 169, 255, 0.3);
  transform: translateY(-4px);
  box-shadow: 0 20px 40px -10px rgba(93, 169, 255, 0.2);
}
.tool-card h3 {
  margin: 0 0 12px;
  font-size: 22px;
  color: var(--accent);
  letter-spacing: -0.01em;
}
.tool-card p {
  color: var(--fg-dim);
  margin: 0 0 20px;
  font-size: 15px;
  line-height: 1.6;
}
.tool-card ul {
  margin: 0;
  padding: 0;
  list-style: none;
}
.tool-card ul li {
  color: var(--fg);
  font-size: 14px;
  padding: 8px 0;
  padding-left: 24px;
  position: relative;
  line-height: 1.5;
}
.tool-card ul li::before {
  content: "→";
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: bold;
}

footer {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 40px 24px;
  color: var(--fg-dim);
  font-size: 14px;
  border-top: 1px solid var(--border);
}

/* ============ Admin ============ */
.admin-shell {
  position: relative;
  z-index: 1;
  max-width: 720px;
  margin: 60px auto;
  padding: 0 24px;
}
.admin-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 40px;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}
.admin-card h1 {
  margin: 0 0 8px;
  font-size: 28px;
  letter-spacing: -0.02em;
}
.admin-card .sub {
  color: var(--fg-dim);
  margin: 0 0 32px;
}
.field-group {
  margin-bottom: 32px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}
.field-group:last-of-type {
  border-bottom: none;
}
.field-group h3 {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--fg-dim);
  margin: 0 0 14px;
}
.field {
  margin-bottom: 12px;
}
.field label {
  display: block;
  font-size: 12px;
  color: var(--fg-dim);
  margin-bottom: 6px;
}
.field input,
.field textarea {
  width: 100%;
  padding: 10px 14px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--fg);
  font-family: inherit;
  font-size: 14px;
  transition: border-color 0.2s, background 0.2s;
}
.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--accent);
  background: rgba(0, 0, 0, 0.5);
}
.field textarea {
  min-height: 80px;
  resize: vertical;
}
.feature-editor {
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 10px;
}
.action-row {
  display: flex;
  gap: 10px;
  margin-top: 16px;
  flex-wrap: wrap;
}
.toast {
  position: fixed;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  padding: 12px 24px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  box-shadow: var(--shadow);
  opacity: 0;
  transition: opacity 0.3s, transform 0.3s;
  z-index: 100;
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Login Form */
.form-group {
  margin-bottom: 20px;
}
.form-group label {
  display: block;
  font-size: 13px;
  color: var(--fg);
  margin-bottom: 8px;
  font-weight: 500;
}
.form-input {
  width: 100%;
  padding: 12px 16px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--fg);
  font-family: inherit;
  font-size: 15px;
  transition: border-color 0.2s, background 0.2s;
}
.form-input:focus {
  outline: none;
  border-color: var(--accent);
  background: rgba(0, 0, 0, 0.5);
}
.form-input::placeholder {
  color: var(--fg-dim);
  opacity: 0.6;
}
.error-message {
  padding: 12px 16px;
  background: rgba(255, 92, 92, 0.1);
  border: 1px solid rgba(255, 92, 92, 0.3);
  border-radius: 10px;
  color: #ff5c5c;
  font-size: 14px;
}

/* Footer */
footer {
  position: relative;
  z-index: 10;
  margin-top: 120px;
  padding: 60px 40px 40px;
  border-top: 1px solid var(--border);
  background: rgba(11, 16, 32, 0.8);
  backdrop-filter: blur(10px);
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 60px;
  margin-bottom: 40px;
}

.footer-brand {
  max-width: 300px;
}

.footer-brand img {
  width: 180px;
  height: auto;
  margin-bottom: 16px;
}

.footer-brand p {
  color: var(--fg-dim);
  font-size: 14px;
  line-height: 1.7;
  margin: 0;
}

.footer-section h4 {
  font-size: 14px;
  font-weight: 600;
  color: var(--fg);
  margin: 0 0 20px 0;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.footer-section ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-section ul li {
  margin-bottom: 12px;
}

.footer-section ul li a {
  color: var(--fg-dim);
  text-decoration: none;
  font-size: 14px;
  transition: color 0.2s;
}

.footer-section ul li a:hover {
  color: var(--accent);
}

.footer-bottom {
  max-width: 1200px;
  margin: 0 auto;
  padding-top: 30px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--fg-dim);
  font-size: 13px;
}

.footer-bottom p {
  margin: 0;
}

.footer-bottom a {
  color: var(--fg-dim);
  text-decoration: none;
  transition: color 0.2s;
}

.footer-bottom a:hover {
  color: var(--accent);
}

@media (max-width: 640px) {
  .nav { padding: 14px 20px; }
  .nav nav a { padding: 6px 10px; font-size: 13px; }
  .hero { padding: 80px 0 60px; }
  .admin-card { padding: 28px 20px; }
  
  footer {
    padding: 40px 20px 30px;
    margin-top: 80px;
  }
  
  .footer-content {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  
  .footer-brand {
    max-width: 100%;
  }
  
  .footer-bottom {
    flex-direction: column;
    gap: 16px;
    text-align: center;
  }
}
