:root {
  color-scheme: dark;
  font-family: "Microsoft YaHei", "PingFang SC", "Helvetica Neue", Arial, sans-serif;
  --gold: #ffd166;
  --gold-soft: #ffe29c;
  --ink: #4b2300;
  --purple-deep: #1b053f;
  --purple-mid: #5622c1;
  --purple-card: rgba(66, 22, 134, 0.87);
}

* {
  box-sizing: border-box;
}

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

body {
  background: #15032e;
  color: #fff;
}

button,
input {
  font: inherit;
}

.refund-page {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  background:
    radial-gradient(circle at 20% 18%, rgba(255, 209, 102, 0.22), transparent 22rem),
    radial-gradient(circle at 82% 46%, rgba(255, 122, 26, 0.16), transparent 18rem),
    linear-gradient(180deg, #1b053f 0%, #5622c1 48%, #15032e 100%);
}

.content-shell {
  position: relative;
  z-index: 2;
  width: min(100%, 480px);
  min-height: 100vh;
  margin: 0 auto;
  padding: calc(env(safe-area-inset-top) + 18px) 18px 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  font-size: 19px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  color: var(--ink);
  background: linear-gradient(90deg, #ffd166, #ff9f1c);
}

.hero {
  margin-top: 18px;
  text-align: center;
}

.service-pill {
  display: inline-flex;
  padding: 6px 16px;
  border-radius: 999px;
  border: 1px solid rgba(255, 209, 102, 0.5);
  background: rgba(42, 11, 90, 0.56);
  color: var(--gold-soft);
  font-weight: 900;
  font-size: 14px;
}

.hero h1 {
  margin: 10px 0 12px;
  font-size: clamp(46px, 13vw, 54px);
  line-height: 1.04;
  letter-spacing: 0;
  font-weight: 900;
}

.hero p {
  margin: 0;
  color: #e8ddff;
  font-size: 15px;
  font-weight: 900;
}

.refund-card {
  width: 100%;
  margin-top: 18px;
  padding: 16px;
  border-radius: 8px;
  border: 1px solid rgba(220, 203, 255, 0.36);
  background: linear-gradient(180deg, rgba(66, 22, 134, 0.87), rgba(31, 7, 75, 0.93));
  box-shadow: 0 20px 60px rgba(10, 0, 28, 0.28);
}

.refund-card h2 {
  margin: 0 0 10px;
  color: var(--gold-soft);
  font-size: 15px;
  font-weight: 900;
}

.game-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.game-chip {
  height: 50px;
  border: 1px solid rgba(255, 224, 138, 0.62);
  border-radius: 8px;
  color: #fff;
  background: linear-gradient(180deg, rgba(124, 65, 233, 0.76), rgba(54, 17, 126, 0.86));
  font-size: 15px;
  font-weight: 900;
  text-align: center;
  cursor: pointer;
}

.game-chip.selected {
  color: var(--ink);
  border-color: #ffe08a;
  background: linear-gradient(180deg, #ffedb1, #ffae2f);
}

.game-chip:disabled,
.field input:disabled,
.submit-button:disabled {
  opacity: 0.58;
  cursor: not-allowed;
}

.field {
  display: block;
  margin-top: 14px;
}

.field span {
  display: block;
  margin-bottom: 8px;
  color: #f0e7ff;
  font-size: 14px;
  font-weight: 800;
}

.field input {
  width: 100%;
  min-height: 54px;
  padding: 0 14px;
  border-radius: 8px;
  border: 1px solid rgba(220, 203, 255, 0.42);
  outline: none;
  color: #fff;
  background: rgba(18, 4, 45, 0.72);
}

.field input::placeholder {
  color: rgba(232, 221, 255, 0.58);
}

.field input:focus {
  border-color: var(--gold);
}

.custom-game-field {
  display: none;
}

.custom-game-field.visible {
  display: block;
}

.submit-button {
  width: 100%;
  height: 62px;
  margin-top: 18px;
  border: 2px solid rgba(255, 255, 255, 0.7);
  border-radius: 999px;
  color: #552700;
  background: linear-gradient(90deg, #ffe78f, #ffb12d, #ff7a1a);
  font-size: 20px;
  font-weight: 900;
  cursor: pointer;
}

.helper-text {
  min-height: 18px;
  margin: 10px 0 0;
  color: #e9ddff;
  font-size: 13px;
  font-weight: 800;
  text-align: center;
}

.helper-text.error {
  color: #ffd166;
}

.tip {
  margin: 22px 0 0;
  color: rgba(236, 225, 255, 0.75);
  font-size: 12px;
  text-align: center;
}

.floating-label {
  position: absolute;
  z-index: 1;
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid rgba(255, 232, 164, 0.68);
  color: var(--ink);
  background: linear-gradient(90deg, rgba(255, 231, 143, 0.9), rgba(255, 151, 31, 0.86));
  font-size: 13px;
  font-weight: 900;
  opacity: 0.86;
  pointer-events: none;
}

.label-a {
  top: 178px;
  left: max(8px, calc(50% - 238px));
  transform: rotate(-6deg);
}

.label-b {
  top: 178px;
  right: max(8px, calc(50% - 238px));
  transform: rotate(5deg);
}

.label-c {
  top: 48%;
  left: max(10px, calc(50% - 236px));
  transform: rotate(4deg);
}

.label-d {
  top: 48%;
  right: max(8px, calc(50% - 238px));
  transform: rotate(-4deg);
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(8, 0, 24, 0.48);
}

.modal-backdrop[hidden] {
  display: none;
}

.status-dialog {
  width: min(100%, 390px);
  padding: 22px;
  border-radius: 8px;
  border: 1px solid rgba(255, 224, 138, 0.54);
  background: linear-gradient(180deg, rgba(71, 24, 148, 0.96), rgba(29, 6, 70, 0.98));
  text-align: center;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
}

.verify-badge {
  display: grid;
  place-items: center;
  width: 104px;
  height: 104px;
  margin: 0 auto 18px;
  border-radius: 50%;
  color: #522600;
  background: linear-gradient(90deg, #fff2a6, #ffbd3d, #ff7a1a);
  font-size: 38px;
  font-weight: 900;
}

.verify-badge.spinning {
  width: 132px;
  height: 132px;
  border: 2px solid rgba(229, 212, 255, 0.72);
  background: radial-gradient(circle, #ffbd3d 0 36%, transparent 37%);
  animation: spin 1.3s linear infinite;
}

.status-dialog h2 {
  margin: 0 0 10px;
  font-size: 24px;
  font-weight: 900;
}

.status-dialog p {
  margin: 0;
  color: #e9ddff;
  font-size: 15px;
  line-height: 1.6;
}

.countdown {
  display: block;
  margin-top: 8px;
  color: var(--gold-soft);
  font-size: 28px;
  font-weight: 900;
}

.processing-label {
  display: block;
  margin-top: 4px;
  color: #e9ddff;
  font-size: 13px;
  font-weight: 800;
}

.application-line {
  display: none;
  margin-top: 10px;
  padding: 10px;
  border-radius: 8px;
  color: var(--gold-soft);
  background: rgba(18, 4, 45, 0.52);
  font-size: 14px;
  font-weight: 900;
}

.cancel-button {
  display: none;
  width: 100%;
  height: 50px;
  margin-top: 16px;
  border: 1px solid rgba(255, 224, 138, 0.75);
  border-radius: 999px;
  color: var(--gold-soft);
  background: rgba(255, 209, 102, 0.12);
  font-weight: 900;
  cursor: pointer;
}

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

@media (max-width: 380px) {
  .content-shell {
    padding-left: 14px;
    padding-right: 14px;
  }

  .hero h1 {
    font-size: 44px;
  }

  .game-chip {
    padding-inline: 8px;
    font-size: 14px;
  }
}
