:root {
  color-scheme: light;
  --surface: rgba(255, 250, 242, 0.82);
  --text: #1f2d3d;
  --muted: #6b7785;
  --line: rgba(18, 39, 61, 0.12);
  --primary: #0f5ea8;
  --primary-strong: #0a4a84;
  --accent: #c78e2f;
  --danger: #a43c2b;
  --success: #0c7b59;
  --shadow: 0 24px 80px rgba(27, 42, 65, 0.14);
  --radius-xl: 28px;
  --radius-lg: 22px;
  --brand-navy: #0b1d33;
}

* {
  box-sizing: border-box;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(199, 142, 47, 0.16), transparent 24%),
    radial-gradient(circle at 85% 15%, rgba(15, 94, 168, 0.12), transparent 16%),
    linear-gradient(135deg, #f8f3ea 0%, #edf2f6 46%, #f7f1e8 100%);
}

button,
input,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-shell {
  min-height: 100vh;
  padding: 24px;
}

.workspace-panel,
.accounts-section,
.countdown-card,
.panel-strip,
.account-card,
.modal-card,
.empty-state {
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.45);
  box-shadow: var(--shadow);
}

.workspace-panel {
  width: 100%;
  max-width: 1380px;
  margin: 0 auto;
  padding: 28px;
  border-radius: var(--radius-xl);
  background: linear-gradient(180deg, rgba(255, 252, 247, 0.9), rgba(248, 250, 252, 0.84));
}

.workspace-panel--full {
  width: 100%;
}

.panel-kicker {
  margin: 0;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-size: 12px;
  opacity: 0.72;
}

.accounts-section,
.countdown-card,
.panel-strip,
.empty-state {
  position: relative;
  overflow: hidden;
  padding: 22px;
  border-radius: var(--radius-lg);
}

.accounts-section::before,
.countdown-card::before,
.panel-strip::before,
.account-card::before {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.75), transparent);
}

.accounts-section {
  background:
    radial-gradient(circle at top right, rgba(199, 142, 47, 0.1), transparent 24%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.84), rgba(249, 250, 252, 0.8));
}

.countdown-card {
  margin-top: 18px;
  background:
    radial-gradient(circle at top right, rgba(15, 94, 168, 0.1), transparent 22%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.84), rgba(247, 250, 253, 0.8));
}

.panel-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 18px;
  background:
    radial-gradient(circle at top right, rgba(199, 142, 47, 0.14), transparent 28%),
    linear-gradient(135deg, rgba(255, 251, 245, 0.94), rgba(245, 248, 252, 0.86));
}

.accounts-section__header,
.accounts-section__tools,
.countdown-card__meta,
.account-card__top,
.account-card__footer,
.otp-block,
.modal-card__header,
.modal-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.accounts-section__tools {
  justify-content: flex-end;
}

.accounts-count {
  display: inline-grid;
  place-items: center;
  min-width: 44px;
  height: 44px;
  padding: 0 14px;
  border-radius: 999px;
  background: rgba(11, 29, 51, 0.07);
  color: var(--brand-navy);
  font-family: ui-monospace, "SFMono-Regular", "SF Mono", "Cascadia Code", "Segoe UI Mono", "Roboto Mono", monospace;
  font-size: 18px;
}

.countdown-card h3,
.panel-strip__copy h3,
.empty-state h4,
.modal-card h3 {
  font-family: "Avenir Next", "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  margin: 8px 0 0;
}

.ghost-button,
.secondary-button,
.primary-button,
.copy-button,
.icon-button {
  border: 0;
  border-radius: 999px;
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    background 180ms ease,
    color 180ms ease;
}

.ghost-button,
.secondary-button,
.primary-button,
.copy-button {
  padding: 13px 18px;
  font-weight: 700;
}

.primary-button {
  background: linear-gradient(135deg, var(--primary), #1d76c6);
  color: #fff;
  box-shadow: 0 18px 36px rgba(15, 94, 168, 0.24);
}

.secondary-button {
  background: rgba(15, 94, 168, 0.1);
  color: var(--primary);
}

.ghost-button,
.ghost-button--solid {
  background: rgba(255, 255, 255, 0.48);
  color: var(--text);
  border: 1px solid var(--line);
}

.ghost-button--solid {
  background: rgba(255, 255, 255, 0.56);
}

.copy-button {
  background: rgba(12, 123, 89, 0.1);
  color: var(--success);
}

.icon-button {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  font-size: 24px;
  background: rgba(0, 0, 0, 0.05);
  color: var(--text);
}

.icon-button--danger {
  background: rgba(164, 60, 43, 0.12);
  color: var(--danger);
}

.ghost-button:hover,
.secondary-button:hover,
.primary-button:hover,
.copy-button:hover,
.icon-button:hover,
.donate-link:hover {
  transform: translateY(-1px);
}

.helper-text,
.about-copy p,
.empty-state p {
  color: inherit;
  opacity: 0.84;
  line-height: 1.6;
}

.panel-strip__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.progress-track {
  margin-top: 18px;
  width: 100%;
  height: 12px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(15, 94, 168, 0.08);
}

.progress-bar {
  height: 100%;
  width: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--primary));
  transform-origin: left center;
}

.accounts-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 16px;
}

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

.account-card {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  padding: 18px;
  animation: rise-in 360ms ease;
  border: 1px solid rgba(255, 255, 255, 0.55);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.72),
    0 24px 44px rgba(17, 35, 58, 0.12);
}

.account-card--brand-google {
  border-color: rgba(66, 133, 244, 0.42);
}

.account-card--brand-github {
  border-color: rgba(36, 41, 47, 0.28);
}

.account-card--brand-aws {
  border-color: rgba(255, 153, 0, 0.42);
}

.account-card--brand-microsoft {
  border-color: rgba(0, 120, 212, 0.38);
}

.account-card--brand-oracle {
  border-color: rgba(199, 70, 52, 0.4);
}

.account-card--brand-gitlab {
  border-color: rgba(252, 109, 38, 0.38);
}

.account-card--brand-cloudflare {
  border-color: rgba(244, 129, 32, 0.4);
}

.account-card--brand-aliyun {
  border-color: rgba(255, 106, 0, 0.42);
}

.account-card--brand-tencent {
  border-color: rgba(0, 82, 217, 0.36);
}

.account-card--brand-docker {
  border-color: rgba(36, 150, 237, 0.38);
}

.account-card--brand-okta {
  border-color: rgba(0, 125, 193, 0.34);
}

.account-card--brand-custom {
  border-color: rgba(11, 29, 51, 0.18);
}

.account-card--tone-0 {
  background: linear-gradient(135deg, rgba(255, 246, 231, 0.96), rgba(252, 237, 213, 0.9));
}

.account-card--tone-1 {
  background: linear-gradient(135deg, rgba(238, 246, 255, 0.96), rgba(221, 236, 252, 0.9));
}

.account-card--tone-2 {
  background: linear-gradient(135deg, rgba(239, 250, 243, 0.96), rgba(220, 243, 229, 0.9));
}

.account-card--tone-3 {
  background: linear-gradient(135deg, rgba(248, 240, 255, 0.96), rgba(234, 225, 250, 0.9));
}

.account-card--tone-4 {
  background: linear-gradient(135deg, rgba(255, 241, 239, 0.96), rgba(249, 224, 218, 0.9));
}

.account-card--tone-5 {
  background: linear-gradient(135deg, rgba(244, 243, 229, 0.96), rgba(237, 234, 206, 0.9));
}

.account-card__identity {
  display: flex;
  align-items: center;
  gap: 12px;
}

.account-card__badge {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  font-family: ui-monospace, "SFMono-Regular", "SF Mono", "Cascadia Code", "Segoe UI Mono", "Roboto Mono", monospace;
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, rgba(11, 29, 51, 0.84), rgba(27, 72, 117, 0.74));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.22),
    0 12px 24px rgba(11, 29, 51, 0.18);
}

.account-card__badge--google {
  background: linear-gradient(135deg, #4285f4, #34a853);
}

.account-card__badge--github {
  background: linear-gradient(135deg, #24292f, #57606a);
}

.account-card__badge--aws {
  background: linear-gradient(135deg, #ff9900, #232f3e);
}

.account-card__badge--microsoft {
  background: linear-gradient(135deg, #2563eb, #0ea5e9);
}

.account-card__badge--oracle {
  background: linear-gradient(135deg, #c74634, #7f1d1d);
}

.account-card__badge--gitlab {
  background: linear-gradient(135deg, #fc6d26, #e24329);
}

.account-card__badge--cloudflare {
  background: linear-gradient(135deg, #f38020, #faae40);
}

.account-card__badge--aliyun {
  background: linear-gradient(135deg, #ff6a00, #ff9f43);
}

.account-card__badge--tencent {
  background: linear-gradient(135deg, #0052d9, #00a3ff);
}

.account-card__badge--docker {
  background: linear-gradient(135deg, #0ea5e9, #2563eb);
}

.account-card__badge--okta {
  background: linear-gradient(135deg, #2563eb, #312e81);
}

.account-card__badge--custom {
  background: linear-gradient(135deg, rgba(11, 29, 51, 0.84), rgba(27, 72, 117, 0.74));
}

.account-card__issuer {
  margin: 0;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.account-card__label {
  margin: 6px 0 0;
  font-size: 19px;
  line-height: 1.15;
}

.otp-block {
  align-items: flex-end;
  margin: 18px 0 12px;
}

.otp-code {
  font-family: ui-monospace, "SFMono-Regular", "SF Mono", "Cascadia Code", "Segoe UI Mono", "Roboto Mono", monospace;
  font-size: clamp(1.8rem, 2.6vw, 2.6rem);
  letter-spacing: 0.12em;
  line-height: 1;
}

.account-card__secret {
  font-family: ui-monospace, "SFMono-Regular", "SF Mono", "Cascadia Code", "Segoe UI Mono", "Roboto Mono", monospace;
  font-size: 11px;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.modal-dialog {
  width: min(92vw, 700px);
  border: 0;
  padding: 0;
  background: transparent;
}

.modal-dialog::backdrop {
  background: rgba(9, 18, 32, 0.42);
  backdrop-filter: blur(8px);
}

.modal-card {
  border-radius: 32px;
  padding: 28px;
  background:
    radial-gradient(circle at top right, rgba(199, 142, 47, 0.16), transparent 24%),
    linear-gradient(180deg, rgba(255, 251, 244, 0.96), rgba(246, 249, 252, 0.92));
  border: 1px solid rgba(255, 255, 255, 0.64);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.7),
    0 32px 80px rgba(10, 24, 42, 0.22);
}

.modal-card--about {
  width: min(92vw, 620px);
  max-height: min(72vh, 420px);
  overflow: hidden;
}

.modal-lead {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 18px 0 6px;
  padding: 16px 18px;
  border-radius: 20px;
  background: rgba(11, 29, 51, 0.05);
}

.modal-lead__mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--brand-navy), #1f5689);
  color: #fff;
  font-family: ui-monospace, "SFMono-Regular", "SF Mono", "Cascadia Code", "Segoe UI Mono", "Roboto Mono", monospace;
  font-size: 24px;
  font-weight: 700;
}

.modal-lead p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.field-label {
  display: block;
  margin: 14px 0 8px;
  font-weight: 700;
}

.text-input {
  width: 100%;
  border: 1px solid rgba(19, 42, 67, 0.12);
  border-radius: 16px;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--text);
  outline: none;
  transition: border-color 180ms ease, box-shadow 180ms ease;
}

.text-input:focus {
  border-color: rgba(15, 94, 168, 0.4);
  box-shadow: 0 0 0 4px rgba(15, 94, 168, 0.1);
}

.text-input--select {
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, rgba(31, 45, 61, 0.68) 50%),
    linear-gradient(135deg, rgba(31, 45, 61, 0.68) 50%, transparent 50%);
  background-position:
    calc(100% - 22px) calc(50% - 3px),
    calc(100% - 16px) calc(50% - 3px);
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  padding-right: 42px;
}

.text-input--textarea {
  resize: vertical;
  min-height: 120px;
}

.modal-actions {
  margin-top: 18px;
}

.modal-actions--start {
  justify-content: flex-start;
  margin-top: 14px;
  padding-top: 8px;
}

.about-copy p {
  margin: 0 0 8px;
  line-height: 1.5;
}

.about-copy p:last-child {
  margin-bottom: 0;
}

.page-footer {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 14px;
  padding: 0 4px 4px;
}

.donate-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 20px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(255, 244, 221, 0.98), rgba(247, 226, 182, 0.96));
  color: var(--brand-navy);
  text-decoration: none;
  font-weight: 700;
  border: 1px solid rgba(199, 142, 47, 0.28);
  box-shadow: 0 16px 32px rgba(199, 142, 47, 0.18);
}

.donate-link--button {
  appearance: none;
  cursor: pointer;
  font: inherit;
}

.donate-link:hover {
  box-shadow: 0 20px 36px rgba(199, 142, 47, 0.24);
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%) translateY(16px);
  padding: 12px 18px;
  border-radius: 999px;
  background: rgba(16, 32, 51, 0.92);
  color: #fff;
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 1180px) {
  .accounts-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .app-shell {
    padding: 14px;
  }

  .workspace-panel {
    padding: 20px;
    border-radius: 24px;
  }

  .accounts-grid {
    grid-template-columns: 1fr;
  }

  .panel-strip,
  .countdown-card__meta,
  .accounts-section__header,
  .accounts-section__tools,
  .otp-block,
  .modal-card__header,
  .modal-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .otp-block {
    align-items: flex-start;
  }

  .primary-button,
  .secondary-button,
  .ghost-button,
  .copy-button {
    width: 100%;
    justify-content: center;
  }

  .panel-strip__actions {
    width: 100%;
  }
}
