:root {
  --pad: 12px;
  --gap: 10px;
  --bg: #0c1222;
  --fg: #f5f7ff;
  --muted: #9aa4c2;
  --accent: #5b8cff;
}

* { box-sizing: border-box; }
html, body {
  margin:0;
  padding:0;
  background: var(--bg);
  color: var(--fg);
  font-family: system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
}
a { color: var(--accent); }
button, input, select { font: inherit; }

.container {
  max-width: 960px;
  margin: 0 auto;
  padding: calc(var(--pad) * 2) var(--pad);
}

.card {
  background: #131a30;
  border: 1px solid #1f2a4d;
  border-radius: 12px;
  padding: calc(var(--pad) * 1.5);
  box-shadow: 0 6px 24px rgba(0,0,0,0.25);
}

.row { display: grid; gap: var(--gap); grid-template-columns: 1fr 1fr; }
.row.one { grid-template-columns: 1fr; }
@media (max-width: 760px) { .row { grid-template-columns: 1fr; } }

h1, h2, h3 { margin: 0 0 10px; }
label { color: var(--muted); display: block; margin: 8px 0 4px; }
input[type="text"] {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border:1px solid #2a3766;
  background:#0f1530;
  color: var(--fg);
}

button {
  background: var(--accent);
  color: white;
  border: none;
  border-radius: 10px;
  padding: 10px 14px;
  cursor: pointer;
  transition: transform .05s ease, filter .2s;
}
button:active { transform: translateY(1px); }
button.ghost { background: transparent; border: 1px solid #2a3766; }

.badge {
  display: inline-block;
  background:#1b2547;
  border:1px solid #2a3766;
  padding: 6px 10px;
  border-radius: 100px;
  font-size:.9rem;
}

.qr {
  background: white;
  padding: 8px;
  border-radius: 8px;
  display: inline-block;
}

.flex { display:flex; gap:var(--gap); align-items:center; flex-wrap:wrap; }

img.frame {
  width: 100%;
  max-height: 70vh;
  object-fit: contain;
  background: #0a0f20;
  border-radius: 12px;
}

.small { font-size: .9rem; color: var(--muted); }
.hr { height:1px; background:#1f2a4d; margin:16px 0; }

.grid2 {
  display:grid;
  grid-template-columns:1fr auto;
  align-items:center;
  gap: var(--gap);
}

code.k {
  background:#0f1530;
  border:1px solid #2a3766;
  padding:4px 8px;
  border-radius:8px;
}

/* ========== Watcher Saved List Styles ========== */

.separator {
  margin: 10px 0;
  padding: 5px;
  background: #1b2547;
  border-radius: 6px;
  font-size: 0.9em;
  color: var(--muted);
}

.thumb-item {
  margin: 6px 0;
  padding: 6px;
  border-bottom: 1px solid #1f2a4d;
}

.thumb-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.thumb {
  width: 80px;
  height: auto;
  border: 1px solid #2a3766;
  border-radius: 6px;
  cursor: pointer;
  background: #0a0f20;
}

.thumb-meta {
  flex: 1; /* take all available space */
  display: flex;
  flex-direction: row;        /* horizontal layout */
  justify-content: space-between;
  align-items: center;
  font-size: 0.85em;
  color: var(--muted);
}

.thumb-meta > div:first-child {
  /* the date block */
  line-height: 1.4;
}

.thumb-actions {
  display: flex;
  gap: 8px;
}

.thumb-actions a {
  text-decoration: none;
  font-size: 1.2em;
  cursor: pointer;
  color: var(--accent);
}
.thumb-actions button {
  background: transparent;
  border: none;
  font-size: 1.2em;
  cursor: pointer;
  padding: 2px;
  line-height: 1;
  color: var(--accent);
}

.thumb-comment {
  font-size: 0.85em;
  margin-left: 88px; /* align under thumbnail row */
  margin-top: 4px;
  color: var(--fg);
}

/* Expanded state */
.thumb-item.expanded {
  flex-direction: column;
  align-items: flex-start;
}

.comment-box {
  width: 100%;
  min-height: 60px;
  margin-top: 8px;
  padding: 8px;
  border-radius: 8px;
  border:1px solid #2a3766;
  background:#0f1530;
  color: var(--fg);
  font-size: .9rem;
}
