/* ============================================================
   FAST NET WIFI - Portail Captif Moderne
   ============================================================ */

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen,
    Ubuntu, Cantarell, 'Helvetica Neue', Arial, sans-serif;
  font-size: 14px;
  min-height: 100vh;
  background: linear-gradient(135deg, #0f0c29, #302b63, #24243e);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
  margin: 0;
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes slideDown {
  from { opacity: 0; max-height: 0; }
  to { opacity: 1; max-height: 600px; }
}

.main {
  max-width: 420px;
  width: 100%;
  animation: fadeInUp 0.6s ease-out;
}

.card {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 24px;
  padding: 32px 24px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.5);
  text-align: center;
}

.brand {
  font-size: 28px;
  font-weight: 900;
  color: #fff;
  margin-bottom: 4px;
  letter-spacing: -0.5px;
}

.brand-sub {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.4);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 3px;
  margin-bottom: 24px;
}

.logo-icon {
  width: 72px;
  height: 72px;
  background: linear-gradient(135deg, #667eea, #764ba2);
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  font-size: 32px;
  color: #fff;
  box-shadow: 0 8px 32px rgba(102, 126, 234, 0.4);
}

.tabs {
  display: flex;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  padding: 4px;
  margin-bottom: 24px;
  gap: 4px;
}

.tab-btn {
  flex: 1;
  padding: 10px 8px;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: rgba(255, 255, 255, 0.4);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.tab-btn:hover { color: rgba(255, 255, 255, 0.7); }

.tab-btn.active {
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: #fff;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.momo-section { display: none; animation: slideDown 0.4s ease-out; }
.momo-section.active { display: block; }

.momo-section h3 {
  color: #fff;
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 4px;
}

.momo-section .subtitle {
  color: rgba(255, 255, 255, 0.5);
  font-size: 13px;
  margin-bottom: 20px;
}

.payment-methods {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-bottom: 20px;
}

.payment-method {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.5);
  font-weight: 600;
}

.payment-method .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  display: inline-block;
}
.dot.orange { background: #ff6600; }
.dot.m-pesa { background: #4caf50; }
.dot.airtel { background: #e91e63; }

.plans { display: flex; flex-direction: column; gap: 8px; margin-bottom: 20px; }

.plan-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 12px 16px;
  cursor: pointer;
  transition: all 0.25s ease;
  text-align: left;
}

.plan-card:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(102, 126, 234, 0.3);
  transform: translateX(2px);
}

.plan-card.selected {
  border-color: #667eea;
  background: rgba(102, 126, 234, 0.12);
  box-shadow: 0 0 20px rgba(102, 126, 234, 0.1);
}

.plan-info { flex: 1; }
.plan-info .plan-name { color: #fff; font-size: 15px; font-weight: 700; }
.plan-info .plan-desc { color: rgba(255, 255, 255, 0.4); font-size: 12px; margin-top: 2px; }

.plan-price {
  font-size: 18px;
  font-weight: 900;
  color: #667eea;
  white-space: nowrap;
}

.plan-price .currency { font-size: 12px; font-weight: 600; opacity: 0.7; }

.plan-radio {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.2);
  margin-right: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.25s ease;
  flex-shrink: 0;
}

.plan-card.selected .plan-radio {
  border-color: #667eea;
  background: #667eea;
}

.plan-card.selected .plan-radio::after {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #fff;
}

.input-group { text-align: left; margin-bottom: 16px; }

.input-group label {
  display: block;
  color: rgba(255, 255, 255, 0.6);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}

.input-group .phone-input-wrapper {
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  overflow: hidden;
  transition: border-color 0.3s ease;
}

.input-group .phone-input-wrapper:focus-within {
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.15);
}

.input-group .country-code {
  padding: 12px 8px 12px 14px;
  color: rgba(255, 255, 255, 0.5);
  font-size: 15px;
  font-weight: 600;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  white-space: nowrap;
}

.input-group input {
  flex: 1;
  padding: 12px 14px;
  border: none;
  background: transparent;
  color: #fff;
  font-size: 16px;
  font-weight: 500;
  outline: none;
  width: 100%;
}

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

.btn-primary {
  width: 100%;
  padding: 14px;
  border: none;
  border-radius: 14px;
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: #fff;
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.btn-primary:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(102, 126, 234, 0.35);
}

.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-primary .btn-content { display: flex; align-items: center; justify-content: center; gap: 8px; }

.spinner {
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

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

.status-box {
  display: none;
  margin-top: 16px;
  padding: 14px 16px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.5;
  animation: fadeInUp 0.3s ease-out;
}

.status-box.show { display: block; }
.status-box.success { background: rgba(76, 175, 80, 0.12); border: 1px solid rgba(76, 175, 80, 0.2); color: #81c784; }
.status-box.error { background: rgba(244, 67, 54, 0.12); border: 1px solid rgba(244, 67, 54, 0.2); color: #e57373; }
.status-box.info { background: rgba(33, 150, 243, 0.12); border: 1px solid rgba(33, 150, 243, 0.2); color: #64b5f6; }

.status-box .ussd-code { display: block; font-size: 28px; font-weight: 900; color: #fff; margin: 8px 0; letter-spacing: 2px; }

.voucher-section { display: none; }
.voucher-section.active { display: block; }

.voucher-section input {
  width: 100%;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  color: #fff;
  font-size: 18px;
  font-weight: 700;
  text-align: center;
  letter-spacing: 4px;
  outline: none;
  transition: all 0.3s ease;
  margin-bottom: 12px;
  text-transform: uppercase;
}

.voucher-section input:focus {
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.15);
}

.voucher-section input::placeholder {
  color: rgba(255, 255, 255, 0.2);
  letter-spacing: 1px;
  font-size: 14px;
  font-weight: 400;
}

#infologin {
  color: rgba(255, 255, 255, 0.4);
  font-size: 12px;
  margin-bottom: 8px;
  min-height: 18px;
}

.footer {
  margin-top: 24px;
  text-align: center;
}

.footer p { color: rgba(255, 255, 255, 0.3); font-size: 11px; }
.footer a { color: rgba(255, 255, 255, 0.4); text-decoration: none; transition: color 0.2s; }
.footer a:hover { color: rgba(255, 255, 255, 0.7); }

@media screen and (max-width: 480px) {
  body { padding: 12px; justify-content: flex-start; padding-top: 40px; }
  .card { padding: 24px 16px; border-radius: 20px; }
  .brand { font-size: 24px; }
  .plan-card { padding: 10px 14px; }
  .plan-price { font-size: 16px; }
}
