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

*, *::before, *::after { box-sizing: border-box; }

:root {
  --bg-primary: #0a0e1a;
  --bg-card: rgba(17, 24, 39, 0.85);
  --bg-glass: rgba(255,255,255,0.04);
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --accent: #6C63FF;
  --accent-glow: rgba(108,99,255,0.35);
  --cyan: #22d3ee;
  --cyan-glow: rgba(34,211,238,0.25);
  --green: #34d399;
  --orange: #fb923c;
  --red: #f43f5e;
  --red-glow: rgba(244,63,94,0.25);
  --border: rgba(255,255,255,0.08);
  --border-accent: rgba(108,99,255,0.3);
  --radius: 16px;
  --radius-sm: 10px;
  --radius-lg: 24px;
  --shadow: 0 8px 32px rgba(0,0,0,0.4);
  --shadow-glow: 0 0 40px var(--accent-glow);
  --font: 'Inter', -apple-system, sans-serif;
  --mono: 'JetBrains Mono', monospace;
  --transition: .3s cubic-bezier(.4,0,.2,1);
}

html { scroll-behavior: smooth; }

body {
  margin: 0; padding: 0;
  font-family: var(--font);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.7;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, p { margin: 0; }
ul { margin: 0; padding: 0; }
a { color: var(--accent); }

/* ── Canvas ── */
#particles-canvas {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: 0;
  pointer-events: none;
}

/* ── Navbar ── */
.navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  background: rgba(10,14,26,0.8);
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
}
.navbar-inner {
  max-width: 1200px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  height: 64px;
}
.nav-logo {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none; color: var(--text-primary);
  font-weight: 800; font-size: 18px;
}
.nav-logo .logo-icon {
  width: 36px; height: 36px; border-radius: 10px;
  background: linear-gradient(135deg, var(--accent), var(--cyan));
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; color: #fff;
}
.nav-links { display: flex; gap: 8px; align-items: center; }
.nav-links a {
  color: var(--text-secondary); text-decoration: none;
  padding: 8px 16px; border-radius: var(--radius-sm);
  font-size: 14px; font-weight: 500;
  transition: var(--transition);
}
.nav-links a:hover { color: var(--text-primary); background: var(--bg-glass); }
.nav-links .btn-nav {
  background: var(--accent); color: #fff !important;
  padding: 8px 20px; border-radius: var(--radius-sm);
  font-weight: 600;
}
.nav-links .btn-nav:hover { background: #5b54e0; }

/* ── Layout ── */
.page-wrapper { position: relative; z-index: 1; }
.container { max-width: 1100px; margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 520px; margin: 0 auto; padding: 0 24px; }
.section { padding: 100px 0; }
.section-header { text-align: center; margin-bottom: 60px; }
.section-header h2 {
  font-size: 36px; font-weight: 800;
  background: linear-gradient(135deg, var(--text-primary), var(--accent));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text; margin-bottom: 16px;
}
.section-header p { color: var(--text-secondary); max-width: 560px; margin: 0 auto; font-size: 17px; }

/* ── Hero ── */
.hero-section {
  min-height: 100vh; display: flex; align-items: center;
  padding-top: 64px; position: relative; overflow: hidden;
}
.hero-section::before {
  content: ''; position: absolute; top: -200px; right: -200px;
  width: 600px; height: 600px; border-radius: 50%;
  background: radial-gradient(circle, var(--accent-glow), transparent 70%);
  animation: pulseGlow 4s ease-in-out infinite alternate;
}
.hero-section::after {
  content: ''; position: absolute; bottom: -150px; left: -150px;
  width: 400px; height: 400px; border-radius: 50%;
  background: radial-gradient(circle, var(--cyan-glow), transparent 70%);
  animation: pulseGlow 5s ease-in-out infinite alternate-reverse;
}
@keyframes pulseGlow { 0% { opacity:.4; transform:scale(1); } 100% { opacity:.8; transform:scale(1.15); } }

.hero-content { position: relative; z-index: 2; text-align: center; width: 100%; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 20px; border-radius: 999px;
  background: rgba(108,99,255,0.12); border: 1px solid rgba(108,99,255,0.25);
  color: var(--accent); font-size: 13px; font-weight: 600;
  margin-bottom: 28px; letter-spacing: .5px; text-transform: uppercase;
  animation: fadeInUp .8s ease-out;
}
.hero-badge .pulse-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--green); animation: pulse 2s infinite;
}
@keyframes pulse { 0%,100% { opacity:1; } 50% { opacity:.4; } }

.hero-title {
  font-size: 56px; font-weight: 900;
  line-height: 1.1; margin-bottom: 24px;
  animation: fadeInUp .8s ease-out .1s both;
}
.hero-title .gradient-text {
  background: linear-gradient(135deg, var(--accent), var(--cyan), var(--green));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-subtitle {
  font-size: 18px; color: var(--text-secondary);
  max-width: 640px; margin: 0 auto 40px; line-height: 1.8;
  animation: fadeInUp .8s ease-out .2s both;
}
.hero-actions {
  display: flex; flex-wrap: wrap; gap: 16px;
  justify-content: center;
  animation: fadeInUp .8s ease-out .3s both;
}
@keyframes fadeInUp { from { opacity:0; transform:translateY(24px); } to { opacity:1; transform:translateY(0); } }

/* ── Stats ── */
.stats-bar {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 1px; background: var(--border);
  border-radius: var(--radius-lg); overflow: hidden;
  margin-top: 80px; animation: fadeInUp .8s ease-out .5s both;
}
.stat-item {
  background: var(--bg-card);
  padding: 28px 24px; text-align: center;
}
.stat-number {
  font-size: 32px; font-weight: 800; font-family: var(--mono);
  background: linear-gradient(135deg, var(--accent), var(--cyan));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.stat-label { font-size: 13px; color: var(--text-muted); margin-top: 4px; text-transform: uppercase; letter-spacing: 1px; }

/* ── Buttons ── */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 28px; border-radius: var(--radius-sm);
  font-weight: 600; font-size: 15px; font-family: var(--font);
  text-decoration: none; border: none; cursor: pointer;
  transition: var(--transition); line-height: 1.4;
}
.btn-primary {
  background: linear-gradient(135deg, var(--accent), #8b5cf6);
  color: #fff; box-shadow: 0 4px 20px var(--accent-glow);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 30px var(--accent-glow); }
.btn-secondary {
  background: var(--bg-glass); color: var(--text-primary);
  border: 1px solid var(--border);
}
.btn-secondary:hover { background: rgba(255,255,255,0.08); border-color: rgba(255,255,255,0.15); }
.btn-danger {
  background: linear-gradient(135deg, var(--red), #e11d48);
  color: #fff; box-shadow: 0 4px 20px var(--red-glow);
}
.btn-danger:hover { transform: translateY(-2px); }
.btn-full { width: 100%; justify-content: center; margin-top: 20px; }
.btn-sm { padding: 10px 18px; font-size: 13px; }
.btn-icon { font-size: 18px; }

/* ── Cards ── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 36px; box-shadow: var(--shadow);
  transition: var(--transition); position: relative;
}
.card:hover { transform: translateY(-4px); border-color: var(--border-accent); box-shadow: var(--shadow-glow); }
.card h3 { font-size: 20px; font-weight: 700; margin-bottom: 10px; }
.card p { color: var(--text-secondary); font-size: 15px; }

.card-icon {
  width: 56px; height: 56px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 24px; margin-bottom: 20px;
}
.card-icon.cyan { background: rgba(34,211,238,0.15); color: var(--cyan); }
.card-icon.red { background: rgba(244,63,94,0.15); color: var(--red); }

.features-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }

/* ── Mini Card ── */
.mini-card {
  background: var(--bg-glass); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 24px;
  transition: var(--transition);
}
.mini-card:hover { border-color: var(--border-accent); background: rgba(255,255,255,0.06); }
.mini-card h3 { font-size: 13px; text-transform: uppercase; letter-spacing: 1px; color: var(--text-muted); margin-bottom: 8px; font-weight: 600; }
.mini-card .value { font-size: 24px; font-weight: 700; font-family: var(--mono); }
.mini-card .value.secure { color: var(--green); }
.mini-card .value.insecure { color: var(--red); }

.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin: 24px 0; }

/* ── Auth ── */
.auth-wrapper {
  min-height: 100vh; display: flex; align-items: center;
  justify-content: center; padding: 100px 24px 40px;
  position: relative;
}
.auth-wrapper::before {
  content: ''; position: absolute; top: 50%; left: 50%;
  transform: translate(-50%,-50%); width: 500px; height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--accent-glow), transparent 70%);
  opacity: .3; pointer-events: none;
}
.auth-card {
  background: var(--bg-card);
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 44px 40px; width: 100%; max-width: 460px;
  box-shadow: var(--shadow); position: relative; z-index: 2;
}
.auth-card h1 { font-size: 28px; font-weight: 800; margin-bottom: 8px; text-align: center; }
.auth-card .auth-subtitle { color: var(--text-secondary); text-align: center; margin-bottom: 32px; font-size: 15px; }

/* ── Protocol Badge ── */
.protocol-badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 14px; border-radius: 999px;
  font-size: 12px; font-weight: 600; font-family: var(--mono);
  margin-bottom: 24px;
}
.protocol-badge.secure { background: rgba(52,211,153,0.12); color: var(--green); border: 1px solid rgba(52,211,153,0.25); }
.protocol-badge.insecure { background: rgba(244,63,94,0.12); color: var(--red); border: 1px solid rgba(244,63,94,0.25); animation: blink 2s infinite; }
@keyframes blink { 0%,100% { opacity:1; } 50% { opacity:.6; } }

/* ── Forms ── */
.form-group { margin-bottom: 20px; }
label {
  display: block; font-size: 13px; font-weight: 600;
  color: var(--text-secondary); margin-bottom: 8px;
  text-transform: uppercase; letter-spacing: .5px;
}
input[type="text"], input[type="password"], input[type="email"] {
  width: 100%; padding: 14px 16px;
  background: rgba(255,255,255,0.04); border: 1px solid var(--border);
  border-radius: var(--radius-sm); color: var(--text-primary);
  font-size: 15px; font-family: var(--font);
  transition: var(--transition);
}
input[type="text"]:focus, input[type="password"]:focus, input[type="email"]:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
  background: rgba(255,255,255,0.06);
}
input:disabled { opacity: .5; cursor: not-allowed; background: rgba(255,255,255,0.02); }
input::placeholder { color: var(--text-muted); }

/* hidden inputs should not be styled */
input[type="hidden"] { display: none; }

/* ── Alerts ── */
.alert {
  padding: 16px 20px; border-radius: var(--radius-sm);
  margin: 20px 0; font-size: 14px;
  display: flex; align-items: flex-start; gap: 12px;
}
.alert-icon { font-size: 18px; flex-shrink: 0; margin-top: 1px; }
.alert.warning { background: rgba(251,146,60,0.1); border: 1px solid rgba(251,146,60,0.25); color: var(--orange); }
.alert.danger { background: rgba(244,63,94,0.1); border: 1px solid rgba(244,63,94,0.25); color: var(--red); }
.alert.info { background: rgba(34,211,238,0.1); border: 1px solid rgba(34,211,238,0.25); color: var(--cyan); }
.alert.success { background: rgba(52,211,153,0.1); border: 1px solid rgba(52,211,153,0.25); color: var(--green); }

/* ── Badge ── */
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 14px; border-radius: 999px;
  font-size: 12px; font-weight: 600; letter-spacing: .5px;
  text-transform: uppercase;
}
.badge-primary { background: rgba(108,99,255,0.12); color: var(--accent); border: 1px solid rgba(108,99,255,0.25); }
.badge-success { background: rgba(52,211,153,0.12); color: var(--green); border: 1px solid rgba(52,211,153,0.25); }
.badge-danger { background: rgba(244,63,94,0.12); color: var(--red); border: 1px solid rgba(244,63,94,0.25); }
.badge-warning { background: rgba(251,146,60,0.12); color: var(--orange); border: 1px solid rgba(251,146,60,0.25); }

/* ── Hint ── */
.hint {
  background: rgba(108,99,255,0.06); border: 1px dashed rgba(108,99,255,0.2);
  border-radius: var(--radius); padding: 20px; margin: 24px 0;
  font-size: 14px; line-height: 1.8;
}
.hint summary { cursor: pointer; font-weight: 600; color: var(--accent); }
code {
  background: rgba(255,255,255,0.08); padding: 2px 8px;
  border-radius: 6px; font-family: var(--mono); font-size: 13px;
  color: var(--cyan);
}

/* ── Phishing ── */
.phish-card { border-top: 3px solid var(--red); }

/* ── Dashboard ── */
.dashboard-section { padding-top: 100px; padding-bottom: 60px; }
.dashboard-header {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 20px; margin-bottom: 36px;
}
.dashboard-header h1 { font-size: 28px; font-weight: 800; }
.user-info { display: flex; align-items: center; gap: 12px; }
.user-avatar {
  width: 44px; height: 44px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 18px; color: #fff;
}

/* ── Checklist ── */
.checklist { list-style: none; padding: 0; }
.checklist li {
  padding: 14px 0; border-bottom: 1px solid var(--border);
  display: flex; align-items: flex-start; gap: 12px;
  color: var(--text-secondary); font-size: 15px;
}
.checklist li:last-child { border-bottom: none; }
.checklist li::before {
  content: '▹'; color: var(--accent); font-size: 16px;
  flex-shrink: 0; margin-top: 1px;
}

/* ── Result Cards ── */
.result-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px,1fr)); gap: 20px; margin: 32px 0; }
.result-card {
  background: var(--bg-glass); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 28px;
  transition: var(--transition); position: relative; overflow: hidden;
}
.result-card::after {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
}
.result-card:nth-child(1)::after { background: linear-gradient(90deg, var(--red), var(--orange)); }
.result-card:nth-child(2)::after { background: linear-gradient(90deg, var(--orange), #eab308); }
.result-card:nth-child(3)::after { background: linear-gradient(90deg, #eab308, var(--accent)); }
.result-card:nth-child(4)::after { background: linear-gradient(90deg, var(--green), var(--cyan)); }
.result-card:hover { transform: translateY(-4px); border-color: var(--border-accent); }
.result-card h3 { font-size: 16px; font-weight: 700; margin-bottom: 10px; color: var(--text-primary); }
.result-card .card-number {
  font-size: 44px; font-weight: 900; opacity: .06;
  position: absolute; top: 10px; right: 20px;
  font-family: var(--mono); color: var(--text-primary);
}
.result-card p { color: var(--text-secondary); font-size: 14px; line-height: 1.7; }

/* ── Rules ── */
.rules-card {
  background: linear-gradient(135deg, rgba(108,99,255,0.08), rgba(34,211,238,0.05));
  border: 1px solid rgba(108,99,255,0.15);
}
.rules-list { list-style: none; padding: 0; }
.rules-list li {
  padding: 14px 0; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 12px;
  font-size: 15px; color: var(--text-secondary);
}
.rules-list li:last-child { border-bottom: none; }
.rules-list .rule-icon {
  width: 36px; height: 36px; border-radius: 8px;
  background: rgba(108,99,255,0.12);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; flex-shrink: 0;
}

/* ── Footer ── */
.footer {
  padding: 40px 0; border-top: 1px solid var(--border);
  text-align: center; color: var(--text-muted); font-size: 13px;
}
.footer a { color: var(--accent); text-decoration: none; }

/* ── Terminal ── */
.terminal-box {
  background: rgba(0,0,0,0.5); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px; margin: 24px 0;
  font-family: var(--mono); font-size: 13px;
}
.terminal-header {
  display: flex; align-items: center; gap: 8px; margin-bottom: 16px;
  padding-bottom: 12px; border-bottom: 1px solid var(--border);
}
.terminal-dot { width: 10px; height: 10px; border-radius: 50%; }
.terminal-dot.red { background: #f43f5e; }
.terminal-dot.yellow { background: #eab308; }
.terminal-dot.green { background: #34d399; }
.terminal-line { line-height: 2; }
.terminal-line .prompt { color: var(--green); }
.terminal-line .cmd { color: var(--cyan); }
.terminal-line .output { color: var(--text-muted); }

/* ── Scroll Reveal ── */
.reveal { opacity: 0; transform: translateY(30px); transition: opacity .6s ease, transform .6s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ── Back Link ── */
.back-link {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--text-secondary); text-decoration: none;
  font-size: 14px; margin-top: 24px; transition: var(--transition);
}
.back-link:hover { color: var(--accent); }

/* ── Responsive ── */
@media (max-width: 768px) {
  .navbar-inner { height: 56px; }
  .nav-links a { padding: 6px 10px; font-size: 13px; }
  .hero-section { min-height: auto; padding: 120px 0 60px; }
  .hero-title { font-size: 32px; }
  .stats-bar { grid-template-columns: repeat(2, 1fr); }
  .features-grid { grid-template-columns: 1fr; }
  .auth-card { padding: 32px 24px; }
  .dashboard-header { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 480px) {
  .stats-bar { grid-template-columns: 1fr; }
  .hero-actions { flex-direction: column; align-items: stretch; }
  .hero-actions .btn { justify-content: center; }
  .result-grid { grid-template-columns: 1fr; }
}
