
:root {
  --bg: #f6f6f6;
  --surface: #ffffff;
  --text: #000000;
  --muted: #5e5e5e;
  --border: #e6e6e6;
  --primary: #000000;
  --primary-hover: #242424;
  --danger: #c62828;
  --danger-hover: #a81f1f;
  --success-bg: #eaf7ef;
  --success-text: #166534;
  --error-bg: #fff1f1;
  --error-text: #9d2323;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.08);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family:
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    "PingFang TC",
    "Noto Sans TC",
    "Helvetica Neue",
    Arial,
    sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

button {
  font: inherit;
}

.page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 28px 18px;
}

.card {
  width: min(100%, 520px);
  min-height: 410px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 38px;
}

.brand-header {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  margin-bottom: 54px;
}

.uber-logo,
.modal__brand {
  display: inline-block;
  color: #000;
  font-family: Arial, Helvetica, sans-serif;
  font-weight: 700;
  letter-spacing: -1.8px;
  line-height: 1;
}

.uber-logo {
  font-size: 31px;
}

.modal__brand {
  margin-bottom: 26px;
  font-size: 25px;
}

.state {
  width: 100%;
}

.state--center {
  text-align: center;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 14px;
  font-size: clamp(1.7rem, 4vw, 2.05rem);
  line-height: 1.18;
  letter-spacing: -0.028em;
}

h2 {
  margin-bottom: 12px;
  font-size: 1.3rem;
  line-height: 1.3;
}

.description,
.modal__description {
  color: var(--muted);
  line-height: 1.7;
}

.description {
  margin-bottom: 30px;
  font-size: 1rem;
}

.description--last {
  margin-bottom: 0;
}

.button {
  min-height: 50px;
  border: 0;
  border-radius: 10px;
  padding: 12px 18px;
  cursor: pointer;
  font-weight: 650;
  transition:
    background-color 0.18s ease,
    opacity 0.18s ease,
    transform 0.18s ease;
}

.button:active:not(:disabled) {
  transform: translateY(1px);
}

.button:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

.button--primary {
  width: 100%;
  background: var(--primary);
  color: #fff;
}

.button--primary:hover:not(:disabled) {
  background: var(--primary-hover);
}

.button--secondary {
  background: #eeeeee;
  color: var(--text);
}

.button--secondary:hover:not(:disabled) {
  background: #e3e3e3;
}

.button--danger {
  background: var(--danger);
  color: #fff;
}

.button--danger:hover:not(:disabled) {
  background: var(--danger-hover);
}

.status-message {
  margin: 18px 0 0;
  padding: 12px 14px;
  border-radius: 10px;
  line-height: 1.55;
  background: var(--success-bg);
  color: var(--success-text);
}

.status-message.is-error {
  background: var(--error-bg);
  color: var(--error-text);
}

.spinner {
  width: 34px;
  height: 34px;
  margin: 50px auto 16px;
  border: 3px solid #e3e3e3;
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.75s linear infinite;
}

.success-icon {
  width: 62px;
  height: 62px;
  display: grid;
  place-items: center;
  margin: 12px auto 24px;
  border-radius: 50%;
  background: var(--success-bg);
}

.success-icon svg {
  width: 34px;
  height: 34px;
  fill: var(--success-text);
}

.error-mark {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  margin: 12px auto 22px;
  border-radius: 50%;
  background: var(--error-bg);
  color: var(--error-text);
  font-size: 1.4rem;
  font-weight: 800;
}

.modal[hidden] {
  display: none;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 20px;
}

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

.modal__panel {
  position: relative;
  z-index: 1;
  width: min(100%, 460px);
  background: var(--surface);
  border-radius: 16px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.22);
  padding: 30px;
}

.modal__description {
  margin-bottom: 26px;
}

.modal__close {
  position: absolute;
  top: 12px;
  right: 14px;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #666;
  cursor: pointer;
  font-size: 1.65rem;
  line-height: 1;
}

.modal__close:hover {
  background: #f3f3f3;
  color: var(--text);
}

.modal__actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 560px) {
  .page {
    align-items: start;
    padding: 0;
  }

  .card {
    min-height: 100vh;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    padding: 30px 24px;
  }

  .brand-header {
    margin-bottom: 64px;
  }

  .modal__panel {
    padding: 28px 22px 22px;
  }

  .modal__actions {
    flex-direction: column-reverse;
  }

  .modal__actions .button {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
