/* Global Styles - Professional Medical Design */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

/* Anchor scroll offset */
#filter-section {
  scroll-margin-top: 100px;
}

:root {
  --primary-color: #2563eb;
  --primary-hover: #1d4ed8;
  --secondary-color: #64748b;
  --success-color: #10b981;
  --warning-color: #f59e0b;
  --danger-color: #ef4444;
  --bg-color: #f8fafc;
  --card-bg: #ffffff;
  --text-primary: #1e293b;
  --text-secondary: #64748b;
  --border-color: #e2e8f0;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

/* Site-wide Background - Medical Theme Image */
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: url('../image/image_1.png') center center / cover no-repeat fixed;
  color: var(--text-primary);
  line-height: 1.6;
  position: relative;
}

/* Semi-transparent overlay to ensure content readability */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(224, 235, 255, 0.85) 0%, rgba(255, 255, 255, 0.9) 50%, rgba(224, 255, 240, 0.85) 100%);
  pointer-events: none;
  z-index: -1;
}

/* Remove original DNA double helix background layer */
body::after {
  content: none;
}

/* Header Navigation */
header {
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(10px);
  color: var(--text-primary);
  padding: 1rem 0;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 1.5rem;
  font-weight: bold;
  text-decoration: none;
  color: var(--primary-color);
}

nav ul {
  display: flex;
  list-style: none;
  gap: 2rem;
}

nav a {
  color: var(--text-primary);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s;
  font-size: 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
}

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

/* 导航图标样式 */
.nav-icon {
  font-size: 1.25rem;
  line-height: 1;
  display: block;
}

.nav-text {
  font-size: 0.875rem;
  white-space: nowrap;
}

/* Language Selector */
.language-selector {
  position: relative;
}

.language-selector > a {
  cursor: pointer;
  user-select: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  padding: 0.5rem 1rem;
  margin: -0.5rem -1rem;
  position: relative;
}

.language-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  background: white;
  border-radius: 8px;
  box-shadow: var(--shadow-lg);
  min-width: 200px;
  margin-top: 0.25rem;
  z-index: 1000;
  padding: 0.5rem 0;
}

.language-selector:hover .language-dropdown,
.language-dropdown:hover {
  display: block;
  animation: fadeInDown 0.3s ease;
}

/* Add a bridge area to prevent dropdown from closing */
.language-selector::after {
  content: '';
  position: absolute;
  top: 100%;
  right: 0;
  width: 100%;
  height: 0.25rem;
  background: transparent;
  pointer-events: auto;
}

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

.language-option {
  display: flex;
  align-items: center;
  padding: 0.75rem 1rem;
  color: var(--text-primary);
  text-decoration: none;
  transition: all 0.2s;
  gap: 0.75rem;
}

.language-option:hover {
  background: var(--bg-color);
  color: var(--primary-color);
}

.language-option.active {
  background: rgba(37, 99, 235, 0.1);
  color: var(--primary-color);
  font-weight: 600;
}

.lang-flag {
  font-size: 1.25rem;
  line-height: 1;
}

.lang-name {
  flex: 1;
}

/* Main Content Area */
main {
  max-width: 1200px;
  margin: 2rem auto;
  padding: 0 1.5rem;
}

/* Search Box */
.search-section {
  margin-bottom: 3rem;
}

/* Risk Assessment CTA Button */
.assessment-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 600px;
  margin: 0 auto 1.5rem;
  padding: 1.5rem 2rem;
  background: linear-gradient(135deg, #2563eb 0%, #8b5cf6 100%);
  border-radius: 16px;
  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.3);
  text-decoration: none;
  color: white;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
  overflow: hidden;
}

.assessment-cta::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;
}

.assessment-cta:hover::before {
  left: 100%;
}

.assessment-cta:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 28px rgba(37, 99, 235, 0.4);
}

.assessment-cta:active {
  transform: translateY(-2px);
}

.cta-icon {
  font-size: 3rem;
  line-height: 1;
  animation: bounce 2s infinite;
}

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

.cta-content {
  flex: 1;
  margin: 0 1.5rem;
}

.cta-title {
  font-size: 1.5rem;
  font-weight: bold;
  margin-bottom: 0.25rem;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.cta-subtitle {
  font-size: 0.95rem;
  opacity: 0.95;
  font-weight: 400;
}

.cta-arrow {
  font-size: 2rem;
  font-weight: bold;
  transition: transform 0.3s ease;
}

.assessment-cta:hover .cta-arrow {
  transform: translateX(5px);
}

/* AI Consultation Button - Blue-Green Gradient (Theme Blue) */
.ai-cta {
  background: linear-gradient(135deg, #2563eb 0%, #10b981 100%);
  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.3);
  margin-bottom: 1.5rem;
}

.ai-cta:hover {
  box-shadow: 0 12px 28px rgba(37, 99, 235, 0.4);
}

.disease-query-cta {
  background: linear-gradient(135deg, #10b981 0%, #2563eb 100%);
  box-shadow: 0 8px 20px rgba(16, 185, 129, 0.3);
  margin-bottom: 1.5rem;
}

.disease-query-cta:hover {
  box-shadow: 0 12px 28px rgba(16, 185, 129, 0.4);
}

.search-box {
  position: relative;
  width: 100%;
  margin: 0 0 1rem 0;
}

.search-box input {
  width: 100%;
  padding: 1rem 1.5rem;
  padding-right: 3.5rem;
  font-size: 1rem;
  border: 2px solid var(--border-color);
  border-radius: 50px;
  transition: all 0.3s;
}

.search-box input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.search-icon {
  position: absolute;
  right: 1.5rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-secondary);
  font-size: 1.2rem;
}

/* Search Container - vertical layout: search box above, checkboxes below */
.search-container {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 2rem;
}

/* Search Scope Group */
.search-scope-group {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 0.75rem 0;
}

/* Health Tips specific scope styling - align with filters */
.search-scope-group.health-tips-scope {
  padding: 0;
  align-items: flex-start;
  flex-shrink: 0;
}

.search-scope-label {
  font-size: 0.9rem;
  color: var(--text-secondary);
  font-weight: 500;
  white-space: nowrap;
}

.search-scope-checkbox {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  font-size: 0.9rem;
  color: var(--text-primary);
  user-select: none;
  white-space: nowrap;
  padding: 0.25rem 0.5rem;
  border-radius: 6px;
  transition: background-color 0.2s;
}

.search-scope-checkbox:hover {
  background-color: rgba(37, 99, 235, 0.05);
}

.search-scope-checkbox input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: var(--primary-color);
}

.search-scope-checkbox span {
  font-size: 0.9rem;
}

/* Responsive design for search container */
@media (max-width: 768px) {
  .search-container {
    gap: 0.75rem;
  }
  
  .search-scope-group {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 0.4rem;
    padding: 0.5rem 0;
  }
  
  .search-scope-label {
    font-size: 0.75rem;
    width: 100%;
    margin-bottom: 0;
    flex-shrink: 0;
  }
  
  /* 复选框在移动端缩小字体和内边距，使其能在一行显示 */
  .search-scope-checkbox {
    font-size: 0.65rem;
    padding: 0.15rem 0.3rem;
    gap: 0.3rem;
    flex-shrink: 0;
    white-space: nowrap;
  }
  
  .search-scope-checkbox span {
    font-size: 0.65rem;
  }
  
  .search-scope-checkbox input[type="checkbox"] {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
  }
  
  /* Health Tips mobile: move scope to new line */
  .search-scope-group.health-tips-scope {
    width: 100%;
    margin-left: 0 !important;
    margin-top: 0.5rem;
    padding: 0.5rem 0;
  }
}

/* Category Cards */
.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-bottom: 3rem;
}

.category-card {
  background: var(--card-bg);
  padding: 2rem;
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s;
  cursor: pointer;
  border: 2px solid transparent;
}

.category-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary-color);
}

.category-card h3 {
  color: var(--primary-color);
  margin-bottom: 1rem;
  font-size: 1.25rem;
}

.category-card p {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

/* Disease List */
.disease-list {
  display: grid;
  gap: 1rem;
  scroll-margin-top: 120px; /* Leave space for fixed header navigation */
}

.disease-item-link {
  text-decoration: none;
  color: inherit;
  display: block;
}

.disease-item {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  padding: 1rem 1.25rem;
  border-radius: 8px;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s;
  border-left: 4px solid var(--primary-color);
}

.disease-item-link:hover .disease-item {
  box-shadow: var(--shadow-md);
  transform: translateX(4px);
}

.disease-header {
  display: flex;
  justify-content: space-between;
  align-items: start;
  margin-bottom: 0.4rem;
}

.disease-name {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.3;
}

.pathogen-badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  background: var(--bg-color);
  color: var(--primary-color);
  border-radius: 20px;
  font-size: 0.85rem;
  margin-left: 0.5rem;
}

.disease-symptoms {
  color: var(--text-secondary);
  font-size: 0.875rem;
  line-height: 1.5;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Disease Detail Page */
.disease-detail {
  background: var(--card-bg);
  padding: 2rem;
  border-radius: 12px;
  box-shadow: var(--shadow-md);
}

.disease-title {
  font-size: 2rem;
  margin-bottom: 1rem;
  color: var(--primary-color);
}

/* Disease Title and Image Container */
.disease-header-with-image {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 2rem;
  gap: 3rem;
}

/* Left Side: Title and Info Container */
.disease-header-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.disease-header-info .disease-title {
  margin: 0;
  font-size: 2rem;
  color: var(--primary-color);
}

/* Pathogen Info Row (Compact Display) */
.disease-meta-inline {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.disease-meta-inline .meta-item {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
}

.disease-meta-inline .meta-label {
  font-weight: 600;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.disease-meta-inline .meta-value {
  color: var(--text-primary);
  font-size: 0.95rem;
}

/* Inline Disease Description Style */
.disease-description-inline {
  margin-top: 0.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-color);
}

.disease-description-inline p {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--text-primary);
}

/* Right Side: Pathogen Image Container */
.pathogen-image-container {
  flex-shrink: 0;
}

/* Pathogen Image */
.pathogen-image {
  width: 250px;
  height: 250px;
  object-fit: cover;
  border-radius: 16px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
  border: 4px solid var(--primary-color);
  display: block;
}

/* Old disease-meta style removed, pathogen info integrated into disease-header-info */

.detail-section {
  margin-bottom: 2rem;
}

.detail-section h3 {
  color: var(--primary-color);
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--border-color);
}

.detail-section ul {
  list-style: none;
}

.detail-section li {
  padding: 0.5rem 0;
  padding-left: 1.5rem;
  position: relative;
}

.detail-section li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: var(--primary-color);
  font-weight: bold;
}

/* STD Risk Calculator */
.assessment-layout {
  display: flex;
  gap: 2rem;
  align-items: flex-start;
}

#questionnaireContainer {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  height: calc(100vh - 200px);
  min-height: 600px;
}

#questionnaireContainer > .questionnaire {
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  margin-bottom: 0;
}

#quizContainer {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  height: calc(100vh - 200px);
  min-height: 600px;
}

#quizContainer > .question-card,
#quizContainer > .quiz-summary-card {
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  margin-bottom: 0;
}

.questionnaire {
  background: var(--card-bg);
  padding: 2rem;
  border-radius: 12px;
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  position: relative; /* 作为按钮定位的参考 */
}

.questionnaire-header {
  flex-shrink: 0;
}

.questionnaire-content {
  flex: 1;
  overflow-y: auto;
  padding-right: 0.5rem;
  min-height: 0;
}

.question-category {
  margin-bottom: 3rem;
}

.category-title {
  color: var(--primary-color);
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--border-color);
}

.question {
  margin-bottom: 1rem;
  padding: 1.5rem;
  background: var(--bg-color);
  border-radius: 8px;
}

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

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

.option {
  display: flex;
  align-items: center;
  padding: 0.75rem;
  background: white;
  border: 2px solid var(--border-color);
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.3s;
}

.option:hover {
  border-color: var(--primary-color);
  background: rgba(37, 99, 235, 0.05);
}

.option input[type="radio"],
.option input[type="checkbox"] {
  margin-right: 0.75rem;
  cursor: pointer;
}

.option.selected {
  border-color: var(--primary-color);
  background: rgba(37, 99, 235, 0.1);
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  background: var(--primary-color);
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  text-decoration: none;
}

.btn:hover {
  background: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-secondary {
  background: var(--secondary-color);
}

.btn-secondary:hover {
  background: #475569;
}

/* Health Knowledge Sidebar */
.health-sidebar {
  width: 350px;
  position: sticky;
  top: 100px;
  max-height: calc(100vh - 120px);
  overflow-y: auto;
}

.sidebar-placeholder {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  padding: 2rem;
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
  border: 2px dashed var(--border-color);
}

.health-info-card {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  padding: 1.5rem;
  border-radius: 12px;
  box-shadow: var(--shadow-md);
  border-left: 4px solid var(--primary-color);
  animation: fadeInSlide 0.4s ease;
}

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

.health-info-card h4 {
  color: var(--primary-color);
  font-size: 1.1rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--border-color);
}

.health-info-card .info-content {
  color: var(--text-primary);
  line-height: 1.8;
  margin-bottom: 1rem;
  font-size: 0.95rem;
}

.health-info-card .info-tips {
  background: var(--bg-color);
  padding: 1rem;
  border-radius: 8px;
  margin-top: 1rem;
}

.health-info-card .info-tips h5 {
  color: var(--primary-color);
  font-size: 0.95rem;
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.health-info-card .info-tips h5::before {
  content: "💡";
  font-size: 1.1rem;
}

.health-info-card .info-tips ul {
  list-style: none;
  padding: 0;
}

.health-info-card .info-tips li {
  padding: 0.5rem 0;
  padding-left: 1.5rem;
  position: relative;
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--text-primary);
}

.health-info-card .info-tips li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--success-color);
  font-weight: bold;
}

/* Result Card */
.result-card {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  padding: 2rem;
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
  margin-top: 2rem;
  animation: fadeInSlide 0.5s ease;
  width: 100%;
  max-width: 900px;
  box-sizing: border-box;
}

/* Result Header */
.result-header {
  text-align: center;
  padding-bottom: 1.5rem;
  margin-bottom: 2rem;
  border-bottom: 2px solid var(--border-color);
}

.result-header h2 {
  color: var(--text-primary);
  font-size: 1.8rem;
  font-weight: 600;
  margin: 0;
}

/* Percentage Display Area */
.risk-percentage-display {
  text-align: center;
  padding: 2rem 0;
  margin-bottom: 1.5rem;
}

.percentage-value {
  font-size: 4rem;
  font-weight: bold;
  line-height: 1;
  margin-bottom: 0.5rem;
}

.risk-level {
  font-size: 1.5rem;
  font-weight: 600;
  margin-top: 0.5rem;
}

/* Risk Colors */
.risk-success .percentage-value,
.risk-success .risk-level {
  color: var(--success-color);
}

.risk-warning .percentage-value,
.risk-warning .risk-level {
  color: var(--warning-color);
}

.risk-danger .percentage-value,
.risk-danger .risk-level {
  color: var(--danger-color);
}

/* Progress Bar */
.risk-progress-bar {
  width: 100%;
  height: 30px;
  background: var(--bg-color);
  border-radius: 15px;
  overflow: hidden;
  margin-bottom: 2rem;
  position: relative;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.progress-fill {
  height: 100%;
  border-radius: 15px;
  transition: width 1s ease, background 0.3s ease;
  position: relative;
  overflow: hidden;
}

.progress-fill::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.3) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  animation: shimmer 2s infinite;
}

@keyframes shimmer {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(100%);
  }
}

.progress-fill.risk-success {
  background: linear-gradient(90deg, var(--success-color), #059669);
}

.progress-fill.risk-warning {
  background: linear-gradient(90deg, var(--warning-color), #d97706);
}

.progress-fill.risk-danger {
  background: linear-gradient(90deg, var(--danger-color), #dc2626);
}

/* Result Description */
.result-description {
  margin-bottom: 2rem;
  line-height: 1.8;
  color: var(--text-primary);
  font-size: 1rem;
}

.result-description p {
  margin-bottom: 0;
}

/* Related Disease List */
.risk-diseases {
  background: #fff3cd;
  border-left: 4px solid var(--warning-color);
  padding: 1.5rem;
  border-radius: 8px;
  margin-bottom: 2rem;
}

.risk-diseases h4 {
  color: #856404;
  margin-bottom: 1rem;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.risk-diseases ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.risk-diseases li {
  padding: 0.75rem;
  background: white;
  margin-bottom: 0.5rem;
  border-radius: 6px;
  border-left: 3px solid var(--warning-color);
  font-weight: 500;
  color: var(--text-primary);
}

.risk-diseases li:last-child {
  margin-bottom: 0;
}

/* Disease Link Style */
.disease-link {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s;
  border-bottom: 1px dashed var(--primary-color);
  display: block;
  padding: 0.75rem;
  margin: -0.75rem;
}

.disease-link:hover {
  color: var(--primary-hover);
  border-bottom-style: solid;
  background: rgba(37, 99, 235, 0.1);
  border-radius: 6px;
}

/* Question Progress Indicator */
.question-progress {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  padding: 0.75rem 1.5rem;
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
  border-radius: 12px;
  font-size: 0.9rem;
  color: var(--text-primary);
  font-weight: 500;
  flex-shrink: 0;
}

.question-navigation {
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  align-items: center;
  margin-top: 0;
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
  border-top: 1px solid var(--border-color);
  flex-shrink: 0;
}

.category-badge {
  background: var(--primary-color);
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 500;
}

.question-navigation .btn {
  min-width: auto;
  padding: 0.75rem 1rem;
}

.question-navigation .btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  background: var(--border-color);
  border-color: var(--border-color);
}

/* Floating Action Buttons Container */
.floating-buttons-container {
  position: fixed;
  right: 20px;
  bottom: 100px; /* 放在Health Quiz按钮上方 */
  top: auto;
  transform: none;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  z-index: 999;
  transition: all 0.3s ease;
}

/* Floating buttons container - when used, override individual button positioning */
.floating-buttons-container .floating-btn {
  position: relative;
  right: auto;
  top: auto;
  transform: none;
}

/* Floating Button Base Styles - Standalone buttons (like in health-quiz pages) */
.floating-btn {
  position: fixed;
  right: 20px;
  bottom: 100px; /* 放在Health Quiz按钮上方 */
  top: auto;
  transform: none;
  width: 70px;
  height: 70px;
  border-radius: 50%;
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
  overflow: visible;
  z-index: 999;
}

.floating-btn-icon {
  font-size: 2.2rem;
  margin: 0;
  transition: all 0.3s ease;
  flex-shrink: 0;
}

.floating-btn-label {
  display: none;
  font-size: 0.9rem;
  font-weight: 600;
  color: white;
  margin-left: 0.5rem;
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.3s ease;
}

/* AI Consultation Floating Button - More Prominent */
.ai-floating-btn {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  border: 3px solid rgba(255, 255, 255, 0.3);
  animation: aiButtonPulse 2s ease-in-out infinite;
}

@keyframes aiButtonPulse {
  0%, 100% {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2), 0 0 0 0 rgba(37, 99, 235, 0.4);
  }
  50% {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2), 0 0 0 10px rgba(37, 99, 235, 0);
  }
}

.ai-floating-btn:hover {
  width: auto;
  min-width: 70px;
  padding: 0 1.5rem;
  border-radius: 35px;
  box-shadow: 0 8px 25px rgba(37, 99, 235, 0.5);
  transform: translateY(-5px);
  animation: none;
}

.ai-floating-btn:hover .floating-btn-icon {
  margin-right: 0;
}

.ai-floating-btn:hover .floating-btn-label {
  display: inline-block;
  opacity: 1;
}

.ai-floating-btn:active {
  transform: translateY(-2px);
}


/* AI Consultation Button Floating Mode - Legacy Support (deprecated) */
.ai-cta.floating-mode {
  position: fixed;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  width: 60px;
  height: 60px;
  border-radius: 50%;
  padding: 0;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
  z-index: 999;
  transition: all 0.3s ease;
  margin: 0;
  animation: none;
}

/* Hide text content and arrow in floating mode */
.ai-cta.floating-mode .cta-content,
.ai-cta.floating-mode .cta-arrow {
  display: none;
}

/* Center and enlarge icon in floating mode */
.ai-cta.floating-mode .cta-icon {
  font-size: 2rem;
  margin: 0;
}

/* Floating mode hover effect */
.ai-cta.floating-mode:hover {
  width: auto;
  min-width: 60px;
  padding: 0 1rem;
  border-radius: 30px;
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.4);
}

/* Show tooltip text on hover in floating mode */
.ai-cta.floating-mode:hover::after {
  content: 'AI Consultation';
  margin-left: 0.5rem;
  font-size: 0.9rem;
  font-weight: 500;
  white-space: nowrap;
}

/* Homepage Assessment Section */
.assessment-section {
  margin-bottom: 3rem;
  animation: fadeInSlide 0.5s ease;
}

/* Ensure assessment-layout displays properly on homepage */
#assessmentSection .assessment-layout {
  display: grid;
  grid-template-columns: 1fr 350px;
  gap: 2rem;
  margin-top: 2rem;
}

/* Result container full width display */
.result-container-fullwidth {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Result card centered in result container, width consistent with disease list */
.result-container-fullwidth .result-card {
  margin: 2rem auto;
}

/* Recommendation Area */
.result-recommendation {
  padding: 1.5rem;
  background: var(--bg-color);
  border-left: 4px solid var(--primary-color);
  border-radius: 8px;
  margin-top: 1rem;
  width: 100%;
  box-sizing: border-box;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.result-recommendation h4 {
  color: var(--primary-color);
  margin-bottom: 1rem;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.result-recommendation p {
  color: var(--text-primary);
  line-height: 1.8;
  margin: 0;
  width: 100%;
  word-wrap: break-word;
  white-space: pre-wrap;
}

/* Backward compatibility for old risk level styles */
.risk-low .result-title { color: var(--success-color); }
.risk-medium .result-title { color: var(--warning-color); }
.risk-high .result-title { color: var(--danger-color); }

/* Filter Bar */
.filter-bar {
  display: flex;
  gap: 1rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 0.5rem 1rem;
  background: var(--card-bg);
  border: 2px solid var(--border-color);
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.3s;
  font-weight: 500;
}

.filter-btn:hover {
  border-color: var(--primary-color);
  color: var(--primary-color);
}

.filter-btn.active {
  background: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
}

/* AI Diagnosis Interface */
.ai-container {
  max-width: 900px;
  margin: 0 auto;
}

.chat-container {
  background: var(--card-bg);
  border-radius: 12px;
  box-shadow: var(--shadow-md);
  height: 500px;
  display: flex;
  flex-direction: column;
}

.chat-messages {
  flex: 1;
  padding: 1.5rem;
  overflow-y: auto;
}

.message {
  margin-bottom: 1rem;
}

.message.user {
  text-align: right;
}

.message-content {
  display: inline-block;
  padding: 0.75rem 1rem;
  background: var(--bg-color);
  border-radius: 8px;
  max-width: 70%;
}

.message.assistant .message-content {
  background: rgba(37, 99, 235, 0.1);
}

.chat-input-area {
  padding: 1.5rem;
  border-top: 2px solid var(--border-color);
  display: flex;
  gap: 1rem;
}

.chat-input {
  flex: 1;
  padding: 0.75rem;
  border: 2px solid var(--border-color);
  border-radius: 8px;
  font-size: 1rem;
}

.chat-input:focus {
  outline: none;
  border-color: var(--primary-color);
}

/* 移动端顶部标题栏 - PC端隐藏 */
.mobile-title-bar {
  display: none;
}

/* Footer */
footer {
  background: var(--card-bg);
  padding: 2rem 0;
  margin-top: 4rem;
  text-align: center;
  color: var(--text-secondary);
  border-top: 2px solid var(--border-color);
}

/* 桌面端隐藏footer中的隐私条款（因为已经在标题下方显示） */
.privacy-policy-footer {
  display: none;
}

/* Responsive Design */
@media (max-width: 768px) {
  /* 防止横向滚动 */
  html, body {
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
  }
  
  main {
    max-width: 100%;
    overflow-x: hidden;
  }
  
  /* 移动端顶部标题栏 - 蓝白渐变背景，固定在顶部 */
  .mobile-title-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 999;
    background: linear-gradient(to right, #ffffff 0%, var(--primary-color) 100%);
    padding: 0.75rem 1rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  }
  
  .mobile-title {
    display: inline-block;
    font-size: 1.25rem;
    font-weight: bold;
    color: #1e293b; /* 深色文字，在白色背景部分清晰可见 */
    text-decoration: none;
    transition: opacity 0.3s ease;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8); /* 白色阴影，确保在蓝色背景部分也可见 */
    flex: 1;
    text-align: center;
  }
  
  .mobile-title:hover {
    opacity: 0.8;
  }
  
  /* 移动端标题栏中的语言选择器 */
  .mobile-title-bar .mobile-language-selector {
    position: relative;
    flex-shrink: 0;
  }
  
  .mobile-title-bar .mobile-language-selector .language-selector {
    position: relative;
  }
  
  .mobile-title-bar .mobile-language-selector .language-selector > a {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.5rem 0.75rem;
    font-size: 0.9rem;
    color: #ffffff;
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.3s ease;
    background: linear-gradient(to right, var(--primary-color) 0%, #8b5cf6 100%);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  }
  
  .mobile-title-bar .mobile-language-selector .language-selector > a:hover {
    background: linear-gradient(to right, #1d4ed8 0%, #7c3aed 100%);
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.3);
    transform: translateY(-1px);
  }
  
  .mobile-title-bar .mobile-language-selector .language-dropdown {
    right: 0;
    left: auto;
    top: 100%;
    bottom: auto;
    margin-top: 0.25rem;
    margin-bottom: 0;
    min-width: 180px;
  }
  
  /* 在移动端底部导航栏中隐藏语言选择器 */
  header nav ul .language-selector {
    display: none;
  }
  
  /* 移动端缩小footer间距并统一字体大小，左对齐 */
  footer {
    padding: 1.5rem;
    margin-top: 1.5rem;
    font-size: 0.75rem; /* 统一字体大小 */
    text-align: left !important; /* 左对齐 */
  }
  
  footer p {
    font-size: 0.75rem !important; /* 覆盖内联样式，统一字体大小 */
    line-height: 1.5;
    text-align: left !important; /* 左对齐 */
    margin: 0.5rem 0 !important;
  }
  
  footer a {
    font-size: 0.75rem !important; /* 链接文字也统一 */
  }
  
  /* 隐私条款在footer中显示 */
  .privacy-policy-footer {
    font-size: 0.75rem !important;
    line-height: 1.5 !important;
    text-align: left !important;
    margin-bottom: 1rem !important;
  }
  /* Mobile background optimization */
  body {
    background-size: cover;
    background-position: center center;
  }
  
  body::before {
    background: linear-gradient(135deg, rgba(224, 235, 255, 0.9) 0%, rgba(255, 255, 255, 0.95) 50%, rgba(224, 255, 240, 0.9) 100%);
  }
  
  /* ===== 移动端底部导航栏 ===== */
  
  /* 将导航栏固定在底部 */
  header {
    position: fixed;
    bottom: 0;
    top: auto;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: none;
    padding: 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
  }
  
  header::before,
  header::after {
    display: none;
  }
  
  /* 容器布局：横向排列，隐藏logo */
  .header-container {
    display: flex;
    justify-content: center;
    align-items: stretch;
    padding: 0;
    width: 100%;
  }
  
  .header-container .logo {
    display: none;
  }
  
  /* 导航区域：占满宽度，横向分布 */
  nav {
    display: flex;
    flex: 1;
    width: 100%;
  }
  
  nav ul {
    display: flex;
    width: 100%;
    justify-content: space-around;
    align-items: stretch;
    gap: 0;
    padding: 0;
    margin: 0;
    list-style: none;
  }
  
  nav ul li {
    flex: 1;
    display: flex;
    align-items: stretch;
  }
  
  /* 导航链接：纵向布局（图标+文字） */
  nav a {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
    font-size: 0.85rem;
    gap: 0;
    white-space: nowrap;
    padding-top: 1rem;
    padding-bottom: 1rem;
  }
  
  /* 导航图标和文字 */
  .nav-icon {
    font-size: 1.5rem;
    line-height: 1;
    display: block;
  }
  
  .nav-text {
    font-size: 0.85rem;
    line-height: 1;
  }
  
  /* 隐藏导航栏中的语言选择器（已移至顶部标题栏） */
  header nav ul .language-selector {
    display: none;
  }
  
  /* 语言下拉菜单向上弹出 */
  .language-dropdown {
    bottom: 100%;
    top: auto;
    margin-bottom: 0.25rem;
  }

  main {
    margin: 0.5rem auto;
    padding: 0 1rem;
    padding-bottom: 90px; /* 为底部导航栏留出空间（已增加高度） */
  }
  
  /* 修复移动端面包屑导航换行问题 */
  nav[aria-label="breadcrumb"] ol {
    flex-wrap: nowrap !important;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    white-space: nowrap;
  }
  
  nav[aria-label="breadcrumb"] ol li {
    display: flex !important;
    align-items: center !important;
    white-space: nowrap;
    flex-shrink: 0;
  }
  
  /* 缩小移动端面包屑导航字体 */
  nav[aria-label="breadcrumb"] {
    font-size: 0.75rem;
  }
  
  nav[aria-label="breadcrumb"] ol {
    font-size: 0.75rem;
  }
  
  /* 缩小各个section的间距 */
  section {
    margin-bottom: 1rem !important;
  }
  
  .search-section {
    margin-bottom: 1.5rem !important;
  }
  
  .assessment-section {
    margin-bottom: 1.5rem !important;
  }

  .category-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
    margin-bottom: 1.5rem;
  }

  .disease-header {
    flex-direction: column;
    gap: 0.5rem;
  }

  /* Disease detail page responsive */
  .disease-header-with-image {
    flex-direction: column;
    align-items: flex-start;
    gap: 1.5rem;
  }
  
  .pathogen-image-container {
    align-self: center;
    margin-top: 0;
  }
  
  .pathogen-image {
    width: 180px;
    height: 180px;
  }

  .filter-bar {
    flex-direction: column;
  }

  .filter-container {
    grid-template-columns: 1fr;
  }
  
  .disease-filter-container {
    flex-direction: row;
    gap: 0.25rem;
  }
  
  .disease-filter-container .filter-item {
    border-right: none;
    border-bottom: none;
    flex: 1;
    min-width: 0;
  }
  
  .disease-filter-container .filter-item:last-child {
    border-bottom: none;
  }
  
  .disease-filter-container .filter-item:first-child .filter-label {
    border-radius: 8px 0 0 8px;
  }
  
  .disease-filter-container .filter-item:last-child .filter-label {
    border-radius: 0 8px 8px 0;
  }
  
  /* Remove border separator on mobile */
  .disease-filter-container .filter-item:not(:last-child) .filter-label {
    border-right: 1px solid rgba(255, 255, 255, 0.3);
    border-bottom: none;
  }
  
  /* 缩小移动端筛选器标签的文字和内边距 */
  .disease-filter-container .filter-label {
    padding: 0.45rem 0.3rem;
    font-size: 0.65rem;
    font-weight: 500;
  }
  
  .disease-filter-container .filter-label > span:first-child {
    font-size: 0.65rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  
  .disease-filter-container .filter-count {
    font-size: 0.6rem;
    padding: 0.1rem 0.3rem;
    min-width: 1.3rem;
  }
  
  /* 缩小移动端筛选器下拉列表选项的文本，确保最多两行 */
  .filter-dropdown .filter-option {
    padding: 0.5rem 0.8rem;
    font-size: 0.75rem;
    line-height: 1.4;
  }
  
  .filter-dropdown .filter-option > span,
  .filter-dropdown .filter-option > label {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.4;
    max-height: 2.8em; /* 大约两行的高度 */
  }
  
  .filter-dropdown .filter-option input[type="checkbox"] {
    width: 14px;
    height: 14px;
    margin-right: 0.4rem;
    flex-shrink: 0;
  }
  
  .disease-filter-container .filter-item:first-child .filter-dropdown {
    border-radius: 0 0 0 0;
  }
  
  .disease-filter-container .filter-item:last-child .filter-dropdown {
    border-radius: 0 0 12px 12px;
  }

  /* Mobile: click to expand/collapse */
  .filter-item:hover .filter-dropdown {
    display: none;  /* Disable hover expand on mobile */
  }
  
  .filter-item .filter-dropdown.show {
    display: block;  /* Requires click to expand on mobile */
  }

  .filter-actions {
    flex-direction: row;
    justify-content: flex-start;
    gap: 0.75rem;
    align-items: center;
  }
  
  /* 缩小移动端清除筛选按钮，使其与筛选器按钮大小一致 */
  .filter-actions .btn-secondary {
    padding: 0.45rem 0.8rem;
    font-size: 0.65rem;
    font-weight: 500;
    white-space: nowrap;
  }
  
  /* 缩小结果计数文本 */
  .filter-actions .result-count {
    font-size: 0.65rem;
  }
  
  .filter-actions .result-count strong {
    font-size: 0.75rem;
  }
  
  /* 缩小移动端Diseases标题下方说明文字的字体 */
  section p[data-i18n="diseaseList.description"] {
    font-size: 0.65rem;
  }

  .message-content {
    max-width: 85%;
  }

  /* Mobile: move sidebar to bottom */
  .assessment-layout {
    flex-direction: column;
    gap: 0;
  }

  .health-sidebar {
    width: 100%;
    position: static;
    max-height: none;
    margin-top: 0;
  }
  
  /* 确保问卷容器在移动端没有下边距 */
  #questionnaireContainer {
    margin-bottom: 0;
  }
  
  #questionnaireContainer > .questionnaire {
    margin-bottom: 0;
  }
  
  /* 确保问答容器没有下边距，让反馈卡片紧贴 */
  #quizContainer {
    margin-bottom: 0;
    height: auto;
    min-height: auto;
  }
  
  /* 确保问题卡片根据内容自适应高度，而不是填满容器 */
  #quizContainer > .question-card,
  #quizContainer > .quiz-summary-card {
    height: auto;
    min-height: auto;
  }
  
  /* 确保反馈卡片没有上边距 */
  .quiz-feedback-card {
    margin-top: 0;
  }
  
  .quiz-entry-wrapper {
    position: static;
    margin-left: 0;
    margin-top: 2rem;
    display: flex;
    justify-content: center;
  }
  
  .quiz-entry-btn-fixed {
    position: absolute;
    bottom: 100%; /* 按钮底部紧贴卡片顶部 */
    right: 0;
    margin-bottom: 0;
  }
  
  #questionnaireContainer {
    height: auto;
    min-height: auto;
  }
  
  #questionnaireContainer > .questionnaire {
    height: auto;
    margin-bottom: 0;
    padding: 1rem; /* 减少内边距，让内容更宽 */
    display: block; /* 移动端改为block布局，不再是flex */
  }
  
  /* 移动端：隐藏问卷头（标题），但保留进度显示在内容区域 */
  .questionnaire-header {
    display: none;
  }
  
  /* 移动端：移除问卷内容容器的嵌套，让问题直接显示 */
  .questionnaire-content {
    display: block; /* 改为block，移除flex容器特性 */
    padding: 0;
    overflow: visible;
    flex: none; /* 移除flex属性 */
  }
  
  /* 移动端：确保进度显示区域正确显示 */
  .questionnaire-content .question-header-wrapper {
    margin-bottom: 1.5rem;
  }

  /* Mobile: risk assessment CTA button */
  .assessment-cta {
    padding: 1.25rem 1.5rem;
    margin-bottom: 1rem;
  }
  
  .ai-cta {
    margin-bottom: 1rem;
  }
  
  .cta-icon {
    font-size: 2.5rem;
  }
  
  .cta-content {
    margin: 0 1rem;
  }
  
  .cta-title {
    font-size: 1.25rem;
  }
  
  .cta-subtitle {
    font-size: 0.85rem;
  }
  
  .cta-arrow {
    font-size: 1.5rem;
  }
  
  /* Question progress */
  .question-progress {
    flex-direction: column;
    gap: 0.5rem;
    text-align: center;
  }
  
  /* Question navigation */
  .question-navigation {
    flex-direction: column;
  }
  
  .question-navigation .btn {
    width: 100%;
  }
  
  /* Result container full width */
  .result-container-fullwidth {
    padding: 0 1rem;
  }
  
  .result-card {
    padding: 1.5rem;
    margin: 1.5rem auto;
  }
  
  .result-header h2 {
    font-size: 1.5rem;
  }
  
  .result-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
  }
  
  .result-actions .btn {
    width: 100%;
  }
  
  /* Homepage questionnaire area responsive */
  #assessmentSection .assessment-layout {
    grid-template-columns: 1fr;
    display: flex;
    flex-direction: column;
    gap: 0;
  }
  
  #assessmentSection .health-sidebar {
    display: block;
    width: 100%;
    position: static;
    max-height: none;
    margin-top: 0;
  }
  
  /* Mobile floating buttons adjustment */
  .floating-buttons-container {
    right: 15px;
    bottom: 90px; /* 放在Health Quiz按钮上方（按钮高度60px + 间距约30px） */
    top: auto;
    transform: none;
    gap: 0.75rem;
  }
  
  .floating-btn {
    width: 60px;
    height: 60px;
    bottom: 90px; /* 放在Health Quiz按钮上方 */
    top: auto;
    transform: none;
  }
  
  .floating-btn-icon {
    font-size: 1.8rem;
  }
  
  .floating-btn:hover {
    width: 60px;
    padding: 0;
  }
  
  .floating-btn:hover .floating-btn-label {
    display: none;
    opacity: 0;
  }
  
  .floating-btn:hover .floating-btn-icon {
    margin-right: 0;
    margin-left: 0;
  }
  
  /* Legacy floating button - Mobile adjustment */
  .ai-cta.floating-mode {
    right: 10px;
    bottom: 20px;
    top: auto;
    width: 50px;
    height: 50px;
    transform: none;
  }
  
  .ai-cta.floating-mode .cta-icon {
    font-size: 1.5rem;
  }
  
  .ai-cta.floating-mode:hover {
    width: 50px;
    padding: 0;
  }
  
  .ai-cta.floating-mode:hover::after {
    display: none;
  }
}

/* Loading Animation */
.loading {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(37, 99, 235, 0.3);
  border-radius: 50%;
  border-top-color: var(--primary-color);
  animation: spin 0.8s linear infinite;
}

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

/* Filter Container - Original grid layout for health-tips */
.filter-container {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-bottom: 2rem;
}

/* Disease Filter Container - Merged single bar layout for diseases-list */
.disease-filter-container {
  display: flex;
  margin-bottom: 2rem;
  background: transparent;
  border-radius: 0;
  box-shadow: none;
  overflow: visible;
  gap: 0;
}

.filter-item {
  background: var(--card-bg);
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
  overflow: visible;  /* Changed to visible, allow dropdown overflow */
  position: relative;  /* Add relative positioning as dropdown positioning reference */
}

/* Disease filter items - merged style */
.disease-filter-container .filter-item {
  flex: 1;
  background: transparent;
  border-radius: 0;
  box-shadow: none;
  border-right: none;
  margin: 0;
  padding: 0;
}

.disease-filter-container .filter-item:last-child {
  border-right: none;
}

.disease-filter-container .filter-item:first-child .filter-label {
  border-radius: 12px 0 0 12px;
}

.disease-filter-container .filter-item:last-child .filter-label {
  border-radius: 0 12px 12px 0;
}

.filter-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem;
  background: linear-gradient(135deg, var(--primary-color), var(--success-color));
  color: white;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  border-radius: 12px;
}

.disease-filter-container .filter-label {
  border-radius: 0;
  margin: 0;
}

/* Add separator between filter items using filter-label border */
.disease-filter-container .filter-item:not(:last-child) .filter-label {
  border-right: 1px solid rgba(255, 255, 255, 0.3);
}

.filter-label:hover {
  background: linear-gradient(135deg, var(--primary-hover), #059669);
}

.filter-count {
  background: rgba(255, 255, 255, 0.3);
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.85rem;
  min-width: 2rem;
  text-align: center;
}

.filter-dropdown {
  display: none;  /* Hidden by default */
  position: absolute;  /* Absolute positioning, doesn't occupy document flow space */
  top: 100%;  /* Immediately below parent element */
  left: 0;
  right: 0;
  max-height: 400px;  /* Increase max height to accommodate more risk behavior options */
  overflow-y: auto;
  padding: 0.5rem 0;
  background: var(--card-bg);  /* Add background color */
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);  /* Add shadow */
  z-index: 100;  /* Increased z-index to ensure dropdown appears above all elements */
  border-radius: 0 0 12px 12px;  /* Bottom border radius */
  transition: opacity 0.2s ease;
}

/* Disease filter dropdown border radius */
.disease-filter-container .filter-item:first-child .filter-dropdown {
  border-radius: 0 0 0 12px;  /* Bottom left corner for first item */
}

.disease-filter-container .filter-item:last-child .filter-dropdown {
  border-radius: 0 0 12px 0;  /* Bottom right corner for last item */
}

.filter-item:hover > .filter-dropdown {
  display: block;  /* Show on hover, using > direct child selector */
  animation: slideDown 0.2s ease;
}

/* Ensure .show class has higher priority than hover, and works on all devices */
.filter-dropdown.show {
  display: block !important;  /* Show when clicked, override hover behavior */
  animation: slideDown 0.2s ease;
}

/* Keep dropdown open when hovering over it (works with both hover and click) */
.filter-item:hover > .filter-dropdown,
.filter-dropdown:hover {
  display: block;
  animation: slideDown 0.2s ease;
}

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

.filter-dropdown.hidden {
  display: none !important;
}

.filter-option {
  display: flex;
  align-items: center;
  padding: 0.75rem 1.5rem;
  cursor: pointer;
  transition: all 0.2s;
  border-left: 3px solid transparent;
}

.filter-option:hover {
  background: rgba(37, 99, 235, 0.05);
  border-left-color: var(--primary-color);
}

.filter-option input[type="checkbox"] {
  margin-right: 0.75rem;
  cursor: pointer;
  width: 18px;
  height: 18px;
}

.filter-option.selected {
  background: rgba(37, 99, 235, 0.1);
  border-left-color: var(--primary-color);
  font-weight: 600;
}

.filter-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 0;
}

.result-count {
  color: var(--text-secondary);
  font-size: 1rem;
}

.result-count strong {
  color: var(--primary-color);
  font-size: 1.25rem;
  margin: 0 0.25rem;
}

/* AI Diagnosis Modal */
.ai-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 9999;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.ai-modal.show {
  opacity: 1;
}

.ai-modal-content {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-radius: 16px;
  width: 90%;
  max-width: 1050px;
  height: 95vh;
  max-height: 95vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: modalSlideIn 0.3s ease;
}

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

.ai-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 1rem;
  border-bottom: 1px solid var(--border-color);
  background: linear-gradient(135deg, var(--primary-color), #1e40af);
  color: white;
  border-radius: 16px 16px 0 0;
}

.ai-modal-header h3 {
  margin: 0;
  font-size: 0.75rem;
  font-weight: 600;
}

.ai-close-btn {
  background: none;
  border: none;
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background 0.3s;
}

.ai-close-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

.ai-modal-body {
  flex: 1;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* AI Configuration Interface */
.ai-config {
  padding: 2rem;
}

.ai-config-notice {
  background: #fff3cd;
  border-left: 4px solid var(--warning-color);
  padding: 1rem 1.5rem;
  border-radius: 8px;
  margin-bottom: 2rem;
}

.ai-config-form {
  max-width: 500px;
  margin: 0 auto;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: var(--text-primary);
}

.form-input {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 2px solid var(--border-color);
  border-radius: 8px;
  font-size: 1rem;
  transition: border-color 0.3s;
}

.form-input:focus {
  outline: none;
  border-color: var(--primary-color);
}

.form-help {
  background: var(--bg-color);
  padding: 1rem;
  border-radius: 8px;
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
}

.form-help p {
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: var(--primary-color);
}

.form-help ol {
  margin-left: 1.5rem;
  line-height: 1.8;
}

.form-help a {
  color: var(--primary-color);
  text-decoration: underline;
}

.btn-primary {
  width: 100%;
  background: var(--primary-color);
  color: white;
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.3s;
}

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

/* AI Chat Interface */
.ai-chat-container {
  display: flex;
  flex-direction: column;
  height: 100%;
  flex: 1;
}

.ai-privacy-notice {
  background: #e7f3ff;
  padding: 0.5rem 1.5rem;
  text-align: center;
  font-size: 0.75rem;
  color: var(--primary-color);
  border-bottom: 1px solid var(--border-color);
}

.ai-privacy-notice p {
  margin: 0;
}

.ai-messages {
  flex: 1;
  overflow-y: auto;
  padding: 1.5rem;
  background: var(--bg-color);
}

.ai-message {
  margin-bottom: 1.5rem;
  display: flex;
  animation: messageSlideIn 0.3s ease;
}

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

.ai-message-user {
  justify-content: flex-end;
}

.ai-message-content {
  max-width: 75%;
  padding: 0.75rem 1rem;
  border-radius: 12px;
  font-size: 0.85rem;
  line-height: 1.45;
  letter-spacing: -0.01em;
}

.ai-message-assistant .ai-message-content {
  background: white;
  border: 2px solid var(--border-color);
  box-shadow: var(--shadow-sm);
}

.ai-message-user .ai-message-content {
  background: var(--primary-color);
  color: white;
}

.ai-message-error .ai-message-content {
  background: #fee;
  border: 2px solid var(--danger-color);
  color: var(--danger-color);
}

.ai-message-content ul {
  margin: 0.4rem 0;
  padding-left: 1.25rem;
}

.ai-message-content li {
  margin: 0.2rem 0;
}

.ai-loading {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-secondary);
}

.ai-loading::after {
  content: '...';
  animation: ellipsis 1.5s infinite;
}

@keyframes ellipsis {
  0%, 20% { content: '.'; }
  40% { content: '..'; }
  60%, 100% { content: '...'; }
}

/* Streaming output cursor animation */
.ai-message-streaming .ai-message-content::after {
  content: '▊';
  animation: blink 1s infinite;
  margin-left: 2px;
  color: var(--primary-color);
}

/* Assessment recommendation streaming output cursor animation */
.result-recommendation.ai-message-streaming #aiRecommendationText::after {
  content: '▊';
  animation: blink 1s infinite;
  margin-left: 2px;
  color: var(--primary-color);
}

@keyframes blink {
  0%, 50% { opacity: 1; }
  51%, 100% { opacity: 0; }
}

/* Quick Questions */
.ai-quick-questions {
  padding: 0.5rem 1rem;
  background: white;
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  flex-shrink: 0;
}

.quick-questions-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.quick-question-btn {
  background: var(--bg-color);
  border: 1px solid var(--border-color);
  padding: 0.3rem 0.65rem;
  border-radius: 14px;
  font-size: 0.75rem;
  cursor: pointer;
  transition: all 0.3s;
  color: var(--text-primary);
  line-height: 1.2;
}

.quick-question-btn:hover {
  background: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
  transform: translateY(-1px);
}

/* Input Area */
.ai-input-area {
  padding: 1.5rem;
  background: white;
  border-top: 2px solid var(--border-color);
  display: flex;
  gap: 1rem;
  align-items: flex-end;
}

.ai-input {
  flex: 1;
  padding: 0.75rem 1rem;
  border: 2px solid var(--border-color);
  border-radius: 8px;
  font-size: 1rem;
  font-family: inherit;
  resize: none;
  transition: border-color 0.3s;
}

.ai-input:focus {
  outline: none;
  border-color: var(--primary-color);
}

.ai-send-btn {
  width: 42px;
  height: 42px;
  min-width: 42px;
  padding: 0 !important;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}

.ai-reconfig {
  padding: 0.5rem 1.5rem;
  text-align: center;
  background: var(--bg-color);
}

.btn-text {
  background: none;
  border: none;
  color: var(--primary-color);
  cursor: pointer;
  font-size: 0.9rem;
  text-decoration: underline;
  padding: 0.5rem 1rem;
}

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

/* Responsive */
@media (max-width: 768px) {
  .ai-modal-content {
    width: 95%;
    height: 95vh;
  }
  
  .ai-modal-header {
    padding: 0.4rem 0.75rem;
  }
  
  .ai-modal-header h3 {
    font-size: 0.7rem;
  }
  
  .ai-close-btn {
    font-size: 1.25rem;
  }
  
  .ai-quick-questions {
    padding: 0.4rem 0.75rem;
  }
  
  .ai-message-content {
    max-width: 85%;
    padding: 0.6rem 0.85rem;
    font-size: 0.8rem;
  }
  
  .quick-question-btn {
    font-size: 0.7rem;
    padding: 0.25rem 0.5rem;
  }
  
  .ai-input-area {
    gap: 0.75rem;
  }
  
  .ai-send-btn {
    width: 38px;
    height: 38px;
    min-width: 38px;
    font-size: 1rem;
  }
}

/* Utility Classes */
.text-center { text-align: center; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.hidden { display: none; }

/* Health Tips Page Styles */
.health-tips-list {
  display: grid;
  gap: 0;
  margin-bottom: 2rem;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.health-tip-card {
  background: var(--card-bg);
  padding: 1.5rem;
  transition: all 0.2s ease;
  border: none;
  border-bottom: 1px solid var(--border-color);
  position: relative;
}

.health-tip-card-link:last-child .health-tip-card {
  border-bottom: none;
}

.health-tip-card-link {
  display: block;
  text-decoration: none;
  color: inherit;
}

.health-tip-card-link:hover .health-tip-card {
  background: #f8fafc;
}

.tip-header {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  margin-bottom: 1rem;
  flex-wrap: nowrap;
  gap: 0.5rem;
}

.tip-language-badge {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.375rem 0.75rem;
  background: linear-gradient(135deg, #e0f2fe 0%, #f0f9ff 100%);
  border-radius: 20px;
  font-size: 0.875rem;
  color: var(--text-primary);
  font-weight: 500;
}

.lang-flag {
  font-size: 1rem;
}

.lang-name {
  color: var(--primary-color);
}

.tip-category-badge {
  display: inline-block;
  padding: 0.375rem 0.75rem;
  background: var(--primary-color);
  color: white;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.tip-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
  line-height: 1.4;
}

.tip-content {
  color: var(--text-secondary);
  line-height: 1.7;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  max-height: 3.4em; /* 大约两行的高度 (1.7 * 2) */
}

/* Health Tips Filter Styles */
.health-tips-list:empty::before {
  content: 'No tips found. Try adjusting your filters.';
  display: block;
  text-align: center;
  padding: 3rem;
  color: var(--text-secondary);
}

/* Responsive Design for Health Tips */
@media (max-width: 768px) {
  /* 移动端：调整健康贴士筛选器按钮的padding */
  .filter-container .filter-label {
    padding: 10px 15px;
  }
  
  /* 移动端：让健康贴士列表更宽，与疾病列表一致 */
  .health-tips-list {
    margin-left: -1rem;
    margin-right: -1rem;
    border-radius: 0;
    box-shadow: none;
  }
  
  .health-tip-card {
    padding: 1rem 1.25rem; /* 与疾病列表的padding一致 */
  }
  
  .health-tip-card.selected {
    padding-left: calc(1.25rem - 4px);
  }
  
  .health-tip-card.selected::before {
    right: 1.25rem;
    top: 1rem;
    font-size: 1rem;
  }
  
  .tip-title {
    font-size: 1.1rem;
  }
  
  .tip-content {
    font-size: 0.9rem;
  }
  
  .tip-header {
    flex-direction: row;
    align-items: center;
    flex-wrap: nowrap;
  }
}

/* Health Tip Detail Page Styles */
.health-tip-detail-container {
  display: grid;
  grid-template-columns: 1fr 350px;
  gap: 2rem;
  margin-top: 2rem;
}

.health-tip-main-content {
  min-width: 0; /* Prevent grid overflow */
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* Title and Meta Card */
.tip-header-card {
  background: var(--card-bg);
  border-radius: 12px;
  padding: 2rem;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border-color);
}

.tip-meta-info {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}

.tip-language-badge-detail {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: linear-gradient(135deg, #e0f2fe 0%, #f0f9ff 100%);
  border-radius: 20px;
  font-size: 0.875rem;
  color: var(--text-primary);
  font-weight: 500;
}

.tip-category-badge-detail {
  display: inline-block;
  padding: 0.5rem 1rem;
  background: var(--primary-color);
  color: white;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Title Row with Like Button */
.tip-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.tip-detail-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
  line-height: 1.3;
  flex: 1;
  min-width: 0;
}

/* Like Button Styles */
.tip-like-section {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.tip-like-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: transparent;
  border: 1px solid var(--border-color);
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 1rem;
  color: var(--text-primary);
}

.tip-like-btn:hover {
  background: #f0f9ff;
  border-color: var(--primary-color);
  transform: translateY(-1px);
}

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

.tip-like-btn.liked {
  background: #e0f2fe;
  border-color: var(--primary-color);
  color: var(--primary-color);
}

.like-icon {
  font-size: 1.2rem;
  line-height: 1;
}

.like-count {
  font-weight: 600;
  font-size: 0.9rem;
  min-width: 1.5rem;
  text-align: center;
}

/* Content Card */
.tip-content-card {
  background: var(--card-bg);
  border-radius: 12px;
  padding: 2rem;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border-color);
}

.tip-detail-content {
  font-size: 1rem;
  line-height: 1.8;
  color: var(--text-primary);
}

.tip-detail-content p {
  margin-bottom: 1.25rem;
}

.tip-detail-content p:last-child {
  margin-bottom: 0;
}

/* Answer Cards */
.tip-answer-card {
  background: var(--bg-secondary);
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  border-left: 4px solid var(--primary-color);
  box-shadow: var(--shadow-sm);
}

.tip-answer-card:last-child {
  margin-bottom: 0;
}

.tip-answer-number {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--primary-color);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-color);
}

.tip-answer-content {
  font-size: 1.1rem;
  line-height: 1.8;
  color: var(--text-primary);
}

/* 确保帖子内容（非Answer卡片内的内容）字体比Answer1小 */
.tip-detail-content > p:not(.tip-answer-card p) {
  font-size: 1rem;
}

.tip-answer-content p {
  margin-bottom: 1.25rem;
}

.tip-answer-content p:last-child {
  margin-bottom: 0;
}

/* Sidebar Styles */
.health-tip-sidebar {
  position: sticky;
  top: 100px;
  align-self: start;
  height: fit-content;
}

.related-tips-section {
  background: var(--card-bg);
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border-color);
}

.related-tips-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--border-color);
}

.related-tips-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.related-tip-card {
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-color);
  transition: all 0.2s ease;
}

.related-tip-card:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.related-tip-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
  flex-wrap: wrap;
}

.related-tip-lang {
  font-size: 0.75rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.related-tip-category {
  font-size: 0.7rem;
  padding: 0.25rem 0.5rem;
  background: var(--primary-color);
  color: white;
  border-radius: 12px;
  font-weight: 600;
  text-transform: uppercase;
}

.related-tip-title {
  font-size: 1rem;
  font-weight: 600;
  margin: 0;
  line-height: 1.4;
}

.related-tip-title a {
  color: var(--primary-color);
  text-decoration: none;
  transition: color 0.2s ease;
}

.related-tip-title a:hover {
  color: var(--primary-hover);
  text-decoration: underline;
}

/* Search Page Styles */

/* Home Search Section */
.home-search-section {
  padding: 3rem 1rem;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.05) 0%, rgba(147, 51, 234, 0.05) 100%);
  margin-top: 0;
}

.home-search-container {
  max-width: 800px;
  margin: 0 auto;
}

.home-search-box {
  position: relative;
  width: 100%;
}

.home-search-box input {
  width: 100%;
  padding: 1rem 1.5rem;
  padding-right: 3.5rem;
  font-size: 1rem;
  border: 2px solid var(--border-color);
  border-radius: 50px;
  transition: all 0.3s;
  background: white;
}

.home-search-box input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.home-search-box .search-icon {
  position: absolute;
  right: 1.5rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-secondary);
  font-size: 1.2rem;
  pointer-events: auto;
  cursor: pointer;
  transition: color 0.3s ease;
}

.home-search-box .search-icon:hover {
  color: var(--primary-color);
}

.search-box .search-icon {
  position: absolute;
  right: 1.5rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-secondary);
  font-size: 1.2rem;
  pointer-events: auto;
  cursor: pointer;
  transition: color 0.3s ease;
}

.search-box .search-icon:hover {
  color: var(--primary-color);
}

/* AI Answer Container */
#aiAnswerContainer {
  margin-bottom: 2rem;
}

.ai-answer-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  text-align: center;
  color: var(--text-secondary);
}

.ai-loading-spinner {
  width: 40px;
  height: 40px;
  border: 4px solid var(--border-color);
  border-top-color: var(--primary-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 1rem;
}

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

.ai-answer-content {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  border-radius: 16px;
  padding: 1.5rem;
  color: white;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
}

.ai-answer-content:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.3);
}

.ai-answer-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
  font-size: 0.9rem;
}

.ai-answer-icon {
  font-size: 1.5rem;
}

.ai-answer-label {
  font-weight: 600;
  font-size: 1rem;
}

.ai-answer-hint {
  margin-left: auto;
  opacity: 0.8;
  font-size: 0.85rem;
}

.ai-answer-text {
  line-height: 1.6;
  font-size: 1rem;
}

.ai-answer-text mark {
  background: rgba(255, 255, 255, 0.3);
  color: white;
  padding: 0.1rem 0.3rem;
  border-radius: 4px;
}

.ai-answer-error {
  background: var(--danger-color);
  color: white;
  border-radius: 16px;
  padding: 1.5rem;
  text-align: center;
}

/* Search Results */
#searchResults {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.search-result-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.5rem;
  background: white;
  border: 2px solid var(--border-color);
  border-radius: 12px;
  text-decoration: none;
  color: var(--text-primary);
  transition: all 0.3s ease;
}

.search-result-item:hover {
  border-color: var(--primary-color);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.1);
  transform: translateY(-2px);
}

.search-result-icon {
  font-size: 2rem;
  flex-shrink: 0;
}

.search-result-content {
  flex: 1;
}

.search-result-title {
  font-size: 1.2rem;
  font-weight: 600;
  margin: 0 0 0.5rem 0;
  color: var(--text-primary);
}

.search-result-title mark {
  background: rgba(37, 99, 235, 0.2);
  color: var(--primary-color);
  padding: 0.1rem 0.3rem;
  border-radius: 4px;
}

.search-result-description {
  color: var(--text-secondary);
  margin: 0 0 0.75rem 0;
  line-height: 1.5;
}

.search-result-description mark {
  background: rgba(37, 99, 235, 0.15);
  color: var(--primary-color);
  padding: 0.1rem 0.3rem;
  border-radius: 4px;
}

.search-result-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.85rem;
}

.search-result-type {
  padding: 0.25rem 0.75rem;
  background: var(--primary-color);
  color: white;
  border-radius: 12px;
  font-weight: 600;
  text-transform: uppercase;
}

.search-result-score {
  color: var(--text-secondary);
}

/* Responsive Design */
@media (max-width: 768px) {
  .home-search-section {
    padding: 1.5rem 1rem;
    margin-top: 0;
  }
  
  .ai-answer-content {
    padding: 1rem;
  }
  
  .ai-answer-header {
    flex-wrap: wrap;
  }
  
  .ai-answer-hint {
    width: 100%;
    margin-left: 0;
    margin-top: 0.5rem;
  }
  
  .search-result-item {
    padding: 1rem;
  }
  
  .search-result-icon {
    font-size: 1.5rem;
  }
  
  .search-result-title {
    font-size: 1rem;
  }
  
  .search-result-meta {
    flex-wrap: wrap;
    gap: 0.5rem;
  }
}

/* Responsive Design for Detail Page */
@media (max-width: 1024px) {
  .health-tip-detail-container {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  .health-tip-main-content {
    order: 0;
  }
  
  .health-tip-sidebar {
    position: static;
    order: 1; /* Move sidebar to bottom on mobile */
  }
  
  .tip-title-row {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .tip-like-section {
    align-self: flex-end;
  }
  
  .tip-detail-title {
    font-size: 1.75rem;
  }
}

@media (max-width: 768px) {
  .tip-detail-title {
    font-size: 1.5rem;
  }
  
  .tip-like-btn {
    padding: 0.4rem 0.8rem;
    font-size: 0.9rem;
  }
  
  .tip-detail-content {
    font-size: 0.9rem;
  }
  
  /* 移动端：调整标题卡片的padding */
  .tip-header-card {
    padding: 10px 15px 10px 20px;
  }
  
  /* 移动端：移除内容卡片的外层容器样式，让答案卡片独立显示 */
  .tip-content-card {
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 0;
    border-radius: 0;
  }
  
  /* 移动端：让每个答案卡片独立显示，宽度与标题卡片一致 */
  .tip-answer-card {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 5px 15px;
    margin-bottom: 1rem;
    margin-left: 0;
    margin-right: 0;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    border-left: 4px solid var(--primary-color);
  }
  
  .tip-answer-card:last-child {
    margin-bottom: 0;
  }
  
  .tip-answer-content {
    font-size: 0.95rem;
  }
  
  /* 移动端：调整答案卡片内部元素的间距 */
  .tip-answer-number {
    margin-bottom: 0.5rem;
    padding-top: 10px;
    padding-bottom: 0.5rem;
  }
  
  .tip-answer-content p {
    margin-bottom: 0.75rem;
  }
  
  .tip-answer-content {
    padding-bottom: 10px;
  }
  
  .related-tips-section {
    padding: 1rem;
  }
  
  .tip-meta-info {
    gap: 0.75rem;
  }
}

/* Pagination Container */
.pagination-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 2rem;
  padding: 1.5rem 0;
  border-top: 1px solid var(--border-color);
}

/* Pagination Buttons */
.pagination-btn {
  padding: 0.75rem 1.5rem;
  background: var(--primary-color);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.pagination-btn:hover:not(:disabled) {
  background: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.pagination-btn:disabled {
  background: var(--border-color);
  color: var(--text-secondary);
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* Pagination Info */
.pagination-info {
  display: flex;
  align-items: center;
  gap: 1rem;
  color: var(--text-primary);
  font-size: 0.95rem;
}

.pagination-info .divider {
  color: var(--border-color);
}

/* Pagination Responsive Adjustment */
@media (max-width: 768px) {
  .pagination-container {
    flex-direction: row;
    justify-content: center;
    gap: 0.75rem;
    align-items: center;
  }
  
  .pagination-info {
    order: 0;
    flex-direction: row;
    gap: 0.5rem;
    text-align: center;
    font-size: 0.65rem;
  }
  
  .pagination-info .divider {
    display: inline;
  }
  
  .pagination-btn {
    padding: 0.45rem 0.8rem;
    font-size: 0.65rem;
    font-weight: 500;
    width: auto;
    white-space: nowrap;
  }
}

/* Health Quiz Styles */
.question-card {
  background: var(--card-bg);
  padding: 2rem;
  border-radius: 12px;
  box-shadow: var(--shadow-md);
  width: 100%;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  margin-bottom: 0;
}


.question-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  flex-shrink: 0;
}

.question-header-wrapper {
  width: 100%;
  flex-shrink: 0;
}

.question-content {
  flex: 1;
  overflow-y: auto;
  padding-right: 0.5rem;
  min-height: 0;
}

.question-number {
  font-size: 0.9rem;
  color: var(--text-secondary);
  font-weight: 600;
}

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

.progress-fill {
  height: 100%;
  background: var(--primary-color);
  transition: width 0.3s ease;
}

.question-title {
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 1.5rem;
  line-height: 1.5;
}

.option-label {
  display: flex;
  align-items: center;
  padding: 1rem;
  background: white;
  border: 2px solid var(--border-color);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s;
  margin-bottom: 0.75rem;
  justify-content: flex-start;
  text-align: left;
}

.option-label:hover:not(.correct):not(.incorrect) {
  border-color: var(--primary-color);
  background: rgba(37, 99, 235, 0.05);
}

.option-label input[type="radio"],
.option-label input[type="checkbox"] {
  margin-right: 0.75rem;
  cursor: pointer;
  width: 18px;
  height: 18px;
}

.option-label.correct {
  border-color: #10b981;
  background: rgba(16, 185, 129, 0.1);
}

.option-label.incorrect {
  border-color: #ef4444;
  background: rgba(239, 68, 68, 0.1);
}

.option-label.correct-answer {
  border-color: #10b981;
  background: rgba(16, 185, 129, 0.15);
  font-weight: 600;
}

.option-label.truefalse {
  justify-content: flex-start;
}

.option-label span {
  text-align: left;
}

.question-number {
  font-size: 0.9rem;
  color: var(--text-secondary);
  font-weight: 600;
}

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

.progress-fill {
  height: 100%;
  background: var(--primary-color);
  transition: width 0.3s ease;
}

.question-title {
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 1.5rem;
  line-height: 1.5;
}

.option-label {
  display: flex;
  align-items: center;
  padding: 1rem;
  background: white;
  border: 2px solid var(--border-color);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s;
  margin-bottom: 0.75rem;
  justify-content: flex-start;
  text-align: left;
}

.option-label:hover:not(.correct):not(.incorrect) {
  border-color: var(--primary-color);
  background: rgba(37, 99, 235, 0.05);
}

.option-label input[type="radio"],
.option-label input[type="checkbox"] {
  margin-right: 0.75rem;
  cursor: pointer;
  width: 18px;
  height: 18px;
}

.option-label.correct {
  border-color: #10b981;
  background: rgba(16, 185, 129, 0.1);
}

.option-label.incorrect {
  border-color: #ef4444;
  background: rgba(239, 68, 68, 0.1);
}

.option-label.correct-answer {
  border-color: #10b981;
  background: rgba(16, 185, 129, 0.15);
  font-weight: 600;
}

.option-label.truefalse {
  justify-content: flex-start;
}

.option-label span {
  text-align: left;
}

.question-navigation {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 0;
  gap: 1rem;
  flex-shrink: 0;
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
  border-top: 1px solid var(--border-color);
}

/* Quiz Entry Button - Blue to Purple Gradient Arrow */
.quiz-entry-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  background: linear-gradient(to bottom, #2563eb 0%, #8b5cf6 100%);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
  animation: quizEntryBounce 3s ease-in-out infinite;
  height: 60px; /* 固定高度 */
  box-sizing: border-box;
}

.quiz-btn-content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.25rem;
}

.quiz-btn-subtitle {
  font-size: 0.75rem;
  font-weight: 400;
  opacity: 0.9;
  font-style: italic;
}

.quiz-entry-btn:hover {
  background: linear-gradient(to bottom, #1d4ed8 0%, #7c3aed 100%);
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.4);
}

.quiz-entry-btn .arrow-icon {
  font-size: 1.2rem;
  display: inline-block;
}


/* 让cta-with-bubbles作为定位参考 */
.cta-with-bubbles {
  position: relative;
}

/* 按钮相对于start-screen-content定位 */
.start-screen-content {
  position: relative;
}

.quiz-entry-btn-fixed {
  position: absolute;
  bottom: 100%; /* 按钮底部紧贴卡片顶部 */
  right: 0;
  margin-bottom: 0;
  z-index: 100;
  writing-mode: horizontal-tb;
  white-space: nowrap;
}

/* 问卷卡片也需要作为按钮定位参考 */
.question-card {
  position: relative;
}

/* 确保问卷容器中的按钮正确显示 */
#questionnaireContainer {
  position: relative;
}

/* 问卷进行时的按钮样式 - 相对于questionnaire卡片定位 */
#questionnaireContainer > .quiz-entry-btn-assessment {
  position: absolute;
  bottom: 100%; /* 按钮底部紧贴问卷卡片顶部 */
  right: 0;
  margin-bottom: -30px; /* 下移半个按钮高度（按钮高度60px的一半） */
  z-index: 100;
}

/* 调整questionnaire的位置，给按钮留出空间 */
#questionnaireContainer > .questionnaire {
  margin-top: 0;
}

@media (max-width: 1400px) {
  .quiz-button-wrapper {
    padding: 0 1rem;
  }
}

@keyframes quizEntryBounce {
  0%, 100% {
    transform: translateX(0);
  }
  8% {
    transform: translateX(-6px);
  }
  16% {
    transform: translateX(6px);
  }
  20% {
    transform: translateX(0);
  }
}

/* Override animation for fixed button to maintain correct vertical position */
.quiz-entry-btn-fixed {
  animation: quizEntryBounceFixed 3s ease-in-out infinite;
}

@keyframes quizEntryBounceFixed {
  0%, 100% {
    transform: translateX(0);
  }
  8% {
    transform: translateX(-6px);
  }
  16% {
    transform: translateX(6px);
  }
  20% {
    transform: translateX(0);
  }
}

.btn-success {
  background: #10b981;
}

.btn-success:hover {
  background: #059669;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Quiz Feedback Sidebar */
.quiz-feedback-card {
  background: var(--card-bg);
  padding: 1.5rem;
  border-radius: 12px;
  box-shadow: var(--shadow-md);
  margin-top: 0;
}

.feedback-status {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem;
  border-radius: 8px;
  margin-bottom: 1.5rem;
  font-weight: 600;
  font-size: 1.1rem;
}

.feedback-status.correct {
  background: rgba(16, 185, 129, 0.1);
  color: #10b981;
}

.feedback-status.incorrect {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
}

.status-icon {
  font-size: 1.5rem;
  font-weight: bold;
}

.feedback-content {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.correct-answer-section h4,
.explanation-section h4,
.related-tips-section h4 {
  color: var(--text-primary);
  font-size: 1rem;
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.correct-answer-text {
  color: var(--text-primary);
  font-weight: 600;
  padding: 0.75rem;
  background: rgba(16, 185, 129, 0.1);
  border-radius: 6px;
  border-left: 3px solid #10b981;
}

.explanation-text {
  color: var(--text-secondary);
  line-height: 1.6;
  padding: 0.75rem;
  background: var(--bg-color);
  border-radius: 6px;
}

.related-tips-section {
  margin-top: 0.5rem;
}

.related-tip-link-item {
  display: block;
  padding: 0.75rem;
  background: var(--bg-color);
  border-radius: 6px;
  color: var(--primary-color);
  text-decoration: none;
  transition: all 0.3s;
  border: 1px solid var(--border-color);
}

.related-tip-link-item:hover {
  background: rgba(37, 99, 235, 0.05);
  border-color: var(--primary-color);
  transform: translateX(4px);
}

/* Quiz Summary */
.quiz-summary-card {
  background: var(--card-bg);
  padding: 3rem;
  border-radius: 12px;
  box-shadow: var(--shadow-md);
  text-align: center;
  width: 100%;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow-y: auto;
}

.quiz-summary-card h2 {
  color: var(--text-primary);
  margin-bottom: 2rem;
  font-size: 2rem;
}

.score-display {
  margin-bottom: 2rem;
}

.score-number {
  font-size: 3rem;
  font-weight: bold;
  color: var(--primary-color);
  margin-bottom: 0.5rem;
}

.score-percentage {
  font-size: 1.5rem;
  color: var(--text-secondary);
}

.score-message {
  color: var(--text-secondary);
  font-size: 1.1rem;
  margin-bottom: 2rem;
}

.quiz-summary-sidebar {
  background: var(--card-bg);
  padding: 1.5rem;
  border-radius: 12px;
  box-shadow: var(--shadow-md);
}

.quiz-summary-sidebar h3 {
  color: var(--text-primary);
  margin-bottom: 1rem;
  font-size: 1.2rem;
}

.answer-review-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.answer-review-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  border-radius: 6px;
  background: var(--bg-color);
}

.answer-review-item.correct {
  border-left: 3px solid #10b981;
}

.answer-review-item.incorrect {
  border-left: 3px solid #ef4444;
}

.review-number {
  font-weight: 600;
  color: var(--text-secondary);
  min-width: 24px;
}

.review-status {
  font-size: 1.2rem;
  font-weight: bold;
}

.answer-review-item.correct .review-status {
  color: #10b981;
}

.answer-review-item.incorrect .review-status {
  color: #ef4444;
}

/* Responsive styles for quiz */
@media (max-width: 768px) {
  .question-card {
    padding: 1.5rem;
  }
  
  .question-title {
    font-size: 1.1rem;
  }
  
  .option-label {
    padding: 0.75rem;
    font-size: 0.9rem;
  }
  
  .question-navigation {
    flex-direction: row;
    justify-content: space-between;
  }
  
  .question-navigation .btn {
    width: auto;
  }
  
  .quiz-entry-btn {
    padding: 0.625rem 1.25rem;
    font-size: 0.9rem;
    height: 56px; /* 移动端固定高度 */
  }
  
  .quiz-btn-subtitle {
    font-size: 0.7rem;
  }
  
  .quiz-entry-btn .arrow-icon {
    font-size: 1rem;
  }
  
  .score-number {
    font-size: 2.5rem;
  }
}

/* Character Avatar Styles */
.character-avatar-wrapper {
  position: fixed;
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

.character-avatar {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  cursor: pointer;
  object-fit: contain;
  background: rgba(255, 255, 255, 0.9);
  border: 3px solid var(--primary-color);
  box-shadow: var(--shadow-md);
  animation: characterBreathing 2s ease-in-out infinite;
  /* Smooth transition for expression changes */
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.character-avatar-fixed {
  position: static;
}

.character-name-input {
  width: 100px;
  padding: 0.5rem;
  font-size: 0.875rem;
  text-align: center;
  border: 2px solid var(--border-color);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.95);
  color: var(--text-primary);
  transition: all 0.3s ease;
}

.character-name-input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.character-name-input::placeholder {
  color: var(--text-secondary);
  font-size: 0.8rem;
}

.character-avatar:hover {
  transform: scale(1.05);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-hover);
  animation-play-state: paused;
}

@keyframes characterBreathing {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(3px);
  }
}

/* Avatar expression shake animation */
@keyframes avatarExpressionShake {
  0%, 100% {
    transform: translateX(0);
  }
  10%, 30%, 50%, 70%, 90% {
    transform: translateX(-4px);
  }
  20%, 40%, 60%, 80% {
    transform: translateX(4px);
  }
}

.avatar-expression-shake {
  /* Override breathing animation temporarily with shake animation */
  animation: avatarExpressionShake 0.4s ease-in-out;
}

/* Assessment Start Screen */
.assessment-start-screen {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  min-height: 60vh;
  padding: 2rem 1.5rem;
  margin-bottom: 0;
  width: 100%;
}

/* 桌面端隐藏移动端版本的隐私条款和特性标签 */
.privacy-features-mobile {
  display: none;
}

.start-screen-content {
  background: var(--card-bg);
  border-radius: 16px;
  padding: 3rem 2.5rem 1.5rem 2.5rem;
  box-shadow: var(--shadow-lg);
  max-width: 500px;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
  text-align: center;
  flex: 0 0 auto;
}

.start-screen-title {
  color: var(--text-primary);
  font-size: 1.75rem;
  font-weight: 600;
  margin: 0;
  line-height: 1.3;
}

.start-screen-avatar-section {
  display: flex;
  justify-content: center;
  align-items: center;
}

.start-screen-avatar {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  cursor: pointer;
  object-fit: contain;
  background: rgba(255, 255, 255, 0.9);
  border: 4px solid var(--primary-color);
  box-shadow: var(--shadow-md);
  transition: all 0.3s ease;
  animation: characterBreathing 2s ease-in-out infinite;
}

.start-screen-avatar:hover {
  transform: scale(1.05);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-hover);
  animation-play-state: paused;
}

.start-screen-name-input {
  width: 100%;
  max-width: 300px;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  text-align: center;
  border: 2px solid var(--border-color);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.95);
  color: var(--text-primary);
  transition: all 0.3s ease;
}

.start-screen-name-input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.start-screen-name-input::placeholder {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.start-assessment-btn {
  width: 100%;
  max-width: 300px;
  padding: 1rem 2rem;
  font-size: 1.1rem;
  font-weight: 600;
  color: white;
  background: linear-gradient(135deg, var(--primary-color), #1e40af);
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: var(--shadow-md);
  text-transform: none;
}

.start-assessment-btn:hover {
  background: linear-gradient(135deg, var(--primary-hover), #1e3a8a);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

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

/* Responsive styles for start screen */
@media (max-width: 768px) {
  .start-screen-content {
    padding: 1.5rem 1rem 0.75rem 1rem;
    gap: 1rem;
  }
  
  .start-screen-title {
    font-size: 1.5rem;
    margin-bottom: 1rem;
  }
  
  .start-screen-avatar {
    width: 100px;
    height: 100px;
  }
  
  .start-screen-name-input {
    font-size: 0.9rem;
    padding: 0.65rem 0.9rem;
  }
  
  .start-assessment-btn {
    font-size: 1rem;
    padding: 0.9rem 1.5rem;
  }
  
  /* 缩小标题区域的间距 */
  .assessment-intro-section {
    margin-bottom: 1rem !important;
  }
  
  /* 缩小开始屏幕的高度和间距 */
  .assessment-start-screen {
    min-height: auto !important;
    padding: 1rem 0.5rem 0.5rem 0.5rem !important;
    margin-bottom: 0 !important;
  }
  
  /* 在移动端隐藏桌面端的隐私条款 */
  .assessment-intro-section .privacy-policy-text {
    display: none !important;
  }
  
  /* 移动端显示footer中的隐私条款 */
  .privacy-policy-footer {
    display: block !important;
  }
  
  /* 特性标签在移动端显示在标题下方，确保一行两个 */
  .assessment-intro-section .feature-tags {
    display: flex !important;
    font-size: 0.9rem !important; /* 稍微放大，确保一行两个 */
    gap: 0.75rem !important;
    margin-top: 0.75rem;
    margin-bottom: 0;
    flex-wrap: wrap !important;
    justify-content: center !important;
  }
  
  /* 当问卷进行中时，在移动端隐藏搜索框和FAQ气泡 */
  /* 使用body上的assessment-active类来标识问卷进行中状态 */
  body.assessment-active .home-search-section {
    display: none !important;
  }
  
  /* 隐藏FAQ气泡（包括移动端移动后的气泡容器） */
  body.assessment-active .bubbles-only-mobile {
    display: none !important;
  }
}

@media (max-width: 480px) {
  .start-screen-content {
    padding: 1.5rem 1rem 0.75rem 1rem;
    gap: 1.25rem;
  }
  
  .start-screen-title {
    font-size: 1.25rem;
  }
  
  .start-screen-avatar {
    width: 100px;
    height: 100px;
  }
  
  .start-screen-name-input {
    font-size: 0.85rem;
    padding: 0.6rem 0.8rem;
  }
  
  .start-assessment-btn {
    font-size: 0.95rem;
    padding: 0.85rem 1.25rem;
  }
}

/* Character Selector Modal */
.character-selector {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 10000;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.character-selector.active {
  display: flex;
  opacity: 1;
}

.character-selector-content {
  background: var(--card-bg);
  border-radius: 16px;
  width: 90%;
  max-width: 600px;
  max-height: 90vh;
  padding: 2rem;
  box-shadow: var(--shadow-lg);
  animation: modalSlideIn 0.3s ease;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.character-selector-content h3 {
  margin: 0 0 1.5rem 0;
  color: var(--text-primary);
  font-size: 1.5rem;
  text-align: center;
}

.character-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  flex: 1;
  overflow-y: auto;
  padding: 0.5rem;
}

.character-option {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  background: var(--bg-color);
  border: 2px solid transparent;
}

.character-option:hover {
  background: rgba(37, 99, 235, 0.1);
  border-color: var(--primary-color);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.character-option.selected {
  background: rgba(37, 99, 235, 0.15);
  border-color: var(--primary-color);
  box-shadow: var(--shadow-md);
}

.character-preview {
  width: 80px;
  height: 80px;
  object-fit: contain;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  border: 2px solid var(--border-color);
}

.character-option.selected .character-preview {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
}

.character-name {
  display: none;
}

.character-selector-close {
  margin-top: 1.5rem;
  padding: 0.75rem 1.5rem;
  background: var(--primary-color);
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 500;
  transition: background 0.3s ease;
  align-self: center;
}

.character-selector-close:hover {
  background: var(--primary-hover);
}

/* Responsive styles for character selector */
@media (max-width: 768px) {
  .character-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
  }
  
  .character-preview {
    width: 60px;
    height: 60px;
  }
  
  .character-selector-content {
    padding: 1.5rem;
  }
  
  .character-selector-content h3 {
    font-size: 1.25rem;
  }
  
  .character-avatar-wrapper {
    left: 10px;
  }
  
  .character-avatar {
    width: 80px;
    height: 80px;
  }
  
  .character-name-input {
    width: 80px;
    font-size: 0.8rem;
    padding: 0.4rem;
  }
}

@media (max-width: 480px) {
  .character-grid {
    grid-template-columns: 1fr;
  }
  
  .character-avatar-wrapper {
    left: 10px;
  }
  
  .character-avatar {
    width: 70px;
    height: 70px;
  }
  
  .character-name-input {
    width: 70px;
    font-size: 0.75rem;
    padding: 0.35rem;
  }
}

