*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: #1a1a1e;
  color: #e4e4e7;
  display: flex;
  flex-direction: column;
}

header {
  padding: 1rem 1.5rem;
  border-bottom: 1px solid #2e2e35;
  display: flex;
  align-items: baseline;
  gap: 1.5rem;
  flex-wrap: wrap;
}

header h1 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 600;
  color: #fafafa;
}

.status {
  margin: 0;
  font-size: 0.9rem;
  color: #a1a1aa;
}

main {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 1rem 1.5rem 1.5rem;
  gap: 1rem;
  min-width: 0;
}

.main-view {
  flex: 1;
  min-height: 400px;
  background: #0f0f12;
  border: 1px solid #2e2e35;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}

.placeholder {
  text-align: center;
  color: #71717a;
}

.placeholder .hint {
  font-size: 0.85rem;
  margin-top: 0.5rem;
}

.main-img {
  max-width: 100%;
  max-height: calc(100vh - 220px);
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.hidden {
  display: none !important;
}

.filmstrip {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  padding: 0.5rem 0;
  min-height: 90px;
}

.thumb {
  flex: 0 0 auto;
  width: 120px;
  cursor: pointer;
  border: 2px solid transparent;
  border-radius: 4px;
  overflow: hidden;
  background: #0f0f12;
  transition: border-color 0.15s;
}

.thumb:hover {
  border-color: #52525b;
}

.thumb.active {
  border-color: #3b82f6;
}

.thumb img {
  display: block;
  width: 120px;
  height: 68px;
  object-fit: cover;
}

.thumb time {
  display: block;
  font-size: 0.7rem;
  color: #a1a1aa;
  padding: 0.25rem 0.35rem;
  text-align: center;
}

@media (max-width: 1023px) {
  main {
    padding: 0.75rem;
  }

  .main-view {
    min-height: 280px;
  }
}
