/* styles.css */
body {
  font-family: "Inter", sans-serif;
  background-color: #0f172a; /* Slate 900 */
  color: #e2e8f0; /* Slate 200 */
  overflow-y: scroll;
  scroll-behavior: smooth;
  height: 100vh;
  scroll-snap-type: y mandatory;
  margin: 0;
}
section {
  min-height: 100vh;
  width: 100%;
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 4rem 2rem;
  box-sizing: border-box;
  border-bottom: 1px solid #1e293b;
  position: relative;
}
.slide-content {
  max-width: 1400px;
  width: 100%;
  z-index: 10;
}
.accent {
  color: #38bdf8; /* Sky 400 */
}
.diagram-container {
  background: #1e293b;
  padding: 2rem;
  border-radius: 1rem;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3);
  margin-top: 2rem;
  display: flex;
  justify-content: center;
  overflow: auto;
  position: relative;
}
.diagram-container.editable {
  cursor: pointer;
  border: 2px dashed #f59e0b;
}
.diagram-container svg {
  max-width: 100%;
  height: auto;
}
.mermaid {
  display: flex;
  justify-content: center;
  width: 100%;
}
.nav-dots {
  position: fixed;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 12px;
  z-index: 50;
}
.dot {
  width: 12px;
  height: 12px;
  background: #334155;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.3s;
}
.dot.active {
  background: #38bdf8;
  transform: scale(1.2);
}
h1,
h2,
h3,
p,
ul,
li {
  transition: background-color 0.2s;
}
[contenteditable="true"]:hover {
  outline: 2px solid #38bdf8;
  background-color: rgba(56, 189, 248, 0.1);
  cursor: text;
}
h1 {
  font-size: 3.5rem;
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
}
h2 {
  font-size: 2.25rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  color: white;
  letter-spacing: -0.01em;
}
h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: #e2e8f0;
}
p {
  font-size: 1rem;
  line-height: 1.6;
  color: #cbd5e1;
}
ul {
  font-size: 1.1rem;
  line-height: 1.6;
  list-style-type: none;
}
li {
  margin-bottom: 0.75rem;
  display: flex;
  align-items: flex-start;
}
li::before {
  content: "→";
  color: #38bdf8;
  margin-right: 12px;
  font-weight: bold;
}

.card {
  background: rgba(30, 41, 59, 0.5);
  border: 1px solid #334155;
  padding: 1.5rem;
  border-radius: 0.75rem;
}
.mockup-window {
  background: #0f172a;
  border: 1px solid #334155;
  border-radius: 8px;
  padding: 12px;
  height: 180px;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow: hidden;
  box-shadow: inset 0 2px 4px 0 rgba(0, 0, 0, 0.3);
}
.mockup-btn {
  height: 24px;
  background: #0284c7;
  border-radius: 4px;
  color: white;
  font-size: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100px;
  margin-top: auto;
  cursor: pointer;
}
.mockup-btn.secondary {
  background: #334155;
  color: #94a3b8;
}
.mockup-btn.accent {
  background: #059669;
}
.system-response {
  font-family: "Courier New", monospace;
  font-size: 0.75rem;
  color: #34d399;
  margin-top: 1rem;
  padding: 0.5rem;
  background: rgba(6, 78, 59, 0.3);
  border-left: 2px solid #34d399;
}
.mockup-radio-circle {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: 1px solid #475569;
  display: inline-block;
  margin-right: 4px;
}
.mockup-radio-circle.selected {
  background-color: #38bdf8;
  border-color: #38bdf8;
}
.mockup-radio {
  display: flex;
  align-items: center;
  font-size: 10px;
  color: #94a3b8;
}
.mockup-input {
  background: #1e293b;
  border: 1px solid #334155;
  border-radius: 4px;
  padding: 4px;
  font-size: 10px;
  color: #e2e8f0;
}
.mockup-toggle-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 4px;
  margin-bottom: 4px;
  border-bottom: 1px dashed #334155;
}
.mockup-toggle {
  width: 24px;
  height: 12px;
  border-radius: 6px;
  background: #475569;
  position: relative;
  transition: background-color 0.2s;
}
.mockup-toggle::after {
  content: "";
  position: absolute;
  top: 1px;
  left: 1px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #0f172a;
  transition: left 0.2s;
}
.mockup-toggle.on {
  background: #34d399;
}
.mockup-toggle.on::after {
  left: 13px;
}
.mockup-badge {
  background: #334155;
  color: #38bdf8;
  font-size: 8px;
  padding: 2px 6px;
  border-radius: 9999px;
}
.mockup-user-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 10px;
  margin-bottom: 4px;
}
.mockup-avatar {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #64748b;
}

#editModeToggle {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: 9999px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s, transform 0.2s;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.2);
}
#editModeToggle.off {
  background-color: #334155;
  color: #e2e8f0;
}
#editModeToggle.on {
  background-color: #f59e0b; /* Amber 500 */
  color: #1e293b;
  transform: scale(1.05);
}
.save-tools {
  position: fixed;
  top: 20px;
  left: 20px;
  z-index: 100;
}
.save-tools button {
  background: #0284c7;
  color: white;
  padding: 8px 12px;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.2);
}

#mermaidEditor {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 90%;
  max-width: 600px;
  background: #1e293b;
  border-radius: 1rem;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
  padding: 1.5rem;
  z-index: 200;
  display: none;
  border: 2px solid #38bdf8;
}
#mermaidEditor.open {
  display: block;
}
#mermaidCode {
  width: 100%;
  height: 250px;
  background: #0f172a;
  color: #34d399;
  font-family: "Courier New", monospace;
  padding: 10px;
  border-radius: 0.5rem;
  border: 1px solid #334155;
  resize: none;
}

/* Mobile Responsive Styles */
@media (max-width: 768px) {
  section {
    padding: 2rem 1rem;
    min-height: 100vh;
  }

  .slide-content {
    max-width: 100%;
  }

  h1 {
    font-size: 2rem;
    line-height: 1.2;
    padding: 0 0.5rem;
  }

  h2 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
  }

  h3 {
    font-size: 1.1rem;
  }

  p {
    font-size: 0.9rem;
  }

  ul {
    font-size: 0.95rem;
  }

  .diagram-container {
    padding: 1rem;
    margin-top: 1rem;
    overflow-x: auto;
  }

  .card {
    padding: 1rem;
    margin-bottom: 1rem;
  }

  .mockup-window {
    height: auto;
    min-height: 150px;
    padding: 10px;
  }

  .nav-dots {
    right: 10px;
    gap: 8px;
  }

  .dot {
    width: 10px;
    height: 10px;
  }

  #editModeToggle {
    top: 10px;
    right: 10px;
    padding: 8px 12px;
    font-size: 0.75rem;
    min-height: 44px; /* Touch-friendly */
    min-width: 44px;
  }

  .save-tools {
    top: 10px;
    left: 10px;
  }

  .save-tools button {
    padding: 8px 12px;
    font-size: 0.75rem;
    min-height: 44px; /* Touch-friendly */
  }

  #mermaidEditor {
    width: 95%;
    max-width: none;
    padding: 1rem;
    max-height: 90vh;
    overflow-y: auto;
  }

  #mermaidEditor button {
    min-height: 44px; /* Touch-friendly */
    width: 100%;
  }

  #mermaidCode {
    height: 200px;
    font-size: 0.75rem;
  }

  .system-response {
    font-size: 0.65rem;
    padding: 0.4rem;
    word-break: break-word;
  }

  .mockup-btn {
    min-height: 32px;
    font-size: 9px;
  }

  /* Prevent text overflow */
  * {
    word-wrap: break-word;
    overflow-wrap: break-word;
  }
}

@media (max-width: 640px) {
  section {
    padding: 1.5rem 0.75rem;
  }

  h1 {
    font-size: 1.75rem;
    padding: 0 0.25rem;
  }

  h2 {
    font-size: 1.25rem;
  }

  h3 {
    font-size: 1rem;
  }

  .nav-dots {
    display: none; /* Hide navigation dots on very small screens */
  }

  #editModeToggle {
    font-size: 0.7rem;
    padding: 8px 10px;
    min-height: 44px;
  }

  .save-tools {
    top: 60px; /* Move below edit toggle */
  }

  .save-tools button {
    font-size: 0.7rem;
    padding: 8px 10px;
    min-height: 44px;
  }

  .mockup-window {
    min-height: 120px;
    padding: 8px;
  }

  .card {
    padding: 0.75rem;
  }

  .diagram-container {
    padding: 0.75rem;
  }
}

.slide-number {
  position: absolute;
  bottom: 2rem;
  right: 2rem;
  font-size: 1.5rem;
  font-weight: 700;
  color: #475569; /* Slate 600 */
  opacity: 0.6;
  z-index: 5;
  font-family: "Inter", sans-serif;
}
