:root {
  --bg: #0f1724;
  --card: #ffffff;
  --accent: #0ea5a4;
  --muted: #cbd5e1;
}
* { box-sizing: border-box; }
html, body {
  height: 100%;
  margin: 0;
  font-family: "Cairo", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
}
body {
  background: linear-gradient(180deg, #071029 0%, #174083 60%);
  color: var(--muted);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  min-height: 100vh;
}

/* topbar */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 18px;
  background: linear-gradient(90deg, rgba(255,255,255,0.03), transparent);
  border-bottom: 1px solid rgba(255,255,255,0.03);
}
.topbar h1 {
  margin: 0;
  font-size: clamp(1rem, 2.5vw, 1.6rem);
  color: #fff;
  font-weight: 600;
  text-align: center;
  flex: 1;
}
.nav-btn {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.06);
  color: #fff;
  padding: 8px 10px;
  border-radius: 8px;
  cursor: pointer;
}

/* main stage */
.stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 18px;
  flex: 1;
}
.slide {
  width: 100%;
  max-width: 1100px;
  aspect-ratio: 16/9;
  background: linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0.01));
  border-radius: 12px;
  overflow: hidden;
  position: relative;
  box-shadow: 0 10px 30px rgba(2,6,23,0.6);
  display: flex;
  align-items: center;
  justify-content: center;
}
.slide img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  transform-origin: center center;
}

/* caption */
.caption {
  margin-top: 12px;
  color: var(--muted);
  max-width: 1100px;
  width: 100%;
  text-align: center;
  font-size: clamp(0.9rem, 1.6vw, 1.1rem);
  min-height: 1.6em;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.source-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.source-link {
  display: inline-block;
  padding: 8px 12px;
  background: transparent;
  border: 1px solid rgba(255,255,255,0.12);
  color: var(--muted);
  border-radius: 8px;
  text-decoration: none;
  font-size: 0.95rem;
  transition: all .15s ease;
}
.source-link:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 18px rgba(2,6,23,0.35);
  color: #fff;
  border-color: var(--accent);
}


/* thumbnails footer */
.thumbs {
  display: flex;
  gap: 10px;
  padding: 12px 18px;
  overflow-x: auto;
  background: linear-gradient(180deg, transparent, rgba(255,255,255,0.02));
}
.thumb {
  width: 110px;
  height: 66px;
  border-radius: 6px;
  overflow: hidden;
  flex: 0 0 auto;
  border: 2px solid transparent;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(2,6,23,0.4);
}
.thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transform-origin: center center;
}
.thumb.active {
  outline: 3px solid var(--accent);
  transform: scale(1.03);
}

/* responsive */
@media (max-width:900px){
  .thumb{width:96px;height:56px}
  .slide{max-width:900px}
}
@media (max-width:600px){
  .topbar{padding:10px}
  .topbar h1{font-size:1rem}
  .thumb{width:74px;height:46px}
  .slide{max-width:100%;border-radius:10px}
}
