/* Beam PWA — refined minimal dark UI */

@import url('https://cdn.jsdelivr.net/fontsource/css/geist@latest/index.css');
@import url('https://cdn.jsdelivr.net/fontsource/css/geist-mono@latest/index.css');

:root {
  --bg: #0a0a0b;
  --surface: #131316;
  --surface-2: #1a1a1f;
  --border: #26262c;
  --border-strong: #34343c;
  --text: #ededef;
  --text-dim: #8a8a93;
  --text-faint: #5a5a63;
  --accent: #4f8cff;
  --accent-dim: #2b4d8f;
  --good: #38c172;
  --bad: #ff5f57;
  --wait: #e0a83e;
  --radius: 12px;
  --mono: 'Geist Mono', ui-monospace, 'SF Mono', monospace;
  --sans: 'Geist', -apple-system, 'Segoe UI', 'Hiragino Sans', 'Yu Gothic UI', sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body {
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}
body { user-select: none; }

.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 20px; border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, #101013, var(--bg));
}
.brand { display: flex; align-items: center; gap: 9px; }
.brand-dot {
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--accent); box-shadow: 0 0 12px var(--accent);
  animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .4; } }
.brand-name { font-weight: 600; letter-spacing: .5px; }

.status { font-size: 12px; color: var(--text-dim); font-family: var(--mono); }
.status.good { color: var(--good); }
.status.bad { color: var(--bad); }
.status.wait { color: var(--wait); }

.content { padding: 24px 20px; max-width: 560px; margin: 0 auto; }

/* Landing */
.lede { color: var(--text-dim); line-height: 1.7; margin-bottom: 22px; text-align: center; }
.choice { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.choice-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 26px 16px; cursor: pointer;
  text-align: center; transition: all .16s; font-family: var(--sans); color: var(--text);
}
.choice-card:hover { border-color: var(--accent-dim); background: var(--surface-2); transform: translateY(-2px); }
.cc-icon {
  width: 46px; height: 46px; line-height: 44px; margin: 0 auto 12px;
  border: 1.5px solid var(--accent-dim); border-radius: 50%;
  color: var(--accent); font-size: 22px;
}
.cc-title { font-weight: 600; }
.cc-sub { color: var(--text-faint); font-size: 12px; margin-top: 4px; }

/* Centered host/join */
.centered { display: flex; flex-direction: column; align-items: center; gap: 16px; padding-top: 14px; }
.code-label { color: var(--text-dim); font-size: 13px; }
.code-display {
  font-family: var(--mono); font-size: 44px; font-weight: 600; letter-spacing: 8px;
  color: var(--text); padding: 18px 26px; background: var(--surface);
  border: 1px solid var(--border-strong); border-radius: 14px;
}
.code-input {
  font-family: var(--mono); font-size: 30px; letter-spacing: 8px; text-align: center;
  text-transform: uppercase; width: 240px; padding: 14px;
  background: var(--surface); color: var(--text);
  border: 1px solid var(--border-strong); border-radius: 12px; outline: none;
}
.code-input:focus { border-color: var(--accent); }

/* Buttons */
.ghost-btn {
  background: transparent; color: var(--text-dim);
  border: 1px solid var(--border); border-radius: 8px;
  padding: 6px 14px; font-size: 12px; cursor: pointer; font-family: var(--sans); transition: all .15s;
}
.ghost-btn:hover { color: var(--text); border-color: var(--border-strong); }
.btn-primary {
  background: var(--accent); color: #fff; font-weight: 500;
  border: none; border-radius: 10px; padding: 11px 26px; font-size: 14px;
  cursor: pointer; font-family: var(--sans); transition: filter .15s;
}
.btn-primary:hover { filter: brightness(1.1); }
.btn-primary.full { width: 100%; margin-top: 12px; }
.link-btn { background: none; border: none; color: var(--text-faint); cursor: pointer; font-size: 13px; font-family: var(--sans); margin-top: 6px; }
.link-btn:hover { color: var(--text-dim); }

/* Dropzone */
.dropzone {
  border: 1.5px dashed var(--border-strong); border-radius: var(--radius);
  padding: 34px; text-align: center; cursor: pointer; transition: all .18s; background: var(--surface);
}
.dropzone:hover { border-color: var(--accent-dim); background: var(--surface-2); }
.dropzone.drag-over { border-color: var(--accent); background: rgba(79,140,255,.06); }
.dz-icon {
  font-size: 22px; color: var(--accent); width: 44px; height: 44px; line-height: 44px;
  margin: 0 auto 10px; border: 1.5px solid var(--accent-dim); border-radius: 50%;
}
.dz-title { font-weight: 500; }
.dz-sub { color: var(--text-faint); font-size: 12px; margin-top: 3px; }

/* Staged */
.staged {
  margin-top: 16px; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 14px 16px;
}
.staged-head {
  display: flex; justify-content: space-between; align-items: center;
  font-family: var(--mono); font-size: 12px; color: var(--text-dim); margin-bottom: 10px;
}
.staged-list { list-style: none; display: flex; flex-direction: column; gap: 6px; }
.staged-list li {
  display: flex; justify-content: space-between; align-items: center;
  padding: 7px 10px; background: var(--surface-2); border-radius: 8px; font-size: 13px;
}
.staged-list .fsize { color: var(--text-faint); font-family: var(--mono); font-size: 11px; }

/* Progress bars */
.bar { height: 4px; border-radius: 2px; background: var(--surface-2); overflow: hidden; margin-top: 10px; }
.bar.standalone { margin-top: 14px; }
.bar > span { display: block; height: 100%; background: var(--accent); width: 0; transition: width .12s linear; }

/* Section label */
.section-label {
  font-size: 11px; text-transform: uppercase; letter-spacing: 1px;
  color: var(--text-faint); font-weight: 600; margin: 26px 2px 12px;
}

/* History */
.history-list { list-style: none; display: flex; flex-direction: column; gap: 6px; }
.history-list li {
  display: flex; align-items: center; gap: 11px; padding: 10px 13px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 10px; font-size: 13px;
}
.h-dir { font-family: var(--mono); font-size: 11px; padding: 2px 7px; border-radius: 5px; }
.h-dir.sent { color: var(--accent); background: rgba(79,140,255,.1); }
.h-dir.recv { color: var(--good); background: rgba(56,193,114,.1); }
.h-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.h-name a { color: var(--good); text-decoration: none; }
.h-name a:hover { text-decoration: underline; }
.h-time { color: var(--text-faint); font-family: var(--mono); font-size: 11px; }

.empty { color: var(--text-faint); text-align: center; padding: 18px; font-size: 13px; }
.empty.small { padding: 12px; font-size: 12px; }

.hidden { display: none !important; }
