:root {
  --ui-transition: opacity 0.4s ease;
}

body {
  background: #000;
  color: #e0e0e0;
  font-family: -apple-system, system-ui, sans-serif;
  margin: 0;
  overflow: hidden;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

#player-wrapper {
  position: relative;
  width: 100%;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #000;
}

#slide-container {
  position: relative;
  width: 90%;
  max-width: 1100px;
  aspect-ratio: 16/9;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
}

img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

#subtitles {
  position: absolute;
  bottom: 10%;
  width: 100%;
  text-align: center;
  pointer-events: none;
  z-index: 10;
}

#sub-text {
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
  padding: 8px 20px;
  font-size: clamp(1rem, 4vw, 1.5rem);
  border-radius: 6px;
  display: inline-block;
  max-width: 80%;
}

#ui-overlay {
  position: absolute;
  bottom: 0;
  width: 100%;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.95));
  padding: 40px 0 20px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: var(--ui-transition);
  z-index: 20;
}

.ui-hidden {
  opacity: 0;
  cursor: none;
}

#controls {
  width: 90%;
  max-width: 1000px;
}

audio {
  width: 100%;
  height: 40px;
}

.info {
  margin-top: 10px;
  color: #aaa;
  font-size: 0.8rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.toolbar {
  display: flex;
  gap: 10px;
}

select,
button {
  background: rgba(40, 40, 40, 0.8);
  color: #fff;
  border: 1px solid #555;
  padding: 5px 12px;
  border-radius: 4px;
  cursor: pointer;
}

:fullscreen #slide-container {
  width: 100vw;
  height: 100dvh;
  max-width: none;
  aspect-ratio: auto;
}

:-webkit-full-screen #slide-container {
  width: 100vw;
  height: 100dvh;
}
