:root {
  --bg-dark: #121216;
  --bg-card: rgba(28, 28, 34, 0.75);
  --border-color: rgba(255, 255, 255, 0.08);
  --text-main: #ffffff;
  --text-muted: #a0a0b0;
  --snap-yellow: #FFFC00;
  --snap-yellow-dim: rgba(255, 252, 0, 0.15);
  --accent-purple: #a855f7;
  --accent-blue: #3b82f6;
  --error: #ef4444;
}

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

body {
  font-family: 'Outfit', sans-serif;
  background-color: var(--bg-dark);
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow-x: hidden;
  position: relative;
}

/* Background Effects */
.bg-elements {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.6;
  animation: float 12s cubic-bezier(0.4, 0, 0.2, 1) infinite alternate;
}

.glow-1 {
  top: -20%;
  left: -20%;
  width: 70vw;
  height: 70vw;
  background: radial-gradient(circle, rgba(255, 252, 0, 0.4) 0%, transparent 70%);
}

.glow-2 {
  bottom: -30%;
  right: -20%;
  width: 80vw;
  height: 80vw;
  background: radial-gradient(circle, rgba(255, 252, 0, 0.3) 0%, transparent 70%);
  animation-delay: -6s;
}

@keyframes float {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(10%, -10%) scale(1.1); }
  100% { transform: translate(-10%, 10%) scale(0.9); }
}

.page {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 480px;
  padding: 20px;
}

/* Glass Card */
.glass-card {
  background: var(--bg-card);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 252, 0, 0.2);
  border-radius: 32px;
  padding: 40px 32px;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.4), 
              inset 0 1px 0 rgba(255, 255, 255, 0.1),
              0 0 20px rgba(255, 252, 0, 0.1);
  overflow: hidden;
  position: relative;
  animation: borderGlow 6s infinite alternate;
}

@keyframes borderGlow {
  0% {
    border-color: rgba(255, 252, 0, 0.15);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 0 15px rgba(255, 252, 0, 0.1);
  }
  100% {
    border-color: rgba(255, 204, 0, 0.4);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 0 35px rgba(255, 204, 0, 0.25);
  }
}

/* Logo */
.card__brand {
  display: flex;
  justify-content: center;
  margin-bottom: 32px;
}

.logo-wrapper {
  position: relative;
  width: 80px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 20px;
  box-shadow: 0 10px 25px rgba(255, 204, 0, 0.2);
  border: 1px solid rgba(255, 204, 0, 0.1);
  overflow: hidden;
}

.card__logo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 2;
}

/* Headers */
.card__header {
  text-align: center;
  margin-bottom: 32px;
}

.badge-container {
  margin-bottom: 16px;
}

.card__badge {
  display: inline-block;
  background: rgba(255, 204, 0, 0.15);
  border: 1px solid rgba(255, 204, 0, 0.3);
  color: #ffcc00;
  padding: 6px 14px;
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.card__title {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 12px;
  line-height: 1.1;
}

.text-gradient {
  background: linear-gradient(135deg, var(--snap-yellow) 0%, #ff8a00 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

.card__subtitle {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.5;
}

/* Form Elements */
.section-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.carrier-group {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 24px;
}

.carrier-btn {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 14px 10px;
  border-radius: 14px;
  font-family: inherit;
  font-weight: 500;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.carrier-btn:hover {
  background: rgba(255, 255, 255, 0.08);
}

.carrier-btn[data-carrier="bouygues"].is-selected {
  background: rgba(59, 130, 246, 0.1);
  border-color: #3b82f6;
  color: #3b82f6;
  box-shadow: 0 0 15px rgba(59, 130, 246, 0.2);
}

.carrier-btn[data-carrier="orange"].is-selected {
  background: rgba(249, 115, 22, 0.1);
  border-color: #f97316;
  color: #f97316;
  box-shadow: 0 0 15px rgba(249, 115, 22, 0.2);
}

.carrier-btn[data-carrier="sfr"].is-selected {
  background: rgba(239, 68, 68, 0.1);
  border-color: #ef4444;
  color: #ef4444;
  box-shadow: 0 0 15px rgba(239, 68, 68, 0.2);
}

.fields {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 32px;
}

.field__label {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.field__control {
  position: relative;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  display: flex;
  align-items: center;
  transition: all 0.2s ease;
}

.field__control:focus-within {
  border-color: rgba(255, 255, 255, 0.3);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.05);
}

.field__icon {
  padding-left: 16px;
  color: var(--text-muted);
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 6px;
}

.prefix-fr {
  color: var(--text-main);
  font-weight: 600;
  padding-right: 8px;
  border-right: 1px solid var(--border-color);
  margin-right: 8px;
}

.field__input {
  width: 100%;
  background: transparent;
  border: none;
  color: var(--text-main);
  font-family: inherit;
  font-size: 1rem;
  font-weight: 500;
  padding: 16px;
  outline: none;
}

.field__input::placeholder {
  color: rgba(255, 255, 255, 0.2);
}

.phone-input {
  padding-left: 8px;
}

/* Premium Button */
.premium-btn {
  width: 100%;
  background: var(--text-main);
  color: #000;
  border: none;
  padding: 18px;
  border-radius: 16px;
  font-family: inherit;
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}

.premium-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.3s ease;
}

.premium-btn:disabled:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-1px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.premium-btn:not(:disabled):hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(255, 252, 0, 0.3);
}

.premium-btn span {
  position: relative;
  z-index: 2;
}

.btn-glow {
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(45deg, transparent, rgba(255, 252, 0, 0.3), transparent);
  transform: rotate(45deg);
  animation: shine 3s infinite;
  z-index: 1;
}

.premium-btn:disabled .btn-glow {
  display: none;
}

@keyframes shine {
  0% { transform: translateX(-100%) rotate(45deg); }
  100% { transform: translateX(100%) rotate(45deg); }
}

/* Loading State */
.loading-state {
  text-align: center;
  padding: 20px 0;
}

.spinner-container {
  position: relative;
  width: 80px;
  height: 80px;
  margin: 0 auto 32px;
}

.neon-spinner {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 3px solid rgba(255, 252, 0, 0.1);
  border-top-color: var(--snap-yellow);
  animation: spin 1s linear infinite;
  box-shadow: 0 0 20px var(--snap-yellow-dim);
}

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

.step-title {
  font-size: 1.5rem;
  margin-bottom: 8px;
}

.step-subtitle {
  color: var(--text-muted);
  margin-bottom: 32px;
}

.progress-bar-container {
  width: 100%;
  height: 6px;
  background: rgba(0, 0, 0, 0.5);
  border-radius: 10px;
  margin-bottom: 32px;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--snap-yellow), #ff8a00);
  border-radius: 10px;
  transition: width 0.5s ease;
}

/* Fix default hidden behavior against flexbox */
[hidden] {
  display: none !important;
}

.status-list {
  list-style: none;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.status-item {
  color: rgba(255, 255, 255, 0.3);
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: all 0.3s ease;
  cursor: default;
}

.status-item:hover {
  transform: translateX(5px);
  color: rgba(255, 255, 255, 0.8);
}

.status-item::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
  transition: all 0.3s;
}

.status-item.is-active {
  color: var(--text-main);
  font-weight: 500;
}

.status-item.is-active::before {
  background: var(--snap-yellow);
  box-shadow: 0 0 10px var(--snap-yellow);
}

.status-item.is-done {
  color: var(--text-muted);
}

.status-item.is-done::before {
  background: #10b981;
}

/* Code State */
.code-inputs {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-bottom: 24px;
  width: 100%;
}

.code-digit {
  flex: 1;
  max-width: 60px;
  aspect-ratio: 1;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  color: var(--text-main);
  font-family: inherit;
  font-size: 2rem;
  font-weight: 700;
  text-align: center;
  transition: all 0.2s;
}

.code-digit:focus {
  outline: none;
  border-color: var(--snap-yellow);
  background: rgba(255, 252, 0, 0.05);
  box-shadow: 0 0 15px var(--snap-yellow-dim);
}

.text-center {
  text-align: center;
}

.highlight-text {
  color: var(--text-main);
  font-weight: 600;
}

.text-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.9rem;
  margin-top: 20px;
  width: 100%;
  cursor: pointer;
  transition: color 0.2s;
}

.text-btn:hover {
  color: var(--text-main);
}

.error-box {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #fca5a5;
  padding: 12px;
  border-radius: 12px;
  margin-bottom: 24px;
  font-size: 0.9rem;
}

/* Success State */
.success-state {
  text-align: center;
  padding: 20px 0;
}

.success-icon-wrapper {
  width: 90px;
  height: 90px;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.2), rgba(16, 185, 129, 0.05));
  border: 2px solid rgba(16, 185, 129, 0.5);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 32px;
  color: #10b981;
  box-shadow: 0 0 40px rgba(16, 185, 129, 0.3), inset 0 0 20px rgba(16, 185, 129, 0.2);
  animation: pulse-success 2s infinite;
}

@keyframes pulse-success {
  0% { transform: scale(1); box-shadow: 0 0 40px rgba(16, 185, 129, 0.3); }
  50% { transform: scale(1.05); box-shadow: 0 0 60px rgba(16, 185, 129, 0.5); }
  100% { transform: scale(1); box-shadow: 0 0 40px rgba(16, 185, 129, 0.3); }
}

.success-icon {
  width: 45px;
  height: 45px;
  filter: drop-shadow(0 0 8px rgba(16, 185, 129, 0.5));
}

.user-recap {
  background: linear-gradient(145deg, rgba(255, 252, 0, 0.1), rgba(168, 85, 247, 0.05));
  border: 1px solid rgba(255, 252, 0, 0.3);
  border-radius: 20px;
  padding: 24px;
  margin-top: 32px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3), inset 0 0 20px rgba(255, 252, 0, 0.05);
}

.recap-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 1rem;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.recap-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.recap-label {
  color: rgba(255, 255, 255, 0.6);
  font-weight: 500;
}

.recap-value {
  font-weight: 700;
  font-size: 1.15rem;
  color: #fff;
}

.text-gradient {
  background: linear-gradient(to right, #ffcc00, #ff9900);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 2px 5px rgba(255, 153, 0, 0.4));
}

.recap-item .text-gradient {
  font-size: 1.3rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  background: linear-gradient(to right, #fbbf24, #f59e0b);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 10px rgba(245, 158, 11, 0.4));
}

@media (max-width: 480px) {
  .glass-card {
    padding: 30px 20px;
    border-radius: 24px;
  }
  
  .card__title {
    font-size: 1.7rem;
  }

  .carrier-btn {
    padding: 12px 8px;
    font-size: 0.85rem;
  }
  
  .code-digit {
    font-size: 1.5rem;
  }

  .field__control {
    flex-direction: row;
  }
}

