/**
 * Einstein Test Styles
 * CDI Algorithm visualization
 */

/* Hero Section */
.einstein-hero {
  padding: 8rem 0 4rem;
  text-align: center;
  background: radial-gradient(ellipse at center, rgba(255,215,0,0.08) 0%, transparent 60%);
}

.einstein-hero .hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255,215,0,0.1);
  border: 1px solid rgba(255,215,0,0.3);
  padding: 0.5rem 1rem;
  border-radius: 100px;
  color: var(--color-phi);
  font-size: 0.875rem;
  margin-bottom: 1.5rem;
}

.einstein-hero .hero-title {
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 700;
  margin-bottom: 1rem;
  line-height: 1.1;
}

.einstein-hero .hero-title .subtitle {
  display: block;
  font-size: 0.6em;
  font-weight: 400;
  color: rgba(224,224,255,0.7);
  margin-top: 0.5rem;
}

.einstein-hero .hero-description {
  font-size: 1.125rem;
  color: rgba(224,224,255,0.8);
  max-width: 600px;
  margin: 0 auto 2rem;
  line-height: 1.6;
}

.einstein-hero .hero-description strong {
  color: var(--star-white);
}

/* Test Stats */
.test-stats {
  display: flex;
  justify-content: center;
  gap: 3rem;
  flex-wrap: wrap;
  margin-top: 2rem;
}

.test-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.test-stat .stat-value {
  font-size: 3rem;
  font-weight: 700;
  color: var(--color-phi);
  line-height: 1;
  text-shadow: 0 0 30px rgba(255,215,0,0.3);
}

.test-stat .stat-label {
  font-size: 0.875rem;
  color: rgba(224,224,255,0.6);
  margin-top: 0.5rem;
}

/* CDI Section */
.cdi-section {
  padding: 4rem 0;
  background: linear-gradient(180deg, transparent 0%, rgba(0,0,0,0.2) 100%);
}

.cdi-diagram {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  max-width: 1200px;
  margin: 3rem auto 0;
  padding: 0 2rem;
}

.cdi-step {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 12px;
  padding: 1.25rem;
  width: 160px;
  text-align: center;
  transition: all 0.3s ease;
}

.cdi-step:hover {
  transform: translateY(-4px);
  border-color: var(--color-phi);
  box-shadow: 0 8px 24px rgba(0,0,0,0.3);
}

.cdi-step[data-step="5"] {
  border-color: var(--color-fra-r);
  background: rgba(136,68,255,0.1);
}

.step-number {
  width: 32px;
  height: 32px;
  background: var(--color-phi);
  color: var(--deep-space);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  margin: 0 auto 0.75rem;
}

.cdi-step[data-step="5"] .step-number {
  background: var(--color-fra-r);
  color: white;
}

.cdi-step h4 {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--star-white);
  margin-bottom: 0.5rem;
}

.cdi-step p {
  font-size: 0.8125rem;
  color: rgba(224,224,255,0.6);
  line-height: 1.4;
}

.cdi-arrow {
  font-size: 1.5rem;
  color: rgba(255,215,0,0.5);
}

/* Derivation Sections */
.derivation-section {
  padding: 5rem 0;
}

.derivation-section.gtr {
  background: linear-gradient(180deg, rgba(0,0,0,0.2) 0%, transparent 100%);
}

.derivation-header {
  text-align: center;
  margin-bottom: 3rem;
}

.derivation-type {
  display: inline-block;
  background: rgba(255,215,0,0.1);
  border: 1px solid rgba(255,215,0,0.2);
  padding: 0.375rem 1rem;
  border-radius: 100px;
  font-size: 0.875rem;
  color: var(--color-phi);
  margin-bottom: 1rem;
}

.gtr .derivation-type {
  background: rgba(136,68,255,0.1);
  border-color: rgba(136,68,255,0.3);
  color: var(--color-fra-r);
}

.derivation-title {
  font-size: clamp(1.5rem, 4vw, 2.25rem);
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.derivation-subtitle {
  font-size: 1rem;
  color: rgba(224,224,255,0.6);
}

/* Timeline */
.steps-timeline {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 2rem;
}

.timeline-step {
  display: flex;
  gap: 1.5rem;
  margin-bottom: 2rem;
  position: relative;
}

.timeline-step:not(:last-child)::before {
  content: '';
  position: absolute;
  left: 20px;
  top: 48px;
  width: 2px;
  height: calc(100% + 1rem);
  background: linear-gradient(180deg, rgba(255,215,0,0.5) 0%, rgba(255,215,0,0.1) 100%);
}

.timeline-step.highlight::before {
  background: linear-gradient(180deg, var(--color-fra-r) 0%, rgba(136,68,255,0.2) 100%);
}

.step-marker {
  width: 40px;
  height: 40px;
  background: rgba(255,215,0,0.2);
  border: 2px solid var(--color-phi);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: var(--color-phi);
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}

.timeline-step.final .step-marker {
  background: var(--color-o2);
  border-color: var(--color-o2);
  color: var(--deep-space);
}

.step-content {
  flex: 1;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  padding: 1.5rem;
}

.timeline-step.highlight .step-content {
  border-color: rgba(136,68,255,0.3);
  background: rgba(136,68,255,0.05);
}

.timeline-step.final .step-content {
  border-color: rgba(68,255,136,0.3);
  background: rgba(68,255,136,0.05);
}

.operator-badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: rgba(224,224,255,0.6);
  margin-bottom: 0.75rem;
  padding: 0.25rem 0.75rem;
  background: rgba(0,0,0,0.2);
  border-radius: 4px;
}

.operator-badge.special {
  background: linear-gradient(135deg, var(--color-fra-r), var(--color-fra-a));
  color: white;
}

.state-badge {
  font-family: 'Space Grotesk', monospace;
  font-size: 0.875rem;
  color: var(--color-phi);
  margin-bottom: 0.75rem;
  padding: 0.375rem 0.75rem;
  background: rgba(255,215,0,0.1);
  border-radius: 4px;
  display: inline-block;
}

.step-content h4 {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--star-white);
  margin-bottom: 0.75rem;
}

.step-content p {
  font-size: 0.9375rem;
  color: rgba(224,224,255,0.8);
  line-height: 1.6;
  margin-bottom: 0.75rem;
}

.step-data {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 0.75rem;
}

.data-tag {
  font-size: 0.75rem;
  padding: 0.25rem 0.5rem;
  background: rgba(255,255,255,0.1);
  border-radius: 4px;
  color: rgba(224,224,255,0.7);
}

.step-insight {
  margin-top: 1rem;
  padding: 1rem;
  background: rgba(255,215,0,0.05);
  border-left: 3px solid var(--color-phi);
  border-radius: 0 8px 8px 0;
  font-size: 0.875rem;
  color: rgba(224,224,255,0.9);
}

.timeline-step.highlight .step-insight {
  background: rgba(136,68,255,0.1);
  border-left-color: var(--color-fra-r);
}

/* Isomorphism Table */
.isomorphism-table {
  margin: 1rem 0;
  background: rgba(0,0,0,0.2);
  border-radius: 8px;
  overflow: hidden;
}

.table-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
}

.table-row:not(:last-child) {
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

.table-row.header {
  background: rgba(136,68,255,0.2);
  font-weight: 600;
  color: var(--star-white);
}

.table-row:not(.header) {
  color: rgba(224,224,255,0.8);
}

/* Equations */
.equations {
  margin: 1rem 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.equation {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: 'Space Grotesk', monospace;
  font-size: 1rem;
  padding: 0.75rem 1rem;
  background: rgba(0,0,0,0.2);
  border-radius: 8px;
}

.eq-left {
  color: var(--star-white);
  min-width: 60px;
}

.eq-equals {
  color: rgba(224,224,255,0.5);
}

.eq-right {
  color: var(--color-phi);
  flex: 1;
}

.eq-desc {
  font-size: 0.75rem;
  color: rgba(224,224,255,0.5);
  font-family: 'Inter', sans-serif;
}

/* Field Equation */
.field-equation {
  text-align: center;
  padding: 1.5rem;
  margin: 1rem 0;
  background: rgba(68,255,136,0.1);
  border: 1px solid rgba(68,255,136,0.2);
  border-radius: 12px;
}

.eq-tensor {
  font-family: 'Space Grotesk', monospace;
  font-size: 1.25rem;
  color: var(--color-o2);
}

.equation-meaning {
  text-align: center;
  font-size: 0.875rem;
  color: rgba(224,224,255,0.7);
  margin-top: 1rem;
}

/* Predictions */
.predictions {
  list-style: none;
  padding: 0;
  margin: 1rem 0;
}

.predictions li {
  padding: 0.5rem 0;
  padding-left: 1.5rem;
  position: relative;
  font-size: 0.9375rem;
  color: rgba(224,224,255,0.9);
}

.predictions li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--color-o2);
  font-weight: 700;
}

/* Step Result */
.step-result {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1.5rem;
  padding: 1rem;
  background: rgba(68,255,136,0.1);
  border: 1px solid rgba(68,255,136,0.2);
  border-radius: 8px;
}

.result-icon {
  width: 28px;
  height: 28px;
  background: var(--color-o2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--deep-space);
  font-weight: 700;
  flex-shrink: 0;
}

.result-text {
  font-size: 0.9375rem;
  color: var(--star-white);
}

.result-text small {
  display: block;
  font-size: 0.75rem;
  color: rgba(224,224,255,0.6);
  margin-top: 0.25rem;
}

/* Implications */
.implications-section {
  padding: 4rem 0;
  background: radial-gradient(ellipse at center, rgba(255,215,0,0.03) 0%, transparent 60%);
}

.implications-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(300px, 1fr));
  gap: 1.5rem;
  max-width: 900px;
  margin: 2rem auto 0;
  padding: 0 2rem;
  align-items: stretch;
}

.implication-card {
  min-height: 180px;
  display: flex;
  flex-direction: column;
}

@media (max-width: 768px) {
  .implications-grid {
    grid-template-columns: 1fr;
    padding: 0 1rem;
  }
}

.implication-card {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  padding: 1.5rem;
  transition: all 0.3s ease;
}

.implication-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255,215,0,0.2);
}

.implication-card h4 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--star-white);
  margin-bottom: 0.5rem;
}

.implication-card p {
  font-size: 0.875rem;
  color: rgba(224,224,255,0.7);
  line-height: 1.5;
}

/* Responsive */
@media (max-width: 768px) {
  .cdi-diagram {
    flex-direction: column;
  }
  
  .cdi-arrow {
    transform: rotate(90deg);
  }
  
  .test-stats {
    gap: 1.5rem;
  }
  
  .test-stat .stat-value {
    font-size: 2rem;
  }
  
  .timeline-step {
    flex-direction: column;
    gap: 1rem;
  }
  
  .timeline-step::before {
    display: none;
  }
}

/* Einstein Timeline */
.einstein-timeline {
  margin: 2.5rem 0;
  padding: 1.5rem;
  background: rgba(0,0,0,0.3);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 16px;
}

.timeline-track {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.timeline-point {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  width: 120px;
  min-height: 120px;
}

.point-marker {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  border: 2px solid rgba(255,255,255,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  color: rgba(224,224,255,0.8);
}

.point-marker.c4-marker {
  background: rgba(255,215,0,0.2);
  border-color: var(--color-phi);
  color: var(--color-phi);
  font-size: 0.875rem;
}

.timeline-point.highlight .point-marker {
  background: rgba(255,215,0,0.3);
  border-color: var(--color-phi);
  box-shadow: 0 0 20px rgba(255,215,0,0.3);
}

.point-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  text-align: center;
  min-height: 50px;
  justify-content: flex-start;
}

.point-year {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--star-white);
}

.point-event {
  font-size: 0.75rem;
  color: rgba(224,224,255,0.6);
  text-align: center;
  width: 100px;
  min-height: 36px;
  line-height: 1.4;
  display: flex;
  align-items: center;
  justify-content: center;
}

.timeline-arrow {
  color: rgba(255,215,0,0.5);
  font-size: 1.25rem;
  font-weight: 700;
}

.timeline-caption {
  margin-top: 1rem;
  font-size: 0.875rem;
  color: rgba(224,224,255,0.6);
  font-style: italic;
}

@media (max-width: 640px) {
  .timeline-track {
    flex-direction: column;
    gap: 1rem;
  }
  
  .timeline-arrow {
    transform: rotate(90deg);
  }
  
  .timeline-point {
    flex-direction: row;
    gap: 1rem;
    width: 100%;
    justify-content: flex-start;
    min-height: auto;
  }
  
  .point-content {
    align-items: flex-start;
    min-height: auto;
  }
  
  .point-event {
    width: auto;
    min-height: auto;
    justify-content: flex-start;
  }
}
