:root {
  --bg: #050816;
  --bg-soft: #050816;
  --bg-card: rgba(9, 11, 26, 0.92);
  --bg-chip: rgba(15, 23, 42, 0.9);
  --accent: #4fd1c5;
  --accent-soft: rgba(79, 209, 197, 0.16);
  --accent-strong: #22c55e;
  --text-main: #f9fafb;
  --text-soft: #9ca3af;
  --border-subtle: rgba(148, 163, 184, 0.35);
  --shadow-soft: 0 22px 60px rgba(15, 23, 42, 0.8);
  --danger: #fb7185;
  --radius-xl: 24px;
  --radius-lg: 16px;
  --radius-pill: 999px;
  --blur: 22px;
  --transition-fast: 180ms ease-out;
  color-scheme: dark;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text",
    "Segoe UI", sans-serif;
}

:root[data-theme="light"] {
  --bg: #eef2ff;
  --bg-soft: #e0e7ff;
  --bg-card: rgba(248, 250, 252, 0.94);
  --bg-chip: rgba(226, 232, 240, 0.9);
  --accent: #0ea5e9;
  --accent-soft: rgba(14, 165, 233, 0.12);
  --accent-strong: #16a34a;
  --text-main: #020617;
  --text-soft: #4b5563;
  --border-subtle: rgba(148, 163, 184, 0.55);
  --shadow-soft: 0 18px 45px rgba(15, 23, 42, 0.18);
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background:
    radial-gradient(circle at 0% 0%, rgba(79, 209, 197, 0.14), transparent 52%),
    radial-gradient(circle at 100% 100%, rgba(59, 130, 246, 0.18), transparent 55%),
    linear-gradient(145deg, var(--bg-soft), var(--bg));
  color: var(--text-main);
  -webkit-font-smoothing: antialiased;
}

.backdrop-orbs {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: -1;
}

.orb {
  position: absolute;
  border-radius: 999px;
  filter: blur(40px);
  opacity: 0.6;
  mix-blend-mode: screen;
  transform-origin: center;
  animation: float-orb 18s ease-in-out infinite alternate;
}

.orb-1 {
  width: 260px;
  height: 260px;
  top: -60px;
  left: -40px;
  background: radial-gradient(circle, rgba(79, 209, 197, 0.85), transparent 70%);
  animation-duration: 20s;
}

.orb-2 {
  width: 260px;
  height: 260px;
  bottom: -80px;
  right: -40px;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.9), transparent 70%);
  animation-duration: 24s;
}

.orb-3 {
  width: 200px;
  height: 200px;
  top: 40%;
  right: 20%;
  background: radial-gradient(circle, rgba(236, 72, 153, 0.6), transparent 70%);
  animation-duration: 28s;
}

@keyframes float-orb {
  0% {
    transform: translate3d(0, 0, 0) scale(1);
    opacity: 0.55;
  }
  50% {
    transform: translate3d(20px, -24px, 0) scale(1.05);
    opacity: 0.9;
  }
  100% {
    transform: translate3d(-12px, 22px, 0) scale(1.02);
    opacity: 0.7;
  }
}

.app-shell {
  width: 100%;
  max-width: 980px;
  position: relative;
}

.app-shell::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: calc(var(--radius-xl) + 8px);
  background: linear-gradient(
    135deg,
    rgba(148, 163, 184, 0.24),
    rgba(79, 209, 197, 0.6),
    rgba(59, 130, 246, 0.45)
  );
  opacity: 0.22;
  z-index: -1;
  filter: blur(1px);
}

.app-surface {
  border-radius: var(--radius-xl);
  background: radial-gradient(circle at top left, rgba(15, 23, 42, 0.68), transparent 60%),
    radial-gradient(circle at bottom right, rgba(15, 23, 42, 0.7), transparent 58%),
    var(--bg-card);
  padding: 18px 20px 20px;
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(var(--blur));
  border: 1px solid rgba(148, 163, 184, 0.36);
}

:root[data-theme="light"] .app-surface {
  background: linear-gradient(145deg, rgba(248, 250, 252, 0.96), rgba(241, 245, 249, 0.96));
}

.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-logo {
  width: 32px;
  height: 32px;
  border-radius: 12px;
  background: radial-gradient(circle at 30% 20%, #ffffff, rgba(248, 250, 252, 0.35)),
    conic-gradient(from 210deg, #22c55e, #0ea5e9, #8b5cf6, #22c55e);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.7);
  position: relative;
  overflow: hidden;
}

.brand-logo::after {
  content: "";
  position: absolute;
  inset: 4px;
  border-radius: 10px;
  background: radial-gradient(circle at 10% 0%, rgba(255, 255, 255, 0.85), transparent 68%);
  opacity: 0.75;
  mix-blend-mode: screen;
}

.brand-logo-symbol {
  position: relative;
  width: 18px;
  height: 18px;
  border-radius: 6px;
  border: 2px solid rgba(15, 23, 42, 0.92);
  background: rgba(15, 23, 42, 0.85);
  box-shadow: 0 0 0 1px rgba(148, 163, 184, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
}

.brand-logo-symbol::before,
.brand-logo-symbol::after {
  content: "";
  position: absolute;
  width: 60%;
  height: 2px;
  border-radius: 999px;
  background: var(--accent);
}

.brand-logo-symbol::before {
  top: 4px;
  left: 50%;
  transform: translateX(-50%);
}

.brand-logo-symbol::after {
  bottom: 4px;
  left: 50%;
  transform: translateX(-50%);
  opacity: 0.6;
}

.brand-text-main {
  font-weight: 600;
  letter-spacing: 0.03em;
  font-size: 15px;
  display: flex;
  align-items: baseline;
  gap: 4px;
}

.brand-text-main span.domain {
  opacity: 0.9;
}

.brand-text-main span.suffix {
  font-weight: 500;
  font-size: 12px;
  padding: 2px 7px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.5);
  background: rgba(15, 23, 42, 0.75);
  color: var(--accent);
}

:root[data-theme="light"] .brand-text-main span.suffix {
  background: rgba(255, 255, 255, 0.9);
  border-color: rgba(148, 163, 184, 0.65);
}

.brand-subline {
  font-size: 11px;
  color: var(--text-soft);
  text-transform: uppercase;
  letter-spacing: 0.16em;
}

.header-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  border-radius: var(--radius-pill);
  background: rgba(15, 23, 42, 0.82);
  border: 1px solid rgba(148, 163, 184, 0.5);
  font-size: 11px;
  color: var(--text-soft);
  backdrop-filter: blur(18px);
}

:root[data-theme="light"] .pill {
  background: rgba(248, 250, 252, 0.9);
}

.pill-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--accent-strong);
  box-shadow: 0 0 0 6px rgba(34, 197, 94, 0.25);
}

.pill-label {
  text-transform: uppercase;
  letter-spacing: 0.16em;
}

.lang-switcher {
  display: inline-flex;
  align-items: center;
  padding: 3px;
  border-radius: var(--radius-pill);
  background: var(--bg-chip);
  border: 1px solid rgba(148, 163, 184, 0.55);
  backdrop-filter: blur(18px);
}

:root[data-theme="light"] .lang-switcher {
  background: rgba(241, 245, 249, 0.9);
}

.lang-btn {
  border: none;
  background: transparent;
  font-size: 11px;
  padding: 5px 9px;
  border-radius: var(--radius-pill);
  color: var(--text-soft);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  cursor: pointer;
  transition: background var(--transition-fast), color var(--transition-fast),
    transform 120ms ease-out;
  min-width: 38px;
  text-align: center;
}

.lang-btn.is-active {
  background: var(--accent-soft);
  color: var(--accent);
  transform: translateY(-0.5px);
}

.lang-btn:not(.is-active):hover {
  background: rgba(148, 163, 184, 0.15);
  transform: translateY(-0.5px);
}

.theme-toggle {
  border: none;
  background: var(--bg-chip);
  border-radius: 999px;
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  margin-left: 4px;
  box-shadow: 0 0 0 1px rgba(148, 163, 184, 0.5);
  font-size: 15px;
  transition: background var(--transition-fast), transform 120ms ease-out,
    box-shadow var(--transition-fast), color var(--transition-fast);
  color: var(--text-soft);
}

:root[data-theme="light"] .theme-toggle {
  background: rgba(248, 250, 252, 0.9);
}

.theme-toggle:hover {
  transform: translateY(-1px);
  background: var(--accent-soft);
  color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
}

.layout {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 2.3fr);
  gap: 16px;
}

@media (max-width: 840px) {
  .layout {
    grid-template-columns: minmax(0, 1fr);
  }
  .app-surface {
    padding: 16px 14px 16px;
  }
  body {
    padding: 14px;
  }
}

.status-card {
  border-radius: var(--radius-lg);
  padding: 18px 18px 16px;
  border: 1px solid rgba(148, 163, 184, 0.55);
  background: linear-gradient(
    145deg,
    rgba(15, 23, 42, 0.7),
    rgba(15, 23, 42, 0.94)
  );
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.85);
  position: relative;
  overflow: hidden;
}

:root[data-theme="light"] .status-card {
  background: linear-gradient(
    145deg,
    rgba(248, 250, 252, 0.96),
    rgba(241, 245, 249, 0.96)
  );
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.18);
}

.status-pill-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-bottom: 10px;
}

.status-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 9px;
  border-radius: var(--radius-pill);
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.5);
  font-size: 11px;
  color: var(--text-soft);
  text-transform: uppercase;
  letter-spacing: 0.16em;
}

:root[data-theme="light"] .status-label {
  background: rgba(248, 250, 252, 0.94);
}

.status-label-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--danger);
  box-shadow: 0 0 0 5px rgba(248, 113, 113, 0.22);
}

.status-label-text {
  white-space: nowrap;
}

.status-id {
  font-size: 11px;
  color: var(--text-soft);
  opacity: 0.9;
}

.status-title {
  font-size: 22px;
  margin: 0 0 4px;
  letter-spacing: 0.02em;
}

.status-lead {
  margin: 0 0 12px;
  font-size: 13px;
  line-height: 1.55;
  color: var(--text-soft);
}

.meter-block {
  margin-bottom: 14px;
}

.meter-label-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 3px;
  font-size: 11px;
  color: var(--text-soft);
}

.meter-percent {
  font-variant-numeric: tabular-nums;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.meter-shell {
  width: 100%;
  height: 9px;
  border-radius: 999px;
  background: radial-gradient(circle at top, rgba(15, 23, 42, 0.9), rgba(15, 23, 42, 1));
  border: 1px solid rgba(148, 163, 184, 0.7);
  padding: 1px;
  overflow: hidden;
}

:root[data-theme="light"] .meter-shell {
  background: radial-gradient(circle at top, rgba(226, 232, 240, 0.92), rgba(226, 232, 240, 1));
}

.meter-fill {
  width: 100%;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--danger), #f97316, var(--accent));
  transform-origin: left center;
  animation: meter-pulse 3.2s ease-in-out infinite;
}

@keyframes meter-pulse {
  0% {
    transform: scaleX(0.35);
  }
  38% {
    transform: scaleX(0.94);
  }
  68% {
    transform: scaleX(0.68);
  }
  100% {
    transform: scaleX(0.8);
  }
}

.countdown-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
  font-size: 12px;
}

.countdown-label {
  color: var(--text-soft);
}

.countdown-timer {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  padding: 4px 9px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(148, 163, 184, 0.6);
  background: rgba(15, 23, 42, 0.9);
}

:root[data-theme="light"] .countdown-timer {
  background: rgba(248, 250, 252, 0.96);
}

.info-block {
  border-radius: 12px;
  border: 1px dashed rgba(148, 163, 184, 0.6);
  background: linear-gradient(
    135deg,
    rgba(15, 23, 42, 0.86),
    rgba(15, 23, 42, 0.96)
  );
  padding: 9px 10px 9px;
  font-size: 11px;
  color: var(--text-soft);
}

:root[data-theme="light"] .info-block {
  background: rgba(248, 250, 252, 0.98);
}

.info-title {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  margin-bottom: 4px;
  color: var(--text-main);
  opacity: 0.8;
}

.info-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.info-list li {
  display: flex;
  gap: 6px;
  align-items: flex-start;
  margin-top: 3px;
  line-height: 1.4;
}

.info-bullet {
  width: 4px;
  height: 4px;
  margin-top: 5px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.9);
}

.stay-hint {
  margin-top: 8px;
  font-size: 11px;
  color: var(--text-soft);
}

.grid-queue {
  border-radius: var(--radius-lg);
  border: 1px dashed rgba(148, 163, 184, 0.55);
  background: radial-gradient(circle at top left, rgba(79, 209, 197, 0.08), transparent 60%),
    radial-gradient(circle at bottom right, rgba(59, 130, 246, 0.12), transparent 55%),
    rgba(15, 23, 42, 0.9);
  padding: 12px 11px 10px;
  font-size: 11px;
  color: var(--text-soft);
  position: relative;
  overflow: hidden;
}

:root[data-theme="light"] .grid-queue {
  background: radial-gradient(circle at top left, rgba(79, 209, 197, 0.1), transparent 60%),
    radial-gradient(circle at bottom right, rgba(59, 130, 246, 0.16), transparent 55%),
    rgba(248, 250, 252, 0.96);
}

.grid-queue-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-bottom: 6px;
}

.queue-title {
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 10px;
  color: var(--text-soft);
}

.queue-summary {
  font-variant-numeric: tabular-nums;
  font-size: 10px;
  color: var(--accent);
}

.queue-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 4px;
}

.queue-item {
  border-radius: 11px;
  border: 1px solid rgba(148, 163, 184, 0.6);
  background: rgba(15, 23, 42, 0.96);
  padding: 6px 7px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.7);
  transform-origin: center;
  animation: float-row 7s ease-in-out infinite;
}

:root[data-theme="light"] .queue-item {
  background: rgba(248, 250, 252, 0.98);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.16);
}

.queue-item:nth-child(2) {
  animation-duration: 8s;
  animation-delay: 1.2s;
}

.queue-item:nth-child(3) {
  animation-duration: 9s;
  animation-delay: 2.1s;
}

@keyframes float-row {
  0% {
    transform: translateY(0) scale(1);
    opacity: 0.98;
  }
  50% {
    transform: translateY(-3px) scale(1.01);
    opacity: 1;
  }
  100% {
    transform: translateY(0) scale(1);
    opacity: 0.98;
  }
}

.file-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.file-title {
  font-size: 11px;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 190px;
}

.file-sub {
  font-size: 10px;
  color: var(--text-soft);
  display: flex;
  align-items: center;
  gap: 6px;
}

.file-status-tag {
  border-radius: var(--radius-pill);
  padding: 2px 6px;
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  background: rgba(34, 197, 94, 0.1);
  color: var(--accent);
  border: 1px solid rgba(34, 197, 94, 0.35);
}

.file-icon {
  width: 26px;
  height: 26px;
  border-radius: 9px;
  background: radial-gradient(circle at top left, #f9fafb, rgba(248, 250, 252, 0.7)),
    linear-gradient(135deg, #0ea5e9, #22c55e);
  position: relative;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.9);
  flex-shrink: 0;
}

:root[data-theme="light"] .file-icon {
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.2);
}

.file-icon::before {
  content: "";
  position: absolute;
  inset: 5px 6px 7px;
  border-radius: 6px;
  background: rgba(15, 23, 42, 0.95);
}

.file-icon::after {
  content: "";
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 7px;
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(90deg, #fb7185, #f97316, #22c55e);
}

.file-meter-shell {
  width: 70px;
  border-radius: 999px;
  height: 5px;
  background: rgba(15, 23, 42, 0.9);
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.7);
}

:root[data-theme="light"] .file-meter-shell {
  background: rgba(248, 250, 252, 0.98);
}

.file-meter-fill {
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, var(--accent), #0ea5e9);
  transform-origin: left center;
  animation: file-meter 2.3s ease-in-out infinite;
}

.queue-item:nth-child(2) .file-meter-fill {
  animation-duration: 2.8s;
  animation-delay: 0.8s;
}

.queue-item:nth-child(3) .file-meter-fill {
  animation-duration: 3.1s;
  animation-delay: 1.3s;
}

@keyframes file-meter {
  0% {
    transform: scaleX(0.25);
  }
  50% {
    transform: scaleX(0.95);
  }
  100% {
    transform: scaleX(0.6);
  }
}

.queue-footer {
  margin-top: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  font-size: 10px;
}

.queue-note {
  max-width: 70%;
}

.queue-badge {
  border-radius: var(--radius-pill);
  padding: 2px 7px;
  border: 1px solid rgba(148, 163, 184, 0.7);
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--text-soft);
  background: rgba(15, 23, 42, 0.9);
}

:root[data-theme="light"] .queue-badge {
  background: rgba(248, 250, 252, 0.96);
}
