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

body {
  font-family: Arial, Helvetica, sans-serif;
  background: linear-gradient(145deg, #082f49, #075985 50%, #0e7490);
  min-height: 100vh;
  color: #0f172a;
  padding: 20px 15px;
}

.page {
  max-width: 900px;
  margin: 0 auto;
}

/* Header */
.header {
  text-align: center;
  color: white;
  padding: 30px 0 25px;
}

.header-logo {
  font-size: 50px;
  margin-bottom: 10px;
}

.header h1 {
  font-size: 32px;
  letter-spacing: -1px;
}

.header p {
  color: #cffafe;
  margin-top: 8px;
  font-size: 15px;
}

.account-link {
  display: inline-block;
  margin-top: 14px;
  padding: 9px 22px;
  border-radius: 999px;
  background: white;
  color: #075985;
  font-size: 14px;
  font-weight: bold;
  text-decoration: none;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  transition: transform 0.2s;
}

.account-link:hover {
  transform: translateY(-2px);
}

/* Cards */
.card {
  background: white;
  border-radius: 18px;
  padding: 25px;
  box-shadow: 0 20px 50px rgba(0,0,0,0.2);
  margin-bottom: 20px;
}

/* Package Grid */
.section-title {
  font-size: 20px;
  font-weight: bold;
  color: #0f172a;
  margin-bottom: 5px;
}

.section-subtitle {
  color: #64748b;
  font-size: 14px;
  margin-bottom: 20px;
}

.plan-tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.tab-btn {
  padding: 8px 20px;
  border-radius: 999px;
  border: 2px solid #e2e8f0;
  background: white;
  cursor: pointer;
  font-size: 14px;
  font-weight: bold;
  color: #64748b;
  transition: all 0.2s;
}

.tab-btn.active {
  border-color: #075985;
  background: #075985;
  color: white;
}

.packages-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 15px;
}

.package-card {
  border: 2px solid #e2e8f0;
  border-radius: 14px;
  padding: 18px;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
}

.package-card:hover {
  border-color: #0891b2;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}

.package-card.selected {
  border-color: #075985;
  background: #f0f9ff;
}

.package-card.unavailable {
  opacity: 0.6;
  cursor: not-allowed;
  background: #f8fafc;
}

.plan-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: bold;
  margin-bottom: 10px;
}

.badge-basic {
  background: #dbeafe;
  color: #1e40af;
}

.badge-premium {
  background: #fef3c7;
  color: #92400e;
}

.badge-family {
  background: #d1fae5;
  color: #065f46;
}

.badge-soldout {
  background: #fee2e2;
  color: #991b1b;
}

.plan-validity {
  font-size: 18px;
  font-weight: bold;
  color: #0f172a;
  margin-bottom: 8px;
}

.plan-price {
  font-size: 24px;
  font-weight: bold;
  color: #075985;
  margin-bottom: 12px;
}

.plan-price span {
  font-size: 13px;
  color: #64748b;
  font-weight: normal;
}

.plan-features {
  list-style: none;
  font-size: 12px;
  color: #475569;
}

.plan-features li {
  padding: 3px 0;
}

.plan-features li::before {
  content: "✓ ";
  color: #16a34a;
  font-weight: bold;
}

.spots-left {
  font-size: 11px;
  color: #dc2626;
  margin-top: 8px;
  font-weight: bold;
}

/* Form */
.form-title {
  font-size: 18px;
  font-weight: bold;
  margin-bottom: 5px;
  color: #0f172a;
}

.selected-plan-summary {
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  border-radius: 10px;
  padding: 12px 15px;
  margin-bottom: 20px;
  font-size: 14px;
  color: #0369a1;
}

.field {
  margin-bottom: 15px;
}

.field label {
  display: block;
  font-size: 13px;
  font-weight: bold;
  color: #334155;
  margin-bottom: 6px;
}

.field input {
  width: 100%;
  height: 46px;
  padding: 0 14px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  font-size: 15px;
  background: #f8fafc;
  color: #0f172a;
  outline: none;
}

.field input:focus {
  border-color: #0891b2;
  background: white;
  box-shadow: 0 0 0 3px rgba(8,145,178,0.12);
}

.btn {
  display: block;
  width: 100%;
  padding: 14px;
  border: none;
  border-radius: 10px;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
}

.btn-primary {
  background: #16a34a;
  color: white;
}

.btn-primary:hover {
  background: #15803d;
}

.btn-primary:disabled {
  background: #94a3b8;
  cursor: not-allowed;
}

.btn-secondary {
  background: #075985;
  color: white;
  margin-top: 10px;
}

.error-msg {
  color: #dc2626;
  font-size: 13px;
  margin-top: 8px;
  display: none;
}

.loading {
  display: none;
  text-align: center;
  padding: 20px;
  color: #64748b;
}

/* Footer */
.footer {
  text-align: center;
  color: #bae6fd;
  font-size: 12px;
  padding: 20px 0;
}

/* Responsive */
@media (max-width: 600px) {
  .packages-grid {
    grid-template-columns: 1fr 1fr;
  }

  .header h1 {
    font-size: 26px;
  }
}

@media (max-width: 400px) {
  .packages-grid {
    grid-template-columns: 1fr;
  }
}