/* --- UI Enhancements & Polish --- */

.progress {
  height: 6px;
  overflow: hidden;
  border-radius: 99px;
  background: #ffffff12;
}
.progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--violet), var(--pink));
  box-shadow: 0 0 12px var(--pink);
}

.empty-state {
  grid-column: 1 / -1;
  margin: 0;
  padding: 36px;
  border: 1px dashed var(--line);
  border-radius: 16px;
  background: var(--surface);
  color: var(--muted);
  text-align: center;
  font-size: .95rem;
}

.exit-message {
  display: grid;
  min-height: 100dvh;
  place-content: center;
  padding: 25px;
  text-align: center;
}
.exit-message h1 { margin: 0 0 10px; color: var(--pink); }
.exit-message p { color: var(--muted); }

.panel-account { margin: 6px 10px; color: var(--cyan); font-size: .84rem; font-weight: 600; }

/* Custom scrollbar */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--line); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: #3c497a; }

/* Enhanced Story Card Glow */
.story-card {
  box-shadow: 0 10px 30px #0005;
  transition: transform .25s cubic-bezier(.16,1,.3,1), border-color .25s ease, box-shadow .25s ease;
}
.story-card:hover {
  border-color: #f071e6aa;
  transform: translateY(-6px);
  box-shadow: 0 22px 50px #f071e626, 0 10px 30px #0008;
}

.cover-label {
  backdrop-filter: blur(8px);
  border: 1px solid #ffffff22;
}

/* Reusable loading placeholders */
.skeleton {
  overflow: hidden;
  border-radius: 12px;
  background: linear-gradient(90deg, var(--surface) 25%, var(--surface-2) 50%, var(--surface) 75%);
  background-size: 200% 100%;
  animation: skeleton-loading 1.25s infinite linear;
}
.skeleton-card { min-height: 320px; border: 1px solid var(--line); border-radius: 16px; }
.skeleton-line { height: .9rem; margin: 12px; border-radius: 6px; }
.skeleton-line--short { width: 58%; }
@keyframes skeleton-loading { to { background-position: -200% 0; } }

.rank-item {
  border-radius: 10px;
  cursor: pointer;
  transition: background .18s ease, transform .18s ease;
  padding: 10px 6px;
}
.rank-item:hover, .rank-item:focus-visible {
  background: #ffffff0d;
  outline: none;
  transform: translateX(4px);
}
.comment { align-items: start; }
.comment .avatar { flex: none; box-shadow: 0 4px 15px #0006; }
.history-item {
  transition: border-color .2s ease, transform .2s ease;
}
.history-item:hover, .history-item:focus-visible {
  border-color: #f071e688;
  transform: translateY(-2px);
  outline: none;
}
.history-item > div { min-width: 0; flex: 1; }

.filter-dialog {
  width: min(480px, calc(100vw - 28px));
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow);
}
.filter-dialog::backdrop { background: #03040acb; backdrop-filter: blur(6px); }
.filter-dialog form { padding: 26px; }
.filter-dialog h2 { margin: 0 0 8px; }
.filter-dialog p { color: var(--muted); font-size: .92rem; }

.genre-checks {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin: 20px 0;
}
.genre-checks label {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: .9rem;
  font-weight: 550;
  cursor: pointer;
  background: var(--surface-2);
  transition: border-color .15s;
}
.genre-checks label:hover {
  border-color: var(--pink);
}

.dialog-actions { display: flex; justify-content: end; gap: 10px; }

/* Brand glow */
.brand {
  position: relative;
}
.brand:hover {
  filter: drop-shadow(0 0 10px #f071e688);
}
