* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background: linear-gradient(135deg, #0c0c0c 0%, #1a1a2e 50%, #16213e 100%);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow-x: hidden;
  position: relative;
  color: #ffffff;
}

/* Fallback background for mobile devices */
body::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #0c0c0c 0%, #1a1a2e 50%, #16213e 100%);
  z-index: -3;
}

/* Animated background particles - mobile optimized */
body::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: radial-gradient(2px 2px at 20px 30px, #00ffff, transparent),
    radial-gradient(2px 2px at 40px 70px, #ff00ff, transparent),
    radial-gradient(1px 1px at 90px 40px, #00ff00, transparent),
    radial-gradient(1px 1px at 130px 80px, #ffff00, transparent);
  background-repeat: repeat;
  background-size: 200px 200px;
  animation: sparkle 4s linear infinite;
  opacity: 0.3;
  z-index: -2;
}

/* Mobile-specific background handling */
@media (max-width: 768px) {
  body {
    background: #1a1a2e; /* Solid fallback for mobile */
    background-image: linear-gradient(
      135deg,
      #0c0c0c 0%,
      #1a1a2e 50%,
      #16213e 100%
    );
    background-attachment: scroll; /* Force scroll instead of fixed */
  }

  body::before {
    position: absolute; /* Change from fixed to absolute */
    animation: none; /* Disable animation on mobile for better performance */
    opacity: 0.2; /* Slightly reduce opacity for better readability */
  }
}

/* Further mobile optimizations for older devices */
@media (max-width: 480px) {
  body {
    background: #1a1a2e; /* Solid color fallback */
  }

  body::before {
    display: none; /* Hide particles on very small screens */
  }
}

/* Support for devices with poor gradient support */
@supports not (
  background: linear-gradient(135deg, #0c0c0c 0%, #1a1a2e 50%, #16213e 100%)
) {
  body {
    background: #1a1a2e;
  }
}

a {
  color: #84a4ff;
}

@keyframes sparkle {
  0%,
  100% {
    transform: translateY(0px) translateX(0px);
  }
  25% {
    transform: translateY(-10px) translateX(5px);
  }
  50% {
    transform: translateY(-20px) translateX(-5px);
  }
  75% {
    transform: translateY(-10px) translateX(3px);
  }
}

.registration-container {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  padding: 40px;
  width: 600px;
  max-width: 90vw;
  position: relative;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

/* Fallback for browsers that don't support backdrop-filter */
@supports not (backdrop-filter: blur(20px)) {
  .registration-container {
    background: rgba(26, 26, 46, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.2);
  }
}

.registration-container::before {
  content: "";
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: linear-gradient(45deg, #00ffff, #ff00ff, #00ff00, #ffff00);
  border-radius: 22px;
  z-index: -1;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.registration-container:hover::before {
  opacity: 0.3;
}

.wizard-header {
  text-align: center;
  margin-bottom: 30px;
}

.wizard-title {
  color: #00ffff;
  font-size: 2.5rem;
  font-weight: 300;
  text-shadow: 0 0 20px rgba(0, 255, 255, 0.5);
  margin-bottom: 10px;
  letter-spacing: 2px;
}

.wizard-subtitle {
  color: rgba(255, 255, 255, 0.7);
  font-size: 1rem;
  font-weight: 300;
}

.progress-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 30px 0;
  position: relative;
}

.progress-line {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 2px;
  background: rgba(255, 255, 255, 0.1);
  z-index: 1;
}

.progress-line-fill {
  height: 100%;
  background: linear-gradient(90deg, #00ffff, #ff00ff);
  width: 0%;
  transition: width 0.5s ease;
  border-radius: 1px;
  box-shadow: 0 0 10px rgba(0, 255, 255, 0.5);
}

.progress-step {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.1);
  border: 2px solid rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.5);
  font-weight: bold;
  z-index: 2;
  position: relative;
  transition: all 0.3s ease;
}

.progress-step.active {
  background: linear-gradient(135deg, #00ffff, #0080ff);
  border-color: #00ffff;
  color: white;
  box-shadow: 0 0 20px rgba(0, 255, 255, 0.5);
  transform: scale(1.1);
}

.progress-step.completed {
  background: linear-gradient(135deg, #00ff00, #008000);
  border-color: #00ff00;
  color: white;
  box-shadow: 0 0 20px rgba(0, 255, 0, 0.5);
}

.form-step {
  display: none;
  animation: fadeInUp 0.5s ease forwards;
}

.form-step.active {
  display: block;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.form-group {
  margin-bottom: 25px;
  position: relative;
}

.form-label {
  display: block;
  color: #00ffff;
  font-size: 0.9rem;
  margin-bottom: 8px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.form-input,
.form-select {
  width: 100%;
  padding: 15px 20px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  color: white;
  font-size: 1rem;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

/* Fallback for input fields on mobile */
@supports not (backdrop-filter: blur(10px)) {
  .form-input,
  .form-select {
    background: rgba(26, 26, 46, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.2);
  }
}

.form-input:focus,
.form-select:focus {
  outline: none;
  border-color: #00ffff;
  box-shadow: 0 0 20px rgba(0, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.08);
}

.form-input::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

.form-input:disabled {
  background: rgba(255, 255, 255, 0.02);
  border-color: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.5);
  cursor: not-allowed;
}

.form-select {
  cursor: pointer;
}

.form-select option {
  background: #1a1a2e;
  color: white;
}

.error-message {
  color: #ff4757;
  font-size: 0.8rem;
  margin-top: 5px;
  display: none;
  text-shadow: 0 0 10px rgba(255, 71, 87, 0.5);
}

.error-message.show {
  display: block;
  animation: shake 0.5s ease;
}

@keyframes shake {
  0%,
  100% {
    transform: translateX(0);
  }
  25% {
    transform: translateX(-5px);
  }
  75% {
    transform: translateX(5px);
  }
}

.form-input.error,
.form-select.error {
  border-color: #ff4757;
  box-shadow: 0 0 20px rgba(255, 71, 87, 0.3);
}

.button-group {
  display: flex;
  justify-content: space-between;
  margin-top: 30px;
}

.btn {
  padding: 15px 30px;
  border: none;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.2),
    transparent
  );
  transition: left 0.5s ease;
}

.btn:hover::before {
  left: 100%;
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.15);
  color: white;
  transform: translateY(-2px);
}

.btn-primary {
  background: linear-gradient(135deg, #00ffff, #0080ff);
  color: white;
  box-shadow: 0 4px 20px rgba(0, 255, 255, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(0, 255, 255, 0.4);
}

.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.completion-message {
  text-align: center;
  color: #00ff00;
  font-size: 1.2rem;
  margin: 20px 0;
  text-shadow: 0 0 20px rgba(0, 255, 0, 0.5);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.8;
  }
}

.password-strength {
  margin-top: 8px;
  display: flex;
  gap: 4px;
}

.strength-bar {
  height: 4px;
  border-radius: 2px;
  flex: 1;
  background: rgba(255, 255, 255, 0.1);
  transition: background 0.3s ease;
}

.strength-bar.active {
  background: linear-gradient(90deg, #ff4757, #ffa502, #2ed573);
}

.alert {
  padding: 15px;
  margin-bottom: 20px;
  border-radius: 12px;
  border: 1px solid;
  display: none;
  animation: slideInDown 0.3s ease;
}

.alert.show {
  display: block;
}

.alert-error {
  background: rgba(255, 71, 87, 0.1);
  border-color: #ff4757;
  color: #ff4757;
}

.alert-success {
  background: rgba(45, 213, 115, 0.1);
  border-color: #2ed573;
  color: #2ed573;
}

@keyframes slideInDown {
  from {
    opacity: 0;
    transform: translateY(-30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hidden {
  display: none !important;
}

@media (max-width: 768px) {
  .registration-container {
    padding: 20px;
    margin: 20px;
    /* Ensure container has proper background on mobile */
    background: rgba(26, 26, 46, 0.95);
    backdrop-filter: blur(10px);
  }

  .wizard-title {
    font-size: 2rem;
  }

  .button-group {
    flex-direction: column;
    gap: 15px;
  }

  /* Disable expensive animations on mobile */
  .btn::before {
    display: none;
  }

  .progress-step {
    transform: none !important;
  }

  .progress-step.active {
    transform: none !important;
  }
}

/* Additional mobile-specific fixes */
@media (max-width: 480px) {
  .registration-container {
    background: rgba(26, 26, 46, 0.98);
    border: 2px solid rgba(255, 255, 255, 0.2);
  }

  .form-input,
  .form-select {
    background: rgba(26, 26, 46, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.3);
  }
}

.temp-loader {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  right: 0;
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #00000075;
}

.temp-loader img {
  height: 80px;
}

.company-name {
  font-size: 20px;
  font-weight: bold;
  background: linear-gradient(45deg, #ff6b6b, #4ecdc4, #45b7d1, #96ceb4);
  background-size: 300% 300%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: shimmer 3s ease-in-out infinite;
  margin-bottom: 8px;
}

/* Mobile fallback for company name gradient */
@media (max-width: 768px) {
  .company-name {
    color: #4ecdc4; /* Fallback color */
    animation: none; /* Disable animation on mobile */
  }
}

@keyframes shimmer {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

.company-name img {
  height: 40px;
  display: inline-block;
  margin-bottom: -13px;
}

.register-link {
  margin-top: 20px;
  font-size: 13px;
  color: #ececec;
}

.register-link a {
  color: #98d4ff;
}
