:root {
  --bg: #070b16;
  --bg-2: #0b1222;
  --card: #0f1930;
  --card-2: #121e3a;
  --accent: #3b82f6;
  --accent-2: #22d3ee;
  --accent-3: #1dd3b0;
  --text: #eaf1ff;
  --muted: #90a4c8;
  --danger: #ff5c7a;
  --border: #1c2a4a;
  --glow: rgba(59,130,246,.45);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: "Segoe UI", -apple-system, Roboto, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
.container { width: 100%; max-width: 1160px; margin: 0 auto; padding: 0 24px; }
.accent { color: var(--accent-2); }
.gradient-text {
  background: linear-gradient(120deg, var(--accent-2), var(--accent), var(--accent-3));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* ---------- NAV ---------- */
header {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(12px);
  background: rgba(7,11,22,.72);
  border-bottom: 1px solid var(--border);
}
nav { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand { display: flex; align-items: center; gap: 12px; font-weight: 800; font-size: 20px; letter-spacing: .3px; }
.brand .logo {
  width: 38px; height: 38px; border-radius: 10px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  display: flex; align-items: center; justify-content: center; color: #fff; font-size: 20px;
  box-shadow: 0 6px 20px var(--glow);
}
.nav-links { display: flex; align-items: center; gap: 30px; }
.nav-links a { color: var(--muted); font-size: 14px; transition: color .2s; }
.nav-links a:hover { color: var(--text); }
.btn {
  display: inline-flex; align-items: center; gap: 8px; cursor: pointer;
  padding: 10px 20px; border-radius: 10px; font-size: 14px; font-weight: 600;
  border: none; transition: transform .15s, filter .2s, box-shadow .2s;
}
.btn-primary { color: #fff; background: linear-gradient(135deg, var(--accent), #4b86ff); box-shadow: 0 8px 24px var(--glow); }
.btn-primary:hover { transform: translateY(-2px); filter: brightness(1.08); }
.btn-ghost { color: var(--text); background: transparent; border: 1px solid var(--border); }
.btn-ghost:hover { border-color: var(--accent); }

/* ---------- HERO ---------- */
.hero { position: relative; padding: 96px 0 80px; text-align: center; }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(600px 300px at 50% -5%, rgba(59,130,246,.25), transparent 70%),
    radial-gradient(500px 260px at 80% 20%, rgba(34,211,238,.14), transparent 70%);
}
.pill {
  display: inline-flex; align-items: center; gap: 8px; margin-bottom: 24px;
  padding: 7px 16px; border-radius: 999px; font-size: 13px; color: var(--accent-2);
  border: 1px solid var(--border); background: rgba(34,211,238,.06);
}
.pill .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent-3); box-shadow: 0 0 10px var(--accent-3); animation: pulse 1.8s infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .3; } }
.hero h1 { font-size: 54px; line-height: 1.08; font-weight: 800; letter-spacing: -1px; margin-bottom: 20px; }
.hero p { max-width: 620px; margin: 0 auto 32px; color: var(--muted); font-size: 18px; }
.hero-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.btn-lg { padding: 14px 28px; font-size: 15px; }

/* ---------- STATS ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin: 72px 0; }
.stat { text-align: center; padding: 28px 16px; border: 1px solid var(--border); border-radius: 16px; background: linear-gradient(180deg, var(--card), var(--bg-2)); }
.stat .num { font-size: 34px; font-weight: 800; }
.stat .label { color: var(--muted); font-size: 13px; margin-top: 6px; }

/* ---------- SECTION ---------- */
section { padding: 72px 0; }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 48px; }
.section-head h2 { font-size: 36px; font-weight: 800; letter-spacing: -.5px; margin-bottom: 14px; }
.section-head p { color: var(--muted); font-size: 16px; }

/* ---------- SERVICES ---------- */
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.svc {
  padding: 30px 26px; border: 1px solid var(--border); border-radius: 16px;
  background: var(--card); transition: transform .2s, border-color .2s, box-shadow .2s;
}
.svc:hover { transform: translateY(-4px); border-color: var(--accent); box-shadow: 0 16px 40px rgba(0,0,0,.4); }
.svc .ico { width: 48px; height: 48px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 24px; margin-bottom: 18px; background: rgba(59,130,246,.12); border: 1px solid var(--border); }
.svc h3 { font-size: 19px; margin-bottom: 10px; }
.svc p { color: var(--muted); font-size: 14px; }

/* ---------- CTA ---------- */
.cta { text-align: center; padding: 60px 40px; border-radius: 24px; border: 1px solid var(--border);
  background: radial-gradient(600px 300px at 50% 0%, rgba(59,130,246,.18), transparent), var(--card); }
.cta h2 { font-size: 32px; margin-bottom: 14px; }
.cta p { color: var(--muted); margin-bottom: 28px; }

/* ---------- FOOTER ---------- */
footer { border-top: 1px solid var(--border); padding: 40px 0; color: var(--muted); font-size: 13px; }
.foot-grid { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px; }

/* ---------- AUTH (login / profile) ---------- */
.auth-wrap { min-height: calc(100vh - 68px); display: flex; align-items: center; justify-content: center; padding: 40px 24px; }
.card {
  background: var(--card); border: 1px solid var(--border); border-radius: 18px;
  padding: 38px 34px; width: 100%; max-width: 420px; box-shadow: 0 24px 70px rgba(0,0,0,.5);
}
.card.wide { max-width: 660px; }
.card .subtitle { color: var(--muted); font-size: 14px; margin: 6px 0 26px; }
label { display: block; font-size: 13px; color: var(--muted); margin: 14px 0 6px; }
input {
  width: 100%; padding: 13px 15px; border-radius: 11px; border: 1px solid var(--border);
  background: #0a1324; color: var(--text); font-size: 14px; outline: none; transition: border-color .2s;
}
input:focus { border-color: var(--accent); }
.card .btn-primary { width: 100%; margin-top: 24px; justify-content: center; padding: 13px; font-size: 15px; }
.msg { margin-top: 16px; font-size: 13px; min-height: 18px; text-align: center; }
.msg.error { color: var(--danger); }
.msg.ok { color: var(--accent-3); }
.hint { margin-top: 22px; font-size: 12px; color: var(--muted); text-align: center; }

.topbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.profile-row { display: flex; justify-content: space-between; padding: 13px 0; border-bottom: 1px solid var(--border); font-size: 14px; }
.profile-row span:first-child { color: var(--muted); }
table { width: 100%; border-collapse: collapse; margin-top: 12px; font-size: 13px; }
th, td { text-align: left; padding: 11px; border-bottom: 1px solid var(--border); }
th { color: var(--muted); font-weight: 600; }
.badge { padding: 3px 10px; border-radius: 20px; font-size: 11px; font-weight: 600; }
.badge.admin { background: rgba(59,130,246,.2); color: #7aa8ff; }
.badge.user { background: rgba(29,211,176,.15); color: var(--accent-3); }
.logout { background: transparent; border: 1px solid var(--border); padding: 9px 18px; font-size: 13px; }
.logout:hover { border-color: var(--accent); }

/* reveal on scroll */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .6s, transform .6s; }
.reveal.show { opacity: 1; transform: none; }

@media (max-width: 860px) {
  .hero h1 { font-size: 38px; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .grid { grid-template-columns: 1fr; }
  .nav-links a:not(.btn) { display: none; }
}
