:root {
  --bg: #0d1214;
  --panel: rgba(16, 23, 28, 0.86);
  --panel-border: rgba(205, 174, 115, 0.28);
  --text: #f2ebdf;
  --muted: #d1c1a5;
  --accent: #d0aa62;
  --accent-soft: rgba(208, 170, 98, 0.18);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background:
    radial-gradient(circle at top left, rgba(208, 170, 98, 0.18), transparent 24%),
    radial-gradient(circle at bottom right, rgba(70, 108, 96, 0.24), transparent 26%),
    linear-gradient(180deg, #101719, var(--bg));
  color: var(--text);
  font-family: "Iowan Old Style", "Baskerville", "Times New Roman", serif;
}

body {
  min-height: 100vh;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(320px, 0.8fr);
  gap: 24px;
  padding: 24px;
}

.image-stage,
.info-panel {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--panel-border);
  background: var(--panel);
  backdrop-filter: blur(16px);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.3);
}

.image-stage {
  min-height: calc(100vh - 48px);
  border-radius: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
}

#slide-image {
  width: min(100%, calc(100vh - 96px));
  max-width: 100%;
  max-height: calc(100vh - 96px);
  object-fit: contain;
  opacity: 0;
  transform: scale(0.985);
  transition: opacity 500ms ease, transform 500ms ease;
}

#slide-image.is-visible {
  opacity: 1;
  transform: scale(1);
}

.image-vignette {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at center, transparent 58%, rgba(0, 0, 0, 0.28) 100%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.02), transparent 18%);
}

.progress-track {
  position: absolute;
  left: 24px;
  right: 24px;
  bottom: 22px;
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.progress-bar {
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #d0aa62, #f2deb0);
  transition: width 120ms linear;
}

.info-panel {
  border-radius: 24px;
  padding: 28px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 20px;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.72rem;
  color: var(--accent);
}

#slide-label {
  margin: 0;
  font-size: clamp(1.8rem, 2vw, 2.8rem);
  line-height: 1.05;
}

.arabic-text {
  margin: 0;
  direction: rtl;
  unicode-bidi: plaintext;
  text-align: right;
  font-family: "Geeza Pro", "Damascus", "Al Nile", serif;
  font-size: clamp(1.6rem, 2vw, 2.4rem);
  line-height: 1.9;
  color: #f6f2e9;
}

.meta-text {
  margin: 0;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.6;
}

.controls {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.controls button {
  appearance: none;
  border: 1px solid rgba(208, 170, 98, 0.35);
  background: rgba(208, 170, 98, 0.08);
  color: var(--text);
  border-radius: 999px;
  padding: 12px 18px;
  font: inherit;
  cursor: pointer;
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease;
}

.controls button:hover {
  transform: translateY(-1px);
  background: rgba(208, 170, 98, 0.16);
  border-color: rgba(208, 170, 98, 0.58);
}

.hint {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.6;
  color: rgba(242, 235, 223, 0.72);
}

@media (max-width: 960px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .image-stage {
    min-height: auto;
    aspect-ratio: 1 / 1;
  }

  #slide-image {
    width: 100%;
    max-height: 100%;
  }
}
