@import url("https://fonts.googleapis.com/css2?family=Sora:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap");

:root {
  --bg: #050608;
  --bg-elevated: #0d1016;
  --border: #1e2430;
  --text: #f4f7fb;
  --muted: #8b95a8;
  --accent: #2ee6c2;
  --accent-dim: rgba(46, 230, 194, 0.14);
  --accent-hot: #5ef0d0;
  --danger: #ff6b7a;
  --ok: #3dcf8e;
  --font: "Sora", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
}

body {
  background:
    radial-gradient(ellipse 70% 45% at 50% -8%, rgba(46, 230, 194, 0.12), transparent 58%),
    radial-gradient(ellipse 40% 30% at 85% 80%, rgba(46, 230, 194, 0.04), transparent 50%),
    linear-gradient(180deg, #07090e 0%, #050608 45%, #040507 100%);
  position: relative;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.35;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='640' height='640' viewBox='0 0 640 640'%3E%3Cg fill='none' stroke='%23151a24' stroke-width='1.4'%3E%3Cpath d='M320 70c55 48 95 130 95 210 0 95-48 165-95 230-47-65-95-135-95-230 0-80 40-162 95-210z'/%3E%3Cpath d='M250 250c-48 28-105 85-118 165M390 250c48 28 105 85 118 165'/%3E%3Cpath d='M280 470c35 55 55 105 40 150M360 470c-35 55-55 105-40 150'/%3E%3C/g%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center 18%;
  background-size: min(92vw, 680px);
  animation: markFloat 14s ease-in-out infinite;
}

@keyframes markFloat {
  0%,
  100% {
    transform: translateY(0);
    opacity: 0.32;
  }
  50% {
    transform: translateY(-10px);
    opacity: 0.45;
  }
}

@keyframes riseIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulseGlow {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(46, 230, 194, 0);
  }
  50% {
    box-shadow: 0 0 24px 0 rgba(46, 230, 194, 0.12);
  }
}

a {
  color: var(--text);
  text-decoration: none;
}

a:hover {
  color: var(--accent);
}

.shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 1;
}

.top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.15rem 1.6rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  font-size: 1.05rem;
  text-transform: uppercase;
}

.brand-mark {
  width: 1.55rem;
  height: 1.55rem;
  display: grid;
  place-items: center;
  color: var(--accent);
  filter: drop-shadow(0 0 10px rgba(46, 230, 194, 0.35));
}

.brand-mark svg {
  width: 100%;
  height: 100%;
  display: block;
}

.brand-text {
  background: linear-gradient(120deg, #fff 20%, var(--accent-hot) 140%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.nav {
  display: flex;
  gap: 1.15rem;
  font-size: 0.9rem;
}

.nav a {
  color: var(--muted);
  transition: color 0.15s ease;
}

.main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem 4rem;
}

.panel {
  width: min(520px, 100%);
  text-align: center;
  animation: riseIn 0.55s ease both;
}

.panel-brand {
  margin: 0 0 1.35rem;
  font-size: clamp(2rem, 6vw, 2.75rem);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  line-height: 1.05;
}

.panel-brand .dot {
  color: var(--accent);
}

.panel-tag {
  margin: -0.7rem 0 1.6rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.filename {
  font-size: clamp(1.35rem, 3.5vw, 1.85rem);
  font-weight: 700;
  word-break: break-word;
  margin: 0 0 0.35rem;
  animation: riseIn 0.45s ease both;
}

.meta {
  color: var(--muted);
  font-size: 0.95rem;
  margin: 0 0 1.5rem;
  font-family: var(--mono);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  border: 1px solid #2a3344;
  background: linear-gradient(180deg, #171c26 0%, #12161e 100%);
  color: var(--text);
  font-family: var(--font);
  font-size: 1.05rem;
  font-weight: 600;
  padding: 0.95rem 1.2rem;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.btn:hover:not(:disabled) {
  background: linear-gradient(180deg, #1d2431 0%, #161b25 100%);
  border-color: #3d4a60;
  transform: translateY(-1px);
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.btn-accent {
  border-color: rgba(46, 230, 194, 0.35);
  background: linear-gradient(180deg, rgba(46, 230, 194, 0.16), rgba(46, 230, 194, 0.06));
  color: #e9fffa;
  animation: pulseGlow 3.2s ease-in-out infinite;
}

.btn-accent:hover:not(:disabled) {
  background: linear-gradient(180deg, rgba(46, 230, 194, 0.24), rgba(46, 230, 194, 0.1));
  border-color: rgba(46, 230, 194, 0.55);
}

.btn-danger {
  border-color: #5a2222;
  background: #241010;
  color: #f0c0c0;
  animation: none;
}

.stack {
  margin-top: 1rem;
  display: grid;
  gap: 0.65rem;
}

.box {
  border: 1px solid var(--border);
  background: rgba(8, 10, 14, 0.78);
  padding: 0.85rem 1rem;
  font-size: 0.9rem;
  color: var(--muted);
  text-align: left;
  backdrop-filter: blur(6px);
}

.box strong {
  color: var(--text);
  font-weight: 600;
}

.box.accent-line {
  position: relative;
}

.box.accent-line::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 42%;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), transparent);
}

.drop {
  border: 1px dashed #2c3545;
  background: rgba(12, 15, 22, 0.88);
  padding: 2.4rem 1.2rem;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.drop:hover,
.drop.dragover {
  border-color: var(--accent);
  background: rgba(46, 230, 194, 0.06);
  transform: translateY(-2px);
}

.drop h1 {
  margin: 0 0 0.4rem;
  font-size: 1.35rem;
  font-weight: 600;
}

.drop p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.tab {
  flex: 1;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  padding: 0.55rem;
  cursor: pointer;
  font-family: var(--font);
  font-size: 0.9rem;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.tab.active {
  color: var(--text);
  border-color: rgba(46, 230, 194, 0.35);
  background: var(--accent-dim);
}

.field {
  width: 100%;
  border: 1px solid var(--border);
  background: #0b0e14;
  color: var(--text);
  padding: 0.8rem 0.9rem;
  font-size: 0.95rem;
  font-family: var(--font);
  margin-bottom: 0.65rem;
}

.field:focus {
  outline: 1px solid rgba(46, 230, 194, 0.45);
  border-color: rgba(46, 230, 194, 0.35);
}

.progress {
  margin-top: 0.85rem;
  height: 3px;
  background: #1a2030;
  overflow: hidden;
}

.progress > span {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--accent), #8affea);
  transition: width 0.15s ease;
}

.remote-stats {
  margin-top: 0.7rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem 1rem;
  font-size: 0.86rem;
  color: var(--muted);
}

.remote-stats .mono {
  color: var(--text);
}

.status {
  margin-top: 0.75rem;
  font-size: 0.9rem;
  color: var(--muted);
  min-height: 1.2em;
}

.status.error {
  color: var(--danger);
}

.status.ok {
  color: var(--ok);
}

.footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem 1.35rem;
  color: var(--muted);
  font-size: 0.85rem;
}

.footer nav {
  display: flex;
  gap: 1rem;
}

.footer a {
  color: var(--muted);
}

.admin-wrap {
  width: min(960px, 100%);
  text-align: left;
  animation: riseIn 0.45s ease both;
}

.admin-wrap h1 {
  margin: 0 0 1rem;
  font-size: 1.4rem;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  background: rgba(8, 10, 14, 0.7);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

th,
td {
  padding: 0.65rem 0.75rem;
  border-bottom: 1px solid #1a2030;
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--muted);
  font-weight: 600;
  background: #0c1018;
}

.mono {
  font-family: var(--mono);
  font-size: 0.84rem;
}

.hidden {
  display: none !important;
}

.drop.busy {
  opacity: 0.7;
  pointer-events: none;
}

.upload-queue {
  margin-top: 0.85rem;
  display: grid;
  gap: 0.55rem;
  text-align: left;
}

.queue-row {
  border: 1px solid var(--border);
  background: rgba(8, 10, 14, 0.78);
  padding: 0.7rem 0.8rem;
}

.queue-top {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: baseline;
  margin-bottom: 0.45rem;
}

.queue-top strong {
  font-size: 0.9rem;
  word-break: break-word;
}

.queue-speed {
  color: var(--accent);
  font-size: 0.78rem;
  white-space: nowrap;
}

.queue-bar {
  height: 3px;
  background: #1a2030;
  overflow: hidden;
  margin-bottom: 0.35rem;
}

.queue-bar > span {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--accent), #8affea);
  transition: width 0.12s linear;
}

.queue-sub {
  color: var(--muted);
  font-size: 0.75rem;
}

.results {
  margin-top: 1.25rem;
  text-align: left;
  border: 1px solid var(--border);
  background: rgba(8, 10, 14, 0.78);
  padding: 0.9rem;
  animation: riseIn 0.35s ease both;
}

.results-head {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.results-head h2 {
  margin: 0;
  font-size: 1rem;
}

.results-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.results-list {
  display: grid;
  gap: 0.55rem;
}

.link-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  justify-content: space-between;
  align-items: center;
  border: 1px solid #1a2030;
  padding: 0.65rem 0.75rem;
  background: rgba(0, 0, 0, 0.25);
}

.link-meta {
  display: grid;
  gap: 0.2rem;
  min-width: 0;
  flex: 1;
}

.link-meta strong {
  font-size: 0.92rem;
  word-break: break-word;
}

.link-meta .mono {
  color: var(--muted);
  word-break: break-all;
  font-size: 0.78rem;
}

.link-actions {
  display: flex;
  gap: 0.4rem;
}

.row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

@media (max-width: 640px) {
  .top,
  .footer {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .nav {
    gap: 0.75rem;
    font-size: 0.85rem;
  }

  .footer {
    flex-direction: column;
    gap: 0.6rem;
    align-items: flex-start;
  }
}
