:root{
  --bg1:#070A0F;
  --bg2:#0C111C;
  --card: rgba(255,255,255,0.06);
  --card2: rgba(255,255,255,0.10);
  --text: rgba(255,255,255,0.92);
  --muted: rgba(255,255,255,0.70);
  --muted2: rgba(255,255,255,0.55);
  --line: rgba(255,255,255,0.12);
  --accent:#FF7A1F;
  --shadow: 0 18px 60px rgba(0,0,0,0.55);
  --shadow-soft: 0 10px 30px rgba(0,0,0,0.35);
  --radius: 18px;
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial;
  color:var(--text);
  background:
    radial-gradient(1200px 800px at 15% 20%, rgba(255,122,31,0.18), transparent 55%),
    radial-gradient(1200px 800px at 85% 30%, rgba(46,204,113,0.13), transparent 60%),
    linear-gradient(180deg, var(--bg1), var(--bg2));
  overflow-x:hidden;
}

a{color:inherit; text-decoration:none}
.wrap{max-width:1480px; margin:0 auto; padding:24px 18px 40px}
.topbar{
  display:flex; align-items:center; justify-content:space-between;
  gap:14px;
  padding:14px 0;
}
.brand{
  /* Keep "SixHack" together (no extra gap between the spans). */
  display:flex; align-items:center; gap:0 !important;
  font-weight:700;
  letter-spacing:0.2px;
}
.brand .six{color:#fff}
.brand .hack{color:var(--accent)}
.brand .academy{font-weight:500; color:var(--muted2); margin-left:6px}
.brand span{display:block; line-height:1;}
.brand{white-space:nowrap;}
.tagline{font-size:13px; color:var(--muted2)}
.lang{
  display:flex;
  gap:8px;
  align-items:center;
  background:rgba(17,24,39,0.70);
  border:1px solid rgba(31,41,55,0.85);
  border-radius:9999px;
  padding:6px;
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.lang a{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:36px;
  height:28px;
  border-radius:9999px;
  background:#111827;
  border:1px solid #1f2937;
  color:#e5e7eb;
  transition: transform .12s ease, background .12s ease, border-color .12s ease, opacity .12s ease;
  opacity:.92;
}
.lang a:hover{transform: translateY(-1px); opacity:1}
.lang a.active{
  background:#22c55e;
  border-color:#22c55e;
  color:#020617;
  opacity:1;
}
.lang .flag{
  font-size:16px;
  line-height:1;
}

.lang a:focus-visible{
  outline: 2px solid rgba(34,197,94,.45);
  outline-offset: 2px;
}

.hero{
  display:grid;
  /* More space for the preview so "Issued on" and small QR text remain visible */
  grid-template-columns: 1.45fr 0.55fr;
  gap:18px;
  margin-top:14px;
}
.card{
  background: var(--card);
  border:1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
  overflow:hidden;
}
.card-pad{padding:18px 18px}
h1{
  margin:0 0 10px 0;
  font-size:28px;
  line-height:1.15;
  letter-spacing:-0.4px;
}
p{margin:0; color:var(--muted); line-height:1.55}

.token-form{
  display:flex; gap:10px; margin-top:16px;
  align-items:center;
}
.token-form input{
  flex:1;
  padding:12px 14px;
  border-radius: 12px;
  border:1px solid rgba(255,255,255,0.16);
  background: rgba(0,0,0,0.25);
  color: var(--text);
  outline:none;
}
.token-form input:focus{border-color: rgba(255,122,31,0.6)}
.btn{
  cursor:pointer;
  border:none;
  padding:12px 14px;
  border-radius: 12px;
  background: rgba(255,122,31,0.92);
  color:#0c0c0c;
  font-weight:700;
  box-shadow: 0 12px 30px rgba(255,122,31,0.18);
  transition: transform .12s ease, filter .12s ease;
  white-space:nowrap;
}
.btn:hover{transform: translateY(-1px); filter:brightness(1.05)}
.btn:active{transform: translateY(0px)}

.badge{
  display:inline-flex; align-items:center; gap:8px;
  padding:6px 10px;
  border-radius:999px;
  border:1px solid var(--line);
  background: rgba(255,255,255,0.05);
  color: var(--muted);
  font-size:12px;
  font-weight:600;
}
.badge svg{width:14px; height:14px; flex:0 0 auto}
.badge.good{border-color: rgba(46,204,113,0.35); background: rgba(46,204,113,0.08); color: rgba(230,255,240,0.9)}
.badge.bad{border-color: rgba(255,80,80,0.35); background: rgba(255,80,80,0.08); color: rgba(255,235,235,0.95)}
.grid{
  display:grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap:18px;
  margin-top:18px;
  align-items:start;
}

.cert-frame{
  background: rgba(255,255,255,0.04);
  border:1px solid rgba(255,255,255,0.14);
  border-radius: 16px;
  box-shadow: var(--shadow);
  padding:12px;
}
.cert-frame img{
  width:100%;
  height:auto;
  display:block;
  /* Do not crop the certificate contents (edges must match the PDF exactly) */
  border-radius: 0;
  background: #ffffff;
  box-shadow: 0 14px 40px rgba(0,0,0,0.45);
}

.details{
  display:flex; flex-direction:column; gap:12px;
}
.detail-row{
  display:flex; justify-content:space-between; gap:10px;
  padding:10px 12px;
  border-radius: 14px;
  border:1px solid rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.03);
}
.detail-row .k{color:var(--muted2); font-size:12px}
.detail-row .v{color:var(--text); font-weight:650; text-align:right}

.share{
  display:flex; gap:10px; flex-wrap:wrap;
  align-items:center;
}
.share a{
  display:inline-flex; align-items:center; gap:8px;
  padding:10px 12px;
  border-radius: 14px;
  border:1px solid rgba(255,255,255,0.14);
  background: rgba(0,0,0,0.22);
  transition: transform .12s ease, background .12s ease, border-color .12s ease;
  font-weight:650;
  font-size:13px;
  color: var(--text);
}
.share a:hover{transform: translateY(-1px); background: rgba(255,255,255,0.05); border-color: rgba(255,255,255,0.20)}
.share svg{width:16px; height:16px}

.footer{
  margin-top:32px;
  color: var(--muted2);
  font-size:12px;
  text-align:center;
}

@media (max-width: 900px){
  .hero{grid-template-columns:1fr}
  .grid{grid-template-columns:1fr}
  .tagline{display:none}
  .wrap{padding-top:14px}
}

/* ------------------------------------------------------------
   Terminal UI (used in /404 and certificate "not found" pages)
   ------------------------------------------------------------ */

.mono{
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas,
               "Liberation Mono", "Courier New", monospace;
  letter-spacing: 0.1px;
}

.actions{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  align-items:center;
  margin-top:16px;
}

.btn-ghost{
  background: rgba(0,0,0,0.22);
  color: var(--text);
  border: 1px solid rgba(255,255,255,0.14);
  box-shadow: none;
}
.btn-ghost:hover{
  background: rgba(255,255,255,0.06);
  border-color: rgba(255,255,255,0.20);
  filter:none;
}

.hint{
  margin-top:14px;
  font-size:13px;
  line-height:1.6;
  color: var(--muted2);
}

.badge.warn{
  border-color: rgba(251,191,36,0.40);
  background: rgba(251,191,36,0.10);
  color: rgba(255,248,220,0.95);
}

.accent{color: var(--accent)}
.warn{color: rgba(251,191,36,0.92)}
.danger{color: rgba(255,110,110,0.95)}
.dim{color: rgba(255,255,255,0.58)}

/* "Simple" terminal block (used by generic error templates) */
.terminal{
  margin-top: 16px;
  border-radius: 16px;
  border: 1px solid rgba(34,197,94,0.22);
  background: rgba(0,0,0,0.25);
  box-shadow: 0 14px 40px rgba(0,0,0,0.45);
  padding: 12px 14px;
  font-size: 13px;
  line-height: 1.45;
  color: rgba(210,255,225,0.92);
}
.term-line{display:flex; gap:10px; align-items:flex-start;}
.prompt{
  min-width: 18px;
  color: rgba(210,255,225,0.72);
}

/* Terminal window (with titlebar + dots) */
.term-window{
  margin-top: 16px;
  border-radius: 16px;
  border: 1px solid rgba(34,197,94,0.24);
  background: rgba(0,0,0,0.28);
  box-shadow: 0 18px 55px rgba(0,0,0,0.55);
  overflow: hidden;
}

.term-titlebar{
  display:flex;
  align-items:center;
  gap:10px;
  padding: 10px 12px;
  background: rgba(0,0,0,0.38);
  border-bottom: 1px solid rgba(34,197,94,0.18);
}

.term-dots{display:flex; align-items:center; gap:6px;}
.term-dot{
  width:10px;
  height:10px;
  border-radius:999px;
  display:inline-block;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.40);
}
.term-dot.red{background:#ef4444}
.term-dot.yellow{background:#f59e0b}
.term-dot.green{background:#22c55e}

.term-title{
  flex: 1;
  font-size: 12px;
  font-weight: 700;
  color: rgba(210,255,225,0.88);
}
.term-meta{
  font-size: 12px;
  color: rgba(210,255,225,0.62);
}

.term-body{
  padding: 12px 14px;
  max-height: 260px;
  overflow: auto;
  background: rgba(0,0,0,0.26);
  color: rgba(210,255,225,0.92);
}
.term-screen{
  display:flex;
  flex-direction:column;
  gap:4px;
  font-size: 13px;
  line-height: 1.45;
}

.term-row{display:flex; gap:10px; align-items:flex-start;}
.term-prompt{
  min-width: 132px;
  color: rgba(210,255,225,0.72);
  white-space: pre;
}
.term-prompt.accent{color: rgba(255,122,31,0.95)}
.term-prompt.danger{color: rgba(255,110,110,0.95)}

.term-user{color: rgba(235,255,242,0.95); font-weight:800}
.term-at{color: rgba(210,255,225,0.55)}
.term-host{color: rgba(34,197,94,0.95); font-weight:800}

.term-text{
  flex: 1;
  white-space: pre-wrap;
  word-break: break-word;
}
.term-text.cmd{color: rgba(235,255,242,0.96)}
.term-text.out{color: rgba(210,255,225,0.90)}
.term-text.dim, .term-dim{color: rgba(210,255,225,0.62)}
.term-text.warn{color: rgba(251,191,36,0.92)}
.term-text.danger{color: rgba(255,120,120,0.95)}

.cursor{
  display:inline-block;
  width: 9px;
  height: 1.05em;
  margin-left: 4px;
  border-radius: 2px;
  background: rgba(210,255,225,0.85);
  vertical-align: -0.15em;
  animation: shBlink 1s steps(2, start) infinite;
}

@keyframes shBlink{
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0; }
}
