@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;500;600;700;800&family=Rajdhani:wght@400;500;600;700&display=swap');

:root {
  --bg: #06040b;
  --panel: rgba(8, 5, 14, 0.78);
  --purple: #9f63ff;
  --purple-bright: #c99cff;
  --line: rgba(160, 94, 255, 0.46);
  --line-hot: rgba(188, 132, 255, 0.82);
  --text: #f3edff;
  --muted: #aaa0b7;
  --muted-2: #777080;
}

* { box-sizing: border-box; }
html, body { margin: 0; width: 100%; height: 100%; }
body {
  overflow: hidden;
  color: var(--text);
  background: var(--bg);
  font-family: "Rajdhani", Arial, sans-serif;
}

.kamino-bg {
  position: fixed;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(2,3,9,.05), rgba(3,2,8,.80)),
    url("../assets/kamino-bg.svg") center center / cover no-repeat;
  transform: scale(1.025);
  filter: saturate(.82) contrast(1.08);
}
.storm-overlay {
  position: fixed; inset: 0;
  background:
    radial-gradient(circle at 26% 18%, rgba(130,80,235,.18), transparent 30%),
    radial-gradient(circle at 78% 34%, rgba(65,90,145,.11), transparent 32%),
    linear-gradient(100deg, rgba(4,2,8,.80) 0%, rgba(9,5,15,.53) 45%, rgba(2,2,7,.83) 100%);
  pointer-events: none;
}
.bg-vignette {
  position: fixed; inset: -5%; pointer-events: none;
  box-shadow: inset 0 0 180px 70px rgba(0,0,0,.88);
}
.rain {
  position: fixed; inset: -40%; opacity: .13; pointer-events: none;
  transform: rotate(12deg);
  background-image: repeating-linear-gradient(
    90deg, transparent 0, transparent 34px,
    rgba(205,193,255,.4) 35px, transparent 36px, transparent 76px);
  animation: rainMove 2.8s linear infinite;
}
.rain-b { opacity: .06; transform: rotate(12deg) scale(1.3); animation-duration: 4.2s; animation-direction: reverse; }
.scanlines {
  position: fixed; inset: 0; pointer-events: none;
  background: repeating-linear-gradient(to bottom, rgba(255,255,255,.010) 0, rgba(255,255,255,.010) 1px, transparent 2px, transparent 5px);
  opacity: .42;
}

.shell {
  position: relative; z-index: 2;
  width: min(1190px, calc(100vw - 64px));
  height: calc(100vh - 92px);
  margin: 32px auto 0;
  display: flex; flex-direction: column; justify-content: center; gap: 17px;
}
.panel {
  position: relative;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(17,10,28,.88), rgba(6,4,11,.86));
  box-shadow: 0 0 0 1px rgba(88,35,160,.17), 0 0 24px rgba(127,55,236,.13), 0 20px 65px rgba(0,0,0,.42), inset 0 0 42px rgba(151,80,255,.028);
  backdrop-filter: blur(8px);
}
.panel::before {
  content: ""; position: absolute; top: -1px; left: 24px; width: 100px; height: 2px;
  background: linear-gradient(90deg, transparent, var(--purple-bright), transparent);
  box-shadow: 0 0 14px rgba(171,105,255,.55);
}

.hero { display: grid; grid-template-columns: 1.12fr 1fr; gap: 17px; }
.brand-block { min-height: 315px; overflow: hidden; }
.brand-content {
  position: relative; z-index: 2; height: 100%;
  padding: 32px 40px; display: flex; flex-direction: column; justify-content: center;
}
.republic-mark {
  position: absolute; z-index: 1; width: 430px; height: 430px;
  right: -115px; top: -72px; opacity: .055;
  filter: drop-shadow(0 0 25px rgba(163,99,255,.20)); transform: rotate(7deg);
}
.logo { width: 96px; height: 96px; object-fit: contain; margin-bottom: 14px; filter: drop-shadow(0 0 22px rgba(167,99,255,.34)); }
.eyebrow, .label { font-family: "Orbitron", Arial, sans-serif; text-transform: uppercase; letter-spacing: .21em; }
.eyebrow { color: var(--purple-bright); font-size: 11px; font-weight: 700; }
h1 {
  margin: 8px 0 0; font-family: "Orbitron", Arial, sans-serif;
  font-size: clamp(34px, 3.65vw, 57px); line-height: .98; letter-spacing: .018em;
  text-shadow: 0 0 25px rgba(174,106,255,.14);
}
.divider { width: 182px; height: 2px; margin: 19px 0 13px; background: linear-gradient(90deg, var(--purple), rgba(149,87,255,0)); box-shadow: 0 0 14px rgba(149,87,255,.48); }
.tagline { margin: 0; color: #b4abbc; font-size: 18px; letter-spacing: .07em; }
.glyph-strip { margin-top: 20px; color: rgba(196,151,255,.23); font-family: "Orbitron", sans-serif; font-size: 14px; letter-spacing: .55em; white-space: nowrap; }

.info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; }
.info-card {
  min-height: 152px; padding: 22px; display: flex; flex-direction: column; justify-content: center; overflow: hidden;
}
.info-card::after {
  content: ""; position: absolute; right: -25px; bottom: -50px; width: 110px; height: 110px;
  border: 1px solid rgba(163,96,255,.11); transform: rotate(45deg);
}
.label { color: var(--purple-bright); font-size: 9px; font-weight: 700; margin-bottom: 8px; }
.info-card strong {
  position: relative; z-index: 2; font-family: "Orbitron", Arial, sans-serif;
  font-size: 15px; font-weight: 600; overflow-wrap: anywhere;
}
.info-card small { position: relative; z-index: 2; margin-top: 6px; color: var(--muted-2); font-size: 13px; }
.player-card #steamId { font-family: "Rajdhani", Arial, sans-serif; }

.mission-strip {
  min-height: 78px; padding: 16px 28px;
  display: grid; grid-template-columns: minmax(210px,.55fr) 1px minmax(0,1.45fr);
  align-items: center; gap: 22px;
}
.mission-item { min-width: 0; }
.mission-item .label { display: block; margin-bottom: 5px; }
.mission-item strong {
  display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  color: #eee6fa; font-family: "Orbitron", Arial, sans-serif; font-size: 14px;
}
.mission-file strong { color: #cbb7e5; }
.mission-divider { width: 1px; height: 38px; background: linear-gradient(transparent, var(--line-hot), transparent); }

.loading-panel { padding: 20px 28px 19px; }
.status-row { display: flex; align-items: end; justify-content: space-between; gap: 26px; }
.status-copy { min-width: 0; }
.status-text { font-size: 20px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.percent-wrap { display: flex; align-items: baseline; gap: 8px; flex-shrink: 0; }
.percent-label { color: #756a80; font-family: "Orbitron", sans-serif; font-size: 8px; letter-spacing: .20em; }
.percent { color: var(--purple-bright); font-family: "Orbitron", Arial, sans-serif; font-size: 25px; font-weight: 700; text-shadow: 0 0 16px rgba(177,104,255,.42); }

.progress-shell {
  position: relative; height: 17px; margin-top: 14px; overflow: hidden;
  border: 1px solid rgba(165,99,255,.32); background: rgba(8,5,13,.92);
  clip-path: polygon(7px 0,100% 0,calc(100% - 7px) 100%,0 100%);
}
.progress-fill {
  position: absolute; inset: 0 auto 0 0; width: 0%; overflow: hidden;
  background: linear-gradient(90deg,#4b208b,#8848e4 43%,#bb80ff 75%,#d3aeff);
  box-shadow: 0 0 22px rgba(157,88,255,.45); transition: width .28s ease;
}
.progress-energy {
  position: absolute; inset: 0;
  background: linear-gradient(110deg,transparent 0%,rgba(255,255,255,.04) 35%,rgba(255,255,255,.38) 50%,rgba(255,255,255,.04) 65%,transparent 100%);
  animation: energySweep 1.9s linear infinite;
}
.segment-mask {
  position: absolute; inset: 0; pointer-events: none;
  background: repeating-linear-gradient(90deg,transparent 0,transparent 38px,rgba(4,2,8,.95) 39px,rgba(4,2,8,.95) 43px);
}
.progress-scan {
  position: absolute; top: -1px; bottom: -1px; width: 110px; transform: translateX(-130px);
  background: linear-gradient(90deg,transparent,rgba(212,176,255,.14),rgba(230,206,255,.45),rgba(212,176,255,.14),transparent);
  animation: scanner 2.7s linear infinite; mix-blend-mode: screen;
}
.download-row { margin-top: 9px; display: flex; justify-content: space-between; gap: 20px; color: var(--muted); font-size: 14px; }
#fileText { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.bottom-grid { display: grid; grid-template-columns: 1.45fr .8fr; gap: 17px; }
.transmission-card, .links-card { min-height: 112px; padding: 20px 27px; }
.transmission-head { display: flex; align-items: center; gap: 12px; }
.tip-kind {
  margin-top: -7px; padding: 3px 7px; border: 1px solid rgba(177,111,255,.28);
  color: #897d93; font-family: "Orbitron", sans-serif; font-size: 7px; letter-spacing: .15em;
}
.transmission-card p { margin: 3px 0 0; max-width: 780px; color: #d8d0e4; font-size: 17px; line-height: 1.42; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; }
.button {
  border: 1px solid var(--line-hot); padding: 10px 15px; cursor: pointer;
  font-family: "Orbitron", Arial, sans-serif; font-size: 10px; font-weight: 700;
  letter-spacing: .06em; text-decoration: none;
  transition: transform .15s ease, background .15s ease, box-shadow .15s ease;
}
.button:hover { transform: translateY(-1px); box-shadow: 0 0 17px rgba(153,78,255,.25); }
.primary { color: #fff; background: linear-gradient(180deg,rgba(145,80,248,.88),rgba(81,35,147,.88)); }
.secondary { color: #d7c4f7; background: rgba(255,255,255,.025); }

footer {
  position: fixed; left: 50%; bottom: 13px; transform: translateX(-50%); z-index: 3;
  color: #655d70; font-family: "Orbitron", Arial, sans-serif; font-size: 8px; letter-spacing: .20em; white-space: nowrap;
}
.footer-dot { margin: 0 9px; color: var(--purple); }

@keyframes rainMove { from { background-position: 0 0; } to { background-position: 110px 240px; } }
@keyframes energySweep { from { transform: translateX(-120%); } to { transform: translateX(120%); } }
@keyframes scanner { from { left: -130px; } to { left: calc(100% + 130px); } }

@media (max-width: 900px) {
  body { overflow-y: auto; }
  .shell { width: min(94vw,720px); height: auto; margin: 24px auto 70px; justify-content: flex-start; }
  .hero, .bottom-grid { grid-template-columns: 1fr; }
  .brand-block { min-height: 300px; }
  .info-card { min-height: 120px; }
  .mission-strip { grid-template-columns: 1fr; gap: 10px; }
  .mission-divider { width: 100%; height: 1px; }
}
@media (max-width: 560px) {
  .shell { width: calc(100vw - 24px); }
  .brand-content, .loading-panel, .transmission-card, .links-card { padding-left: 19px; padding-right: 19px; }
  .info-grid { grid-template-columns: 1fr; }
  .status-row, .download-row { align-items: flex-start; flex-direction: column; gap: 7px; }
  .progress-shell { height: 15px; }
}
