/* styles.css */
:root {
  --buncss-light: ;
  --buncss-dark: initial;
  color-scheme: dark;
  --bg: #0b0b0d;
  --surface: #16171a;
  --surface-2: #1d1f24;
  --border: #2a2c33;
  --text: #e6e7ea;
  --muted: #8a8d96;
  --accent: #5a8cff;
  --accent-hover: #7aa5ff;
  --error: #ff6464;
  --warn: #ffb24d;
  --ok: #5fd884;
}

* {
  box-sizing: border-box;
}

html, body {
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, Segoe UI, system-ui, Roboto, Noto Sans, Ubuntu, Cantarell, Helvetica Neue, sans-serif;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  color: var(--accent-hover);
}

a.plain {
  color: inherit;
}

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

header {
  margin-bottom: 1rem;
}

h1 {
  margin: 0 0 .25rem;
  font-size: 1.5rem;
  font-weight: 600;
}

h2 {
  margin: 0 0 .75rem;
  font-size: 1.05rem;
  font-weight: 600;
}

.muted {
  color: var(--muted);
}

.small {
  font-size: .85rem;
}

.hidden {
  display: none !important;
}

.error {
  color: var(--error);
}

.warn {
  color: var(--warn);
}

.ok {
  color: var(--ok);
}

.dropzone {
  border: 2px dashed var(--border);
  text-align: center;
  background: var(--surface);
  cursor: pointer;
  outline: none;
  border-radius: 12px;
  margin: 1.25rem 0 1rem;
  padding: 2.5rem 1rem;
  transition: border-color .15s, background .15s;
}

.dropzone:hover, .dropzone:focus, .dropzone.over {
  border-color: var(--accent);
  background: #181c28;
}

.dropzone p {
  margin: 0;
}

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

.file-item {
  display: grid;
  grid-template-columns: 1fr auto auto auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  align-items:  center;
  gap: .75rem;
  padding: .55rem .8rem;
  font-size: .92rem;
}

.file-item .name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-item .status {
  text-align: right;
  min-width: 4.5em;
  font-size: .82rem;
}

.file-item .remove {
  color: var(--muted);
  cursor: pointer;
  background: none;
  border: none;
  padding: 0 .25rem;
  font-size: 1.25rem;
  line-height: 1;
}

.file-item .remove:hover:not(:disabled) {
  color: var(--error);
}

.file-item .remove:disabled {
  opacity: .3;
  cursor: not-allowed;
}

.checkbox-row {
  display: flex;
  cursor: pointer;
  user-select: none;
  align-items:  center;
  gap: .55rem;
  margin: 1rem 0;
}

.checkbox-row input {
  accent-color: var(--accent);
  width: 1rem;
  height: 1rem;
}

button {
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  border: none;
  border-radius: 6px;
  padding: .6rem 1.25rem;
  transition: background .12s;
  font-size: .95rem;
  font-weight: 500;
}

button:hover:not(:disabled) {
  background: var(--accent-hover);
}

button:disabled {
  opacity: .5;
  cursor: not-allowed;
}

.result {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  margin-top: 2rem;
  padding: 1.25rem;
}

.link-row {
  display: flex;
  gap: .5rem;
}

.link-row input {
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text);
  outline: none;
  border-radius: 6px;
  flex: 1;
  padding: .55rem .7rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: .9rem;
}

.link-row input:focus {
  border-color: var(--accent);
}

.state {
  margin: 1rem 0;
}

.video-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin: 1rem 0 0;
  padding: 0;
}

.video-item {
  background: var(--surface);
  border: 1px solid var(--border);
  overflow: hidden;
  border-radius: 10px;
}

.video-item .meta {
  display: flex;
  border-bottom: 1px solid var(--border);
  align-items:  center;
  gap: .75rem;
  padding: .75rem 1rem;
  font-size: .92rem;
}

.video-item .meta .name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
}

.video-item .dl {
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: .25rem .55rem;
  font-size: .85rem;
}

.video-item .dl:hover {
  border-color: var(--accent);
  background: var(--surface-2);
}

.video-item video {
  display: block;
  background: #000;
  width: 100%;
  max-height: 70vh;
}
