* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bg-primary: #0d1329;
  --bg-secondary: #1a2140;
  --bg-card: #252b4a;
  --accent-pink: #ff3b6f;
  --accent-pink-dark: #cc2f59;
  --accent-blue: #4a6cf7;
  --text-primary: #ffffff;
  --text-secondary: #8892b0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
  background: linear-gradient(180deg, var(--bg-primary) 0%, #0a0f1f 100%);
  min-height: 100vh;
  min-height: 100dvh;
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
}

.app {
  max-width: 430px;
  margin: 0 auto;
  min-height: 100vh;
  min-height: 100dvh;
}

/* ---- Screen system ---- */
.screen {
  display: none;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
  padding: 40px 20px;
  padding-bottom: calc(24px + env(safe-area-inset-bottom, 0px));
}
.screen.active { display: flex; }

/* ---- Header ---- */
.payment-header {
  text-align: center;
  margin-bottom: 28px;
  padding-top: 16px;
}

.payment-icon {
  font-size: 48px;
  margin-bottom: 12px;
}

.payment-title {
  font-size: 24px;
  font-weight: 800;
  margin-bottom: 8px;
  line-height: 1.3;
}

.payment-title a {
  color: var(--accent-pink);
  text-decoration: none;
}

.payment-subtitle {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.4;
}

/* ---- UUID input section ---- */
.input-section {
  margin-bottom: 24px;
}

.input-label {
  display: block;
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 8px;
}

.input-field {
  width: 100%;
  padding: 14px 16px;
  font-size: 15px;
  font-family: 'SF Mono', 'Fira Code', monospace;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  color: var(--text-primary);
  outline: none;
  transition: border-color 0.2s;
}

.input-field::placeholder {
  color: rgba(255, 255, 255, 0.25);
}

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

.input-field.error {
  border-color: var(--accent-pink);
}

.input-hint {
  margin-top: 8px;
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.4;
}

.input-hint a {
  color: var(--accent-blue);
  text-decoration: none;
}

/* ---- Plan cards ---- */
.plans-label {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 12px;
  display: block;
}

.plans-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 24px;
}

.plan-card {
  background: var(--bg-card);
  border-radius: 16px;
  padding: 16px 20px;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  position: relative;
}

.plan-card:active { transform: scale(0.98); }

.plan-card.selected {
  border-color: var(--accent-pink);
  background: linear-gradient(135deg, rgba(255, 59, 111, 0.12) 0%, rgba(74, 108, 247, 0.08) 100%);
}

.plan-radio {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid var(--text-secondary);
  flex-shrink: 0;
  margin-right: 14px;
  transition: all 0.2s ease;
}

.plan-card.selected .plan-radio {
  border-color: var(--accent-pink);
  background: var(--accent-pink);
  box-shadow: inset 0 0 0 3px var(--bg-card);
}

.plan-info {
  flex: 1;
}

.plan-name {
  font-size: 16px;
  font-weight: 700;
}

.plan-price {
  font-size: 16px;
  font-weight: 700;
  color: var(--accent-pink);
  flex-shrink: 0;
  margin-left: 12px;
}

/* ---- Payment method ---- */
.method-label {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 12px;
  display: block;
}

.method-card {
  background: var(--bg-card);
  border-radius: 16px;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  border: 2px solid var(--accent-pink);
  margin-bottom: 24px;
  background: linear-gradient(135deg, rgba(255, 59, 111, 0.12) 0%, rgba(74, 108, 247, 0.08) 100%);
}

.method-radio {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid var(--accent-pink);
  background: var(--accent-pink);
  box-shadow: inset 0 0 0 3px var(--bg-card);
  flex-shrink: 0;
  margin-right: 14px;
}

.method-name {
  font-size: 15px;
  font-weight: 600;
}

/* ---- Pay button ---- */
.btn-pay {
  width: 100%;
  background: linear-gradient(135deg, var(--accent-pink) 0%, var(--accent-pink-dark) 100%);
  border: none;
  color: white;
  padding: 18px;
  border-radius: 30px;
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  box-shadow: 0 4px 20px rgba(255, 59, 111, 0.3);
}

.btn-pay:active { transform: scale(0.97); }

.btn-pay:disabled {
  background: var(--bg-card);
  color: var(--text-secondary);
  box-shadow: none;
  cursor: not-allowed;
}

.payment-note {
  text-align: center;
  color: var(--text-secondary);
  font-size: 12px;
  margin-top: 16px;
}

/* ---- Result screens ---- */
.result-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1;
  text-align: center;
  gap: 16px;
  padding: 0 20px;
}

.result-icon { font-size: 64px; }

.result-title {
  font-size: 26px;
  font-weight: 800;
}

.result-text {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.btn-secondary {
  width: 100%;
  background: transparent;
  border: 2px solid #3a4167;
  color: var(--text-secondary);
  padding: 16px;
  border-radius: 30px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.btn-secondary:active { transform: scale(0.97); }

/* ---- Spinner ---- */
.spinner-small {
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  margin-right: 8px;
}

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

/* ---- Responsive ---- */
@media (max-width: 380px) {
  .screen { padding: 24px 16px; }
  .payment-title { font-size: 20px; }
  .payment-icon { font-size: 40px; }
  .plan-card { padding: 14px 16px; border-radius: 14px; }
}
