:root {
  --bg: radial-gradient(circle at 30% 20%, rgba(56, 189, 248, 0.15), transparent 30%),
    radial-gradient(circle at 80% 30%, rgba(168, 85, 247, 0.12), transparent 30%),
    #0b1221;
  --orb: linear-gradient(135deg, #38bdf8, #22d3ee, #60a5fa);
  --text: #e2e8f0;
  --muted: #94a3b8;
  --card: rgba(255, 255, 255, 0.06);
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: "Space Grotesk", "Segoe UI", sans-serif;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  overflow: hidden;
}

.chrome {
  position: fixed;
  top: 18px;
  left: 18px;
  right: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.brand {
  font-weight: 700;
  letter-spacing: -0.01em;
}

.hamburger {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  cursor: pointer;
  box-shadow: var(--shadow);
}

.menu {
  position: absolute;
  top: 54px;
  right: 0;
  background: rgba(12, 18, 32, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 220px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}

.menu.hidden {
  display: none;
}

.menu-item {
  width: 100%;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 12px;
  font-weight: 700;
  cursor: pointer;
}

.menu-item.primary {
  background: linear-gradient(120deg, #38bdf8, #22d3ee);
  color: #0b1221;
  border: none;
}

.menu-item.file {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.menu-item.file input {
  color: var(--text);
}

.downloads a {
  color: #7dd3fc;
  font-size: 14px;
  display: block;
}

.center {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  margin-top: 60px;
}

.orb-wrap {
  position: relative;
}

.orb-wrap {
  position: relative;
}

.orb {
  width: 220px;
  height: 220px;
  border-radius: 50%;
  border: none;
  background: var(--orb);
  box-shadow: 0 25px 50px rgba(56, 189, 248, 0.45), 0 0 0 12px rgba(56, 189, 248, 0.08);
  color: #0b1221;
  font-weight: 700;
  font-size: 16px;
  letter-spacing: 0.01em;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.orb::after {
  content: "";
  position: absolute;
  inset: 14px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
}

.orb span {
  position: relative;
  z-index: 1;
}

.progress {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
}

.progress svg {
  width: 160px;
  height: 160px;
  transform: rotate(-90deg);
  filter: drop-shadow(0 6px 16px rgba(34, 197, 94, 0.5));
}

.progress circle {
  fill: none;
  stroke: rgba(255, 255, 255, 0.2);
  stroke-width: 10;
  stroke-linecap: round;
}

.progress #progressCircle {
  stroke: #22c55e;
  stroke-dasharray: 100;
  stroke-dashoffset: 100;
  transition: stroke-dashoffset 120ms linear;
}

.progress-text {
  position: absolute;
  color: #e2fbe1;
  font-weight: 800;
  text-shadow: 0 0 8px rgba(0, 0, 0, 0.4), 0 0 16px rgba(0, 0, 0, 0.3);
}

.orb.show-progress span {
  opacity: 0;
}

.status {
  font-weight: 600;
  color: var(--muted);
  text-align: center;
}

.log {
  position: fixed;
  bottom: 16px;
  left: 16px;
  right: 16px;
  max-height: 120px;
  overflow: auto;
  background: rgba(10, 22, 38, 0.85);
  border-radius: 12px;
  padding: 10px;
  font-family: "JetBrains Mono", "SFMono-Regular", monospace;
  color: #cbd5e1;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

/* Glow bump indicator */
#glow {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 10;
  --glow-strength: 0;
  --glow-color: rgba(56, 189, 248, 0.35);
}

#glow::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: var(--glow-strength);
  transition: opacity 120ms ease, background 120ms ease;
}

#glow.left::after {
  background: linear-gradient(90deg, var(--glow-color), transparent 45%);
}

#glow.right::after {
  background: linear-gradient(270deg, var(--glow-color), transparent 45%);
}

#glow.up::after {
  background: linear-gradient(180deg, var(--glow-color), transparent 45%);
}

#glow.down::after {
  background: linear-gradient(0deg, var(--glow-color), transparent 45%);
}

.dialog-title {
  font-weight: 700;
  margin-bottom: 12px;
}

.dialog-actions {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

dialog {
  border: none;
  border-radius: 14px;
  padding: 16px;
  background: rgba(12, 18, 32, 0.95);
  color: var(--text);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}

.dialog-title {
  font-weight: 700;
  margin-bottom: 12px;
}

.dialog-actions {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

dialog {
  border: none;
  border-radius: 14px;
  padding: 16px;
  background: rgba(12, 18, 32, 0.95);
  color: var(--text);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}

.receive-progress {
  margin-top: 12px;
  display: grid;
  place-items: center;
}

.receive-progress svg {
  width: 120px;
  height: 120px;
  transform: rotate(-90deg);
}

.receive-progress circle {
  fill: none;
  stroke: rgba(255, 255, 255, 0.12);
  stroke-width: 10;
  stroke-linecap: round;
}

#receiveCircle {
  stroke: #22d3ee;
  stroke-dasharray: 100;
  stroke-dashoffset: 100;
  transition: stroke-dashoffset 120ms linear;
}

@media (max-width: 640px) {
  .orb {
    width: 190px;
    height: 190px;
  }
  .log {
    font-size: 12px;
  }
}
