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

:root {
  --red:          #c0392b;
  --red-bright:   #e74c3c;
  --green:        #27ae60;
  --green-bright: #2ecc71;
  --navy:         #1a2a4a;
  --navy-light:   #243660;
  --amber:        #f39c12;
  --white:        #eaeaea;
  --grey:         #8a9bac;
  --bg:           #080c12;
  --panel:        #0d1117;
  --border:       #1c2a3a;
}

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

body {
  background: var(--bg);
  color: var(--white);
  font-family: 'Share Tech Mono', monospace;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow-x: hidden;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0px, transparent 3px,
    rgba(0,0,0,0.07) 3px, rgba(0,0,0,0.07) 4px
  );
  pointer-events: none;
  z-index: 999;
}

body::after {
  content: '';
  position: fixed;
  inset: 0;
  border: 2px solid var(--red);
  pointer-events: none;
  z-index: 998;
  animation: borderPulse 2s ease-in-out infinite;
}

@keyframes borderPulse {
  0%, 100% { border-color: var(--red); box-shadow: inset 0 0 60px rgba(192,57,43,0.1); }
  50%       { border-color: #7b241c; box-shadow: none; }
}

/* ── ALERT BANNER ── */
.alert-banner {
  width: 100%;
  background: var(--red);
  color: #fff;
  text-align: center;
  padding: 12px 16px;
  font-family: 'Oswald', sans-serif;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 3px;
  text-transform: uppercase;
  animation: bannerFlash 2.2s step-end infinite;
  flex-shrink: 0;
}

@keyframes bannerFlash {
  0%, 49% { background: var(--red); }
  50%, 100% { background: #922b21; }
}

.page {
  width: 100%;
  max-width: 820px;
  padding: 36px 24px 60px;
  display: flex;
  flex-direction: column;
  gap: 26px;
}

/* ── HEADER ── */
.header {
  display: flex;
  flex-direction: column;
  gap: 0;
  border-bottom: 1px solid var(--border);
  padding-bottom: 20px;
  animation: slideDown 0.7s ease forwards;
}

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

.header-top {
  display: flex;
  align-items: center;
  gap: 20px;
}

.logo-pill {
  background: #fff;
  border-radius: 6px;
  padding: 8px 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  height: 64px;
}

.dci-logo {
  height: 48px;
  width: auto;
  display: block;
}

.header-titles { flex: 1; }

.header-titles .country {
  font-size: 11px;
  letter-spacing: 3px;
  color: var(--grey);
  text-transform: uppercase;
  margin-bottom: 4px;
}

.header-titles .dept {
  font-family: 'Oswald', sans-serif;
  font-size: 22px;
  font-weight: 700;
  color: var(--white);
  letter-spacing: 1px;
  line-height: 1.15;
}

.header-titles .sub {
  font-size: 12px;
  color: var(--green);
  letter-spacing: 1px;
  margin-top: 5px;
}

.header-meta-strip {
  display: flex;
  gap: 28px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
  align-items: flex-start;
}

.meta-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.meta-item .mlabel {
  font-size: 10px;
  letter-spacing: 2px;
  color: var(--grey);
  text-transform: uppercase;
}

.meta-item .mval         { font-size: 13px; color: var(--white); }
.meta-item .mval.case    { color: var(--amber); font-size: 14px; font-weight: bold; }
.meta-item .mval.crit    { color: var(--red-bright); font-weight: bold; }
.meta-item .mval.green   { color: var(--green-bright); }

/* Live clock in strip */
.meta-item .mval.clock   {
  color: var(--green-bright);
  font-size: 15px;
  font-weight: bold;
  letter-spacing: 2px;
}

/* ── TITLE ── */
.title-block {
  text-align: center;
  opacity: 0;
  animation: fadeUp 0.6s ease forwards 0.3s;
}

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

.title-block .warning-icon {
  font-size: 56px;
  display: block;
  margin-bottom: 12px;
  animation: iconGlow 1.8s ease-in-out infinite;
}

@keyframes iconGlow {
  0%, 100% { filter: drop-shadow(0 0 6px rgba(192,57,43,0.9)); }
  50%       { filter: drop-shadow(0 0 24px rgba(231,76,60,1)); }
}

.title-block h1 {
  font-family: 'Oswald', sans-serif;
  font-size: 38px;
  font-weight: 700;
  color: var(--red-bright);
  letter-spacing: 3px;
  text-transform: uppercase;
  line-height: 1.15;
}

.title-block .tagline {
  margin-top: 8px;
  font-size: 13px;
  color: var(--grey);
  letter-spacing: 2px;
}

/* ── SCAN BAR ── */
.scan-wrap {
  opacity: 0;
  animation: fadeUp 0.5s ease forwards 0.6s;
}

.scan-labels {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--grey);
  letter-spacing: 2px;
  margin-bottom: 6px;
}
.scan-labels #scanPct { color: var(--green-bright); }

.scan-track {
  height: 4px;
  background: #0d1f0d;
  border-radius: 2px;
  overflow: hidden;
}

.scan-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--green), var(--green-bright));
  border-radius: 2px;
}

/* ── NOTICE ── */
.notice-box {
  background: var(--panel);
  border: 1px solid var(--navy-light);
  border-left: 4px solid var(--red);
  padding: 22px 26px;
  line-height: 1.9;
  font-size: 14px;
  color: #c0c0c0;
  opacity: 0;
  animation: fadeUp 0.6s ease forwards 0.5s;
}
.notice-box strong  { color: var(--white); }
.notice-box .law    { color: var(--amber); }
.notice-box .penalty { color: var(--red-bright); font-weight: bold; }

/* ── DATA TABLE ── */
.data-panel {
  background: var(--panel);
  border: 1px solid var(--border);
  overflow: hidden;
  opacity: 0;
  animation: fadeUp 0.6s ease forwards 0.8s;
  transition: box-shadow 0.3s ease, border-color 0.3s ease;
}

/* Flash effect on re-capture */
.data-panel.recapture {
  border-color: var(--red-bright);
  box-shadow: 0 0 30px rgba(231,76,60,0.35);
  animation: none; /* don't fight the opacity animation */
}

.data-panel-header {
  background: var(--navy);
  padding: 12px 20px;
  font-family: 'Oswald', sans-serif;
  font-size: 13px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: #b0c4de;
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid var(--border);
}

.live-dot {
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--red-bright);
  flex-shrink: 0;
  animation: dotBlink 1s step-end infinite;
}
@keyframes dotBlink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }

.data-row {
  display: grid;
  grid-template-columns: 190px 1fr;
  border-bottom: 1px solid var(--border);
}
.data-row:last-child { border-bottom: none; }

.dl {
  padding: 15px 20px;
  font-size: 11px;
  letter-spacing: 2px;
  color: var(--grey);
  text-transform: uppercase;
  border-right: 1px solid var(--border);
  display: flex;
  align-items: center;
}

.dv {
  padding: 15px 20px;
  font-size: 15px;
  color: var(--white);
  display: flex;
  align-items: center;
  word-break: break-all;
}

.dv.loading {
  color: #2a3a2a;
  font-size: 13px;
  animation: pulse 1.2s ease-in-out infinite;
}
@keyframes pulse { 50% { opacity: 0.3; } }

.dv.ip-val {
  color: var(--green-bright);
  font-size: 24px;
  font-weight: bold;
  letter-spacing: 1px;
}

.dv.live-clock-val {
  color: var(--green-bright);
  font-size: 18px;
  font-weight: bold;
  letter-spacing: 3px;
}

.dv.status-val {
  color: var(--red-bright);
  font-size: 15px;
  font-weight: bold;
  letter-spacing: 2px;
}

.badge {
  display: inline-block;
  background: rgba(192,57,43,0.15);
  border: 1px solid #7b241c;
  color: #ff9999;
  font-size: 10px;
  letter-spacing: 2px;
  padding: 3px 10px;
  margin-left: 12px;
}

/* Session row — highlighted when updated */
.session-row .dv {
  transition: color 0.4s ease;
}
.session-row.updated .dv {
  color: var(--red-bright);
}

/* ── FOOTER ── */
.footer {
  text-align: center;
  font-size: 13px;
  color: var(--grey);
  letter-spacing: 1px;
  line-height: 2.3;
  opacity: 0;
  animation: fadeUp 0.6s ease forwards 1.2s;
}

.footer .ts     { font-size: 13px; color: #8a9bac; }
.footer .sealed {
  font-family: 'Oswald', sans-serif;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--red-bright);
  font-size: 13px;
  font-weight: 600;
}
.footer .addr { color: var(--grey); font-size: 12px; margin-top: 4px; }

/* ── RESPONSIVE ── */
@media (max-width: 580px) {
  .header-titles .dept { font-size: 17px; }
  .title-block h1 { font-size: 26px; }
  .data-row { grid-template-columns: 130px 1fr; }
  .dv.ip-val { font-size: 18px; }
  .dl, .dv { padding: 12px 14px; font-size: 13px; }
  .logo-pill { height: 54px; }
  .dci-logo { height: 38px; }
}
