@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;900&family=Space+Grotesk:wght@300;400;600;700&display=swap');

:root {
  --bg: #050507;
  --surface: rgba(255,255,255,0.03);
  --surface-2: rgba(255,255,255,0.06);
  --border: rgba(255,255,255,0.07);
  --border-2: rgba(255,255,255,0.14);

  --purple: #9945FF;
  --purple-light: #c084fc;
  --green: #14F195;
  --green-dim: rgba(20, 241, 149, 0.12);
  --red: #f43f5e;

  --text: #f1f5f9;
  --text-2: #94a3b8;
  --text-3: #475569;

  --font: 'Outfit', sans-serif;
  --mono: 'Space Grotesk', monospace;

  --r: 20px;
  --r-sm: 12px;
}

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

html { scroll-behavior: smooth; }

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

/* ─── BG Effects ─────────────────────────────────────────── */
.bg-grid {
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(153,69,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(153,69,255,0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
  z-index: 0;
}

.bg-glow {
  position: fixed;
  top: -30vh;
  left: 50%;
  transform: translateX(-50%);
  width: 80vw;
  height: 60vh;
  background: radial-gradient(ellipse at center, rgba(153,69,255,0.18) 0%, transparent 65%);
  pointer-events: none;
  z-index: 0;
}

.bg-glow-bottom {
  position: fixed;
  bottom: -40vh;
  right: -20vw;
  width: 70vw;
  height: 70vh;
  background: radial-gradient(ellipse at center, rgba(20,241,149,0.08) 0%, transparent 65%);
  pointer-events: none;
  z-index: 0;
}

/* ─── Layout ─────────────────────────────────────────────── */
#app {
  position: relative;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100vh;
}

/* ─── Header ─────────────────────────────────────────────── */
header {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 2rem 2rem 0;
}

.header-links {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.header-link {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--text-3);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 600;
  transition: color 0.2s;
}

.header-link:hover { color: var(--text); }

.logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-2);
}

.logo-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 10px var(--green);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(0.85); }
}

/* ─── Hero ───────────────────────────────────────────────── */
.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 5rem 1.5rem 3rem;
  max-width: 680px;
  width: 100%;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(20, 241, 149, 0.08);
  border: 1px solid rgba(20, 241, 149, 0.2);
  color: var(--green);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: 100px;
  padding: 0.4rem 1rem;
  margin-bottom: 2rem;
}

.hero-badge-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--green);
}

h1 {
  font-size: clamp(3.5rem, 9vw, 5.5rem);
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.04em;
  margin-bottom: 1.25rem;
}

h1 .line-1 {
  display: block;
  background: linear-gradient(180deg, #fff 0%, rgba(255,255,255,0.7) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

h1 .line-2 {
  display: block;
  background: linear-gradient(135deg, var(--purple) 0%, var(--purple-light) 60%, var(--green) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-sub {
  font-size: 1.2rem;
  color: var(--text-2);
  line-height: 1.7;
  max-width: 500px;
  margin-bottom: 3rem;
}

/* ─── Input Card ─────────────────────────────────────────── */
.input-card {
  width: 100%;
  max-width: 560px;
  background: var(--surface);
  border: 1px solid var(--border-2);
  border-radius: var(--r);
  padding: 2rem;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 0 0 1px rgba(255,255,255,0.02) inset, 0 40px 80px -20px rgba(0,0,0,0.6);
}

.input-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-3);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}

.input-wrap {
  position: relative;
  margin-bottom: 1.25rem;
}

.input-prefix {
  position: absolute;
  left: 1.1rem;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--mono);
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--text-3);
  pointer-events: none;
}

input[type="text"] {
  width: 100%;
  background: rgba(0,0,0,0.35);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: 1.1rem 1.1rem 1.1rem 2.8rem;
  color: var(--text);
  font-family: var(--mono);
  font-size: 1.3rem;
  font-weight: 600;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

input[type="text"]::placeholder {
  color: var(--text-3);
  font-weight: 400;
  font-size: 1rem;
  font-family: var(--font);
}

input[type="text"]:focus {
  border-color: var(--purple);
  box-shadow: 0 0 0 3px rgba(153,69,255,0.15);
}

.divider-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.25rem;
  color: var(--text-3);
  font-size: 0.85rem;
}

.divider-row::before, .divider-row::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.btn-primary {
  width: 100%;
  background: linear-gradient(135deg, var(--purple) 0%, #7c3aed 100%);
  color: white;
  border: none;
  border-radius: var(--r-sm);
  padding: 1.1rem;
  font-family: var(--font);
  font-size: 1.05rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.22, 1, 0.36, 1);
  position: relative;
  overflow: hidden;
  letter-spacing: -0.01em;
}

.btn-primary::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(255,255,255,0.12), transparent);
  pointer-events: none;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px -8px rgba(153,69,255,0.5);
}

.btn-primary:active {
  transform: translateY(0);
}

.input-hint {
  text-align: center;
  margin-top: 1rem;
  font-size: 0.83rem;
  color: var(--text-3);
}

/* ─── Animations ─────────────────────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ─── Loading ─────────────────────────────────────────────── */
.loading-view {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
  gap: 1.5rem;
  animation: fadeUp 0.4s ease forwards;
}

.spinner-ring {
  width: 52px; height: 52px;
  border: 3px solid rgba(255,255,255,0.06);
  border-top-color: var(--purple);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.loading-text {
  color: var(--text-2);
  font-size: 1rem;
}

.loading-sub {
  color: var(--text-3);
  font-size: 0.85rem;
  margin-top: 0.25rem;
  text-align: center;
}

/* ─── Session View ───────────────────────────────────────── */
.session-view {
  width: 100%;
  max-width: 680px;
  padding: 0 1.5rem 5rem;
  animation: fadeUp 0.5s ease forwards;
}

.session-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 2rem;
  padding-top: 2rem;
}

.session-avatar {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--purple), #4a00e0);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
  box-shadow: 0 0 20px rgba(153,69,255,0.3);
}

.session-doctor {
  font-weight: 700;
  font-size: 1rem;
}

.session-creds {
  font-size: 0.82rem;
  color: var(--text-3);
}

.session-body {
  background: var(--surface);
  border: 1px solid var(--border-2);
  border-radius: var(--r);
  padding: 2.5rem;
  backdrop-filter: blur(20px);
}

.session-para {
  font-size: 1.1rem;
  line-height: 1.75;
  color: var(--text-2);
  margin-bottom: 1.5rem;
}

.session-para:last-child { margin-bottom: 0; }

.session-para strong {
  color: var(--text);
  font-weight: 600;
}

.session-para mark {
  background: transparent;
  color: var(--green);
  font-weight: 600;
}

.session-actions {
  margin-top: 1.75rem;
  display: flex;
  justify-content: flex-end;
}

.btn-cert {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: linear-gradient(135deg, rgba(20,241,149,0.15), rgba(20,241,149,0.05));
  border: 1px solid rgba(20,241,149,0.3);
  color: var(--green);
  border-radius: 100px;
  padding: 0.75rem 1.5rem;
  font-family: var(--font);
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-cert:hover {
  background: rgba(20,241,149,0.2);
  border-color: rgba(20,241,149,0.5);
  transform: translateY(-1px);
}

/* ─── Certificate ─────────────────────────────────────────── */
.cert-view {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 3rem 1.5rem 5rem;
  gap: 1.75rem;
  width: 100%;
  animation: fadeUp 0.5s ease forwards;
}

.cert-view h2 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-3);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

#cert-card {
  width: 100%;
  max-width: 580px;
  background: #09090f;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.04), 0 60px 120px -30px rgba(0,0,0,0.8), 0 0 80px -20px rgba(153,69,255,0.2);
  position: relative;
}

.cert-top-bar {
  height: 5px;
  background: linear-gradient(90deg, var(--purple), #4a00e0, var(--green));
}

.cert-inner {
  padding: 2.5rem;
  position: relative;
}

.cert-watermark {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 10rem;
  opacity: 0.025;
  font-weight: 900;
  pointer-events: none;
  line-height: 1;
}

.cert-top-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 2.5rem;
}

.cert-issuer {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-3);
}

.cert-issuer strong {
  display: block;
  font-size: 1rem;
  color: var(--text);
  letter-spacing: -0.01em;
  text-transform: none;
  margin-top: 0.2rem;
}

.cert-seal {
  width: 52px; height: 52px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--purple), #4a00e0);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  box-shadow: 0 0 20px rgba(153,69,255,0.4);
}

.cert-statement {
  font-size: 0.9rem;
  color: var(--text-3);
  margin-bottom: 0.4rem;
}

.cert-name {
  font-size: 2.5rem;
  font-weight: 900;
  color: var(--text);
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 2rem;
}

.cert-meta-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 2.5rem;
}

.cert-meta-item {
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1rem;
}

.cert-meta-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.3rem;
}

.cert-meta-value {
  font-family: var(--mono);
  font-size: 1.2rem;
  font-weight: 700;
}

.cert-meta-value.loss { color: var(--red); }
.cert-meta-value.diag { color: var(--green); font-size: 0.95rem; }

.cert-footer-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--border);
  padding-top: 1.5rem;
}

.cert-sig-block {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
}

.cert-sig {
  font-family: 'Times New Roman', Georgia, serif;
  font-style: italic;
  font-size: 1.6rem;
  opacity: 0.85;
  line-height: 1.2;
}

.cert-sig-title {
  font-size: 0.75rem;
  color: var(--text-3);
}

.cert-date-block {
  font-size: 0.78rem;
  font-family: var(--mono);
  color: var(--text-3);
}

/* ─── Bottom Buttons ──────────────────────────────────────── */
.cert-btns {
  display: flex;
  gap: 0.75rem;
  width: 100%;
  max-width: 580px;
}

.btn-icon {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border-radius: var(--r-sm);
  padding: 0.9rem 1rem;
  font-family: var(--font);
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  border: 1px solid var(--border-2);
  background: var(--surface-2);
  color: var(--text);
  transition: all 0.2s;
}

.btn-icon:hover {
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.2);
  transform: translateY(-1px);
}

.btn-icon.twitter {
  background: #000;
  border-color: rgba(255,255,255,0.15);
}

.btn-icon.twitter:hover {
  background: #111;
}

.btn-new {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-3);
  border-radius: var(--r-sm);
  padding: 0.9rem 1.5rem;
  font-family: var(--font);
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-new:hover {
  border-color: var(--border-2);
  color: var(--text-2);
}

/* ─── Testimonials ───────────────────────────────────────── */
.testimonials {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 1.5rem 5rem;
  gap: 1rem;
  width: 100%;
  max-width: 680px;
}

.testimonials-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.5rem;
}

.testimonial-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  width: 100%;
}

.testimonial-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1rem;
}

.t-handle {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-3);
  margin-bottom: 0.4rem;
}

.t-text {
  font-size: 0.83rem;
  color: var(--text-2);
  line-height: 1.5;
}

@media (max-width: 600px) {
  h1 { font-size: 3rem; }
  .testimonial-grid { grid-template-columns: 1fr; }
  .cert-btns { flex-direction: column; }
  .cert-meta-row { grid-template-columns: 1fr; }
  .token-info-bar { border-radius: var(--r-sm); }
  .token-info-value { font-size: 0.75rem; }
}

/* ─── Token Info Bar (X + CA) ────────────────────────────── */
.token-info-bar {
  display: flex;
  align-items: center;
  margin-top: 1.5rem;
  width: 100%;
  max-width: 560px;
  background: var(--surface);
  border: 1px solid var(--border-2);
  border-radius: 100px;
  padding: 0.45rem 0.6rem;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.token-info-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex: 1;
  padding: 0.35rem 0.85rem;
  text-decoration: none;
  border-radius: 100px;
  transition: background 0.2s;
  cursor: default;
  min-width: 0;
}

a.token-info-item { cursor: pointer; }
a.token-info-item:hover { background: rgba(255,255,255,0.05); }

.token-info-label {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-3);
  white-space: nowrap;
  flex-shrink: 0;
}

.token-info-value {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.token-info-value.mono {
  font-family: var(--mono);
  font-size: 0.78rem;
}

.token-info-divider {
  width: 1px;
  height: 22px;
  background: var(--border-2);
  flex-shrink: 0;
}

.ca-copy {
  margin-left: auto;
  background: rgba(153,69,255,0.15);
  border: 1px solid rgba(153,69,255,0.3);
  color: var(--purple-light);
  border-radius: 100px;
  padding: 0.25rem 0.75rem;
  font-family: var(--font);
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
  flex-shrink: 0;
}

.ca-copy:hover {
  background: rgba(153,69,255,0.25);
  border-color: rgba(153,69,255,0.5);
}
