:root {
  color-scheme: dark;
  font-family: Arial, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #0f172a;
  color: #f8fafc;
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at 18% 0%, rgba(250, 204, 21, 0.14), transparent 28%),
    radial-gradient(circle at 92% 16%, rgba(34, 197, 94, 0.12), transparent 26%),
    linear-gradient(160deg, #172554 0%, #0f172a 44%, #111827 100%);
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.52;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.app-shell {
  width: min(100%, 860px);
  min-height: 100vh;
  margin: 0 auto;
  padding: 20px;
}

.app-card {
  min-height: calc(100vh - 40px);
  padding: 24px;
  border: 1px solid #334155;
  border-radius: 20px;
  background: #111827;
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.32);
}

.top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 24px;
}

.logo {
  font-size: 18px;
  font-weight: 800;
}

.language-trigger,
.form-item input,
.form-item select {
  width: 100%;
  min-height: 48px;
  border: 1px solid #475569;
  border-radius: 12px;
  outline: none;
  background: #020617;
  color: #f8fafc;
}

.language-select {
  position: relative;
  width: 220px;
  z-index: 30;
}

.language-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 12px;
}

.language-caret {
  color: #94a3b8;
  font-size: 16px;
  line-height: 1;
}

.language-picker-backdrop {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(2, 6, 23, 0.72);
  z-index: 1000;
}

.language-picker-panel {
  width: min(100%, 420px);
  max-height: min(78vh, 560px);
  overflow: hidden;
  border: 1px solid #475569;
  border-radius: 18px;
  background: #0f172a;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.48);
}

.language-picker-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid #334155;
}

.language-close {
  width: 36px;
  height: 36px;
  border: 1px solid #475569;
  border-radius: 10px;
  background: #020617;
  color: #e2e8f0;
  font-size: 22px;
  line-height: 1;
}

.language-option-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  max-height: calc(min(78vh, 560px) - 65px);
  overflow-y: auto;
  padding: 14px;
}

.language-option {
  width: 100%;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid #334155;
  border-radius: 10px;
  background: #020617;
  color: #e2e8f0;
  text-align: center;
}

.language-option:hover,
.language-option.active {
  background: #064e3b;
  color: #bbf7d0;
}

.form-item input,
.form-item select {
  margin-top: 8px;
  padding: 0 14px;
}

.language-trigger:focus,
.form-item input:focus,
.form-item select:focus {
  border-color: #22c55e;
}

.progress-block {
  margin-bottom: 24px;
}

.progress-text {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
  color: #cbd5e1;
}

.progress-bar {
  width: 100%;
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #334155;
}

.progress-bar-fill {
  height: 100%;
  border-radius: inherit;
  background: #22c55e;
  transition: width 0.25s ease;
}

.home-flow {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.hero-card,
.stats-card,
.records-card,
.feedback-card,
.notice-card,
.step-panel,
.result-panel,
.form-panel {
  border: 1px solid #334155;
  border-radius: 20px;
  background: linear-gradient(180deg, #151b3d 0%, #0f172a 100%);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.22);
}

.hero-card {
  position: relative;
  overflow: hidden;
  padding: 20px;
  border-color: rgba(250, 204, 21, 0.38);
}

.reward-visual {
  position: absolute;
  top: -42px;
  right: -44px;
  width: 210px;
  opacity: 0.24;
  pointer-events: none;
}

.hero-badge {
  position: relative;
  display: inline-flex;
  margin-bottom: 14px;
  padding: 8px 12px;
  border: 1px solid rgba(34, 197, 94, 0.36);
  border-radius: 999px;
  background: rgba(34, 197, 94, 0.12);
  color: #86efac;
  font-size: 13px;
  font-weight: 800;
}

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

h1 {
  margin-bottom: 12px;
  color: #f8fafc;
  font-size: 38px;
  line-height: 1.08;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 8px;
  font-size: 18px;
  letter-spacing: 0;
}

p {
  color: #cbd5e1;
  line-height: 1.6;
}

.hero-desc {
  max-width: 620px;
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 16px 0;
}

.hero-tags span {
  padding: 8px 12px;
  border: 1px solid #334155;
  border-radius: 999px;
  background: #020617;
  color: #cbd5e1;
  font-size: 13px;
}

.reward-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 16px;
  padding: 18px;
  border: 1px solid rgba(250, 204, 21, 0.32);
  border-radius: 18px;
  background: #070b25;
}

.reward-label {
  margin-bottom: 6px;
  color: #facc15;
  font-weight: 800;
}

.reward-amount {
  color: #facc15;
  font-size: 40px;
  font-weight: 900;
  line-height: 1;
}

.reward-amount span {
  margin-left: 4px;
  color: #fff;
  font-size: 16px;
}

.reward-note {
  margin-top: 8px;
  color: #94a3b8;
  font-size: 12px;
  line-height: 1.5;
}

.safe-line {
  margin-top: 14px;
  padding: 12px;
  border: 1px solid rgba(34, 197, 94, 0.36);
  border-radius: 12px;
  background: rgba(6, 78, 59, 0.5);
  color: #bbf7d0;
  font-size: 14px;
  line-height: 1.5;
}

.step-cards,
.option-grid {
  display: grid;
  gap: 12px;
}

.step-cards {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.mini-step,
.option,
.check {
  border: 1px solid #334155;
  border-radius: 14px;
  background: #1e293b;
  color: #e2e8f0;
}

.mini-step {
  padding: 14px;
}

.mini-step b {
  display: block;
  margin-bottom: 6px;
  color: #facc15;
  font-size: 18px;
}

.mini-step span {
  font-size: 13px;
  line-height: 1.4;
}

.stats-card,
.records-card,
.feedback-card,
.notice-card,
.step-panel,
.result-panel,
.form-panel {
  padding: 20px;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.section-head h2 {
  margin: 0;
}

.section-head span {
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.14);
  color: #cbd5e1;
  font-size: 12px;
}

.completed-number {
  color: #facc15;
  font-size: 42px;
  font-weight: 900;
  letter-spacing: 1px;
}

.records-table {
  overflow: hidden;
  border: 1px solid #1e293b;
  border-radius: 14px;
  background: #070b25;
}

.record-header,
.record-row {
  display: grid;
  grid-template-columns: 1fr 1.4fr 1fr;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
}

.record-header {
  background: rgba(15, 23, 42, 0.86);
  color: #94a3b8;
  font-size: 13px;
  font-weight: 800;
}

.records-scroll {
  height: 300px;
  overflow: hidden;
  position: relative;
}

.records-track {
  animation: records-scroll 24s linear infinite;
}

.records-scroll:hover .records-track {
  animation-play-state: paused;
}

@keyframes records-scroll {
  0% {
    transform: translateY(0);
  }
  100% {
    transform: translateY(-50%);
  }
}

.record-row {
  border-top: 1px solid #1e293b;
  color: #e2e8f0;
  font-size: 13px;
}

.record-row b {
  color: #facc15;
  text-align: right;
}

.network-tag {
  width: fit-content;
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.network-tag.trc {
  background: rgba(20, 184, 166, 0.18);
  color: #5eead4;
}

.network-tag.bep {
  background: rgba(250, 204, 21, 0.18);
  color: #fde047;
}

.network-tag.erc {
  background: rgba(99, 102, 241, 0.18);
  color: #a5b4fc;
}

.network-tag.polygon {
  background: rgba(139, 92, 246, 0.18);
  color: #c4b5fd;
}

.wallet-mask {
  width: fit-content;
  padding: 4px 8px;
  border-radius: 7px;
  background: rgba(148, 163, 184, 0.1);
  color: #cbd5e1;
  font-weight: 800;
}

.record-footer,
.feedback-box small {
  color: #94a3b8;
  font-size: 13px;
}

.feedback-box {
  border-radius: 14px;
  background: #070b25;
  padding: 18px;
}

.stars {
  margin-bottom: 8px;
  color: #facc15;
  letter-spacing: 2px;
}

.notice-card {
  border-color: rgba(34, 197, 94, 0.36);
}

.notice-card p,
.feedback-box p {
  margin: 0 0 12px;
}

.step-panel,
.form-panel,
.result-panel {
  min-height: 520px;
}

.option-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 20px;
}

.option {
  min-height: 70px;
  padding: 16px;
  text-align: left;
  font-size: 15px;
}

.country-option {
  display: flex;
  align-items: center;
  gap: 12px;
}

.country-flag {
  display: inline-flex;
  width: 30px;
  flex: 0 0 auto;
  font-size: 24px;
  line-height: 1;
}

.option:hover,
.option.active,
.check:hover,
.check.active {
  border-color: #22c55e;
  background: #064e3b;
}

.check-list {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.check {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px;
  text-align: left;
}

.check-box {
  display: inline-grid;
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid #64748b;
  border-radius: 6px;
  color: #bbf7d0;
  font-weight: 900;
}

.main-btn,
.second-btn,
.hero-btn {
  min-height: 48px;
  border-radius: 12px;
  padding: 0 22px;
  border: 0;
  font-weight: 900;
}

.main-btn,
.hero-btn {
  background: #22c55e;
  color: #052e16;
}

.hero-btn {
  background: linear-gradient(180deg, #facc15, #f59e0b);
  color: #1c1917;
  box-shadow: 0 10px 25px rgba(245, 158, 11, 0.25);
}

.second-btn {
  border: 1px solid #475569;
  background: transparent;
  color: #cbd5e1;
}

.full-width {
  width: 100%;
}

.gift-mark {
  display: inline-flex;
  margin-bottom: 14px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(250, 204, 21, 0.14);
  color: #facc15;
  font-weight: 900;
}

.result-box {
  overflow: hidden;
  margin: 20px 0;
  border: 1px solid #334155;
  border-radius: 14px;
}

.result-box div {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 14px;
  border-bottom: 1px solid #334155;
}

.result-box div:last-child {
  border-bottom: 0;
}

.result-box span {
  color: #94a3b8;
}

.form-item {
  display: block;
  margin-bottom: 14px;
  color: #cbd5e1;
  font-size: 14px;
}

.warning {
  margin: 16px 0;
  padding: 14px;
  border: 1px solid #a16207;
  border-radius: 12px;
  background: #422006;
  color: #fde68a;
  line-height: 1.5;
}

.agree {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 14px 0;
  color: #cbd5e1;
}

.agree input {
  margin-top: 3px;
}

.success-message {
  margin: 18px 0;
  padding: 16px;
  border: 1px solid #22c55e;
  border-radius: 14px;
  background: #064e3b;
  color: #bbf7d0;
  font-weight: 800;
  line-height: 1.6;
}

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

  .app-card {
    min-height: calc(100vh - 28px);
    padding: 18px;
  }

  .top-bar {
    align-items: stretch;
    flex-direction: column;
  }

  .language-select {
    width: 100%;
  }

  .language-picker-backdrop {
    align-items: end;
    padding: 12px;
  }

  .language-picker-panel {
    width: 100%;
  }

  .language-option-grid {
    grid-template-columns: 1fr;
  }

  h1 {
    font-size: 30px;
  }

  .reward-card,
  .result-box div {
    align-items: stretch;
    flex-direction: column;
  }

  .hero-btn,
  .main-btn,
  .second-btn {
    width: 100%;
  }

  .reward-amount {
    font-size: 34px;
  }

  .step-cards,
  .option-grid {
    grid-template-columns: 1fr;
  }

  .record-header,
  .record-row {
    grid-template-columns: 0.9fr 1.3fr 0.9fr;
    padding: 10px;
    font-size: 12px;
  }

  .records-scroll {
    height: 280px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .records-track {
    animation: none;
  }
}
