/* Berry download. Minimalist, rounded, calm, fluid. No neon, no glass. */

:root {
  --bg: #0e0e11;
  --card: #17171b;
  --field: #1e1e23;
  --field-hover: #24242a;
  --border: #292930;
  --border-strong: #3a3a42;
  --text: #ededf0;
  --muted: #8f8f99;
  --faint: #65656e;
  --accent: #cf5f93;      /* muted berry, no glow */
  --accent-hover: #d975a4;
  --ok: #7fcfa4;
  --err: #e08a8a;
  --radius: 22px;
  --radius-sm: 13px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  font-synthesis: none;
}

* { box-sizing: border-box; }
html, body { height: 100%; }

body {
  margin: 0;
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px 16px;
  -webkit-user-select: none;
  -moz-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.shell { width: 100%; max-width: 380px; }

/* ---- Card ---- */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 38px 28px 26px;
  text-align: center;
  box-shadow: 0 20px 50px -24px rgba(0, 0, 0, 0.7);
  animation: card-in 0.6s var(--ease) both;
}
@keyframes card-in {
  from { opacity: 0; transform: translateY(14px) scale(0.985); }
  to   { opacity: 1; transform: none; }
}

/* ---- Staggered fade-up for contents ---- */
.anim { animation: fade-up 0.55s var(--ease) both; animation-delay: calc(0.12s + var(--i) * 0.07s); }
@keyframes fade-up {
  from { opacity: 0; transform: translateY(9px); }
  to   { opacity: 1; transform: none; }
}

/* ---- Brand ---- */
.logo {
  display: block;
  width: 52px;
  height: 52px;
  margin: 0 auto 14px;
  object-fit: contain;
}
.wordmark {
  margin: 0 0 7px;
  font-size: 21px;
  font-weight: 700;
  letter-spacing: 0.01em;
}
.subtitle {
  margin: 0 0 24px;
  font-size: 14px;
  line-height: 1.55;
  color: var(--muted);
}

/* ---- Form ---- */
.form { display: flex; flex-direction: column; gap: 10px; }

.input {
  width: 100%;
  height: 48px;
  padding: 0 15px;
  font-size: 15px;
  text-align: center;
  color: var(--text);
  background: var(--field);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  outline: none;
  transition: border-color 0.25s var(--ease), background 0.25s var(--ease), box-shadow 0.25s var(--ease);
  -webkit-user-select: text;
  -moz-user-select: text;
  user-select: text;
}
.input::placeholder { color: var(--faint); }
.input:hover { background: var(--field-hover); }
.input:focus {
  border-color: var(--accent);
  background: var(--field-hover);
  box-shadow: 0 0 0 3px rgba(207, 95, 147, 0.14);
}
.input:disabled { opacity: 0.6; }

.btn {
  position: relative;
  height: 48px;
  margin-top: 2px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  background: var(--accent);
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  overflow: hidden;
  transition: background 0.25s var(--ease), transform 0.12s var(--ease);
}
.btn:hover { background: var(--accent-hover); }
.btn:active { transform: scale(0.985); }
.btn:disabled { cursor: default; }
.btn.loading .btn-label { opacity: 0; }

.btn-spin {
  position: absolute;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.45);
  border-top-color: #fff;
  border-radius: 50%;
  opacity: 0;
}
.btn.loading .btn-spin { opacity: 1; animation: spin 0.7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---- Status ---- */
.status {
  margin-top: 15px;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--muted);
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.3s var(--ease), opacity 0.3s var(--ease);
}
.status.show { max-height: 90px; opacity: 1; }
.status.ok { color: var(--ok); }
.status.err { color: var(--err); }
.status.info { color: var(--muted); }

/* ---- Footer ---- */
.foot {
  margin: 24px 0 0;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  font-size: 12px;
  color: var(--faint);
}

@media (max-width: 420px) {
  .card { padding: 32px 20px 22px; }
}

@media (prefers-reduced-motion: reduce) {
  .card, .anim { animation: none; }
  .btn.loading .btn-spin { animation: none; }
  * { transition-duration: 0.01ms !important; }
}
