:root {
  color-scheme: light;
  font-family: "Segoe UI", Tahoma, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: #f3f5f7;
  color: #1f2933;
}

.topbar {
  display: flex;
  align-items: center;
  padding: 12px 18px;
  border-bottom: 1px solid #d7dde4;
  background: #ffffff;
}

.topbar h1 {
  margin: 0;
  font-size: 1.2rem;
}

.layout {
  padding: 14px;
  height: calc(100vh - 58px);
  display: flex;
  gap: 14px;
}

.image-sidebar {
  width: 340px;
  min-width: 280px;
  background: #ffffff;
  border: 1px solid #d7dde4;
  border-radius: 10px;
  padding: 12px;
  overflow-y: auto;
}

.image-sidebar h2 {
  margin-top: 0;
}

.image-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.image-list li {
  margin-bottom: 8px;
}

.image-btn {
  width: 100%;
  text-align: left;
  border: 1px solid #c7d0da;
  background: #ffffff;
  border-radius: 8px;
  padding: 8px 10px;
  cursor: pointer;
}

.image-btn.active {
  border-color: #1f6feb;
  background: #e9f2ff;
}

.viewer {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: #ffffff;
  border: 1px solid #d7dde4;
  border-radius: 10px;
  padding: 12px;
  min-width: 0;
}

.viewer-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.viewer-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.zoom-btn {
  width: 30px;
  height: 30px;
  padding: 0;
  border: 1px solid #c7d0da;
  background: #ffffff;
  color: #1f2933;
  border-radius: 6px;
  font-size: 1rem;
  line-height: 1;
}

.zoom-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

#zoomValue {
  min-width: 46px;
  text-align: right;
}

.image-frame {
  flex: 1;
  min-height: 380px;
  border: 1px solid #d7dde4;
  border-radius: 10px;
  background: #0f1114;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: auto;
}

#viewerImage {
  width: auto;
  height: auto;
  max-width: none;
  max-height: none;
  object-fit: contain;
  display: none;
}

.empty-state {
  margin: 0;
  color: #e5e7eb;
  padding: 10px;
  text-align: center;
}

#imageSlider {
  width: 100%;
  margin: 0;
}
