/* Startups DNA Bootcamp - Fresh Design System */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
  /* Brand Colors - matching StartupsDNA */
  --accent: #f26b3a;
  --accent-hover: #ff7a4a;
  --accent-glow: rgba(242, 107, 58, 0.4);

  /* Backgrounds */
  --bg-primary: #0c0c0c;
  --bg-secondary: #111111;
  --bg-card: rgba(255, 255, 255, 0.03);
  --bg-card-hover: rgba(255, 255, 255, 0.06);

  /* Text */
  --text-primary: #ffffff;
  --text-secondary: rgba(255, 255, 255, 0.7);
  --text-muted: rgba(255, 255, 255, 0.5);

  /* Borders */
  --border: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(255, 255, 255, 0.15);

  /* Effects */
  --shadow-glow: 0 0 60px rgba(242, 107, 58, 0.15);
  --radius: 12px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --transition: all 0.25s ease;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a {
  text-decoration: none;
  color: inherit;
}

ul,
ol {
  list-style: none;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ===== Header ===== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 16px 0;
  background: rgba(12, 12, 12, 0.8);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo img {
  height: 36px;
  width: auto;
}

.nav {
  display: none;
  gap: 32px;
}

@media (min-width: 768px) {
  .nav {
    display: flex;
  }
}

.nav a {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  transition: var(--transition);
}

.nav a:hover {
  color: var(--text-primary);
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  font-size: 15px;
  font-weight: 600;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  transition: var(--transition);
  font-family: inherit;
  text-decoration: none;
}

.btn-primary {
  background: var(--accent);
  color: white;
}

.btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 30px var(--accent-glow);
}

.btn-secondary {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-primary);
}

.btn-secondary:hover {
  border-color: var(--border-hover);
  background: var(--bg-card);
}

.btn-large {
  padding: 18px 36px;
  font-size: 16px;
}

/* ===== Hero ===== */
.hero {
  padding: 160px 0 100px;
  text-align: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 100px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 32px;
}

.hero-badge .accent {
  color: var(--accent);
}

.hero-title {
  font-size: clamp(36px, 6vw, 64px);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 24px;
}

.hero-title .accent {
  color: var(--accent);
}

.hero-subtitle {
  font-size: 18px;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto 40px;
  line-height: 1.7;
}

.spots-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 5px 12px;
  background: rgba(242, 107, 58, 0.1);
  border: 1px solid rgba(242, 107, 58, 0.3);
  border-radius: 100px;
  font-size: 13px;
  font-weight: 500;
  color: var(--accent);
  margin: 10px auto 24px;
  transition: var(--transition);
  white-space: nowrap;
}

@media (min-width: 640px) {
  .spots-badge {
    padding: 6px 14px;
    margin: 12px auto 28px;
  }
}

.spots-badge:hover {
  background: rgba(242, 107, 58, 0.15);
  border-color: rgba(242, 107, 58, 0.4);
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: center;
  margin-bottom: 64px;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 32px;
  justify-content: center;
  padding-top: 48px;
  border-top: 1px solid var(--border);
}

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

.meta-value {
  font-size: 28px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.meta-label {
  font-size: 13px;
  color: var(--text-muted);
}

/* ===== Sections ===== */
.section {
  padding: 100px 0;
  scroll-margin-top: 80px;
}

.section-header {
  text-align: center;
  margin-bottom: 64px;
}

.section-label {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--accent);
  margin-bottom: 16px;
}

.section-title {
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 16px;
}

.section-subtitle {
  font-size: 17px;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto;
}

/* ===== Cards Grid ===== */
.grid {
  display: grid;
  gap: 24px;
}

.grid-2 {
  grid-template-columns: repeat(1, 1fr);
}

.grid-3 {
  grid-template-columns: repeat(1, 1fr);
}

.grid-4 {
  grid-template-columns: repeat(1, 1fr);
}

@media (min-width: 640px) {
  .grid-2 {
    grid-template-columns: repeat(2, 1fr);
  }

  .grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }

  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 900px) {
  .grid-3 {
    grid-template-columns: repeat(3, 1fr);
  }

  .grid-4 {
    grid-template-columns: repeat(4, 1fr);
  }
}

.card {
  padding: 32px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: var(--transition);
}

.card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-hover);
  transform: translateY(-4px);
}

.card-icon {
  font-size: 32px;
  margin-bottom: 20px;
}


.card-title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 12px;
}

.card-text {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ===== Why Section ===== */
.why-content {
  max-width: 700px;
  margin: 0 auto;
  text-align: center;
}

.why-text {
  font-size: 17px;
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 24px;
}

.why-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 500;
  color: var(--accent);
  margin-top: 16px;
  transition: var(--transition);
}

.why-link:hover {
  gap: 12px;
}

/* ===== Program Timeline ===== */
.timeline {
  max-width: 800px;
  margin: 0 auto;
}

.timeline-day {
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin-bottom: 48px;
}

@media (min-width: 640px) {
  .timeline-day {
    flex-direction: row;
    gap: 32px;
  }
}

.day-marker {
  flex-shrink: 0;
  width: 80px;
  height: 80px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--accent);
  border-radius: var(--radius);
  color: white;
}

.day-num {
  font-size: 32px;
  font-weight: 800;
  line-height: 1;
}

.day-text {
  font-size: 12px;
  font-weight: 600;
  opacity: 0.9;
}

.day-content {
  flex: 1;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
}

.day-title {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 8px;
}

.day-subtitle {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 24px;
}

.topics {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.topic {
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
  font-size: 15px;
  color: var(--text-secondary);
}

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

.topic strong {
  color: var(--text-primary);
  font-weight: 600;
}

/* ===== Results ===== */
.results-list {
  display: grid;
  gap: 16px;
  max-width: 700px;
  margin: 0 auto;
}

.result-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 24px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.result-icon {
  font-size: 24px;
  flex-shrink: 0;
}


.result-text {
  font-size: 15px;
  color: var(--text-secondary);
}

.result-highlight {
  margin-top: 32px;
  padding: 24px;
  background: rgba(242, 107, 58, 0.1);
  border: 1px solid rgba(242, 107, 58, 0.2);
  border-radius: var(--radius);
  text-align: center;
  font-size: 15px;
  color: var(--accent);
}

/* ===== FAQ ===== */
.faq-list {
  max-width: 700px;
  margin: 0 auto;
}

.faq-item {
  border-bottom: 1px solid var(--border);
}

.faq-question {
  width: 100%;
  padding: 24px 0;
  background: transparent;
  border: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  cursor: pointer;
  text-align: left;
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  font-family: inherit;
  transition: var(--transition);
}

.faq-question:hover {
  color: var(--accent);
}

.faq-icon {
  font-size: 20px;
  color: var(--text-muted);
  transition: var(--transition);
}

.faq-item.active .faq-icon {
  transform: rotate(45deg);
  color: var(--accent);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.faq-item.active .faq-answer {
  max-height: 200px;
}

.faq-answer-inner {
  padding-bottom: 24px;
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* ===== Final CTA ===== */
.final-cta {
  text-align: center;
  padding: 80px 40px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.final-title {
  font-size: clamp(28px, 4vw, 36px);
  font-weight: 700;
  margin-bottom: 16px;
}

.final-subtitle {
  font-size: 17px;
  color: var(--text-secondary);
  margin-bottom: 48px;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

.steps {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 600px;
  margin: 0 auto 48px;
}

@media (min-width: 640px) {
  .steps {
    flex-direction: row;
    gap: 24px;
  }
}

.step {
  flex: 1;
  padding: 24px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-align: center;
}

.step-num {
  width: 36px;
  height: 36px;
  margin: 0 auto 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent);
  border-radius: 50%;
  font-size: 14px;
  font-weight: 700;
  color: white;
}

.step-text {
  font-size: 14px;
  color: var(--text-secondary);
}

.final-cta-action {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  margin-bottom: 32px;
}

@media (min-width: 640px) {
  .final-cta-action {
    flex-direction: column;
    gap: 20px;
  }
  
  .final-cta-action .spots-badge {
    margin: 0;
  }
}

.trust-row {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  justify-content: center;
  margin-top: 32px;
  font-size: 14px;
  color: var(--text-muted);
}

.trust-row span {
  display: flex;
  align-items: center;
  gap: 8px;
}


/* ===== Footer ===== */
.footer {
  padding: 48px 0;
  text-align: center;
  border-top: 1px solid var(--border);
  font-size: 14px;
  color: var(--text-muted);
}

.footer a {
  color: var(--text-secondary);
  transition: var(--transition);
}

.footer a:hover {
  color: var(--accent);
}

/* ===== Animations ===== */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== Form Modal (for English version with Airtable) ===== */
.form-modal {
  display: flex;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  pointer-events: none;
}

.form-modal.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.form-modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
}

.form-modal-content {
  position: relative;
  width: 100%;
  max-width: 900px;
  max-height: 90vh;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  z-index: 1001;
  display: flex;
  flex-direction: column;
  transform: scale(0.95);
  transition: transform 0.3s ease;
  overflow: visible;
}

.form-modal.active .form-modal-content {
  transform: scale(1);
}

.form-modal-close {
  position: absolute;
  top: 40px;
  right: 20px;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  border: 2px solid rgba(0, 0, 0, 0.1);
  border-radius: 50%;
  color: #333333;
  cursor: pointer;
  z-index: 10000;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  pointer-events: auto;
  min-width: 44px;
  min-height: 44px;
}

.form-modal-close svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  stroke-width: 2.5;
  pointer-events: none;
}

.form-modal-close:hover {
  background: #f5f5f5;
  border-color: rgba(0, 0, 0, 0.2);
  color: #000000;
  transform: rotate(90deg);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
}

.form-modal-body {
  position: relative;
  width: 100%;
  height: 80vh;
  min-height: 500px;
  overflow: hidden;
  border-radius: var(--radius-lg);
  z-index: 1;
  opacity: 1;
  transition: opacity 0.2s ease;
}

.form-modal-body iframe {
  position: relative;
  z-index: 1;
}

/* Modal Form Header (for Russian custom form) */
.form-modal-header {
  text-align: center;
  margin-bottom: 32px;
  padding: 0 20px;
}

.form-modal-title {
  font-size: 28px;
  font-weight: 700;
  line-height: 1.2;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.form-modal-subtitle {
  font-size: 16px;
  color: var(--text-muted);
  line-height: 1.5;
}

/* Modal with custom form styling */
.form-modal-body:has(.application-form) {
  height: auto;
  max-height: 80vh;
  overflow-y: auto;
  padding: 40px;
  background: white;
}

@media (max-width: 768px) {
  .form-modal-header {
    margin-bottom: 24px;
    padding: 0 8px;
  }

  .form-modal-title {
    font-size: 24px;
  }

  .form-modal-subtitle {
    font-size: 15px;
  }

  .form-modal-body:has(.application-form) {
    padding: 24px 20px;
    max-height: calc(100vh - 80px);
  }
}

@media (max-width: 768px) {
  .form-modal {
    padding: 0;
    width: 100vw;
    height: 100vh;
    max-width: 100vw;
    max-height: 100vh;
    padding-top: env(safe-area-inset-top, 0);
    padding-bottom: env(safe-area-inset-bottom, 0);
    padding-left: env(safe-area-inset-left, 0);
    padding-right: env(safe-area-inset-right, 0);
  }

  .form-modal-content {
    max-width: 100%;
    width: 100%;
    max-height: 100vh;
    height: 100vh;
    max-height: calc(100vh - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
    border-radius: 0;
    border: none;
    overflow: hidden;
    box-sizing: border-box;
  }

  .form-modal-body {
    height: 100%;
    max-height: 100%;
    min-height: 0;
    border-radius: 0;
    box-sizing: border-box;
    overflow: hidden;
  }
  
  .form-modal-body iframe {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
  }

  .form-modal-close {
    top: min(max(40px, calc(env(safe-area-inset-top, 0px) + 40px)), calc(100vh - env(safe-area-inset-bottom, 0px) - 84px));
    right: min(max(12px, calc(env(safe-area-inset-right, 0px) + 12px)), calc(100vw - env(safe-area-inset-left, 0px) - env(safe-area-inset-right, 0px) - 56px));
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    background: #ffffff;
    z-index: 10000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    position: absolute;
  }
  
  .form-modal-close svg {
    width: 20px;
    height: 20px;
  }
}

@media (max-width: 480px) {
  .form-modal-close {
    top: min(max(40px, calc(env(safe-area-inset-top, 0px) + 40px)), calc(100vh - env(safe-area-inset-bottom, 0px) - 80px));
    right: min(max(8px, calc(env(safe-area-inset-right, 0px) + 8px)), calc(100vw - env(safe-area-inset-left, 0px) - env(safe-area-inset-right, 0px) - 52px));
    width: 40px;
    height: 40px;
    min-width: 40px;
    min-height: 40px;
  }
  
  .form-modal-close svg {
    width: 18px;
    height: 18px;
  }
}

@media (max-width: 768px) and (orientation: landscape) {
  .form-modal-close {
    top: min(max(40px, calc(env(safe-area-inset-top, 0px) + 40px)), calc(100vh - env(safe-area-inset-bottom, 0px) - 80px));
    right: min(max(8px, calc(env(safe-area-inset-right, 0px) + 8px)), calc(100vw - env(safe-area-inset-left, 0px) - env(safe-area-inset-right, 0px) - 48px));
    width: 40px;
    height: 40px;
    min-width: 40px;
    min-height: 40px;
  }
}

/* ===== Application Form (for Russian version - now in modal) ===== */
.application-form {
  max-width: 500px;
  margin: 0 auto;
  text-align: left;
}

/* When form is in modal, remove bottom margin */
.form-modal-body .application-form {
  margin-bottom: 0;
}

.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.form-label .required {
  color: var(--accent);
}

.form-input {
  width: 100%;
  padding: 14px 16px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 15px;
  color: var(--text-primary);
  font-family: inherit;
  transition: var(--transition);
}

.form-input:focus {
  outline: none;
  border-color: var(--accent);
  background: var(--bg-card);
}

.form-input::placeholder {
  color: var(--text-muted);
}

.form-submit {
  width: 100%;
  margin-top: 8px;
}

.form-message {
  margin-top: 16px;
  padding: 16px;
  border-radius: var(--radius);
  font-size: 14px;
  text-align: center;
}

.form-message.success {
  background: rgba(76, 175, 80, 0.1);
  border: 1px solid rgba(76, 175, 80, 0.3);
  color: #4caf50;
}

.form-message.error {
  background: rgba(244, 67, 54, 0.1);
  border: 1px solid rgba(244, 67, 54, 0.3);
  color: #f44336;
}

/* ===== Custom Form Modal (Russian Version - Dark Theme) ===== */

/* Custom Form Modal Body */
.custom-form-body {
  position: relative;
  height: auto !important;
  max-height: 85vh !important;
  min-height: 500px !important;
  overflow-y: auto !important;
  padding: 56px 48px 48px !important;
  background: linear-gradient(135deg, #1a1a1a 0%, #151515 100%) !important;
  border-radius: var(--radius-lg);
  -webkit-overflow-scrolling: touch;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* Custom Form Header */
.custom-form-header {
  text-align: center;
  margin-bottom: 40px;
}

.custom-form-title {
  font-size: 32px;
  font-weight: 800;
  line-height: 1.2;
  color: #ffffff;
  margin: 0 0 12px 0;
  letter-spacing: -0.02em;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.custom-form-subtitle {
  font-size: 17px;
  color: rgba(255, 255, 255, 0.6);
  line-height: 1.5;
  margin: 0;
  font-weight: 400;
}

/* Custom Application Form */
.custom-application-form {
  max-width: 480px;
  width: 100%;
  margin: 0 auto;
}

/* Custom Form Group */
.custom-form-group {
  margin-bottom: 24px;
}

/* Custom Form Label */
.custom-form-label {
  display: block;
  font-size: 15px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 10px;
  line-height: 1.4;
  letter-spacing: -0.01em;
}

.custom-required {
  color: #f26b3a;
  font-weight: 700;
  margin-left: 2px;
}

/* Custom Form Input - Dark Glassmorphism Style */
.custom-form-input {
  width: 100%;
  padding: 16px 18px;
  font-size: 16px;
  line-height: 1.5;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.05);
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  -webkit-appearance: none;
  appearance: none;
  font-weight: 500;
  backdrop-filter: blur(10px);
}

.custom-form-input::placeholder {
  color: rgba(255, 255, 255, 0.4);
  font-weight: 400;
}

.custom-form-input:hover {
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.08);
}

.custom-form-input:focus {
  outline: none;
  border-color: #f26b3a;
  background: rgba(255, 255, 255, 0.1);
  box-shadow: 
    0 0 0 4px rgba(242, 107, 58, 0.15),
    0 0 20px rgba(242, 107, 58, 0.2);
}

.custom-form-input:invalid:not(:placeholder-shown) {
  border-color: #ef4444;
  background: rgba(239, 68, 68, 0.08);
}

.custom-form-input:invalid:not(:placeholder-shown):focus {
  box-shadow: 
    0 0 0 4px rgba(239, 68, 68, 0.15),
    0 0 20px rgba(239, 68, 68, 0.2);
}

/* Auto-fill styling for dark theme */
.custom-form-input:-webkit-autofill,
.custom-form-input:-webkit-autofill:hover,
.custom-form-input:-webkit-autofill:focus {
  -webkit-text-fill-color: #ffffff;
  -webkit-box-shadow: 0 0 0px 1000px rgba(255, 255, 255, 0.1) inset;
  transition: background-color 5000s ease-in-out 0s;
  border-color: rgba(255, 255, 255, 0.2);
}

/* Custom Form Submit Button - Vibrant Orange Glow */
.custom-form-submit {
  width: 100%;
  margin-top: 16px;
  min-height: 58px;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.01em;
  border-radius: 12px;
  background: linear-gradient(135deg, #f26b3a 0%, #ff7a4a 100%);
  border: none;
  color: #ffffff;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 
    0 4px 16px rgba(242, 107, 58, 0.4),
    0 0 40px rgba(242, 107, 58, 0.2);
  position: relative;
  overflow: hidden;
}

.custom-form-submit::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0) 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.custom-form-submit:hover {
  transform: translateY(-2px);
  box-shadow: 
    0 8px 24px rgba(242, 107, 58, 0.5),
    0 0 60px rgba(242, 107, 58, 0.3);
}

.custom-form-submit:hover::before {
  opacity: 1;
}

.custom-form-submit:active {
  transform: translateY(0);
  box-shadow: 
    0 2px 12px rgba(242, 107, 58, 0.4),
    0 0 30px rgba(242, 107, 58, 0.2);
}

.custom-form-submit:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: 0 2px 8px rgba(242, 107, 58, 0.2);
}

/* Custom Form Message */
.custom-form-message {
  margin-top: 24px;
  padding: 18px 20px;
  border-radius: 12px;
  font-size: 15px;
  line-height: 1.5;
  text-align: center;
  font-weight: 500;
  animation: slideDown 0.3s ease;
  backdrop-filter: blur(10px);
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.custom-form-message.success {
  background: rgba(76, 175, 80, 0.15);
  border: 2px solid rgba(134, 239, 172, 0.3);
  color: #86efac;
  box-shadow: 0 4px 12px rgba(76, 175, 80, 0.15);
}

.custom-form-message.error {
  background: rgba(239, 68, 68, 0.15);
  border: 2px solid rgba(252, 165, 165, 0.3);
  color: #fca5a5;
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.15);
}

/* Loading State */
.custom-form-submit .submit-loading {
  display: none;
}

.custom-form-submit:disabled .submit-text {
  opacity: 0.7;
}

/* Scrollbar styling for dark theme */
.custom-form-body::-webkit-scrollbar {
  width: 8px;
}

.custom-form-body::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.03);
  border-radius: 4px;
}

.custom-form-body::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 4px;
}

.custom-form-body::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.25);
}

/* Mobile Styles for Custom Form */
@media (max-width: 768px) {
  .custom-form-body {
    padding: 40px 28px 32px !important;
    max-height: 100vh !important;
    min-height: 100vh !important;
    border-radius: 0;
    box-shadow: none;
  }

  .custom-form-header {
    margin-bottom: 32px;
  }

  .custom-form-title {
    font-size: 28px;
  }

  .custom-form-subtitle {
    font-size: 16px;
  }

  .custom-form-group {
    margin-bottom: 20px;
  }

  .custom-form-label {
    font-size: 14px;
    margin-bottom: 8px;
  }

  .custom-form-input {
    padding: 14px 16px;
    font-size: 16px; /* Prevent zoom on iOS */
    border-radius: 10px;
  }

  .custom-form-submit {
    min-height: 54px;
    font-size: 16px;
    border-radius: 10px;
  }

  .custom-form-message {
    padding: 16px 18px;
    font-size: 14px;
  }
}

@media (max-width: 480px) {
  .custom-form-body {
    padding: 32px 24px 28px !important;
  }

  .custom-form-header {
    margin-bottom: 28px;
  }

  .custom-form-title {
    font-size: 26px;
  }

  .custom-form-subtitle {
    font-size: 15px;
  }

  .custom-form-group {
    margin-bottom: 18px;
  }
}

/* Accessibility improvements */
.custom-form-input:focus-visible {
  outline: 2px solid #f26b3a;
  outline-offset: 2px;
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  .custom-form-input,
  .custom-form-submit,
  .custom-form-message {
    transition: none;
    animation: none;
  }
  
  .custom-form-submit:hover {
    transform: none;
  }
}

/* ===== Success & Error States ===== */

/* Success State */
.custom-form-success {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 40px 20px;
  animation: fadeInScale 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.success-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 32px;
  color: #10b981;
}

.success-icon svg {
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 4px 12px rgba(16, 185, 129, 0.3));
}

.success-circle {
  stroke-dasharray: 240;
  stroke-dashoffset: 240;
  animation: drawCircle 0.6s ease-out forwards;
}

.success-check {
  stroke-dasharray: 60;
  stroke-dashoffset: 60;
  animation: drawCheck 0.4s ease-out 0.4s forwards;
}

@keyframes drawCircle {
  to {
    stroke-dashoffset: 0;
  }
}

@keyframes drawCheck {
  to {
    stroke-dashoffset: 0;
  }
}

@keyframes fadeInScale {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.success-title {
  font-size: 28px;
  font-weight: 800;
  color: #ffffff;
  margin: 0 0 16px 0;
  letter-spacing: -0.02em;
}

.success-message {
  font-size: 17px;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.6;
  margin: 0 0 32px 0;
  max-width: 400px;
  margin-left: auto;
  margin-right: auto;
}

.success-close {
  min-width: 200px;
}

/* Error State */
.custom-form-error {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 40px 20px;
  animation: fadeInScale 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.error-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 32px;
  color: #ef4444;
}

.error-icon svg {
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 4px 12px rgba(239, 68, 68, 0.3));
  animation: shake 0.5s ease-in-out;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-10px); }
  75% { transform: translateX(10px); }
}

.error-title {
  font-size: 28px;
  font-weight: 800;
  color: #ffffff;
  margin: 0 0 16px 0;
  letter-spacing: -0.02em;
}

.error-message {
  font-size: 17px;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.6;
  margin: 0 0 32px 0;
  max-width: 400px;
  margin-left: auto;
  margin-right: auto;
}

.error-retry {
  min-width: 200px;
}

/* Form transition states */
.custom-form-header,
.custom-application-form {
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.custom-form-body.form-submitted .custom-form-header,
.custom-form-body.form-submitted .custom-application-form {
  opacity: 0;
  transform: translateY(-20px);
  pointer-events: none;
}

.custom-form-body.form-error .custom-form-header,
.custom-form-body.form-error .custom-application-form {
  opacity: 0;
  transform: translateY(-20px);
  pointer-events: none;
}

/* Mobile adjustments for success/error states */
@media (max-width: 768px) {
  .custom-form-success,
  .custom-form-error {
    padding: 40px 24px;
    justify-content: center;
  }

  .success-icon,
  .error-icon {
    width: 72px;
    height: 72px;
    margin-bottom: 28px;
    flex-shrink: 0;
  }

  .success-title,
  .error-title {
    font-size: 26px;
  }

  .success-message,
  .error-message {
    font-size: 16px;
    margin-bottom: 32px;
  }

  .success-close,
  .error-retry {
    min-width: auto;
    width: 100%;
    max-width: 280px;
  }
}

@media (max-width: 480px) {
  .custom-form-body {
    padding: 28px 20px !important;
    min-height: 100vh !important;
  }

  .custom-form-header {
    margin-bottom: 24px;
  }

  .custom-form-title {
    font-size: 24px;
  }

  .custom-form-subtitle {
    font-size: 15px;
  }

  .custom-form-group {
    margin-bottom: 16px;
  }

  .success-icon,
  .error-icon {
    width: 64px;
    height: 64px;
    margin-bottom: 24px;
  }

  .success-title,
  .error-title {
    font-size: 24px;
  }

  .success-message,
  .error-message {
    font-size: 15px;
    margin-bottom: 28px;
  }
}
