/* Complete reveal.js CSS for PowerNote */
html.reveal-full-page {
  width: 100%;
  height: 100%;
  overflow: hidden;
}

body.reveal-viewport {
  margin: 0;
  padding: 0;
  overflow: hidden;
}

.reveal {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 40px;
  font-weight: normal;
  color: #222;
  width: 100vw;
  height: 100vh;
  position: relative;
  overflow: hidden;
  background-color: #fff;
}

/* Slides container */
.reveal .slides {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  margin: auto;
  pointer-events: none;
  overflow: visible;
  z-index: 1;
  text-align: center;
  perspective: 600px;
  perspective-origin: 50% 40%;
}

.reveal .slides > section {
  -ms-perspective: 600px;
  perspective: 600px;
}

.reveal .slides > section,
.reveal .slides > section > section {
  display: none;
  position: absolute;
  width: 100%;
  height: 100%;
  padding: 20px;
  pointer-events: auto;
  z-index: 10;
  transform-style: preserve-3d;
  transition: transform-origin 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985),
             transform 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985),
             visibility 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985),
             opacity 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985);
  
  /* 讓所有內容在螢幕正中央 */
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  box-sizing: border-box;
}

/* Section positioning */
.reveal .slides > section.stack {
  padding-top: 0;
  padding-bottom: 0;
}

.reveal .slides > section.present,
.reveal .slides > section > section.present {
  display: flex !important;
  z-index: 11;
  opacity: 1;
}

/* Slide transitions */
.reveal .slides > section.future,
.reveal .slides > section > section.future,
.reveal .slides > section.past,
.reveal .slides > section > section.past {
  pointer-events: none;
}

.reveal .slides > section.future {
  transform: translate3d(100%, 0, 0);
}

.reveal .slides > section.past {
  transform: translate3d(-100%, 0, 0);
}

.reveal .slides > section > section.future {
  transform: translate3d(0, 100%, 0);
}

.reveal .slides > section > section.past {
  transform: translate3d(0, -100%, 0);
}

/* Typography */
.reveal h1, .reveal h2, .reveal h3, .reveal h4, .reveal h5, .reveal h6 {
  margin: 0 0 20px 0;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: normal;
  text-transform: none;
  text-shadow: none;
  word-wrap: break-word;
  text-align: center;
  flex-shrink: 0; /* 防止標題被壓縮 */
}

.reveal h1 { font-size: 2.5em; }
.reveal h2 { font-size: 1.6em; }
.reveal h3 { font-size: 1.3em; }
.reveal h4 { font-size: 1.0em; }

.reveal p {
  margin: 10px 0;
  line-height: 1.4;
  text-align: center;
  max-width: 80%; /* 限制段落寬度，避免過寬 */
}

/* 確保內容區域能夠適當縮放 */
.reveal .slides > section > * {
  max-width: 100%;
}

/* 為單一大標題提供更大的字體 */
.reveal .slides > section > h1:only-child,
.reveal .slides > section > h2:only-child {
  font-size: 3.5em;
  margin: 0;
}

.reveal .slides > section > h3:only-child {
  font-size: 2.5em;
  margin: 0;
}

.reveal img, .reveal video, .reveal iframe {
  max-width: 95%;
  max-height: 95%;
}

.reveal strong, .reveal b { font-weight: bold; }
.reveal em { font-style: italic; }

.reveal ol, .reveal dl, .reveal ul {
  display: inline-block;
  text-align: left;
  margin: 20px 0;
  padding-left: 1em;
  max-width: 80%;
}

.reveal ol { list-style-type: decimal; }
.reveal ul { list-style-type: disc; }
.reveal ul ul { list-style-type: square; }
.reveal ul ul ul { list-style-type: circle; }

.reveal li {
  margin: 8px 0;
  line-height: 1.4;
}

.reveal blockquote {
  display: block;
  position: relative;
  width: 70%;
  margin: 20px auto;
  padding: 5px;
  font-style: italic;
  background: rgba(255, 255, 255, 0.05);
  box-shadow: 0px 0px 2px rgba(0, 0, 0, 0.2);
}

.reveal code {
  font-family: monospace;
  text-transform: none;
}

.reveal pre {
  display: block;
  position: relative;
  width: 90%;
  margin: 20px auto;
  text-align: left;
  font-size: 0.55em;
  font-family: monospace;
  line-height: 1.2em;
  word-wrap: break-word;
  box-shadow: 0px 0px 6px rgba(0, 0, 0, 0.3);
}

.reveal pre code {
  display: block;
  padding: 5px;
  overflow: auto;
  max-height: 400px;
  word-wrap: normal;
}

.reveal table {
  margin: auto;
  border-collapse: collapse;
  border-spacing: 0;
}

.reveal table th {
  font-weight: bold;
}

.reveal table th, .reveal table td {
  text-align: left;
  padding: 0.2em 0.5em 0.2em 0.5em;
  border-bottom: 1px solid;
}

/* Controls - 移除右下角圓框按鈕 */

/* Progress bar */
.reveal .progress {
  position: absolute;
  bottom: 0;
  left: 0;
  z-index: 10;
  width: 100%;
  height: 3px;
  background-color: rgba(0, 0, 0, 0.2);
  color: #268bd2;
}

.reveal .progress:after {
  content: '';
  display: block;
  position: absolute;
  height: 100%;
  background-color: currentColor;
  width: 0%;
  transition: width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985);
}

/* Slide number */
.reveal .slide-number {
  position: absolute;
  display: block;
  right: 8px;
  bottom: 8px;
  z-index: 31;
  font-family: Helvetica, sans-serif;
  font-size: 12px;
  line-height: 1;
  color: #fff;
  background-color: rgba(0, 0, 0, 0.4);
  padding: 5px;
}

.reveal .slide-number a {
  color: currentColor;
}

/* Hidden elements */
.reveal .slides section.stack {
  display: block !important;
}

.reveal .slides section.stack > section {
  display: none !important;
  padding: 0 !important;
}

.reveal .slides section.stack > section.present {
  display: flex !important;
}

/* Mermaid 圖表在簡報模式的特殊樣式 */
.reveal .mermaid {
  width: 80% !important;
  max-width: 80% !important;
  height: auto !important;
  margin: 20px auto !important;
  display: block !important;
  flex-shrink: 0;
}

.reveal .mermaid svg {
  width: 100% !important;
  height: auto !important;
  max-width: 100% !important;
  max-height: 70vh !important;
}

/* 確保包含 Mermaid 的投影片能正確顯示 */
.reveal .slides > section:has(.mermaid) {
  padding: 40px 20px;
}

/* 如果瀏覽器不支援 :has()，使用類別選擇器 */
.reveal .slides > section.has-mermaid {
  padding: 40px 20px;
}

.reveal .slides > section.has-mermaid .mermaid {
  width: 80% !important;
  margin: 0 auto !important;
}