* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --orange: #ff7b00;
  --orange-light: #ffb800;
  --navy: #0a1628;
  --navy-light: #1e3a5f;
  --cyan: #00d4ff;
  --white: #ffffff;
  --gray-light: #f8f9fa;
  --gray: #6c757d;
  --gray-dark: #343a40;
  --text-dark: #333;
  --text-light: #fff;
  --success: #22c55e;
  --error: #ef4444;
  --form-orange: #ff7b00;
  --form-orange-light: #ffb800;
  --form-navy: #0a1628;
  --form-navy-light: #1e3a5f;
  --form-cyan: #00d4ff;
  --form-white: #ffffff;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto,
    Oxygen, Ubuntu, sans-serif;
  line-height: 1.6;
  color: var(--navy);
  overflow-x: hidden;
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%);
  min-height: 100vh;
}

/* Navigation */
nav {
  position: fixed;
  top: 0;
  width: 100%;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  z-index: 1000;
  padding: 1rem 0;
  transition: all 0.3s ease;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.nav-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  display: flex;
  align-items: center;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--navy);
  text-decoration: none;
}

.logo-icon {
  width: 40px;
  height: 40px;
  margin-right: 10px;
  background: var(--orange);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.logo-icon::before {
  content: "E";
  color: white;
  font-weight: bold;
  font-size: 20px;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

.nav-back {
  color: var(--gray);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 500;
  transition: color 0.3s ease;
}

.nav-back:hover {
  color: var(--orange);
}

#form-section {
  font-family: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto,
    sans-serif;
  background: linear-gradient(135deg, #0a1628 0%, #1a2332 100%);
  min-height: 100vh;
  padding: 2rem;
}

/* Progress Bar */
.form-progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: rgba(255, 255, 255, 0.1);
  z-index: 100;
}

.form-progress-fill {
  height: 100%;
  background: linear-gradient(
    90deg,
    var(--form-orange),
    var(--form-orange-light)
  );
  width: 25%;
  transition: width 0.3s ease;
}

/* Main Container */
.form-application-container {
  max-width: 900px;
  margin: 4rem auto 2rem;
  position: relative;
}

/* Header */
.form-header {
  text-align: center;
  margin-bottom: 3rem;
}

.form-back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: rgba(255, 255, 255, 0.6);
  text-decoration: none;
  font-size: 0.9rem;
  margin-bottom: 2rem;
  transition: all 0.3s ease;
}

.form-back-link:hover {
  color: var(--form-orange-light);
  transform: translateX(-5px);
}

.form-title {
  font-size: clamp(2rem, 3vw, 2.5rem);
  color: white;
  margin-bottom: 0.75rem;
  font-weight: 700;
}

.form-subtitle {
  color: rgba(255, 255, 255, 0.7);
  font-size: 1.1rem;
  line-height: 1.5;
}

/* Form Card */
.form-card {
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  padding: 2.5rem;
  position: relative;
  overflow: hidden;
}

/* Decorative gradient */
.form-card::before {
  content: "";
  position: absolute;
  top: -50%;
  right: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255, 123, 0, 0.03), transparent);
  pointer-events: none;
}

/* Form Sections */
.form-section {
  position: relative;
  animation: formFadeIn 0.5s ease;
}

@keyframes formFadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.form-section-title {
  color: white;
  font-size: 1.3rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* Form Grid */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-group.form-full-width {
  grid-column: 1 / -1;
}

.form-label {
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.9rem;
  font-weight: 500;
}

.form-input,
.form-select {
  padding: 0.9rem 1rem;
  background: rgba(10, 22, 40, 0.5);
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  color: white;
  font-size: 1rem;
  transition: all 0.3s ease;
}

.form-input:focus,
.form-select:focus {
  outline: none;
  border-color: var(--form-orange);
  background: rgba(10, 22, 40, 0.7);
  box-shadow: 0 0 20px rgba(255, 123, 0, 0.2);
}

.form-input::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

/* City Selection Grid */
.form-cities-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.form-city-checkbox {
  position: relative;
}

.form-city-checkbox input {
  position: absolute;
  opacity: 0;
}

.form-city-label {
  display: block;
  padding: 0.9rem 0.75rem;
  background: rgba(255, 255, 255, 0.03);
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.85rem;
}

.form-city-label:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.2);
}

.form-city-checkbox input:checked + .form-city-label {
  background: rgba(255, 123, 0, 0.1);
  border-color: var(--form-orange);
  color: white;
  box-shadow: 0 0 15px rgba(255, 123, 0, 0.2);
}

/* Benefits Ranking */
.form-ranking-container {
  margin-bottom: 2rem;
}

.form-ranking-instruction {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.9rem;
  margin-bottom: 1rem;
  font-style: italic;
}

.form-ranking-grid {
  display: grid;
  gap: 0.75rem;
}

.form-ranking-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.03);
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.form-ranking-item:hover {
  background: rgba(255, 255, 255, 0.05);
  transform: translateX(5px);
}

.form-ranking-item.dragging {
  opacity: 0.5;
}

.form-ranking-item.selected {
  background: rgba(255, 123, 0, 0.1);
  border-color: var(--form-orange);
}

.form-rank-number {
  width: 30px;
  height: 30px;
  background: linear-gradient(
    135deg,
    var(--form-orange),
    var(--form-orange-light)
  );
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: bold;
  font-size: 0.9rem;
}

.form-rank-text {
  flex: 1;
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.95rem;
}

/* Selected cities counter */
.form-city-counter {
  color: var(--form-orange-light);
  font-size: 0.9rem;
  margin-bottom: 2rem;
  text-align: center;
}

/* Submit Section */
.form-submit-section {
  text-align: center;
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.form-btn-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 1.15rem 3rem;
  background: linear-gradient(
    135deg,
    var(--form-orange),
    var(--form-orange-light)
  );
  color: white;
  border: none;
  border-radius: 50px;
  font-weight: 600;
  font-size: 1.05rem;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 10px 30px rgba(255, 123, 0, 0.3);
  position: relative;
  overflow: hidden;
}

.form-btn-submit::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: all 0.6s ease;
}

.form-btn-submit:hover:not(:disabled)::before {
  width: 300px;
  height: 300px;
}

.form-btn-submit:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 15px 40px rgba(255, 123, 0, 0.4);
}

.form-btn-submit:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  background: rgba(255, 123, 0, 0.5);
}

.form-submit-text,
.form-loading-spinner {
  position: relative;
  z-index: 1;
}

.form-loading-spinner {
  animation: formSpin 1s linear infinite;
}

@keyframes formSpin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.form-privacy-text {
  margin-top: 1rem;
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.85rem;
}

/* Success/Error Messages */
.form-message {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(10, 22, 40, 0.95);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 2rem 2.5rem;
  color: white;
  text-align: center;
  z-index: 1000;
  min-width: 300px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.form-message.success {
  border-color: rgba(76, 175, 80, 0.3);
}

.form-message.error {
  border-color: rgba(244, 67, 54, 0.3);
}

.form-message h3 {
  margin-bottom: 1rem;
  font-size: 1.2rem;
}

.form-message.success h3 {
  color: #4caf50;
}

.form-message.error h3 {
  color: #f44336;
}

.form-message p {
  font-size: 0.9rem;
  line-height: 1.4;
  margin-bottom: 1.5rem;
}

.form-message button {
  padding: 0.75rem 1.5rem;
  background: linear-gradient(
    135deg,
    var(--form-orange),
    var(--form-orange-light)
  );
  color: white;
  border: none;
  border-radius: 25px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.form-message button:hover {
  transform: translateY(-1px);
  box-shadow: 0 5px 15px rgba(255, 123, 0, 0.3);
}

/* Overlay for messages */
.form-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.form-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* Responsive */
@media (max-width: 768px) {
  #form-section {
    padding: 1rem;
  }

  .form-application-container {
    margin: 2rem auto 1rem;
  }

  .form-card {
    padding: 1.5rem;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .form-cities-grid {
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  }

  .form-btn-submit {
    padding: 1rem 2rem;
    font-size: 1rem;
  }

  .form-message {
    width: 90%;
    padding: 1.5rem;
  }
}

@media (max-width: 480px) {
  .form-title {
    font-size: 1.8rem;
  }

  .form-subtitle {
    font-size: 1rem;
  }

  .form-cities-grid {
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  }

  .form-city-label {
    padding: 0.75rem 0.5rem;
    font-size: 0.8rem;
  }
}
