:root {
  --bg: #0f1115;
  --surface: #171a21;
  --surface-2: #1f232c;
  --border: #2a2f3a;
  --text: #e7e9ee;
  --muted: #9aa1ad;
  --primary: #4f7cff;
  --primary-hover: #3f6bef;
  --danger: #e5484d;
  --danger-hover: #d13d42;
  --success: #30a46c;
  --radius: 16px;
  --shadow: 0 10px 40px rgba(0, 0, 0, 0.35);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(1200px 600px at 50% -10%, #1a1f2b 0%, var(--bg) 60%);
  color: var(--text);
}

.page-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  gap: 24px;
}

/* --- Topbar --- */
.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  letter-spacing: 0.2px;
}

.brand__dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 0 4px rgba(79, 124, 255, 0.18);
}

.brand__name {
  color: var(--text);
}

/* --- Card --- */
.card {
  width: 100%;
  max-width: 460px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 40px 36px;
}

.card--narrow {
  max-width: 380px;
}

.card--counter {
  text-align: center;
}

.card__title {
  margin: 0 0 6px;
  font-size: 20px;
  font-weight: 600;
}

.card--counter .card__title {
  font-size: 18px;
  color: var(--muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 1.5px;
}

.card__subtitle {
  margin: 0 0 24px;
  color: var(--muted);
  font-size: 14px;
}

/* --- Counter value --- */
.counter {
  margin: 24px 0 12px;
}

.counter__value {
  font-size: clamp(96px, 22vw, 168px);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -3px;
  font-variant-numeric: tabular-nums;
  background: linear-gradient(180deg, #ffffff, #b9c2d6);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.updated {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  margin: 0 0 28px;
}

.updated__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--muted);
  transition: background 0.3s;
}

.updated__dot.is-live {
  background: var(--success);
  box-shadow: 0 0 0 3px rgba(48, 164, 108, 0.2);
}

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

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field__label {
  font-size: 13px;
  color: var(--muted);
}

.field__input {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  color: var(--text);
  font-size: 15px;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.field__input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(79, 124, 255, 0.2);
}

/* --- Buttons --- */
.btn {
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 12px 18px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, transform 0.05s;
}

.btn:active {
  transform: translateY(1px);
}

.btn--block {
  width: 100%;
}

.btn--sm {
  padding: 8px 14px;
  font-size: 13px;
}

.btn--primary {
  background: var(--primary);
  color: white;
}

.btn--primary:hover {
  background: var(--primary-hover);
}

.btn--danger {
  background: var(--danger);
  color: white;
}

.btn--danger:hover {
  background: var(--danger-hover);
}

.btn--ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}

.btn--ghost:hover {
  background: var(--surface-2);
}

.actions {
  display: flex;
  justify-content: center;
}

/* --- Messages --- */
.msg {
  margin: 18px 0 0;
  font-size: 14px;
  padding: 10px 14px;
  border-radius: 10px;
}

.msg--error {
  background: rgba(229, 72, 77, 0.12);
  color: #ff9ea1;
  border: 1px solid rgba(229, 72, 77, 0.3);
}

.msg--success {
  background: rgba(48, 164, 108, 0.12);
  color: #7ee2b0;
  border: 1px solid rgba(48, 164, 108, 0.3);
}

/* --- Modal --- */
.modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 50;
}

.modal[hidden] {
  display: none;
}

.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(2px);
}

.modal__dialog {
  position: relative;
  width: 100%;
  max-width: 420px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px;
  text-align: center;
  animation: pop 0.15s ease-out;
}

@keyframes pop {
  from {
    transform: scale(0.96);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

.modal__title {
  margin: 0 0 8px;
  font-size: 18px;
}

.modal__text {
  margin: 0 0 22px;
  color: var(--muted);
  font-size: 14px;
}

.modal__actions {
  display: flex;
  gap: 12px;
  justify-content: center;
}

/* --- Footer --- */
.footer {
  color: var(--muted);
  font-size: 13px;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.footer__logo {
  height: 20px;
  width: auto;
}

.footer__link {
  display: flex;
  align-items: center;
  transition: opacity 0.2s;
}

.footer__link:hover {
  opacity: 0.8;
}
