@import url('https://fonts.googleapis.com/css2?family=Share+Tech+Mono&family=Orbitron:wght@400;700;900&family=Rajdhani:wght@400;600;700&display=swap');

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

:root {
  --c: #00ffe7;
  --c2: #00aaff;
  --p: #b44fff;
  --gold: #ffd060;
  --red: #ff2d55;
  --green: #00ff9f;
  --bg: #00000f;
  --bg2: #030318;
  --bg3: #060624;
  --b: rgba(0,255,231,0.15);
}

body {
  background: var(--bg);
  color: #b0cce0;
  font-family: 'Rajdhani', sans-serif;
  overflow-x: hidden;
}

canvas#stars {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: 0;
  pointer-events: none;
}

.wrap {
  position: relative;
  z-index: 1;
  padding: 1.5rem;
  max-width: 720px;
  margin: 0 auto;
}

/* ── Header ── */
.site-header { text-align: center; padding: 2rem 0 2.5rem; }

.orbit-ring {
  width: 180px; height: 180px;
  border-radius: 50%;
  border: 1px solid rgba(0,255,231,0.2);
  position: relative;
  margin: 0 auto 1.5rem;
  animation: spin-slow 20s linear infinite;
}

.orbit-ring::before {
  content: '';
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  border: 1px dashed rgba(0,170,255,0.15);
}

.orbit-dot {
  position: absolute;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--c);
  top: -4px; left: 50%; margin-left: -4px;
  box-shadow: 0 0 8px var(--c), 0 0 16px var(--c);
}

.orbit-dot2 {
  position: absolute;
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--p);
  bottom: -2px; right: 20%;
  box-shadow: 0 0 6px var(--p);
}

.planet {
  position: absolute;
  inset: 20px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #1a2a6c, #0a0a2a 60%, #000010);
  border: 1px solid rgba(0,255,231,0.1);
  animation: spin-slow 20s linear infinite reverse;
  display: flex; align-items: center; justify-content: center;
}

.planet-glyph {
  font-family: 'Orbitron', sans-serif;
  font-size: 28px; font-weight: 900;
  color: var(--c);
  animation: pulse-glow 2s ease-in-out infinite;
}

@keyframes spin-slow { to { transform: rotate(360deg); } }
@keyframes pulse-glow {
  0%,100% { text-shadow: 0 0 10px var(--c), 0 0 30px var(--c); }
  50%      { text-shadow: 0 0 20px var(--c), 0 0 60px var(--c), 0 0 80px var(--c2); }
}

.site-year {
  font-family: 'Share Tech Mono', monospace;
  font-size: 10px; color: var(--c2);
  letter-spacing: 0.2em; margin-bottom: 8px; display: block;
}

.site-title {
  font-family: 'Orbitron', sans-serif;
  font-size: 34px; font-weight: 900;
  color: #fff; letter-spacing: 0.12em;
  line-height: 1; margin-bottom: 8px;
}

.site-title .hl { color: var(--c); }

.site-sub {
  font-family: 'Share Tech Mono', monospace;
  font-size: 10px; color: rgba(160,200,220,0.45);
  letter-spacing: 0.1em;
}

/* ── Ticker ── */
.ticker {
  font-family: 'Share Tech Mono', monospace;
  font-size: 10px; color: rgba(0,255,231,0.35);
  letter-spacing: 0.06em; white-space: nowrap;
  overflow: hidden;
  border-top: 1px solid rgba(0,255,231,0.07);
  border-bottom: 1px solid rgba(0,255,231,0.07);
  padding: 6px 0; margin-bottom: 2rem;
}

.ticker-inner { display: inline-block; animation: ticker 28s linear infinite; }
@keyframes ticker { 0% { transform: translateX(100%); } 100% { transform: translateX(-100%); } }

/* ── Panels ── */
.panel {
  background: linear-gradient(135deg, rgba(6,6,36,0.95), rgba(3,3,24,0.98));
  border: 1px solid var(--b);
  position: relative; margin-bottom: 1.25rem;
  animation: fadeup 0.5s ease both;
}

.panel:nth-of-type(1) { animation-delay: 0.15s; }
.panel:nth-of-type(2) { animation-delay: 0.25s; }
.panel:nth-of-type(3) { animation-delay: 0.35s; }

@keyframes fadeup {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}

.panel::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--p), var(--c), transparent);
}

.panel::after {
  content: '';
  position: absolute; bottom: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(0,255,231,0.08), transparent);
}

/* Corners */
.corner { position: absolute; width: 10px; height: 10px; }
.corner.tl { top: -1px; left: -1px; border-top: 1px solid var(--c); border-left: 1px solid var(--c); }
.corner.tr { top: -1px; right: -1px; border-top: 1px solid var(--c); border-right: 1px solid var(--c); }
.corner.bl { bottom: -1px; left: -1px; border-bottom: 1px solid var(--c); border-left: 1px solid var(--c); }
.corner.br { bottom: -1px; right: -1px; border-bottom: 1px solid var(--c); border-right: 1px solid var(--c); }

.panel-hdr {
  padding: 8px 14px 6px;
  display: flex; align-items: center; gap: 10px;
  border-bottom: 1px solid rgba(0,255,231,0.07);
}

.panel-num {
  font-family: 'Orbitron', monospace;
  font-size: 9px; color: var(--c); letter-spacing: 0.1em;
}

.panel-title {
  font-family: 'Share Tech Mono', monospace;
  font-size: 10px; color: rgba(0,255,231,0.45);
  letter-spacing: 0.12em; flex: 1;
}

.hdr-dots { display: flex; gap: 4px; margin-left: auto; }
.hdr-dot  { width: 5px; height: 5px; border-radius: 50%; }
.hdr-dot:nth-child(1) { background: var(--red);   opacity: 0.7; }
.hdr-dot:nth-child(2) { background: var(--gold);  opacity: 0.7; }
.hdr-dot:nth-child(3) { background: var(--green); opacity: 0.7; }

.panel-body { padding: 14px; }
.exec-panel { padding: 10px 14px; }

/* ── Email input ── */
.input-shell {
  background: rgba(0,0,10,0.8);
  border: 1px solid rgba(0,255,231,0.2);
  display: flex; align-items: stretch;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.input-shell:focus-within {
  border-color: var(--c);
  box-shadow: 0 0 0 1px rgba(0,255,231,0.12), inset 0 0 20px rgba(0,255,231,0.03);
}

.input-pre {
  font-family: 'Share Tech Mono', monospace;
  font-size: 11px; color: var(--c);
  padding: 0 12px; white-space: nowrap;
  border-right: 1px solid rgba(0,255,231,0.15);
  background: rgba(0,255,231,0.04);
  display: flex; align-items: center;
}

.email-inp {
  flex: 1; background: transparent; border: none; outline: none;
  color: #fff; font-family: 'Share Tech Mono', monospace;
  font-size: 13px; padding: 13px 14px; caret-color: var(--c);
}

.email-inp::placeholder { color: rgba(100,160,180,0.3); }

/* ── Events grid ── */
.events-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
  gap: 6px;
}

.ev {
  padding: 10px 4px 8px; text-align: center; cursor: pointer;
  background: rgba(0,0,15,0.7);
  border: 1px solid rgba(0,255,231,0.08);
  transition: all 0.2s; position: relative; overflow: hidden;
}

.ev::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(circle at 50% 0%, rgba(0,255,231,0.08), transparent 70%);
  opacity: 0; transition: opacity 0.2s;
}

.ev:hover::before, .ev.sel::before { opacity: 1; }

.ev:hover {
  border-color: rgba(0,255,231,0.3);
  transform: translateY(-1px);
}

.ev.sel {
  border-color: var(--c);
  background: rgba(0,255,231,0.05);
  box-shadow: 0 0 12px rgba(0,255,231,0.1), inset 0 0 12px rgba(0,255,231,0.04);
}

.ev-ico  { font-size: 18px; display: block; margin-bottom: 5px; }
.ev-name {
  font-size: 10px; font-weight: 600;
  color: rgba(140,180,200,0.55); letter-spacing: 0.04em;
  line-height: 1.2; transition: color 0.2s;
}
.ev:hover .ev-name { color: rgba(200,230,240,0.9); }
.ev.sel  .ev-name  { color: var(--c); }

.ev-sel-bar {
  position: absolute; bottom: 0; left: 0; right: 0; height: 1px;
  background: var(--c); transform: scaleX(0); transition: transform 0.2s;
}
.ev.sel .ev-sel-bar { transform: scaleX(1); }

/* ── Launch button ── */
.launch-btn {
  width: 100%; padding: 15px;
  background: transparent;
  border: 1px solid rgba(0,255,231,0.4);
  color: var(--c);
  font-family: 'Orbitron', sans-serif;
  font-size: 13px; font-weight: 700; letter-spacing: 0.2em;
  cursor: pointer; position: relative; overflow: hidden;
  transition: all 0.2s;
  display: flex; align-items: center; justify-content: center; gap: 12px;
}

.launch-btn::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(0,255,231,0.06), transparent);
  transform: translateX(-100%);
}

.launch-btn:hover::before { animation: shimmer 1s ease; }
@keyframes shimmer { to { transform: translateX(100%); } }

.launch-btn:hover {
  border-color: var(--c);
  box-shadow: 0 0 20px rgba(0,255,231,0.12), inset 0 0 20px rgba(0,255,231,0.04);
}

.launch-btn:active  { transform: scale(0.99); }
.launch-btn:disabled { opacity: 0.3; cursor: not-allowed; transform: none; box-shadow: none; }

.btn-arrow { font-size: 16px; transition: transform 0.2s; }
.launch-btn:hover .btn-arrow { transform: translateX(4px); }

/* ── Status ── */
.status-wrap {
  margin-bottom: 1.25rem;
  font-family: 'Share Tech Mono', monospace;
  font-size: 11px; letter-spacing: 0.06em;
  padding: 10px 14px;
  background: rgba(3,3,24,0.95);
  border: 1px solid transparent;
  display: none; align-items: center; gap: 10px;
}

.status-wrap.err  { display: flex; border-color: rgba(255,45,85,0.3);   color: var(--red);   }
.status-wrap.ok   { display: flex; border-color: rgba(0,255,159,0.3);   color: var(--green); }
.status-wrap.load { display: flex; border-color: rgba(0,255,231,0.2);   color: var(--c);     }

.pulse-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: currentColor; flex-shrink: 0;
  animation: blink 0.8s infinite;
}

@keyframes blink {
  0%,100% { opacity: 1; box-shadow: 0 0 4px currentColor; }
  50%      { opacity: 0.15; box-shadow: none; }
}

/* ── Result ── */
.result {
  display: none;
  background: var(--bg3);
  border: 1px solid rgba(0,255,231,0.15);
  margin-bottom: 1.5rem;
  animation: fadeup 0.4s ease;
}
.result.vis { display: block; }

.result-hdr {
  padding: 10px 14px;
  border-bottom: 1px solid rgba(0,255,231,0.08);
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
}

.result-id {
  font-family: 'Share Tech Mono', monospace;
  font-size: 10px; color: var(--c2); letter-spacing: 0.1em;
}

.dl-btn {
  font-family: 'Share Tech Mono', monospace;
  font-size: 10px; padding: 6px 14px;
  border: 1px solid rgba(0,255,231,0.25);
  color: var(--c); text-decoration: none;
  letter-spacing: 0.08em;
  background: rgba(0,255,231,0.05);
  transition: all 0.15s;
  display: inline-flex; align-items: center; gap: 6px;
}

.dl-btn:hover { border-color: var(--c); box-shadow: 0 0 10px rgba(0,255,231,0.15); }

#certCanvas { display: block; width: 100%; height: auto; }

/* ── Spinner ── */
.spinner {
  display: inline-block; width: 13px; height: 13px;
  border: 1.5px solid rgba(0,255,231,0.2);
  border-top-color: var(--c);
  border-radius: 50%; animation: spin 0.55s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Footer ── */
.site-footer {
  text-align: center; padding: 1.5rem 0 2rem;
  font-family: 'Share Tech Mono', monospace;
  font-size: 9px; color: rgba(100,140,160,0.25);
  letter-spacing: 0.1em;
  border-top: 1px solid rgba(0,255,231,0.05);
}