/* ------------------------------
   DARK MODE VARIABLES
-------------------------------- */
:root {
  --font-sans: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
  --color-bg-page: #0a0c10;
  --color-bg-primary: #14181f;
  --color-bg-secondary: #1e242c;
  --color-bg-success: #0f2e24;
  --color-text-primary: #f0f3f8;
  --color-text-secondary: #b9c7d9;
  --color-text-tertiary: #7c8aa0;
  --color-text-success: #6fcf97;
  --color-text-danger: #f29b9b;
  --color-border-secondary: #2a323d;
  --color-border-tertiary: #2a323d;
  --border-radius-md: 8px;
  --border-radius-lg: 14px;
  --color-tag-bg: #1f3a4b;
  --color-tag-text: #b9e2ff;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--color-bg-page);
  font-family: var(--font-sans);
}

.page {
  padding: 1.5rem 1rem;
  max-width: 1100px;
  margin: 0 auto;
}

/* top bar + compact row */
.top-bar {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  margin-bottom: 2rem;
}

.inputs-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  width: 100%;
}

.inputs-row input,
.inputs-row select,
.inputs-row button {
  font-family: var(--font-sans);
}

.genre-select {
  height: 42px;
  border-radius: var(--border-radius-md);
  border: 1px solid var(--color-border-secondary);
  background: var(--color-bg-primary);
  color: var(--color-text-primary);
  padding: 0 14px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.genre-select:focus {
  outline: none;
  border-color: #5f7f9e;
  box-shadow: 0 0 0 2px rgba(95, 127, 158, 0.3);
}

#tags-input {
  width: 340px;
  background: var(--color-bg-primary);
  border: 1px solid var(--color-border-secondary);
  border-radius: 40px;
  padding: 10px 16px;
  font-size: 14px;
  color: var(--color-text-primary);
  transition: 0.2s;
}

#tags-input:focus {
  outline: none;
  border-color: #5f7f9e;
  background: #1a212a;
}

#tags-input::placeholder {
  color: var(--color-text-tertiary);
  font-size: 13px;
}

button {
  background: #2c3e50;
  border: none;
  border-radius: 40px;
  padding: 8px 24px;
  font-weight: 600;
  font-size: 14px;
  color: white;
  cursor: pointer;
  transition: background 0.2s, transform 0.05s;
  height: 42px;
  font-family: var(--font-sans);
}

button:hover {
  background: #3e5a6f;
}

button:active {
  transform: scale(0.97);
}

button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.tags-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
  width: 100%;
}

/* sections */
.section {
  margin-bottom: 2.5rem;
}

.section-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--color-border-tertiary);
}

.section-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--color-text-secondary);
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.dot-current {
  background: #1D9E75;
  box-shadow: 0 0 4px #1d9e75;
}

.dot-completed {
  background: #378ADD;
  box-shadow: 0 0 4px #378add;
}

.count {
  font-size: 12px;
  color: var(--color-text-tertiary);
  margin-left: auto;
  font-weight: 500;
  background: var(--color-bg-secondary);
  padding: 2px 10px;
  border-radius: 20px;
}

/* GRID: 2 columns exactly (responsive but min width) */
.anime-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

/* card styles */
.card {
  background: var(--color-bg-primary);
  border: 1px solid var(--color-border-tertiary);
  border-radius: var(--border-radius-lg);
  padding: 1rem 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: transform 0.1s ease, box-shadow 0.2s;
  cursor: pointer;
}

.card:hover {
  background: #1a212c;
  border-color: #4f6b8a;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.4);
  transform: translateY(-2px);
}

.card-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--color-text-primary);
  line-height: 1.3;
  letter-spacing: -0.2px;
}

.score-badge {
  font-size: 13px;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 40px;
  background: #0f2e24;
  color: #6fcf97;
  align-self: flex-start;
  border: 0.5px solid #2f6b4a;
}

.pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 2px;
}

.genre-pill {
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 40px;
  background: var(--color-bg-secondary);
  color: #cbd5e6;
  border: 0.5px solid var(--color-border-tertiary);
  font-weight: 500;
}

/* top tags: only 3 tags max, styled specially */
.tag-pill {
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 40px;
  background: var(--color-tag-bg);
  color: var(--color-tag-text);
  border: 0.5px solid #346a8c;
  font-weight: 500;
}

.empty, .error, .loading {
  color: var(--color-text-tertiary);
  font-size: 14px;
  padding: 1.5rem 0;
  text-align: center;
  grid-column: 1 / -1;
  background: rgba(20, 24, 31, 0.6);
  border-radius: 24px;
}

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

.loading {
  color: #9ab3d0;
}

/* user badge / username hint */
.user-hint {
  font-size: 13px;
  background: var(--color-bg-secondary);
  display: inline-block;
  padding: 4px 14px;
  border-radius: 40px;
  color: var(--color-text-secondary);
  margin-top: 4px;
}

/* small screens: still 2 columns, but if too narrow use 1fr? but we keep 2 until 560px */
@media (max-width: 620px) {
  .anime-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .tags-row input {
    width: 100%;
  }
  .inputs-row {
    flex-direction: column;
    width: 100%;
  }
  .inputs-row input, .inputs-row select, .inputs-row button {
    width: 100%;
  }
}