/* The Neurodivergent Brain - Custom Styles */
@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=Inter:wght@300;400;500;600&family=Newsreader:ital,wght@0,400;1,400&display=swap');

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

/* Custom scrollbar */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #0F1923; }
::-webkit-scrollbar-thumb { background: #243447; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #A0B4C8; }

/* Hero section */
.hero-bg {
  background: linear-gradient(135deg, #0F1923 0%, #1A2A3A 50%, #0F1923 100%);
  position: relative;
  overflow: hidden;
}
.hero-bg::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: url('/static/images/hero-bg.jpg') center/cover no-repeat;
  opacity: 0.35;
  z-index: 0;
}
.hero-bg > * { position: relative; z-index: 1; }

/* Neurotype tab animations */
.neurotype-tab {
  transition: all 0.2s ease;
  position: relative;
}
.neurotype-tab::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 2px;
  transition: width 0.2s ease;
  border-radius: 1px;
}
.neurotype-tab:hover::after,
.neurotype-tab.active::after {
  width: 80%;
}
.neurotype-tab.active {
  background: rgba(255,255,255,0.08);
}

/* Card styles */
.profile-card {
  background: linear-gradient(145deg, #1A2A3A 0%, #0F1923 100%);
  border: 1px solid rgba(100, 223, 223, 0.1);
  transition: all 0.3s ease;
}
.profile-card:hover {
  border-color: rgba(100, 223, 223, 0.3);
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(0,0,0,0.3);
}

/* Section transitions */
.section-enter { animation: fadeInUp 0.4s ease forwards; }
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Assessment progress bar */
.progress-bar {
  background: linear-gradient(90deg, #64DFDF 0%, #8B5CF6 100%);
  transition: width 0.5s ease;
  border-radius: 9999px;
}

/* Radar chart container */
.radar-container {
  max-width: 500px;
  margin: 0 auto;
}

/* Dimension cards in profiles */
.dimension-card {
  background: rgba(26, 42, 58, 0.6);
  border: 1px solid rgba(160, 180, 200, 0.1);
  border-radius: 12px;
  padding: 1.25rem;
  transition: all 0.2s ease;
}
.dimension-card:hover {
  border-color: rgba(160, 180, 200, 0.25);
  background: rgba(26, 42, 58, 0.8);
}

/* Assessment option buttons */
.likert-btn {
  transition: all 0.15s ease;
  border: 2px solid rgba(160, 180, 200, 0.2);
}
.likert-btn:hover {
  border-color: rgba(100, 223, 223, 0.5);
  background: rgba(100, 223, 223, 0.1);
}
.likert-btn.selected {
  border-color: #64DFDF;
  background: rgba(100, 223, 223, 0.15);
  color: #64DFDF;
}

/* Explorer selectors */
.brain-selector {
  transition: all 0.2s ease;
  cursor: pointer;
}
.brain-selector:hover { transform: scale(1.05); }
.brain-selector.selected {
  ring: 3px;
  box-shadow: 0 0 0 3px rgba(100, 223, 223, 0.5);
}

/* Quote styling */
.quote-text {
  font-family: 'Newsreader', serif;
  font-style: italic;
  line-height: 1.7;
}

/* Pulsing glow effect */
.glow-pulse {
  animation: glowPulse 3s ease-in-out infinite;
}
@keyframes glowPulse {
  0%, 100% { box-shadow: 0 0 20px rgba(100, 223, 223, 0.1); }
  50% { box-shadow: 0 0 40px rgba(100, 223, 223, 0.25); }
}

/* Neurotype icon images */
.neurotype-icon {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid currentColor;
}
.neurotype-icon-lg {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid currentColor;
}

/* Accordion */
.accordion-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}
.accordion-content.open {
  max-height: 2000px;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
  .neurotype-tabs-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .neurotype-tabs-scroll::-webkit-scrollbar { display: none; }
}

/* Pairing report sections */
.pairing-section {
  background: rgba(26, 42, 58, 0.5);
  border-left: 3px solid #64DFDF;
  border-radius: 0 12px 12px 0;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}
.pairing-section.friction {
  border-left-color: #FB7185;
}
.pairing-section.harmony {
  border-left-color: #34D399;
}
.pairing-section.bridge {
  border-left-color: #F59E0B;
}

/* ==================== COMPARISON TABLE ==================== */
.comparison-table-container {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 0 -1rem;
  padding: 0 1rem;
}

.comparison-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  min-width: 800px;
}

.comparison-table thead th {
  position: sticky;
  top: 0;
  z-index: 10;
  background: #0F1923;
  padding: 1rem 1.25rem;
  text-align: left;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  font-size: 0.875rem;
  border-bottom: 2px solid #243447;
}

.comparison-table thead th:first-child {
  width: 180px;
  min-width: 160px;
}

.comparison-table thead th:not(:first-child) {
  width: calc((100% - 180px) / 2);
}

.comparison-table tbody tr {
  transition: background 0.15s ease;
}

.comparison-table tbody tr:hover {
  background: rgba(100, 223, 223, 0.03);
}

.comparison-table tbody td {
  padding: 1.25rem;
  border-bottom: 1px solid rgba(36, 52, 71, 0.6);
  vertical-align: top;
  font-size: 0.85rem;
  line-height: 1.7;
  color: #A0B4C8;
}

.comparison-table tbody td:first-child {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 500;
  color: #E8E6E1;
  font-size: 0.8rem;
  background: rgba(26, 42, 58, 0.4);
  border-right: 1px solid rgba(36, 52, 71, 0.6);
  position: sticky;
  left: 0;
  z-index: 5;
}

.comparison-table tbody td:nth-child(2) {
  border-right: 1px solid rgba(36, 52, 71, 0.4);
}

.dim-icon-cell {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
}

.dim-icon-cell i {
  flex-shrink: 0;
  margin-top: 2px;
  font-size: 0.75rem;
}

.dim-label-text {
  line-height: 1.3;
}

/* View toggle buttons */
.view-toggle {
  display: inline-flex;
  border: 1px solid rgba(36, 52, 71, 0.8);
  border-radius: 0.75rem;
  overflow: hidden;
}

.view-toggle-btn {
  padding: 0.5rem 1rem;
  font-size: 0.8rem;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 500;
  color: #A0B4C8;
  background: transparent;
  border: none;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.view-toggle-btn:hover {
  background: rgba(100, 223, 223, 0.05);
  color: #E8E6E1;
}

.view-toggle-btn.active {
  background: rgba(100, 223, 223, 0.15);
  color: #64DFDF;
}

/* Dimension row expand/collapse for mobile */
.dim-expand-btn {
  display: none;
  cursor: pointer;
  color: #64DFDF;
  font-size: 0.7rem;
  margin-top: 0.25rem;
}

/* Column header with icon */
.col-header-brain {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.col-header-brain img {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid currentColor;
  flex-shrink: 0;
}

/* Mobile: Stack comparison cells */
@media (max-width: 900px) {
  .comparison-table { min-width: unset; }
  .comparison-table thead { display: none; }
  .comparison-table tbody tr {
    display: block;
    margin-bottom: 1.5rem;
    background: rgba(26, 42, 58, 0.4);
    border: 1px solid rgba(36, 52, 71, 0.6);
    border-radius: 12px;
    overflow: hidden;
  }
  .comparison-table tbody td {
    display: block;
    border-bottom: 1px solid rgba(36, 52, 71, 0.4);
    border-right: none !important;
    position: static !important;
    background: transparent !important;
  }
  .comparison-table tbody td:first-child {
    background: rgba(15, 25, 35, 0.8) !important;
    font-size: 0.85rem;
    padding: 0.75rem 1rem;
  }
  .comparison-table tbody td:nth-child(2)::before,
  .comparison-table tbody td:nth-child(3)::before {
    display: block;
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 600;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
    padding-bottom: 0.25rem;
    border-bottom: 1px solid rgba(36, 52, 71, 0.4);
  }
  .comparison-table tbody td:nth-child(2)::before {
    content: attr(data-brain-a);
    color: var(--brain-a-color, #64DFDF);
  }
  .comparison-table tbody td:nth-child(3)::before {
    content: attr(data-brain-b);
    color: var(--brain-b-color, #8B5CF6);
  }
}

/* Floating particles background */
.particles-bg {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  z-index: 0;
  opacity: 0.15;
  background:
    radial-gradient(circle at 20% 30%, rgba(100, 223, 223, 0.15) 0%, transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(139, 92, 246, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 50% 50%, rgba(245, 158, 11, 0.05) 0%, transparent 50%);
}
