:root {
  --bg: #0d0f14;
  --panel: #151822;
  --accent: #ff8a3d;
  --text: #f2f3f7;
  --muted: #9aa1b2;
  font-family: "Space Grotesk", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(circle at 20% 20%, #1c2130, #0d0f14 60%);
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.app-shell {
  width: 100%;
  max-width: 960px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.header {
  text-align: center;
}

.header h1 {
  margin: 0 0 6px;
  font-size: clamp(1.6rem, 3vw, 2.4rem);
}

.subtitle {
  margin: 0;
  color: var(--muted);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.9rem;
}

.carousel {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 16px;
  overflow: hidden;
  background: var(--panel);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
  touch-action: pan-y;
}

.carousel-track {
  position: relative;
  width: 100%;
  height: 100%;
}

.slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.9s ease-in-out;
}

.slide.active {
  opacity: 1;
}

.slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.4);
  border: none;
  color: var(--text);
  width: 42px;
  height: 42px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.1rem;
  z-index: 5;
  transition: background 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.nav-btn:hover {
  background: rgba(255, 138, 61, 0.8);
  box-shadow: 0 0 0 1px rgba(255, 138, 61, 0.4), 0 8px 18px rgba(255, 138, 61, 0.25);
}

.nav-btn:active {
  transform: translateY(-50%) scale(0.98);
}

.prev-btn {
  left: 14px;
}

.next-btn {
  right: 14px;
}

.carousel-overlay {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.65));
  z-index: 4;
}

.caption {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.85rem;
  color: var(--text);
}

.play-btn {
  background: rgba(255, 255, 255, 0.12);
  border: none;
  color: var(--text);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.play-btn:hover {
  background: rgba(255, 138, 61, 0.8);
  box-shadow: 0 0 0 1px rgba(255, 138, 61, 0.4), 0 8px 18px rgba(255, 138, 61, 0.25);
}

.play-btn:active {
  transform: translateY(1px) scale(0.98);
}

.thumbnails {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.thumbnails::-webkit-scrollbar {
  height: 6px;
}

.thumbnails::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 4px;
}

.thumb {
  flex: 0 0 auto;
  width: 84px;
  height: 56px;
  border-radius: 8px;
  overflow: hidden;
  border: 2px solid transparent;
  cursor: pointer;
  opacity: 0.6;
  transition: opacity 0.2s ease, border-color 0.2s ease;
  background: none;
  padding: 0;
}

.thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.thumb.active {
  opacity: 1;
  border-color: var(--accent);
}

.overlay-controls {
  display: flex;
  gap: 8px;
  align-items: center;
}

.maximize-btn {
  background: rgba(255, 255, 255, 0.12);
  border: none;
  color: var(--text);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.maximize-btn:hover {
  background: rgba(255, 138, 61, 0.8);
  box-shadow: 0 0 0 1px rgba(255, 138, 61, 0.4), 0 8px 18px rgba(255, 138, 61, 0.25);
}

.maximize-btn:active {
  transform: translateY(1px) scale(0.98);
}

.fullscreen-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.fullscreen-modal.active {
  opacity: 1;
  pointer-events: auto;
}

.fullscreen-content {
  position: relative;
  width: 90vw;
  height: 90vh;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 12px;
}

.fullscreen-img {
  max-width: 100%;
  max-height: 85vh;
  object-fit: contain;
  display: block;
  border-radius: 8px;
}

.close-modal-btn {
  position: absolute;
  top: 20px;
  right: 20px;
  background: rgba(255, 255, 255, 0.12);
  border: none;
  color: var(--text);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.4rem;
  transition: background 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08);
  z-index: 1001;
}

.close-modal-btn:hover {
  background: rgba(255, 138, 61, 0.8);
  box-shadow: 0 0 0 1px rgba(255, 138, 61, 0.4), 0 8px 18px rgba(255, 138, 61, 0.25);
}

.close-modal-btn:active {
  transform: translateY(1px) scale(0.98);
}

.fullscreen-caption {
  display: none;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.9rem;
  color: var(--text);
  text-align: center;
}

@media (max-width: 600px) {
  .nav-btn {
    width: 34px;
    height: 34px;
  }

  .thumb {
    width: 64px;
    height: 42px;
  }
}
