:root {
  --bg-gradient-start: #f8fbff;
  --bg-gradient-end: #eef2ff;
  --card-bg: rgba(255, 255, 255, 0.92);
  --text-primary: #1f2a44;
  --text-accent: #2f6fed;
  --text-muted: #5c6480;
  --border-accent: #c8d3ff;
  --equation-bg: rgba(47, 111, 237, 0.08);
}

body {
  background: linear-gradient(135deg, var(--bg-gradient-start), var(--bg-gradient-end));
  font-family: "Inter", "Segoe UI", sans-serif;
}

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

.reveal .slides section {
  text-align: left;
  background: var(--card-bg);
  border-radius: 18px;
  padding: 32px;
  box-shadow: 0 15px 35px rgba(31, 42, 68, 0.08);
  backdrop-filter: blur(6px);
}

.reveal h2 {
  font-size: 2.3rem;
  color: var(--text-accent);
  border-bottom: 2px solid var(--border-accent);
  padding-bottom: 0.4em;
  margin-bottom: 0.7em;
}

.reveal h3,
.reveal .subheadline {
  color: var(--text-muted);
  font-weight: 500;
  margin-top: -0.5em;
  margin-bottom: 1em;
}

.reveal ul {
  margin: 0;
  padding-left: 1.1em;
  list-style: none;
}

.reveal ul li {
  position: relative;
  margin-bottom: 0.55em;
  font-size: 1.1rem;
  line-height: 1.5;
  color: var(--text-primary);
}

.reveal ul li::before {
  content: "";
  position: absolute;
  left: -1.1em;
  top: 0.6em;
  width: 8px;
  height: 8px;
  background: var(--text-accent);
  border-radius: 50%;
}

.equation {
  margin-top: 1.5em;
  padding: 1em;
  border-radius: 12px;
  background: var(--equation-bg);
  text-align: center;
  font-size: 1.3rem;
}

.equation .katex-display {
  margin: 0;
  font-size: 1.4rem;
}

.equation .katex {
  font-size: 1.4rem;
}

.image-hint {
  margin-top: 1em;
  font-size: 0.95rem;
  color: var(--text-muted);
  font-style: italic;
}

.audio-hint {
  margin-top: 1em;
  padding: 0.75em 1em;
  border-left: 4px solid var(--text-accent);
  background: rgba(47, 111, 237, 0.08);
  border-radius: 8px;
  font-size: 0.95rem;
  color: var(--text-muted);
}

/* Diagram styles */
.diagram-container {
  display: flex;
  justify-content: center;
  margin: 1.5em 0;
}

.diagram {
  max-width: 100%;
  height: auto;
  background: rgba(255, 255, 255, 0.5);
  border-radius: 8px;
}

.slide-svg {
  max-width: 100%;
  height: auto;
}

/* SVG diagram element styles (fallback if inline styles fail) */
.diagram-point {
  fill: #666;
}

.diagram-point-visible {
  fill: #4CAF50;
}

.diagram-point-hidden {
  fill: #ccc;
}

.diagram-point-origin {
  fill: #2196F3;
}

.diagram-point-highlight {
  fill: #FF9800;
}

.diagram-ray {
  stroke: #999;
  stroke-width: 1;
  stroke-dasharray: 4,2;
  fill: none;
}

.diagram-axis {
  stroke: #333;
  stroke-width: 2;
  fill: none;
}

.diagram-grid {
  stroke: #eee;
  stroke-width: 1;
  fill: none;
}

.diagram-label {
  font-size: 12px;
  font-family: sans-serif;
  fill: #333;
}

.diagram-label-small {
  font-size: 10px;
  font-family: sans-serif;
  fill: #666;
}
