:root {
  --bg: #0f1115;
  --panel: #171a21;
  --border: #2a2e37;
  --text: #e6e8eb;
  --muted: #9aa1ac;
  --accent: #4f8cff;
  --danger: #ff5c5c;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, Segoe UI, sans-serif;
}

.page {
  max-width: 720px;
  margin: 0 auto;
  padding: 2rem 1rem 4rem;
}

h1 {
  font-size: 1.4rem;
  margin-bottom: 1rem;
}

.dropzone {
  border: 2px dashed var(--border);
  border-radius: 12px;
  padding: 3rem 1rem;
  text-align: center;
  color: var(--muted);
  cursor: pointer;
  transition: border-color .15s, background .15s;
}

.dropzone.dragover {
  border-color: var(--accent);
  background: rgba(79, 140, 255, .08);
}

.upload-progress {
  width: 100%;
  height: 6px;
  background: var(--border);
  border-radius: 3px;
  margin-top: .75rem;
  overflow: hidden;
}

.upload-progress[hidden] {
  display: none;
}

.upload-progress-bar {
  height: 100%;
  width: 0;
  background: var(--accent);
  transition: width .15s linear;
}

.toolbar {
  display: flex;
  justify-content: flex-end;
  margin: 1rem 0;
}

.btn {
  background: var(--panel);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: .5rem .9rem;
  cursor: pointer;
  font-size: .9rem;
}

.btn:hover {
  border-color: var(--accent);
}

.btn.danger:hover {
  border-color: var(--danger);
}

.file-list {
  list-style: none;
  margin: 1.5rem 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: .5rem;
}

.file-row {
  display: flex;
  align-items: center;
  gap: .75rem;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: .5rem .75rem;
  cursor: zoom-in;
}

.file-row img {
  width: 48px;
  height: 48px;
  object-fit: cover;
  border-radius: 6px;
  flex-shrink: 0;
}

.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .85);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  z-index: 100;
}

.lightbox[hidden] {
  display: none;
}

.lightbox img {
  max-width: 100%;
  max-height: 100%;
  border-radius: 8px;
}

.lightbox-close {
  position: absolute;
  top: 1rem;
  right: 1.25rem;
  background: none;
  border: none;
  color: var(--text);
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(23, 26, 33, .7);
  border: 1px solid var(--border);
  color: var(--text);
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}

.lightbox-prev {
  left: 1rem;
}

.lightbox-next {
  right: 1rem;
}

.lightbox-delete {
  position: absolute;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
}

.file-info {
  flex: 1;
  min-width: 0;
}

.file-name {
  font-size: .9rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.file-meta {
  font-size: .75rem;
  color: var(--muted);
}
