.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgb(15 23 42 / 0.55);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.2s ease;
}

.modal-overlay.active {
  display: flex;
}

.modal-card {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-xl);
  border: 1px solid var(--border);
  width: 100%;
  max-width: 420px;
  padding: 32px;
  position: relative;
  animation: fadeIn 0.3s ease;
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 14px;
  background: none;
  border: none;
  font-size: 1.15rem;
  color: var(--text-secondary);
  cursor: pointer;
  line-height: 1;
  padding: 4px 8px;
  border-radius: 4px;
  transition: color 0.15s, background 0.15s;
}

.modal-close:hover {
  color: var(--text);
  background: var(--bg);
}

.modal-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 24px;
  border-bottom: 2px solid var(--border);
}

.tab {
  flex: 1;
  padding: 10px 0;
  font-size: 0.9rem;
  font-weight: 600;
  font-family: inherit;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
}

.tab.active {
  color: var(--primary);
  border-color: var(--primary);
}

.tab-content {
  display: none;
  text-align: center;
  margin-bottom: 28px;
}

.tab-content.active {
  display: block;
}

.pricing-card {
  background: linear-gradient(135deg, #f8fafc 0%, #eff6ff 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px 20px;
  text-align: center;
}

.pricing-amount {
  display: inline-flex;
  align-items: flex-start;
  justify-content: center;
  gap: 1px;
  background: var(--primary-light);
  border-radius: var(--radius-sm);
  padding: 4px 14px;
  margin-bottom: 6px;
}

.pricing-amount .currency {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--primary);
  margin-top: 2px;
}

.pricing-amount .amount {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--primary);
  line-height: 1;
  letter-spacing: -0.02em;
}

.pricing-amount .cents {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--primary);
  margin-top: 1px;
}

.pricing-subtitle {
  font-size: 0.8rem;
  color: var(--text-secondary);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 18px;
}

.pricing-divider {
  height: 1px;
  background: var(--border);
  margin: 0 auto 18px;
  width: 60%;
}

.pricing-features {
  list-style: none;
  padding: 0;
  margin: 0 0 20px;
  text-align: left;
  display: inline-block;
}

.pricing-features li {
  font-size: 0.84rem;
  color: var(--text-secondary);
  font-weight: 500;
  line-height: 2;
}

.pricing-features .check {
  color: var(--green);
  font-weight: 700;
  margin-right: 8px;
}

.pricing-card form {
  margin-top: 4px;
}

.redeem-section {
  border-top: 1px solid var(--border);
  padding-top: 24px;
  text-align: center;
}

.redeem-section label {
  display: block;
  font-size: 0.825rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 10px;
}

.redeem-row {
  margin-bottom: 10px;
}

.redeem-row input {
  width: 100%;
  padding: 10px 14px;
  font-size: 0.9rem;
  font-family: inherit;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.redeem-row input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgb(37 99 235 / 0.12);
  background: var(--surface);
}

.redeem-btn {
  width: 100%;
  padding: 10px 20px;
  font-size: 0.85rem;
  font-weight: 600;
  font-family: inherit;
  background: var(--surface);
  color: var(--primary);
  border: 2px solid var(--primary);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.redeem-btn:hover {
  background: var(--primary);
  color: #ffffff;
}

.redeem-error {
  color: #ef4444;
  font-size: 0.78rem;
  font-weight: 500;
  margin-bottom: 10px;
  display: none;
  text-align: left;
}

.redeem-error.visible {
  display: block;
}

.pay-btn {
  width: 100%;
  padding: 10px 20px;
  font-size: 0.85rem;
  font-weight: 600;
  font-family: inherit;
  background: var(--primary);
  color: #ffffff;
  border: 2px solid var(--primary);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.15s, opacity 0.15s;
}

.pay-btn:hover {
  opacity: 0.9;
}

.pay-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

@media (max-width: 640px) {
  .modal-card {
    margin: 16px;
    padding: 24px 20px;
    max-width: none;
  }

}
