/* ================================================================
   Cydenium Certificate Verification Portal
   ================================================================ */

:root {
  --bg:        #0B0F17;
  --surface:   #111827;
  --elevated:  #161E2E;
  --purple:    #7C3AED;
  --magenta:   #EC4899;
  --grad:      linear-gradient(135deg, #7C3AED 0%, #EC4899 100%);
  --text:      #E5E7EB;
  --text-2:    #9CA3AF;
  --text-3:    #6B7280;
  --border:    #1F2937;
  --border-a:  rgba(124,58,237,0.35);
  --glow-p:    rgba(124,58,237,0.15);
  --glow-m:    rgba(236,72,153,0.12);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }

.container {
  max-width: 820px;
  margin: 0 auto;
  padding: 0 24px;
}

.grad {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ── NAV ── */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(11,15,23,0.9);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: 820px;
  margin: 0 auto;
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 11px;
}

.nav-logo-img {
  height: 36px;
  width: auto;
  display: block;
  object-fit: contain;
  flex-shrink: 0;
}

.nav-brand {
  font-family: 'Space Grotesk', 'Inter', sans-serif;
  font-weight: 700;
  font-size: 16px;
  letter-spacing: 0.01em;
  color: var(--text);
}

.nav-brand span {
  color: var(--text-3);
  font-weight: 400;
}

/* ── HERO ── */
.hero {
  position: relative;
  padding: 76px 0 68px;
  overflow: hidden;
}

.hero-glow {
  position: absolute;
  pointer-events: none;
  border-radius: 50%;
  filter: blur(100px);
}

.hero-glow-a {
  width: min(640px, 160vw);
  height: min(380px, 90vw);
  background: var(--glow-p);
  top: -100px;
  left: -160px;
}

.hero-glow-b {
  width: min(520px, 130vw);
  height: min(320px, 80vw);
  background: var(--glow-m);
  top: -60px;
  right: -120px;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #A78BFA;
  background: rgba(124,58,237,0.1);
  border: 1px solid var(--border-a);
  border-radius: 999px;
  padding: 6px 14px;
  margin-bottom: 24px;
}

.hero-eyebrow .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #A78BFA;
  animation: pulse 2.2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: .45; transform: scale(.75); }
}

.hero-h1 {
  font-family: 'Space Grotesk', 'Inter', sans-serif;
  font-size: clamp(32px, 5.5vw, 50px);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.025em;
  margin-bottom: 18px;
}

.hero-sub {
  font-size: 16px;
  color: var(--text-2);
  line-height: 1.72;
  max-width: 520px;
  margin-bottom: 40px;
}

/* ── SEARCH FORM ── */
.search-form {
  display: flex;
  gap: 10px;
  max-width: 620px;
}

.search-wrap {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  transition: border-color .2s, box-shadow .2s;
}

.search-wrap:focus-within {
  border-color: var(--border-a);
  box-shadow: 0 0 0 3px rgba(124,58,237,0.1);
}

.search-wrap.has-error   { border-color: rgba(239,68,68,0.45); }
.search-wrap.has-success { border-color: rgba(124,58,237,0.55); box-shadow: 0 0 0 3px rgba(124,58,237,0.08); }

.search-icon {
  position: absolute;
  left: 15px;
  color: var(--text-3);
  pointer-events: none;
  flex-shrink: 0;
}

.search-input {
  width: 100%;
  padding: 15px 15px 15px 48px;
  background: transparent;
  border: none;
  outline: none;
  font-size: 15px;
  font-family: 'SFMono-Regular', Consolas, 'Courier New', monospace;
  color: var(--text);
  letter-spacing: 0.05em;
}

.search-input::placeholder {
  color: var(--text-3);
  font-family: 'Inter', sans-serif;
  letter-spacing: 0;
}

.search-badge {
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 6px;
  margin-right: 12px;
  white-space: nowrap;
}

.search-badge.verified  { background: rgba(124,58,237,0.16); color: #A78BFA; }
.search-badge.not-found { background: rgba(239,68,68,0.1);   color: #F87171; }

.btn-verify {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 22px;
  height: 52px;
  background: var(--grad);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  font-family: 'Inter', sans-serif;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: opacity .15s, transform .1s;
}

.btn-verify:hover  { opacity: .92; }
.btn-verify:active { transform: scale(.97); }

.btn-verify.loading { opacity: .7; pointer-events: none; }

/* ── ALERT ── */
.alert {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  max-width: 620px;
  margin-top: 16px;
  padding: 13px 16px;
  border-radius: 10px;
  font-size: 14px;
  line-height: 1.55;
  animation: slideDown .22s ease;
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-5px); }
  to   { opacity: 1; transform: translateY(0); }
}

.alert-error {
  background: rgba(239,68,68,0.07);
  border: 1px solid rgba(239,68,68,0.22);
  color: #FCA5A5;
}

.alert svg { flex-shrink: 0; margin-top: 1px; }

/* ── RESULT SECTION ── */
.result-section {
  padding: 4px 0 64px;
}

.result-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
}

/* status bar */
.result-status-bar {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 22px 28px;
  background: linear-gradient(100deg, rgba(124,58,237,0.09) 0%, rgba(236,72,153,0.05) 100%);
  border-bottom: 1px solid var(--border-a);
}

.status-icon { flex-shrink: 0; }

.status-text { flex: 1; min-width: 0; }

.status-title {
  font-family: 'Space Grotesk', 'Inter', sans-serif;
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 3px;
}

.status-sub {
  font-size: 13px;
  color: var(--text-2);
}

.status-seal { flex-shrink: 0; }

/* details grid */
.details-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.detail-item {
  padding: 20px 28px;
  border-bottom: 1px solid var(--border);
  border-right: 1px solid var(--border);
}

.detail-item:nth-child(even) { border-right: none; }

.detail-item.full {
  grid-column: 1 / -1;
  border-right: none;
}

.detail-item.last { border-bottom: none; }

.detail-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 7px;
}

.detail-value {
  font-size: 15px;
  color: var(--text);
  line-height: 1.5;
}

.detail-value.large {
  font-family: 'Space Grotesk', 'Inter', sans-serif;
  font-size: 20px;
  font-weight: 600;
}

.detail-value.mono {
  font-family: 'SFMono-Regular', Consolas, 'Courier New', monospace;
  font-size: 14px;
  letter-spacing: 0.06em;
}

.detail-value.accent {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-weight: 700;
  font-size: 16px;
}

.detail-value.desc {
  font-size: 14px;
  color: var(--text-2);
  line-height: 1.72;
}

/* status chip */
.status-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  font-weight: 600;
  padding: 5px 13px;
  border-radius: 999px;
  background: rgba(124,58,237,0.1);
  border: 1px solid var(--border-a);
  color: #A78BFA;
}

.chip-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--grad);
  animation: pulse 2.2s ease-in-out infinite;
}

/* result footer */
.result-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 28px;
  background: var(--elevated);
  border-top: 1px solid var(--border);
}

.footer-note {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  color: var(--text-3);
  font-variant-numeric: tabular-nums;
}

.btn-outline {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-2);
  padding: 8px 18px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  cursor: pointer;
  transition: color .15s, border-color .15s;
  white-space: nowrap;
}

.btn-outline:hover {
  color: var(--text);
  border-color: var(--border-a);
}



/* ── FOOTER ── */
.footer {
  margin-top: auto;
  border-top: 1px solid var(--border);
  padding: 20px 0;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: center;
}

.footer-brand {
  font-size: 13px;
  color: var(--text-3);
  text-align: center;
}

/* ── RESPONSIVE ── */
@media (max-width: 680px) {
  .hero { padding: 52px 0 48px; }

  .search-form { flex-direction: column; }

  .btn-verify {
    width: 100%;
    justify-content: center;
    height: 50px;
  }

  .details-grid { grid-template-columns: 1fr; }
  .detail-item  { border-right: none; }
  .detail-item.full { grid-column: 1; }

  .result-status-bar { flex-wrap: wrap; gap: 12px; }
  .status-seal       { display: none; }

  .result-footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .footer-inner { justify-content: center; }
}

@media (max-width: 480px) {
  .container { padding: 0 16px; }
  .detail-item { padding: 16px 18px; }
  .result-status-bar { padding: 18px; }
  .result-footer { padding: 14px 18px; }
}
