@import url("https://fonts.googleapis.com/css2?family=Exo+2:wght@400;500;600;700&family=Rajdhani:wght@500;600;700&display=swap");

:root {
  color-scheme: dark;
  font-family: "Exo 2", "Segoe UI", sans-serif;
  color: #edfaff;
  background: #020910;
  --cyan: #46e8ff;
  --cyan-soft: #8bf2ff;
  --mint: #64ffc4;
  --violet: #8c83ff;
  --panel: rgba(5, 23, 34, .78);
  --line: rgba(93, 216, 241, .2);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-height: 100vh; overflow-x: hidden; background: #020910; }
body::before {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: -3;
  background:
    linear-gradient(rgba(32, 169, 203, .035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(32, 169, 203, .035) 1px, transparent 1px);
  background-size: 54px 54px;
  mask-image: linear-gradient(to bottom, black 5%, transparent 75%);
}

.atmosphere { position: fixed; inset: 0; overflow: hidden; pointer-events: none; z-index: -2; }
.atmosphere::before { content: ""; position: absolute; width: 780px; height: 780px; left: -320px; top: -410px; border-radius: 50%; background: #0f7fa8; filter: blur(150px); opacity: .18; }
.atmosphere::after { content: ""; position: absolute; width: 620px; height: 620px; right: -250px; top: 140px; border-radius: 50%; background: #5539b6; filter: blur(170px); opacity: .13; }
.atmosphere i { position: absolute; width: 3px; height: 3px; background: var(--cyan); border-radius: 50%; box-shadow: 0 0 14px var(--cyan); animation: drift 9s ease-in-out infinite; }
.atmosphere i:nth-child(1) { left: 13%; top: 27%; }
.atmosphere i:nth-child(2) { left: 76%; top: 16%; animation-delay: -3s; }
.atmosphere i:nth-child(3) { left: 85%; top: 68%; animation-delay: -6s; }
@keyframes drift { 50% { transform: translateY(-26px); opacity: .25; } }

.topbar, main, footer { width: min(1240px, calc(100% - 36px)); margin-inline: auto; }
.topbar { height: 88px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.brand { display: flex; gap: 12px; align-items: center; color: inherit; text-decoration: none; }
.brand-logos { display: flex; align-items: center; gap: 7px; }
.brand-logos img { width: 48px; height: 48px; object-fit: contain; border-radius: 50%; filter: drop-shadow(0 0 11px rgba(70,232,255,.22)); }
.brand span:last-child { display: grid; }
.brand small { color: #7796a2; letter-spacing: .16em; font: 600 .68rem "Rajdhani"; }
.brand strong { font: 700 1.18rem "Rajdhani"; letter-spacing: .11em; }
.topbar nav { display: flex; align-items: center; gap: 10px; }
.topbar nav span, .topbar nav b { border: 1px solid var(--line); border-radius: 999px; padding: 8px 12px; color: #9ebac4; font: 600 .7rem "Rajdhani"; letter-spacing: .1em; }
.topbar nav b { color: #ffd26e; border-color: #f0bc483d; background: #f0bc480b; }
.pulse { display: inline-block; width: 7px; height: 7px; margin-right: 6px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 0 0 #64ffc488; animation: pulse 1.8s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 7px #64ffc400; } }

.audience { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)) auto; align-items: center; margin-top: 18px; border: 1px solid var(--line); background: rgba(5, 21, 30, .72); backdrop-filter: blur(14px); }
.audience span { min-height: 76px; display: grid; align-content: center; gap: 4px; padding: 13px 16px; border-right: 1px solid var(--line); }
.audience small { color: #6f929e; font: 600 .58rem "Rajdhani"; letter-spacing: .12em; }
.audience b { color: var(--mint); font: 700 1.45rem "Rajdhani"; font-variant-numeric: tabular-nums; }
.audience em { max-width: 235px; padding: 13px 16px; color: #587984; font-size: .6rem; font-style: normal; line-height: 1.5; }

.hero { min-height: 475px; display: grid; grid-template-columns: 1.15fr .85fr; align-items: center; gap: 50px; padding: 56px 5px 40px; }
.overline { color: var(--cyan); font: 700 .78rem "Rajdhani"; letter-spacing: .19em; }
.hero h1 { margin: 12px 0 18px; font: 600 clamp(3.1rem, 7vw, 6.4rem)/.84 "Rajdhani"; letter-spacing: -.035em; text-transform: uppercase; }
.hero h1 em { font-style: normal; color: transparent; -webkit-text-stroke: 1px #8defff; text-shadow: 0 0 34px #20d7f133; }
.hero-copy > p:not(.overline) { max-width: 670px; color: #9dbac4; line-height: 1.7; font-size: 1.02rem; }
.hero-badges { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 25px; }
.hero-badges span { padding: 8px 11px; border-left: 2px solid var(--cyan); background: linear-gradient(90deg, #27cfe814, transparent); color: #a8c7d0; font: 600 .68rem "Rajdhani"; letter-spacing: .12em; }

.core { display: grid; place-items: center; align-content: center; min-height: 360px; position: relative; }
.core::before { content: ""; position: absolute; width: 350px; height: 350px; border-radius: 50%; border: 1px solid #48dbef16; background: repeating-radial-gradient(circle, transparent 0 28px, #42e0f009 29px 30px); }
.core-radar { width: 235px; height: 235px; display: grid; place-items: center; position: relative; border: 1px solid #51e6f25c; border-radius: 50%; background: radial-gradient(circle, #36d9ef22, #03141e 65%); box-shadow: 0 0 90px #18cce72b, inset 0 0 55px #17a9c325; }
.core-radar::before { content: ""; position: absolute; inset: 13px; border: 1px dashed #61edff55; border-radius: 50%; animation: rotate 18s linear infinite; }
.core-radar::after { content: ""; position: absolute; inset: 34px; border: 1px solid #68eefa25; border-radius: 50%; }
.core-radar span { position: absolute; width: 8px; height: 8px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 18px var(--mint); }
.core-radar span:nth-child(1) { left: 18%; top: 37%; }
.core-radar span:nth-child(2) { right: 16%; top: 50%; background: var(--violet); box-shadow: 0 0 18px var(--violet); }
.core-radar span:nth-child(3) { bottom: 17%; left: 49%; }
.core-radar b { font: 700 5.4rem "Rajdhani"; color: white; text-shadow: 0 0 30px var(--cyan); }
.core > p { margin: 17px 0 3px; color: var(--cyan-soft); font: 700 .76rem "Rajdhani"; letter-spacing: .2em; }
.core > small { color: #5f7f8b; letter-spacing: .08em; font-size: .58rem; }
@keyframes rotate { to { transform: rotate(360deg); } }

.telemetry { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--line); background: rgba(5, 21, 30, .68); backdrop-filter: blur(14px); }
.telemetry article { min-height: 92px; display: flex; align-items: center; gap: 12px; padding: 17px; border-right: 1px solid var(--line); }
.telemetry article:last-child { border-right: 0; }
.telemetry article > span { color: #496b77; font: 600 .78rem "Rajdhani"; }
.telemetry div { display: grid; gap: 4px; flex: 1; }
.telemetry small { color: var(--cyan); font: 600 .62rem "Rajdhani"; letter-spacing: .13em; }
.telemetry b { font-size: .88rem; font-weight: 600; }
.telemetry i { font: normal 600 .56rem "Rajdhani"; color: var(--mint); }

.hamclock { margin-top: 26px; overflow: hidden; border: 1px solid var(--line); border-radius: 4px; background: rgba(3, 16, 27, .88); box-shadow: 0 24px 60px #0006; }
.hamclock-head { min-height: 72px; display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 22px; padding: 13px 18px; border-bottom: 1px solid var(--line); background: linear-gradient(90deg, rgba(8,37,55,.96), rgba(4,19,32,.96)); }
.hamclock-head small { color: #5e8795; font: 600 .6rem "Rajdhani"; letter-spacing: .16em; }
.hamclock-head h2 { margin: 2px 0 0; color: var(--cyan-soft); font: 700 1.2rem "Rajdhani"; letter-spacing: .08em; }
.hamclock-head a { padding: 8px 11px; border: 1px solid #286681; color: #8defff; text-decoration: none; font: 700 .65rem "Rajdhani"; letter-spacing: .08em; }
.map-clocks { display: flex; gap: 8px; }
.map-clocks span { display: grid; gap: 2px; min-width: 112px; padding: 7px 10px; border: 1px solid var(--line); color: #6f929e; font: 600 .56rem "Rajdhani"; letter-spacing: .1em; }
.map-clocks b { color: #e8fbff; font: 700 1rem "Rajdhani"; letter-spacing: .08em; }
#hamclock-map { height: clamp(330px, 42vw, 550px); background: radial-gradient(circle at 55% 42%, #0c2944, #06182c 52%, #020b18); }
.hamclock > p { margin: 0; padding: 8px 12px; color: #587984; font-size: .62rem; text-align: center; }
.leaflet-container { font-family: "Exo 2", sans-serif; }
.leaflet-tile-pane { filter: invert(.91) hue-rotate(180deg) brightness(.62) contrast(1.2) saturate(.48); }
.leaflet-control-attribution { background: rgba(2,11,23,.82) !important; color: #7893ad !important; font-size: 8px !important; }
.leaflet-control-attribution a { color: #65cbe3 !important; }
.leaflet-control-zoom a { border: 0 !important; background: rgba(6,24,43,.92) !important; color: #d9f8ff !important; }
.leaflet-control-scale-line { border-color: #7ca7bc !important; background: rgba(3,14,27,.72) !important; color: #c8e8f4 !important; }
.xe3vk-map-marker { background: none; border: 0; }
.xe3vk-map-marker span { position: absolute; left: 4px; top: 10px; width: 15px; height: 15px; border: 3px solid white; border-radius: 50%; background: var(--mint); box-shadow: 0 0 0 7px rgba(100,255,196,.16), 0 0 22px var(--mint); animation: map-pulse 2s ease-in-out infinite; }
.xe3vk-map-marker b { position: absolute; left: 27px; top: 7px; padding: 4px 8px; border: 1px solid rgba(90,218,224,.4); background: rgba(3,18,34,.9); color: #efffff; font-size: 10px; letter-spacing: .06em; white-space: nowrap; }
.radio-route { animation: route-flow 7s linear infinite; }
@keyframes map-pulse { 50% { box-shadow: 0 0 0 11px rgba(100,255,196,.04), 0 0 30px var(--mint); } }
@keyframes route-flow { to { stroke-dashoffset: -56; } }

.chat-panel { margin-top: 26px; }
.chat-icon { gap: 4px; }
.chat-icon i { width: 5px; height: 5px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 9px var(--cyan); }
.chat-messages { min-height: 180px; max-height: 360px; overflow: auto; display: grid; align-content: start; gap: 10px; padding: 15px; border: 1px solid #1d4857; background: rgba(1, 12, 20, .78); }
.chat-message { width: min(84%, 760px); display: grid; gap: 5px; margin: 0; padding: 12px 14px; border: 1px solid #17465a; background: #082233; color: #b4ced6; line-height: 1.5; white-space: pre-wrap; }
.chat-message.user { justify-self: end; border-color: #236663; background: #0b3438; }
.chat-message strong { color: var(--cyan); font: 600 .62rem "Rajdhani"; letter-spacing: .12em; }
.chat-message.user strong { color: var(--mint); }
.chat-message.pending { color: #708f99; font-style: italic; }
.chat-form { display: grid; grid-template-columns: minmax(0, 1fr) 145px; gap: 9px; margin-top: 10px; }
.chat-form input { margin: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }

.command-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; padding: 26px 0 0; }
.panel { position: relative; overflow: hidden; background: linear-gradient(145deg, rgba(7, 28, 40, .91), rgba(3, 15, 24, .86)); border: 1px solid var(--line); border-radius: 4px; padding: 23px; box-shadow: 0 24px 60px #0006; backdrop-filter: blur(18px); }
.panel::after { content: ""; position: absolute; left: 0; top: 0; width: 72px; height: 2px; background: var(--cyan); box-shadow: 0 0 18px var(--cyan); }
.panel-head { display: flex; gap: 13px; align-items: center; }
.panel-head > div:nth-child(2) { flex: 1; }
.panel-head small { color: #5e8795; font: 600 .61rem "Rajdhani"; letter-spacing: .15em; }
.panel-head h2 { margin: 2px 0 0; font: 600 1.45rem "Rajdhani"; letter-spacing: .02em; }
.panel-head > span { border: 1px solid #2b6577; background: #092936; color: #80dff0; border-radius: 999px; padding: 7px 10px; font: 600 .65rem "Rajdhani"; text-transform: uppercase; letter-spacing: .08em; }
#voice-status[data-state="listening"] { color: var(--mint); border-color: #49eebc66; }
#voice-status[data-state="thinking"] { color: #ffd26e; border-color: #ffd26e55; }
#voice-status[data-state="speaking"] { color: #a9a2ff; border-color: #8c83ff66; }
.panel-icon { width: 46px; height: 46px; display: flex; justify-content: center; align-items: center; gap: 3px; border: 1px solid #2a6577; background: #082731; }
.sound i { width: 3px; height: 13px; background: var(--cyan); animation: wave 1s ease-in-out infinite alternate; }
.sound i:nth-child(2), .sound i:nth-child(4) { height: 24px; animation-delay: -.3s; }
.sound i:nth-child(3) { height: 32px; animation-delay: -.6s; }
@keyframes wave { to { transform: scaleY(.42); opacity: .55; } }
.eye i { width: 24px; height: 15px; border: 1px solid var(--cyan); border-radius: 50% 50% 48% 48%; position: relative; }
.eye i::after { content: ""; position: absolute; width: 7px; height: 7px; inset: 3px auto auto 8px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 10px var(--cyan); }
.description { color: #91afb9; line-height: 1.55; font-size: .85rem; margin: 18px 0 15px; }
.buttons { display: flex; gap: 9px; flex-wrap: wrap; margin-bottom: 15px; }
button { min-height: 42px; border: 1px solid #2f697c; background: #0b2a37; color: #d9f7ff; padding: 10px 14px; font: 600 .74rem "Exo 2"; text-transform: uppercase; letter-spacing: .05em; cursor: pointer; transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease; }
button:hover:not(:disabled) { transform: translateY(-1px); border-color: var(--cyan); box-shadow: 0 0 22px #20d9ef1b; }
button.primary { color: #001217; border-color: var(--cyan); background: linear-gradient(100deg, #58efff, #62ffc7); box-shadow: 0 0 25px #3ae3f52b; }
button.secondary { background: #082431; }
button.full { width: 100%; margin-bottom: 12px; }
button:disabled { opacity: .35; cursor: not-allowed; }
.mic-dot { display: inline-block; width: 7px; height: 7px; margin-right: 6px; border-radius: 50%; background: #001217; }
.transcript, .result { min-height: 190px; max-height: 300px; overflow: auto; border: 1px solid #1d4857; background: rgba(1, 12, 20, .78); padding: 14px; line-height: 1.5; scrollbar-color: #2b788a transparent; }
.transcript p { display: grid; gap: 5px; padding-left: 12px; border-left: 1px solid #27798b; }
.transcript strong { color: var(--cyan); font: 600 .62rem "Rajdhani"; letter-spacing: .12em; }
.transcript span, .result { color: #a9c5ce; font-size: .83rem; }
.viewport { position: relative; display: grid; place-items: center; min-height: 190px; margin-bottom: 13px; overflow: hidden; border: 1px solid #1d4857; background: radial-gradient(circle, #0d3844 0, #03131c 65%); }
.viewport::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: repeating-linear-gradient(to bottom, transparent 0 3px, #50e9ff08 4px); }
.viewport video { width: 100%; max-height: 280px; object-fit: contain; z-index: 2; }
.viewport:has(video:not([hidden])) .viewport-empty { display: none; }
.viewport-empty { display: grid; place-items: center; gap: 12px; color: #50727d; font: 600 .62rem "Rajdhani"; letter-spacing: .13em; }
.viewport-empty i { width: 42px; height: 42px; border: 1px dashed #3a7486; border-radius: 50%; animation: rotate 8s linear infinite; }
.corner { position: absolute; width: 16px; height: 16px; z-index: 3; border-color: var(--cyan); opacity: .55; }
.corner.a { left: 8px; top: 8px; border-left: 1px solid; border-top: 1px solid; }
.corner.b { right: 8px; top: 8px; border-right: 1px solid; border-top: 1px solid; }
.corner.c { left: 8px; bottom: 8px; border-left: 1px solid; border-bottom: 1px solid; }
.corner.d { right: 8px; bottom: 8px; border-right: 1px solid; border-bottom: 1px solid; }
label { display: block; color: #638692; margin: 9px 0 6px; font: 600 .61rem "Rajdhani"; letter-spacing: .14em; }
input { width: 100%; min-height: 44px; border: 1px solid #215161; background: #041923; color: #cae7ee; padding: 11px; font: .78rem "Exo 2"; margin-bottom: 9px; outline: none; }
input:focus { border-color: var(--cyan); box-shadow: 0 0 0 2px #4be8ff10; }

footer { display: flex; justify-content: space-between; gap: 20px; align-items: center; padding: 23px 0 36px; color: #58737d; font-size: .7rem; }
footer div { display: flex; align-items: center; gap: 11px; }
footer p { margin: 0; }
.update-note { color: #7ea7b4; white-space: nowrap; }
.brand-mini { color: var(--cyan); font: 700 .75rem "Rajdhani"; letter-spacing: .12em; }

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; padding-top: 45px; }
  .core { min-height: 315px; }
  .telemetry { grid-template-columns: 1fr 1fr; }
  .telemetry article:nth-child(2) { border-right: 0; }
  .telemetry article:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .command-grid { grid-template-columns: 1fr; }
  .hamclock-head { grid-template-columns: 1fr auto; }
  .hamclock-head a { grid-column: 1 / -1; text-align: center; }
  .audience { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .audience span:nth-child(2) { border-right: 0; }
  .audience span:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .audience em { grid-column: 1 / -1; max-width: none; border-top: 1px solid var(--line); }
}

@media (max-width: 560px) {
  .topbar { height: 76px; }
  .topbar nav span { display: none; }
  .brand-logos img { width: 38px; height: 38px; }
  .brand strong { font-size: .85rem; }
  .hero { padding-top: 34px; }
  .hero h1 { font-size: 3.25rem; }
  .core { transform: scale(.86); margin-block: -25px; }
  .telemetry { grid-template-columns: 1fr; }
  .telemetry article { border-right: 0; border-bottom: 1px solid var(--line); }
  .panel-head { align-items: flex-start; flex-wrap: wrap; }
  .panel-head > span { margin-left: 59px; }
  footer { align-items: flex-start; flex-direction: column; }
  .update-note { white-space: normal; }
  .hamclock-head { grid-template-columns: 1fr; }
  .map-clocks { width: 100%; }
  .map-clocks span { min-width: 0; flex: 1; }
  #hamclock-map { height: 310px; }
  .chat-form { grid-template-columns: 1fr; }
  .chat-message { width: 94%; }
  .audience { margin-top: 12px; }
  .audience span { min-height: 66px; padding: 10px; }
  .audience small { font-size: .5rem; }
  .audience b { font-size: 1.2rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; }
}
