:root {
  --primary-color: #3b82f6;
  --primary-dark: #1d4ed8;
  --accent-blue: #60a5fa;
  --bg-primary: #f0f9ff;
  --bg-card: #ffffff;
  --bg-section: #dbeafe;
  --text-primary: #1e293b;
  --text-secondary: #64748b;
  --text-muted: #94a3b8;
  --border-color: #bfdbfe;
  --border-focus: #3b82f6;
  --shadow-light: 0 1px 3px 0 rgba(59, 130, 246, 0.1), 0 1px 2px 0 rgba(59, 130, 246, 0.06);
  --shadow-medium: 0 4px 6px -1px rgba(59, 130, 246, 0.1), 0 2px 4px -1px rgba(59, 130, 246, 0.06);
  --success-color: #10b981;
  --warning-color: #f59e0b;
}

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

/* 防止字体加载导致的布局闪烁 */
.fonts-loading body {
  visibility: hidden;
}

.fonts-loaded body {
  visibility: visible;
  animation: fadeIn 0.2s ease-in;
}

/* 确保字体加载时的平滑过渡 */
.fonts-loading * {
  transition: none !important;
}

      @keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
  }

  /* 缓存通知动画 */
  @keyframes slideInRight {
    from {
      opacity: 0;
      transform: translateX(100%);
    }
    to {
      opacity: 1;
      transform: translateX(0);
    }
  }

  @keyframes slideOutRight {
    from {
      opacity: 1;
      transform: translateX(0);
    }
    to {
      opacity: 0;
      transform: translateX(100%);
    }
  }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
  font-display: swap;
  line-height: 1.6;
  background: linear-gradient(135deg, #f0f9ff 0%, #dbeafe 100%);
  color: var(--text-primary);
  min-height: 100vh;
  /* 防止字体闪烁的优化 */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeSpeed;
}

/* Main container layout */
.main-container {
  display: flex;
  max-width: 1400px;
  margin: 0 auto;
  min-height: 100vh;
  gap: 1rem;
  padding: 2rem 1rem;
}

/* Left timeline navigation */
.timeline-sidebar {
  width: 280px;
  flex-shrink: 0;
  background: var(--bg-card);
  border-radius: 12px;
  padding: 1rem;
  box-shadow: var(--shadow-medium);
  border: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  height: fit-content;
  max-height: calc(100vh - 4rem);
  overflow: hidden;
  position: sticky;
  top: 2rem;
}

.timeline-header {
  text-align: center;
  margin-bottom: 1.5rem;
  flex-shrink: 0;
}

.timeline-header h3 {
  font-size: 1.1rem;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
  font-weight: 600;
}

.progress-bar {
  width: 100%;
  height: 6px;
  background: var(--bg-section);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 0.5rem;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary-color), var(--accent-blue));
  width: 0%;
  transition: width 0.4s ease;
}

.progress-text {
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
}

.progress-text span {
  font-size: 1.2rem;
  font-weight: 700;
  color: #dc3545;
}

.timeline-list {
  list-style: none;
  position: relative;
  padding: 0;
  flex: 1;
  overflow-y: auto;
}

.timeline-list::before {
  content: '';
  position: absolute;
  left: 12px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, var(--border-color), var(--bg-section));
}

.timeline-item {
  position: relative;
  padding-left: 2.5rem;
  margin-bottom: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  border-radius: 8px;
  padding-right: 0.5rem;
}

.timeline-item:hover {
  background: var(--bg-section);
  color: var(--primary-color);
}

.timeline-item.completed {
  background: #e6f7f2; /* A light green background */
  border-radius: 8px;
}

/* 时间线编号链接样式 */
.timeline-number-link {
  position: absolute;
  left: 6px;
  top: 6px;
  width: 21px; /* 14px * 1.5 */
  height: 21px; /* 14px * 1.5 */
  border-radius: 50%;
  background: var(--bg-card);
  border: 2px solid var(--border-color);
  transition: all 0.3s ease;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px; /* 9px * 1.5 ≈ 14px */
  font-weight: 700;
  color: var(--text-secondary);
  text-decoration: none;
  cursor: pointer;
}

.timeline-number-link:hover {
  transform: scale(1.08);
  border-color: var(--primary-color);
  color: var(--primary-color);
}

.timeline-item.completed .timeline-number-link {
  background: var(--success-color);
  border-color: var(--success-color);
  box-shadow: 0 0 0 4.5px rgba(16, 185, 129, 0.2); /* 3px * 1.5 */
  color: white;
}

.timeline-item.active .timeline-number-link {
  background: var(--primary-color);
  border-color: var(--primary-color);
  transform: scale(1.12);
  box-shadow: 0 0 0 6px rgba(59, 130, 246, 0.3); /* 4px * 1.5 */
  color: white;
}

.timeline-item.completed::after {
  content: '✔';
  position: absolute;
  right: 15px; /* Position at the end */
  top: 50%;
  transform: translateY(-50%);
  color: var(--success-color);
  font-size: 18px;
  font-weight: bold;
  z-index: 2;
  pointer-events: none;
}

.timeline-content {
  background: transparent;
  border-radius: 6px;
  padding: 0.5rem 0;
  transition: all 0.3s ease;
}

.timeline-content:hover {
  background: var(--bg-section);
}

.timeline-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}

.timeline-description {
  font-size: 0.75rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

.timeline-stats {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 2px solid var(--bg-section);
  flex-shrink: 0;
}

.completion-badge {
  background: linear-gradient(135deg, var(--success-color), #059669);
  color: white;
  padding: 0.25rem 0.5rem;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
  animation: bounce 0.5s ease-in-out;
}





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

.stats-number {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-color);
  line-height: 1;
}

.stats-label {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-10px);
  }
  60% {
    transform: translateY(-5px);
  }
}

/* Right content area */
.content-area {
  flex: 1;
  max-width: 900px;
}

h1 {
  text-align: center;
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.intro-section {
  text-align: center;
  margin-bottom: 2rem;
  padding: 2rem;
  background: var(--bg-card);
  border-radius: 16px;
  box-shadow: var(--shadow-medium);
  /*border: 1px solid var(--border-color);*/
}

.intro-text {
  font-size: 1.2rem;
  margin-bottom: 1rem;
  font-weight: 600;
  color: var(--text-primary);
}

.intro-subtext {
  font-size: 1rem;
  color: var(--text-secondary);
  margin-bottom: 2rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.7;
}

.intro-features {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

      .feature-item {
    padding: 0.75rem 1.25rem;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-blue));
    color: white;
    border-radius: 25px;
    font-size: 0.875rem;
    font-weight: 500;
    box-shadow: var(--shadow-light);
    transition: transform 0.2s ease;
  }

.feature-item:hover {
  transform: translateY(-2px);
}

h2 {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--text-primary);
}

h2 i {
  color: var(--primary-color);
  font-size: 1.2rem;
  background: var(--bg-section);
  padding: 0.5rem;
  border-radius: 10px;
}

form {
  background: transparent;
}

.section {
  margin-bottom: 2rem;
  background: var(--bg-card);
  border-radius: 16px;
  box-shadow: var(--shadow-medium);
  border: 1px solid var(--border-color);
  transition: all 0.3s ease;
  overflow: hidden;
}

.section-header {
  padding: 1.5rem 2rem;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  transition: all 0.3s ease;
}

.section-header h2 {
  font-size: 1.4rem;
  font-weight: 700;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.section-header h2 i {
  font-size: 1.2rem;
  background: rgba(255, 255, 255, 0.2);
  padding: 0.5rem;
  border-radius: 10px;
}

.section-content {
  padding: 0 2rem 2rem;
  transition: all 0.3s ease;
}

      .section-content {
    transition: all 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    overflow: hidden;
    max-height: 10000px;
    opacity: 1;
    transform: translateY(0);
    transform-origin: top;
}

.section.collapsed .section-content {
    max-height: 0;
    opacity: 0;
    transform: translateY(-20px) scaleY(0.8);
    padding-top: 0;
    padding-bottom: 0;
    margin-top: 0;
    margin-bottom: 0;
  }

  .section-results {
    transition: all 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    transform: translateY(-30px) scaleY(0.9);
    transform-origin: top;
    padding: 0 1.5rem;
    margin-bottom: 1.5rem;
  }

  .section-results.show {
    max-height: 2000px;
    opacity: 1;
    transform: translateY(0) scaleY(1);
    padding: 1.5rem;
  }

  .section-results h3 {
    color: var(--primary-color);
    margin-bottom: 1.2rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.1rem;
    font-weight: 600;
  }

  .section-results h3 i {
    color: var(--accent-blue);
  }

  .results-content {
    overflow-y: auto;
    padding-right: 8px;
    margin-left: 1rem;
  }

.section.completed .section-header {
  background: linear-gradient(135deg, var(--success-color), #059669);
  color: white;
}

.section-submit-btn {
  width: 100%;
  padding: 0.875rem 1.5rem;
  background: linear-gradient(135deg, var(--primary-color), var(--accent-blue));
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  margin-top: 1.5rem;
  font-family: inherit;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.section-submit-btn:hover {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary-color));
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.section-submit-btn:active {
  transform: translateY(0);
}

.section-submit-btn.completed {
  background: linear-gradient(135deg, var(--success-color), #059669);
  cursor: default;
}

.section-submit-btn.completed:hover {
  background: linear-gradient(135deg, var(--success-color), #059669);
  transform: none;
  box-shadow: none;
}

.section-submit-btn:disabled {
  cursor: not-allowed;
  opacity: 0.8;
}

.section.completed .section-header::after {
  content: '✓';
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  margin-left: 1rem;
}

label {
  display: block;
  margin: 0.25rem 0;
  font-size: 0.95rem;
  color: var(--text-secondary);
  cursor: pointer;
  transition: color 0.2s ease;
}

label:hover {
  color: var(--text-primary);
}

label.required-label > strong {
  color: #ef4444;
}

label strong {
  color: var(--text-primary);
  font-weight: 600;
  font-size: 1.1rem;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding-bottom: 0.75rem;
  padding-top: 1rem;
  border-bottom: 2px solid var(--bg-section);
}

label strong i {
  color: var(--primary-color);
  font-size: 1rem;
  background: var(--bg-section);
  padding: 0.5rem;
  border-radius: 8px;
}

/* 必填标记样式 */
.required-field {
  color: #ef4444;
  margin-left: 4px;
}

/* 输入框错误状态样式 */
input.error,
textarea.error {
  border-color: #ef4444 !important;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1) !important;
}

/* 错误提示样式 */
.field-error {
  color: #ef4444;
  font-size: 0.85rem;
  margin-top: 0.25rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.field-error i {
  font-size: 0.8rem;
}

      .tech-option {
    display: inline-flex !important;
    align-items: flex-start;
    margin-right: 1rem;
    padding: 1rem 0.75rem;
    border-radius: 12px;
    background: var(--bg-card);
    min-width: 350px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    cursor: pointer;
    border: 2px solid transparent;  /* 使用透明边框保持尺寸一致 */
    box-sizing: border-box;  /* 确保边框包含在元素尺寸内 */
    line-height: 1.4;
  }

  .tech-option:hover {
    background: var(--bg-section);
    transform: translateY(-1px);
    box-shadow: var(--shadow-light);
  }

  .tech-option.checked,
  .tech-option[data-checked="true"] {
    border-color: var(--primary-color) !important;  /* 只改变边框颜色，不改变尺寸 */
    background: linear-gradient(135deg, var(--primary-color), var(--accent-blue)) !important;
    color: white !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4) !important;
  }

  .tech-icon {
    font-size: 0.9rem;
    margin-right: 0.75rem;
    color: var(--primary-color);
    min-width: 16px;
    transition: color 0.2s ease;
    margin-top: 0.1rem;
  }

  .tech-option.checked .tech-icon,
  .tech-option[data-checked="true"] .tech-icon {
    color: white !important;
  }

input[type="checkbox"],
input[type="radio"] {
  margin-right: 0.75rem;
  margin-top: 0.1rem;
  accent-color: var(--primary-color);
  width: 18px;
  height: 18px;
  cursor: pointer;
  border: 2px solid var(--border-color);
  border-radius: 4px;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

input[type="checkbox"]:checked,
input[type="radio"]:checked {
  border-color: var(--primary-color);
  background-color: var(--primary-color);
}

input[type="checkbox"]:hover,
input[type="radio"]:hover {
  border-color: var(--primary-color);
  transform: scale(1.1);
}

      input[type="text"] {
    width: 400px;
    padding: 1rem;
    margin-top: 0.5rem;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    font-size: 0.95rem;
    background: var(--bg-card);
    font-family: inherit;
    transition: all 0.3s ease;
  }

  input[type="email"] {
    width: 400px;
    padding: 1rem;
    margin-top: 0.5rem;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    font-size: 0.95rem;
    background: var(--bg-card);
    font-family: inherit;
    transition: all 0.3s ease;
  }

  input[type="tel"],
  input[type="number"],
  textarea,
  select {
    width: 100%;
    padding: 1rem;
    margin-top: 0.5rem;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    font-size: 0.95rem;
    background: var(--bg-card);
    font-family: inherit;
    transition: all 0.3s ease;
  }

input[type="text"]:focus,
input[type="email"]:focus {
  outline: none;
  border-color: var(--border-focus);
  background: white;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

input[type="tel"]:focus,
input[type="number"]:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--border-focus);
  background: white;
          box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

      .btn-submit {
    width: 100%;
    padding: 1rem 2rem;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-blue));
    color: white;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    margin-top: 2rem;
    font-family: inherit;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-medium);
  }

.btn-submit:hover {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary-color));
  transform: translateY(-2px);
          box-shadow: 0 8px 25px rgba(59, 130, 246, 0.3);
}

.btn-submit:active {
  transform: translateY(0);
}



textarea {
  resize: vertical;
  min-height: 100px;
}

input::placeholder,
textarea::placeholder {
  color: var(--text-muted);
}

/* Responsive design */
@media (max-width: 1024px) {
  .main-container {
    flex-direction: column;
    gap: 1rem;
  }

  .timeline-sidebar {
    width: 100%;
    position: static;
    max-height: none;
  }

  .timeline-list {
    display: flex;
    overflow-x: auto;
    padding-bottom: 1rem;
  }

  .timeline-list::before {
    top: 50%;
    left: 0;
    right: 0;
    width: 100%;
    height: 2px;
  }

  .timeline-item {
    min-width: 200px;
    padding-left: 0;
    padding-top: 3rem;
    margin-bottom: 0;
    margin-right: 1rem;
  }

  .timeline-number-link {
    left: 50%;
    top: 6px;
    transform: translateX(-50%);
  }

  .timeline-item.active .timeline-number-link {
    transform: translateX(-50%) scale(1.2);
  }

  .timeline-item.completed::after {
    left: 50%;
    top: 10px;
    transform: translateX(-50%);
  }
}

@media (max-width: 480px) {
  input[type="text"],
  input[type="email"] {
    width: 100%;
    max-width: none;
  }

  .delivery-time-container input {
    width: 100%;
  }
}

@media (max-width: 768px) {
  body {
    padding: 1rem 0.5rem;
  }

  .main-container {
    padding: 1rem 0.5rem;
  }

  h1 {
    font-size: 2rem;
  }

  .intro-section,
  .section-content {
    padding: 1.5rem;
  }

  input[type="text"],
  input[type="email"] {
    width: 100%;
    max-width: 400px;
  }

  .delivery-time-container input {
    width: 100%;
    max-width: 400px;
  }

  .tech-option {
    min-width: 160px;
    margin-right: 0.5rem;
  }

  .intro-features {
    gap: 0.5rem;
  }

  .feature-item {
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
  }

  /* 移动端选择计数优化 */
  .count-badge {
    font-size: 0.65rem;
    padding: 0.15rem 0.4rem;
    border-radius: 8px;
  }

  .timeline-content {
    padding: 0.4rem 0;
  }

  .timeline-title {
    font-size: 0.85rem;
    margin-bottom: 0.1rem;
  }

  .timeline-description {
    font-size: 0.7rem;
    margin-bottom: 0.3rem;
  }

  .selection-count {
    margin-top: 0.3rem;
  }
}

/* Add smooth scrolling */
html {
  scroll-behavior: smooth;
}


/* Loading animation for buttons */
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

.btn-submit:disabled {
  animation: pulse 1.5s infinite;
  cursor: not-allowed;
}

.conditional-textarea {
  display: none;
  opacity: 0;
  height: 0;
  margin: 0;
  padding: 0;
  transition: all 0.3s ease;
}

.conditional-textarea.show {
  display: block;
  opacity: 1;
  height: auto;
  margin-top: 1rem;
  padding: 1rem;
}

/* Section结果显示样式 */
.section-results {
  padding: 1.5rem;
  position: relative;
  overflow: hidden;
}

.section-results h3 {
  color: var(--primary-color);
  margin-bottom: 1.2rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.1rem;
  font-weight: 600;
}

.section-results h3 i {
  color: var(--accent-blue);
}

.results-content {
  overflow-y: auto;
  padding-right: 8px;
  margin-left: 1rem;
}

.result-label {
  font-weight: 600;
  color: var(--text-primary);
  font-size: 0.95rem;
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px dashed #dfebfb;
}

.result-label i {
  color: var(--primary-color);
  font-size: 1.1em;
  min-width: 16px;
  margin-top: 0.1em;
  flex-shrink: 0;
}

.result-value {
  color: #3b82f6;
  font-weight: normal;
}

.result-item {
  line-height: 1.5;
  margin-bottom: 0.75rem;
}

.result-item.no-requirements {
  opacity: 0.8;
}

.result-item.no-requirements .result-label {
  color: #6b7280;
  font-style: italic;
}

.result-item.no-requirements .fas.fa-info-circle {
  color: #9ca3af;
}



.result-actions {
  /* margin-top: 1.2rem; */
  display: flex;
  gap: 0.8rem;
  justify-content: flex-end;
}

.btn-modify {
  width: 100%;
  padding: 0.875rem 1.5rem;
  background: linear-gradient(135deg, var(--primary-color), var(--accent-blue));
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  margin-top: 1.5rem;
  font-family: inherit;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.btn-modify:hover {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary-color));
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.btn-modify:active {
  transform: translateY(0);
}

@keyframes slideDownFade {
  from {
    opacity: 0;
    transform: translateY(-20px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(100%);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideOutRight {
  from {
    opacity: 1;
    transform: translateX(0);
  }
  to {
    opacity: 0;
    transform: translateX(100%);
  }
}

/* Loading animation for buttons */

/* Delivery Time Picker Styles */
.delivery-time-container {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 1rem;
}

.delivery-time-container input {
  width: 400px;
  cursor: pointer;
}

.delivery-time-btn {
  background: var(--primary-color);
  color: white;
  border: none;
  border-radius: 6px;
  padding: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  height: 44px;
}

.delivery-time-btn:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
}

.delivery-time-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 10000;
}

.delivery-time-modal .delivery-time-content {
  transform: translateY(-400px);
}

.delivery-time-modal.show {
  display: flex;
}

.delivery-time-content {
  background: white;
  border-radius: 12px;
  width: 90%;
  max-width: 500px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.delivery-time-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  border-bottom: 1px solid var(--border-color);
  background: var(--bg-section);
  border-radius: 12px 12px 0 0;
}

.delivery-time-header h3 {
  margin: 0;
  color: var(--text-primary);
  font-size: 1.2rem;
}

.close-modal {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 5px;
  border-radius: 50%;
  transition: all 0.3s ease;
}

.close-modal:hover {
  background: var(--bg-primary);
  color: var(--primary-color);
}

.delivery-time-body {
  padding: 20px;
}

.time-selection {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}

.month-selection h4,
.year-selection h4 {
  margin: 0 0 12px 0;
  color: var(--text-primary);
  font-size: 1rem;
  font-weight: 600;
}

.month-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.year-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.month-btn,
.year-btn {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 10px 8px;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: center;
  font-weight: 500;
}

.month-btn:hover,
.year-btn:hover {
  background: var(--bg-section);
  border-color: var(--primary-color);
  transform: translateY(-1px);
}

.month-btn.selected,
.year-btn.selected {
  background: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
}

.month-btn:disabled,
.year-btn:disabled {
  background: #f5f5f5;
  color: #ccc;
  border-color: #e0e0e0;
  cursor: not-allowed !important;
  opacity: 0.3 !important;
}

.month-btn:disabled:hover,
.year-btn:disabled:hover {
  background: #f5f5f5;
  border-color: #e0e0e0;
  transform: none;
}

.delivery-time-footer {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  padding-top: 20px;
  border-top: 1px solid var(--border-color);
}

.confirm-delivery-btn,
.cancel-delivery-btn {
  padding: 10px 20px;
  border: none;
  border-radius: 6px;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: 500;
}

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

.confirm-delivery-btn:hover {
  background: var(--primary-dark);
}

.confirm-delivery-btn:disabled {
  background: var(--text-muted);
  cursor: not-allowed;
}

.cancel-delivery-btn {
  background: var(--bg-card);
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
}

.cancel-delivery-btn:hover {
  background: var(--bg-section);
}

@media (max-width: 768px) {
  .time-selection {
    grid-template-columns: 1fr;
    gap: 15px;
  }

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

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

/* Bottom-to-top hide animation styles */
.section-hide-animation {
  transition: all 0.6s ease-in-out;
  transform-origin: bottom center;
}

.section-hide-bottom-to-top {
  transform: translateY(100%);
  opacity: 0;
}

/* Enhanced survey completion styles */
.survey-completion-summary {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 25px;
  border-radius: 12px;
  margin-bottom: 20px;
  box-shadow: 0 8px 32px rgba(102, 126, 234, 0.3);
}

.survey-completion-summary h4 {
  margin-bottom: 15px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
}

.survey-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 15px;
  margin-top: 15px;
}

.survey-stat-card {
  background: rgba(255, 255, 255, 0.1);
  padding: 15px;
  border-radius: 8px;
  text-align: center;
  backdrop-filter: blur(10px);
}

.survey-stat-number {
  font-size: 24px;
  font-weight: bold;
  margin-bottom: 5px;
}

.survey-stat-label {
  font-size: 14px;
  opacity: 0.9;
}

.review-buttons-container {
  text-align: center;
  margin-top: 30px;
}

.review-button {
  background: #28a745;
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  margin: 0 7.5px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.review-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
}

.review-button.secondary {
  background: #17a2b8;
}

.review-button.secondary:hover {
  box-shadow: 0 4px 12px rgba(23, 162, 184, 0.3);
}

.next-steps-info {
  background: #e8f5e8;
  border: 1px solid #d4edda;
  color: #155724;
  padding: 15px;
  border-radius: 8px;
  margin-top: 20px;
}

.next-steps-info h5 {
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
}

.next-steps-info ul {
  margin: 0;
  padding-left: 20px;
  line-height: 1.6;
}

.next-steps-info li {
  margin-bottom: 5px;
}

/* Survey completion success styles */
.completion-success-card {
  padding: 20px;
  border-radius: 12px;
  margin-bottom: 20px;
  text-align: center;
  border: 1px solid #e9ecef;
}

.completion-success-card h3 {
  color: #28a745;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.completion-success-card p {
  color: #666;
  margin-bottom: 15px;
}

.email-display-card {
  background: white;
  padding: 15px;
  border-radius: 8px;
  margin-top: 15px;
  border: 1px solid #dee2e6;
}

/* Animation for progressive reveal */
@keyframes slideInFromBottom {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.slide-in-animation {
  animation: slideInFromBottom 0.6s ease-out;
}

/* Staggered animation for multiple elements */
.slide-in-delay-1 {
  animation-delay: 0.1s;
}

.slide-in-delay-2 {
  animation-delay: 0.2s;
}

.slide-in-delay-3 {
  animation-delay: 0.3s;
}

/* Quick success indicator animation */
@keyframes quickPulse {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.8);
  }
  50% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.1);
  }
  100% {
    opacity: 0.9;
    transform: translate(-50%, -50%) scale(1);
  }
}

.quick-success-indicator {
  animation: quickPulse 0.3s ease-out;
}

/* Enhanced completion animation styles */
.rapid-completion-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(102, 126, 234, 0.1);
  z-index: 9999;
  pointer-events: none;
  backdrop-filter: blur(2px);
}

/* Final review comprehensive results styles */
.final-review-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 20px;
}

.completion-header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 25px;
  border-radius: 12px;
  margin-bottom: 30px;
  text-align: center;
  box-shadow: 0 8px 32px rgba(102, 126, 234, 0.3);
}

.results-grid {
  display: grid;
  gap: 20px;
  margin-bottom: 30px;
}

.section-result-card {
  background: white;
  padding: 20px;

  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.section-result-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.section-result-title {
  color: #667eea;
  margin-bottom: 10px;
  font-weight: 600;
  font-size: 1.1rem;
}

.section-result-content {
  color: #6c757d;
  line-height: 1.6;
}

.final-actions {
  text-align: center;
  margin-top: 30px;
  padding: 20px;
  background: #e8f5e8;
  border-radius: 8px;
  border: 1px solid #d4edda;
}

.final-actions h5 {
  color: #155724;
  margin-bottom: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 600;
}

.final-actions p {
  color: #155724;
  margin-bottom: 20px;
  line-height: 1.6;
}

.action-button {
  background: #28a745;
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  margin: 0 7.5px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.action-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
}

.action-button.secondary {
  background: #17a2b8;
}

.action-button.secondary:hover {
  box-shadow: 0 4px 12px rgba(23, 162, 184, 0.3);
}

/* Error highlighting for required fields */
input.error,
textarea.error,
select.error {
  border: 2px solid #dc3545 !important;
  background: rgba(220, 53, 69, 0.1) !important;
  animation: errorShake 0.5s ease-in-out;
}

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

/* Right tools sidebar styles */
.tools-sidebar {
  position: fixed;
  right: max(30px, calc(50vw - 655px));
  top: 50%;
  transform: translateY(-50%);
  width: 120px;
  background: var(--bg-card);
  border-radius: 12px;
  padding: 1rem;
  box-shadow: var(--shadow-medium);
  border: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  height: fit-content;
  max-height: calc(100vh - 4rem);
  overflow: hidden;
  z-index: 2000;
  transition: all 0.3s ease;
}

.tools-header {
  text-align: center;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--bg-section);
}

.tools-header h3 {
  font-size: 0.9rem;
  color: var(--text-primary);
  margin: 0;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.tools-header h3 i {
  color: var(--primary-color);
  font-size: 0.8rem;
}

.tools-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.tool-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  padding: 0.5rem;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.tool-button {
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  color: white;
  cursor: pointer;
}

.clear-button {
  background: linear-gradient(135deg, #dc3545, #c82333);
}

.clear-button:hover {
  background: linear-gradient(135deg, #c82333, #a71e2a);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);
}

.top-button, .bottom-button {
  background: linear-gradient(135deg, var(--primary-color), var(--accent-blue));
}

.top-button:hover, .bottom-button:hover {
  background: linear-gradient(135deg, #1d4ed8, #3b82f6);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.submit-button {
  background: linear-gradient(135deg, var(--success-color), #059669);
}

.submit-button:hover {
  background: linear-gradient(135deg, #059669, #047857);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.tool-label {
  font-size: 0.75rem;
  color: var(--text-secondary);
  font-weight: 500;
  text-align: center;
}

.save-item {
  opacity: 0.5;
  transition: all 0.3s ease;
  pointer-events: none;
  cursor: default;
}

.save-item.active {
  opacity: 1;
  background: var(--bg-section);
}

.save-indicator {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--success-color), #059669);
  color: white;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  transition: all 0.2s ease;
}

.save-item.active .save-indicator {
  transform: scale(1.1);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

/* Media queries for tools sidebar */
@media (max-width: 1400px) {
  .tools-sidebar {
    right: max(25px, calc(50vw - 620px));
    width: 100px;
  }
  
  .tool-button, .save-indicator {
    width: 35px;
    height: 35px;
    font-size: 12px;
  }
  
  .tools-header h3 {
    font-size: 0.8rem;
  }
  
  .tool-label {
    font-size: 0.7rem;
  }
}

@media (max-width: 1200px) {
  .tools-sidebar {
    right: max(20px, calc(50vw - 580px));
    width: 90px;
  }
  
  .tools-header h3 {
    font-size: 0.75rem;
  }
}

@media (max-width: 1024px) {
  .tools-sidebar {
    right: 20px;
    width: 80px;
    padding: 0.75rem;
  }
  
  .tool-button, .save-indicator {
    width: 32px;
    height: 32px;
    font-size: 11px;
  }
  
  .tools-header h3 {
    font-size: 0.7rem;
  }
  
  .tool-label {
    font-size: 0.65rem;
  }
  
  .tools-list {
    gap: 0.5rem;
  }
}

@media (max-width: 768px) {
  .tools-sidebar {
    right: 10px;
    width: 70px;
    padding: 0.5rem;
  }
  
  .tool-button, .save-indicator {
    width: 28px;
    height: 28px;
    font-size: 10px;
  }
  
  .tools-header h3 {
    font-size: 0.65rem;
  }
  
  .tool-label {
    font-size: 0.6rem;
  }
}

/* Email fallback modal styles */
.email-fallback-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  z-index: 10001;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn 0.3s ease-out;
}

.email-fallback-content {
  background: white;
  border-radius: 12px;
  padding: 30px;
  max-width: 700px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  animation: slideInFromBottom 0.4s ease-out;
}

/* Enhanced button hover effects for fallback modal */
.email-fallback-content button:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Email test button styles */
.email-test-button {
  background: linear-gradient(135deg, #ff6b6b, #ee5a52);
}

.email-test-button:hover {
  background: linear-gradient(135deg, #ee5a52, #dc5148);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(255, 107, 107, 0.3);
}

/* Diagnostic and loading animations */
@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.diagnostic-loading {
  animation: spin 1s linear infinite;
}

/* Diagnostic results modal styles */
.diagnostic-results-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  z-index: 10002;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn 0.3s ease-out;
}

.diagnostic-results-content {
  background: white;
  border-radius: 12px;
  padding: 30px;
  max-width: 600px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.diagnostic-status-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 6px;
  margin-bottom: 8px;
  transition: all 0.3s ease;
}

.diagnostic-status-item:hover {
  transform: translateX(5px);
}

.diagnostic-status-item.success {
  background: #d4edda;
  color: #155724;
}

.diagnostic-status-item.failure {
  background: #f8d7da;
  color: #721c24;
}