* { box-sizing: border-box; }
:root {
  --bg: #071019;
  --bg2: #0b1724;
  --panel: #0f1d2d;
  --line: #1f3650;
  --text: #eaf2ff;
  --muted: #a8bdd8;
  --accent: #34d399;
  --accent2: #60a5fa;
}

body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  background: radial-gradient(1200px 600px at 10% -10%, #12304f 0%, transparent 55%),
              radial-gradient(1000px 500px at 100% 0%, #1e3a8a33 0%, transparent 60%),
              linear-gradient(180deg, var(--bg) 0%, var(--bg2) 100%);
  color: var(--text);
}
.app { min-height: 100vh; display: grid; grid-template-rows: auto 1fr auto; }
.topbar {
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--panel) 88%, transparent);
  backdrop-filter: blur(6px);
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}
.topbar h1 { margin: 0; font-size: 16px; font-weight: 700; letter-spacing: .2px; }
.controls { display: flex; gap: 8px; align-items: center; }
button {
  background: #14263a;
  color: var(--text);
  border: 1px solid #2a4565;
  padding: 8px 11px;
  border-radius: 10px;
  cursor: pointer;
}
button:hover { background: #19304a; border-color: var(--accent2); }
#counter { font-size: 14px; color: var(--muted); min-width: 100px; text-align: center; }
.stage {
  padding: 18px;
  display: grid;
  place-items: center;
}
#slideImage {
  max-width: 100%;
  max-height: calc(100vh - 198px);
  object-fit: contain;
  border-radius: 14px;
  border: 1px solid #28415f;
  box-shadow: 0 14px 40px rgba(0,0,0,.45);
  background: #050b12;
}
.thumbs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 10px 12px;
  border-top: 1px solid var(--line);
  background: #0a1520;
}
.thumb {
  width: 86px;
  height: 54px;
  object-fit: cover;
  border: 2px solid transparent;
  border-radius: 8px;
  opacity: .72;
  cursor: pointer;
  flex: 0 0 auto;
  transition: all .15s ease;
}
.thumb:hover { opacity: .92; transform: translateY(-1px); }
.thumb.active { border-color: var(--accent); opacity: 1; box-shadow: 0 0 0 2px #34d39922; }
