:root{
  --toolbar-h: 56px;
  --bg: #f6f7f9;
  --panel: #ffffff;
  --ink: #111318;
  --muted: #5b6470;
  --accent: #1a73e8; /* Google-ish blue */
  --accent-2: #185abc;
  --border: #e6e8ee;
  --stage-bg: #0b0c0f; /* black letterbox */
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body{
  margin:0;
  font: 14px/1.4 system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  color: var(--ink);
  background: var(--bg);
}

/* Toolbar */
.toolbar{
  position: sticky;
  top: 0;
  z-index: 10;
  height: var(--toolbar-h);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  background: var(--panel);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}
.toolbar .left-tools,
.toolbar .center-tools,
.toolbar .right-tools{
  display: flex;
  align-items: center;
  gap: 8px;
}
.toolbar .center-tools{
  justify-content: center;
}
.toolbar .right-tools{
  justify-content: flex-end;
}

/* Buttons */
.button{
  appearance:none;
  border:1px solid var(--border);
  background:#fff;
  color: var(--ink);
  padding:8px 12px;
  border-radius:8px;
  cursor:pointer;
  transition: .15s ease;
  font-weight:600;
}
.button:hover{ border-color:#cfd3da; background:#fafafa; }
.button.primary{
  background: var(--accent);
  color:#fff;
  border-color: transparent;
}
.button.primary:hover{ background: var(--accent-2); }

.icon-btn{
  width:36px; height:36px;
  display:inline-grid; place-items:center;
  border:1px solid var(--border);
  border-radius:8px; background:#fff; cursor:pointer;
  transition:.15s ease; font-size:14px;
}
.icon-btn:disabled{ opacity:.5; cursor:not-allowed; }
.icon-btn:not(:disabled):hover{ border-color:#cfd3da; background:#fafafa; }

/* File / hint */
.hint{ color: var(--muted); }
.filename{
  color: var(--muted);
  max-width: 50vw;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Viewer shell */
.viewer-shell{
  height: calc(100vh - var(--toolbar-h));
  display:flex;
  gap:0;
}

/* Thumbnails panel */
.thumbs{
  /* Hide the left navigation panel to maximize the main slide view */
  display: none !important;
  width: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  overflow: hidden !important;
}
.thumb{
  background:#fff;
  border:1px solid var(--border);
  border-radius:8px;
  margin-bottom:8px;
  overflow:hidden;
  cursor:pointer;
  transition:.12s ease;
}
.thumb.active{ border-color: var(--accent); box-shadow: 0 0 0 2px rgba(26,115,232,.15) inset; }
.thumb:hover{ border-color:#cfd3da; }
.thumb .num{
  font-size:11px;
  color: var(--muted);
  padding:6px 8px 4px;
}
.thumb .canvas{
  background:#111;
  display:block;
  width:100%;
  aspect-ratio: 16 / 9;
}

/* Stage */
.stage{
  flex:1;
  display:grid;
  place-items:center;
  background: var(--stage-bg);
  overflow:auto;
  padding: 16px;
}
.pptx-viewer{
  position: relative;
  /* Transparent so any host/container background doesn't appear as a white overlay */
  background: transparent;
  border-radius: 6px;
  /* Allow JS to control exact width/height; don't clamp in container environments (e.g., SLS) */
  max-width: none;
  overflow:hidden;
  box-shadow: 0 10px 30px rgba(0,0,0,.25);
}

/* Empty state */
.empty-state{
  display:grid;
  place-items:center;
  width: 780px;
  aspect-ratio: 16 / 9;
  background: linear-gradient(180deg, #f9fafb, #eef1f7);
  border:1px dashed #cfd3da;
  color: var(--muted);
}
.empty-state .big-icon{ font-size:48px; }
.empty-state .msg{ margin-top:8px; }

/* Footer */
.footer{
  padding:10px 12px;
  font-size:12px;
  color: var(--muted);
  border-top:1px solid var(--border);
  background: #fcfcfd;
}

/* PPTXjs default content adjustments in our container */
#viewer .slide,
#viewer .singleSlide,
#viewer .slide-page{
  /* Let JS scaling control sizing and avoid host CSS clamping; ensure no white layer */
  max-width: none;
  background: transparent !important;
  height: auto;
}

/* Utility + thumbnail clone styling */
.hidden{ display:none !important; }
.thumb .clone{ transform-origin: top left; display:inline-block; }
