:root {
  --bg: #0f1214;
  --bg-elev: #171b1e;
  --bg-elev-2: #1e2327;
  --border: #2a3033;
  --text: #f2f4f5;
  --text-dim: #9aa4a9;
  --accent: #00bc9c;
  --accent-dim: #00bc9c33;
  --cta: #f97316;
  --cta-dim: #f9731633;
  --danger: #e05a4e;
  --radius: 14px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.wrap {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px clamp(16px, 5vw, 48px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}
.brand-logo {
  height: 22px;
  width: auto;
  display: block;
}
.brand-suffix {
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -0.02em;
  color: #ffffff;
}

.buy-link {
  color: var(--text-dim);
  text-decoration: none;
  font-size: 14px;
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  transition: border-color .15s, color .15s;
}
.buy-link:hover { border-color: var(--cta); color: var(--text); }

main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px clamp(16px, 5vw, 48px) 60px;
}

.screen {
  width: 100%;
  max-width: 720px;
  text-align: center;
}

h1 {
  font-size: clamp(28px, 4vw, 40px);
  margin: 0 0 10px;
  letter-spacing: -0.02em;
}

.subtitle {
  color: var(--text-dim);
  font-size: 16px;
  margin: 0 0 32px;
}

/* Dropzone */
.dropzone {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 56px 24px;
  background-color: var(--bg-elev);
  background-image: radial-gradient(circle, rgba(255, 255, 255, 0.18) 1.5px, transparent 1.5px);
  background-size: 28px 28px;
  background-position: 14px 14px;
  transition: border-color .15s, background-color .15s;
}
.dropzone.dragover {
  border-color: var(--accent);
  background-color: var(--accent-dim);
}
.dropzone-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: var(--bg-elev-2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  color: var(--accent);
}
.dropzone-text {
  font-size: 17px;
  margin: 0 0 12px;
}
.dropzone-or {
  color: var(--text-dim);
  font-size: 13px;
  margin: 0 0 16px;
}
.dropzone-buttons {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn {
  border: none;
  border-radius: 999px;
  padding: 12px 22px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: transform .1s, opacity .15s, background .15s;
}
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--accent); color: #06201b; }
.btn-primary:hover { opacity: .9; }
.btn-secondary { background: var(--bg-elev-2); color: var(--text); border: 1px solid var(--border); }
.btn-secondary:hover { border-color: var(--accent); }
.btn-ghost { background: transparent; color: var(--text-dim); border: 1px solid var(--border); }
.btn-ghost:hover { color: var(--text); }

.rules {
  list-style: none;
  padding: 0;
  margin: 28px 0 0;
  text-align: left;
  max-width: 480px;
  margin-inline: auto;
  color: var(--text-dim);
  font-size: 13px;
  line-height: 1.9;
}
.rules li { padding-left: 20px; position: relative; }
.rules li::before {
  content: "·";
  position: absolute;
  left: 4px;
  color: var(--accent);
  font-weight: 700;
}

.error {
  color: var(--danger);
  font-size: 14px;
  margin-top: 20px;
}

/* Initializing screen */
.init-title {
  background: linear-gradient(90deg, var(--text) 40%, var(--text-dim) 60%);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: shimmer 1.6s linear infinite;
}
@keyframes shimmer {
  0% { background-position: 0% 0; }
  100% { background-position: -200% 0; }
}

.file-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-align: left;
}
.file-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 18px;
}
.file-row .fname { font-weight: 600; font-size: 14px; }
.file-row .fsize { color: var(--text-dim); font-size: 13px; margin-left: 10px; }
.file-row .fleft { display: flex; align-items: baseline; overflow: hidden; }
.file-row .fname { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.status {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-dim);
  flex-shrink: 0;
}
.status.uploading { color: var(--accent); }
.status.done { color: var(--accent); }

/* Ready screen */
.live-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--accent-dim);
  color: var(--accent);
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 20px;
}
.live-badge .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse 1.4s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .35; }
}

.ready-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}
.expire-pill {
  display: inline-block;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 10px 18px;
  font-size: 13px;
  color: var(--text-dim);
  margin-bottom: 20px;
}
#countdown { color: var(--text); font-variant-numeric: tabular-nums; font-weight: 700; }

.browser-chrome {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-elev);
  text-align: left;
}
.chrome-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: var(--bg-elev-2);
  border-bottom: 1px solid var(--border);
}
.chrome-dots { display: flex; gap: 6px; flex-shrink: 0; }
.chrome-dots i {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--border); display: block;
}
.chrome-url {
  flex: 1;
  background: var(--bg);
  border-radius: 8px;
  padding: 7px 12px;
  font-size: 13px;
  color: var(--text-dim);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}
.chrome-open {
  color: var(--text-dim);
  text-decoration: none;
  font-size: 16px;
  flex-shrink: 0;
}
.chrome-open:hover { color: var(--accent); }

.preview-frame {
  width: 100%;
  height: 420px;
  border: none;
  background: #fff;
  display: block;
}

.buy-cta {
  display: inline-block;
  margin-top: 28px;
  color: var(--cta);
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
}
.buy-cta:hover { text-decoration: underline; }

.footer {
  text-align: center;
  padding: 20px;
  color: var(--text-dim);
  font-size: 12px;
}
.footer a { color: var(--text-dim); }

@media (max-width: 560px) {
  .preview-frame { height: 280px; }
}
