/* =========================
   ROOT VARIABLES
   ========================= */

:root {
  --card: rgba(8, 10, 20, 0.92);
  --text: #e6e8ff;
  --muted: #9aa0d6;
  --c-00: #3a3f66;
  --c-01: #5b6cff; 
  --c-10: #9b6cff; 
  --c-11: #ff9f6e;

  --font-title: "Cinzel Decorative", serif;
  --font-body: "Sora", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  --font-mono: "Space Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  --font-badge: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  --font-content: "IBM Plex Sans", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
}

/* =========================
   BASE
   ========================= */

* {
  box-sizing: border-box;
}

body {
  display: flex;
  overflow-x: hidden;
  justify-content: center;
  margin: 0;
  min-height: 100vh;
  padding: 48px 16px;
  position: relative;
  background-color: #000;
  color: var(--text);

  font-family: var(--font-body);
}

/* =========================
   STAR BACKGROUND
   ========================= */

.stars {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: #000;
  overflow: hidden;
}

.stars::before {
  content: "";
  position: absolute;
  inset: 0;

  /* soft nebula haze (spread, not center-biased) */
  background-image:
    radial-gradient(1200px 900px at 22% 38%, rgba(155, 108, 255, 0.055), transparent 62%),
    radial-gradient(1200px 900px at 78% 62%, rgba(91, 108, 255, 0.045), transparent 64%);
}

.stars::after {
  content: "";
  position: absolute;
  inset: 0;

  /* soft vignette (keeps edges visible) */
  background: radial-gradient(
    1600px 1200px at 50% 50%,
    rgba(0, 0, 0, 0.00) 52%,
    rgba(0, 0, 0, 0.62) 100%
  );
}

.stars-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;

  /* subtle softening so dots feel less “digital” */
  filter: blur(0.15px);
}

/* =========================
   LAYOUT
   ========================= */

.container {
  width: 100%;
  max-width: 900px;
  position: relative;
  z-index: 1;
}

/* =========================
   TITLE (CINZEL DECORATIVE)
   ========================= */

.title {
  font-family: var(--font-title);
  font-weight: 700;
  font-size: clamp(2.2rem, 5vw, 2.9rem);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-align: center;

  margin: 8px 0 12px;

  /* dark, desaturated “space ink” */
  color: rgba(230, 232, 255, 0.88);

  /* a heavier, gloomier shadow stack */
  text-shadow:
    0 2px 0 rgba(0, 0, 0, 0.75),
    0 10px 28px rgba(0, 0, 0, 0.85),
    0 0 28px rgba(155, 108, 255, 0.10);
}

/* subtle divider “horizon line” under the title */
.title::after {
  content: "";
  display: block;
  height: 1px;
  width: min(560px, 78%);
  margin: 16px auto 0;

  background: linear-gradient(
    90deg,
    transparent,
    rgba(230, 232, 255, 0.88),
    transparent
  );
  opacity: 0.8;
}

/* =========================
   SUBTITLE
   ========================= */

.subtitle {
  width: fit-content;
  margin: 0 auto 28px;
  padding: 6px 14px 8px;

  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;

  color: rgba(230, 232, 255, 0.88);
  opacity: 0.9;

  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(230, 232, 255, 0.08);
  border-left-color: rgba(155, 108, 255, 0.22);
  border-right-color: rgba(155, 108, 255, 0.22);
  border-radius: 999px;

  text-shadow:
    0 2px 0 rgba(0, 0, 0, 0.65),
    0 0 18px rgba(155, 108, 255, 0.12);
}

.subtitle::before,
.subtitle::after {
  content: "";
  display: inline-block;
  width: 4px;
  height: 4px;
  margin: 0 10px 2px;
  border-radius: 50%;

  background: rgba(230, 232, 255, 0.22);
  box-shadow: 0 0 12px rgba(155, 108, 255, 0.18);
  opacity: 0.9;
}

/* =========================
   TABS
   ========================= */

.tabs {
  display: flex;
  justify-content: center;
  gap: 18px;
  margin-bottom: 32px;

  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  backdrop-filter: none;
  box-shadow: none;
}

/* tab */
.tab {
  position: relative;

  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;

  padding: 10px 18px;
  border-radius: 999px;

  font-family: var(--font-body);
  font-weight: 600;
  letter-spacing: 0.12em;
  font-size: 0.78rem;
  text-transform: uppercase;
  line-height: 1;

  color: rgba(154, 160, 214, 0.92);
  background: transparent;

  cursor: pointer;
  user-select: none;

  border: 1px solid transparent;
  transition:
    background 0.25s ease,
    color 0.25s ease,
    border-color 0.25s ease,
    transform 0.25s ease,
    box-shadow 0.25s ease;
}

.tab:hover {
  background: rgba(253, 250, 250, 0.05);
  border-color: rgba(230, 232, 255, 0.08);
  transform: translateY(-1px);
  box-shadow:
    0 10px 30px rgba(0, 0, 0, 0.45),
    0 0 18px rgba(155, 108, 255, 0.10);
}

/* active tab styling */
input#tab-unwatched:checked ~ .tabs label[for="tab-unwatched"],
input#tab-watched:checked ~ .tabs label[for="tab-watched"] {
  color: rgba(230, 232, 255, 0.92);

  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.10),
    rgba(255, 255, 255, 0.04)
  );

  border-color: rgba(230, 232, 255, 0.12);

  box-shadow:
    0 12px 36px rgba(0, 0, 0, 0.55),
    0 0 13px rgba(155, 108, 255, 0.16);
}

/* active “glow core” */
input#tab-unwatched:checked ~ .tabs label[for="tab-unwatched"]::after,
input#tab-watched:checked ~ .tabs label[for="tab-watched"]::after {
  content: "";
  position: absolute;
  inset: -6px;
  border-radius: 999px;
  pointer-events: none;

  background: radial-gradient(
    60% 120% at 50% 50%,
    rgba(155, 108, 255, 0.14),
    transparent 70%
  );
  filter: blur(6px);
  opacity: 1;
}

/* keyboard focus (input focused -> highlight matching label) */
input#tab-unwatched:focus-visible ~ .tabs label[for="tab-unwatched"],
input#tab-watched:focus-visible ~ .tabs label[for="tab-watched"] {
  outline: none;
  border-color: rgba(255, 211, 106, 0.35);
  box-shadow:
    0 0 0 3px rgba(255, 211, 106, 0.12),
    0 12px 36px rgba(0, 0, 0, 0.55);
}

.tab-icon-star::before {
  content: "★";
  font-size: 1.2rem;
  color: #ffd36a;
  text-shadow:
    0 0 6px rgba(255, 211, 106, 0.35),
    0 0 12px rgba(255, 211, 106, 0.15);

  display: inline-block;
  vertical-align: middle;

  position: relative;
  top: -1px;
}

/* tabs radios (visually hidden, still accessible) */
input[type="radio"] {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  border: 0;

  opacity: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

input#tab-unwatched:checked ~ .tabs label[for="tab-unwatched"] .tab-icon-star::before {
  text-shadow:
    0 0 6px rgba(255, 211, 106, 0.55),
    0 0 18px rgba(255, 211, 106, 0.35),
    0 0 34px rgba(255, 211, 106, 0.18);
}

input#tab-watched:checked ~ .tabs label[for="tab-watched"] .tab-icon-hearts::before,
input#tab-watched:checked ~ .tabs label[for="tab-watched"] .tab-icon-hearts::after {
  text-shadow:
    0 0 8px rgba(155, 108, 255, 0.32),
    0 0 20px rgba(155, 108, 255, 0.18);
}

/* =========================
   CONTROLS (SORT/FILTER)
   ========================= */

/* =========================
   CONTROLS (SORT/FILTER) — animated open/close
   ========================= */

.controls {
  width: 100%;
  margin: 0 auto;

  /* animated collapse */
  max-height: 0;
  opacity: 0;
  transform: translateY(-10px);
  padding-bottom: 0;

  overflow: hidden;
  pointer-events: none;

  transition:
    max-height 0.42s cubic-bezier(0.16, 1, 0.3, 1),
    opacity 0.22s ease,
    transform 0.42s cubic-bezier(0.16, 1, 0.3, 1),
    padding-bottom 0.42s cubic-bezier(0.16, 1, 0.3, 1);

  will-change: max-height, opacity, transform, padding-bottom;

  position: relative;
  z-index: 3; /* keep tooltips above the list */
}

.controls[data-open="true"] {
  max-height: 360px; /* enough for two rows + chips on wrap */
  opacity: 1;
  transform: translateY(0);
  padding-bottom: 26px;

  pointer-events: auto;

  overflow: visible; /* allow tooltips to escape the menu */
}

/* make sure the list is under controls in stacking order */
.lists {
  position: relative;
  z-index: 1;
}

/* keep hovered card above neighbors so tooltip isn't overlapped */
.lists li {
  position: relative;
}

.lists li:hover {
  z-index: 2;
}

.controls-panel {
  display: none;
  width: 100%;
  flex-direction: column;
  gap: 14px;
}

/* show the right panel per active tab */
input#tab-unwatched:checked ~ .controls .controls-unwatched {
  display: flex;
}

input#tab-watched:checked ~ .controls .controls-watched {
  display: flex;
}

.control-row {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.control-caption {
  font-family: var(--font-badge);
  font-size: 0.66rem;
  letter-spacing: 0.26em;
  text-transform: uppercase;

  color: rgba(154, 160, 214, 0.88);
  opacity: 0.85;
}

.control-group {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

/* pill button (matches your tab vibe, but smaller) */
.chip {
  position: relative;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  padding: 8px 14px;
  border-radius: 999px;

  font-family: var(--font-body);
  font-weight: 600;
  letter-spacing: 0.12em;
  font-size: 0.72rem;
  text-transform: uppercase;
  line-height: 1;

  color: rgba(154, 160, 214, 0.92);
  background: transparent;

  cursor: pointer;
  user-select: none;

  border: 1px solid rgba(230, 232, 255, 0.06);

  transition:
    background 0.25s ease,
    color 0.25s ease,
    border-color 0.25s ease,
    transform 0.25s ease,
    box-shadow 0.25s ease;
}

.chip:hover {
  background: rgba(253, 250, 250, 0.05);
  border-color: rgba(230, 232, 255, 0.10);
  transform: translateY(-1px);
  box-shadow:
    0 10px 30px rgba(0, 0, 0, 0.45),
    0 0 18px rgba(155, 108, 255, 0.10);
}

/* show tooltip on hover/focus (chips + info + status) */
.chip:hover .tooltip,
.chip:focus-within .tooltip,
.info-badge:hover .tooltip,
.info-badge:focus-within .tooltip,
.status:hover .tooltip,
.status:focus-within .tooltip {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

/* active chip (radio checked) */
.control-group input[type="radio"]:checked + .chip {
  color: rgba(230, 232, 255, 0.92);

  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.10),
    rgba(255, 255, 255, 0.04)
  );

  border-color: rgba(230, 232, 255, 0.14);

  box-shadow:
    0 12px 36px rgba(0, 0, 0, 0.55),
    0 0 13px rgba(155, 108, 255, 0.16);
}

/* keyboard focus on chips */
.control-group input[type="radio"]:focus-visible + .chip {
  outline: none;
  border-color: rgba(255, 211, 106, 0.35);
  box-shadow:
    0 0 0 3px rgba(255, 211, 106, 0.12),
    0 12px 36px rgba(0, 0, 0, 0.55);
}

/* filtered-out cards */
.is-hidden {
  display: none !important;
}

/* =========================
   FILTERS TOGGLE
   ========================= */

.filters-bar {
  display: flex;
  justify-content: center;
  margin: 0 0 18px;
}

.filters-toggle {
  position: relative;

  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;

  padding: 10px 18px;
  border-radius: 999px;

  font-family: var(--font-body);
  font-weight: 600;
  letter-spacing: 0.12em;
  font-size: 0.78rem;
  text-transform: uppercase;
  line-height: 1;

  color: rgba(154, 160, 214, 0.92);
  background: transparent;

  cursor: pointer;
  user-select: none;

  border: 1px solid rgba(230, 232, 255, 0.06);
  transition:
    background 0.25s ease,
    color 0.25s ease,
    border-color 0.25s ease,
    transform 0.25s ease,
    box-shadow 0.25s ease;
}

.filters-toggle:hover {
  background: rgba(253, 250, 250, 0.05);
  border-color: rgba(230, 232, 255, 0.10);
  transform: translateY(-1px);
  box-shadow:
    0 10px 30px rgba(0, 0, 0, 0.45),
    0 0 18px rgba(155, 108, 255, 0.10);
}

.filters-toggle:focus-visible {
  outline: none;
  border-color: rgba(255, 211, 106, 0.35);
  box-shadow:
    0 0 0 3px rgba(255, 211, 106, 0.12),
    0 12px 36px rgba(0, 0, 0, 0.55);
}

.filters-toggle-icon::before {
  content: "▾";
  display: inline-block;
  transform: translateY(-1px);
  transition: transform 0.25s ease;
  opacity: 0.9;
}

.filters-toggle.is-open .filters-toggle-icon::before {
  transform: translateY(-1px) rotate(180deg);
}

/* =========================
   USER PILL (TOP RIGHT)
   ========================= */

.user-pill {
  position: fixed;
  top: calc(16px + env(safe-area-inset-top));
  right: calc(16px + env(safe-area-inset-right));
  z-index: 50;

  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;

  padding: 10px 16px;
  border-radius: 999px;

  font-family: var(--font-badge);
  font-weight: 600;
  letter-spacing: 0.12em;
  font-size: 0.78rem;
  text-transform: uppercase;
  line-height: 1;

  color: rgba(154, 160, 214, 0.92);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(230, 232, 255, 0.10);

  cursor: pointer;
  user-select: none;

  backdrop-filter: blur(8px);
  box-shadow:
    0 18px 46px rgba(0, 0, 0, 0.55),
    0 0 16px rgba(155, 108, 255, 0.10);

  transition:
    transform 0.25s ease,
    border-color 0.25s ease,
    background 0.25s ease,
    box-shadow 0.25s ease;
}

.user-pill:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(230, 232, 255, 0.16);
  box-shadow:
    0 22px 56px rgba(0, 0, 0, 0.62),
    0 0 18px rgba(155, 108, 255, 0.14);
}

.user-pill:focus-visible {
  outline: none;
  border-color: rgba(255, 211, 106, 0.35);
  box-shadow:
    0 0 0 3px rgba(255, 211, 106, 0.12),
    0 22px 56px rgba(0, 0, 0, 0.62);
}

/* =========================
   TOOLTIP (INFO + CHIP)
   ========================= */

.control-caption {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.info-badge {
  position: relative;

  width: 18px;
  height: 18px;
  border-radius: 50%;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  font-family: var(--font-badge);
  font-size: 0.72rem;
  letter-spacing: 0.02em;

  color: rgba(230, 232, 255, 0.82);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(230, 232, 255, 0.10);

  cursor: help;
  user-select: none;
}

.info-badge:hover {
  border-color: rgba(230, 232, 255, 0.16);
  box-shadow:
    0 10px 30px rgba(0, 0, 0, 0.45),
    0 0 18px rgba(155, 108, 255, 0.10);
}

.tooltip {
  position: absolute;
  left: 50%;

  /* show above by default */
  bottom: calc(100% + 10px);
  top: auto;

  transform: translateX(-50%) translateY(-6px);

  min-width: 220px;
  max-width: min(380px, 84vw);

  /* smaller text + space for the corner "?" */
  padding: 10px 34px 12px 12px;

  border-radius: 16px;

  background: rgba(8, 10, 20, 0.94);
  border: 1px solid rgba(230, 232, 255, 0.10);

  color: rgba(230, 232, 255, 0.92);
  font-family: var(--font-content);
  font-size: 0.72rem;      /* smaller */
  letter-spacing: 0.02em;
  line-height: 1.35;

  backdrop-filter: blur(6px);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.65);

  opacity: 0;
  visibility: hidden;
  pointer-events: none;

  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s ease;
  z-index: 999; /* above everything */
}

/* show tooltip on hover/focus */
.chip:hover .tooltip,
.info-badge:hover .tooltip,
.info-badge:focus-visible .tooltip,
.control-group input[type="radio"]:focus-visible + .chip .tooltip {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

/* arrow (for upward tooltip) */
.tooltip::before {
  content: "";
  position: absolute;
  bottom: -6px;
  left: 50%;
  transform: translateX(-50%) rotate(45deg);

  width: 12px;
  height: 12px;

  background: rgba(8, 10, 20, 0.94);
  border-right: 1px solid rgba(230, 232, 255, 0.10);
  border-bottom: 1px solid rgba(230, 232, 255, 0.10);
}

.tooltip::after {
  content: "?";
  position: absolute;
  top: 8px;
  right: 10px;

  width: 15px;
  height: 15px;
  border-radius: 50%;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  font-family: var(--font-badge);
  font-size: 0.66rem;

  color: rgba(230, 232, 255, 0.70);
  border: 1px solid rgba(230, 232, 255, 0.12);
  background: rgba(255, 255, 255, 0.03);
}

/* flip tooltip to bottom when needed */
.tooltip.tooltip-down {
  top: calc(100% + 10px);
  bottom: auto;
  transform: translateX(-50%) translateY(6px);
}

.tooltip.tooltip-down::before {
  top: -6px;
  bottom: auto;

  border-right: 0;
  border-bottom: 0;
  border-left: 1px solid rgba(230, 232, 255, 0.10);
  border-top: 1px solid rgba(230, 232, 255, 0.10);
}

.tooltip-wide {
  min-width: 260px;
}

.tooltip u {
  text-decoration-thickness: 2px;
  text-underline-offset: 2px;
  text-decoration-color: rgba(240, 239, 238, 0.65);
}

/* flip tooltip to bottom when needed */
.tooltip.tooltip-down {
  top: calc(100% + 10px);
  bottom: auto;
  transform: translateX(-50%) translateY(6px);
}

.tooltip.tooltip-down::before {
  top: -6px;
  bottom: auto;

  border-right: 0;
  border-bottom: 0;
  border-left: 1px solid rgba(230, 232, 255, 0.10);
  border-top: 1px solid rgba(230, 232, 255, 0.10);
}

/* =========================
   LISTS
   ========================= */

.lists > ul {
  display: none;
}

input#tab-unwatched:checked ~ .lists .unwatched,
input#tab-watched:checked ~ .lists .watched {
  display: grid;
}

ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 14px;
}

/* =========================
   CARDS
   ========================= */

.left {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* film title */
.filmTitle {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 10px;

  font-family: var(--font-content);
  font-weight: 600;
  font-size: 1.02rem;
  letter-spacing: 0.01em;
  line-height: 1.2;

  color: rgba(230, 232, 255, 0.94);
  text-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
}

/* muted date label */
.watch-date {
  font-family: var(--font-badge);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;

  color: rgba(154, 160, 214, 0.86);
  opacity: 0.9;
  white-space: nowrap;

  margin: 0; /* important: don't push layout */
}

/* meta line under title */
.meta {
  font-family: var(--font-content);
  font-size: 0.9rem;
  line-height: 1.35;

  color: rgba(154, 160, 214, 0.9);
  opacity: 0.78;
}

li {
  display: flex;
  justify-content: space-between;
  align-items: center;

  padding: 16px 20px;
  border: 1px solid rgba(255, 255, 255, 0.03);
  border-radius: 18px;
  border-left: 4px solid transparent;

  background: linear-gradient(
    180deg,
    rgba(10, 10, 20, 0.95),
    rgba(5, 5, 10, 0.95)
  );
  backdrop-filter: blur(4px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.45);

  /* animation: fadeUp .6s ease both; */
  transition: transform .35s ease, box-shadow .35s ease;
}

li:hover {
  transform: translateY(-4px) scale(1.01);
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.65);
}

/* card animations control */

li.is-animating {
  animation: fadeUp .6s ease both;
  animation-delay: var(--anim-delay, 0s);
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(12px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* =========================
   RATING STARS IN CARDS
   ========================= */

.rating {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.rating-row {
  display: flex;
  align-items: center;
  gap: 3px;
}

.rating-name {
  min-width: 42px;
  color: var(--muted);
  font-size: 0.8rem;
}

.rating-stars {
  display: flex;
  gap: 3px;
}

.rating-heart {
  font-size: 0.9rem;
  opacity: 0.2;
  transform: scale(1);
  transition: transform 0.12s ease, opacity 0.12s ease;
}

.rating-heart.vlad.filled,
.rating-heart.vlad.hovered {
  opacity: 1;
  color: #9b6cff;
  text-shadow:
    0 0 6px rgba(155, 108, 255, 0.35),
    0 0 12px rgba(155, 108, 255, 0.15);
}

.rating-heart.vika.filled,
.rating-heart.vika.hovered {
  opacity: 1;
  color: #ff7abf;
  text-shadow:
    0 0 6px rgba(255, 122, 191, 0.35),
    0 0 12px rgba(255, 122, 191, 0.15);
}

/* hover preview size */
.rating-row.is-editable .rating-heart.hovered {
  transform: scale(1.14);
}

.rating-row.is-editable .rating-heart.hovered-peak {
  transform: scale(1.18);
}

/* =========================
   STATUS COLORS
   ========================= */

li[data-status="00"] { border-color: var(--c-00); }
li[data-status="01"] { border-color: var(--c-01); }
li[data-status="10"] { border-color: var(--c-10); }
li[data-status="11"] { border-color: var(--c-11); }

/* status badge text */
.status {
  font-family: var(--font-badge);
  letter-spacing: 0.12em;
  font-size: 0.78rem;

  padding: 6px 12px;
  border-radius: 999px;

  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(230, 232, 255, 0.06);

  position: relative;   /* important for absolute tooltip positioning */
  cursor: default;
}

.status .tooltip {
  text-transform: uppercase;
}

.s-00 { color: var(--c-00); }
.s-01 { color: var(--c-01); }
.s-10 { color: var(--c-10); }
.s-11 { color: var(--c-11); }

/* =========================
   FOOTER
   ========================= */

/* footer */
footer {
  margin: 48px auto 0;
  width: 100%;
  text-align: center;

  font-family: var(--font-body);
  letter-spacing: 0.08em;
  text-transform: none;

  color: rgba(154, 160, 214, 0.85);
  font-size: 0.72rem;

  opacity: 0;
  transform: translateY(12px);

  transition:
    opacity 0.6s ease,
    transform 0.6s ease;
}

/* =========================
   CROSSED HEARTS
   ========================= */

.tab-icon-hearts,
.footer-hearts {
  position: relative;
  display: inline-block;
  width: 18px;
  height: 18px;
  line-height: 1;
}

.tab-icon-hearts {
  margin: 0;           
  flex: 0 0 24px;    
}

.footer-hearts {
  margin: 0 6px;  
  top: 5px;   
}

.tab-icon-hearts::before,
.tab-icon-hearts::after,
.footer-hearts::before,
.footer-hearts::after {
  content: "❤";
  position: absolute;
  top: 0;
  left: 50%;
  font-size: 0.95rem;  
  transform-origin: center;
}

.tab-icon-hearts::before,
.footer-hearts::before {
  color: #9b6cff;
  text-shadow:
    0 0 6px rgba(155, 108, 255, 0.35),
    0 0 12px rgba(155, 108, 255, 0.15);

  transform: translateX(-75%) rotate(-22deg);
  z-index: 2;
}

.tab-icon-hearts::after,
.footer-hearts::after {
  color: #ff7abf;
  text-shadow:
    0 0 6px rgba(255, 122, 191, 0.35),
    0 0 12px rgba(255, 122, 191, 0.15);

  transform: translateX(-25%) rotate(22deg);
  z-index: 1;
}

/* visible footer */
footer.visible {
  opacity: 1;
  transform: translateY(0);
}

/* instant hide of footer (without animation) */
footer.instant-hide {
  transition: none;
  opacity: 0;
  transform: translateY(12px);
}

/* =========================
   AUTH OVERLAY (VLAD / VIKA)
   ========================= */

body.auth-open {
  overflow-y: hidden;
}

.auth-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;

  display: grid;
  place-items: center;

  background: rgba(0, 0, 0, 0.62);
  backdrop-filter: blur(8px);

  opacity: 0;
  visibility: hidden;
  pointer-events: none;

  transition: opacity 0.22s ease, visibility 0.22s ease;
}

.auth-overlay.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.auth-card {
  width: min(520px, 92vw);
  padding: 18px 18px 16px;
  border-radius: 22px;

  background: linear-gradient(
    180deg,
    rgba(10, 10, 20, 0.92),
    rgba(5, 5, 10, 0.92)
  );
  border: 1px solid rgba(230, 232, 255, 0.10);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.75);

  transform: translateY(10px) scale(0.98);
  opacity: 0;

  transition: transform 0.42s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.22s ease;

  text-align: center; /* keeps title/desc perfectly centered */
}

.auth-overlay.is-open .auth-card {
  transform: translateY(0) scale(1);
  opacity: 1;
}

.auth-title {
  width: 100%;
  display: block;

  font-family: var(--font-title);
  font-weight: 700;
  font-size: clamp(1.35rem, 3.2vw, 1.75rem);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-align: center;

  margin: 6px 0 10px;

  color: rgba(230, 232, 255, 0.88);

  text-shadow:
    0 2px 0 rgba(0, 0, 0, 0.75),
    0 10px 28px rgba(0, 0, 0, 0.85),
    0 0 22px rgba(155, 108, 255, 0.10);
}

/* subtle mini “horizon line” under auth title */
.auth-title::after {
  content: "";
  display: block;

  height: 1px;
  width: min(340px, 78%);
  margin: 12px auto 0;

  background: linear-gradient(
    90deg,
    transparent,
    rgba(230, 232, 255, 0.88),
    transparent
  );
  opacity: 0.75;
}

.auth-desc {
  font-family: var(--font-body);
  font-weight: 600;
  letter-spacing: 0.12em;
  font-size: 0.72rem;
  text-transform: uppercase;
  line-height: 1.35;

  color: rgba(154, 160, 214, 0.92);
  opacity: 0.9;

  margin: 0 0 14px;
  text-align: center;
}

.auth-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.auth-choice {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  padding: 10px 18px;
  border-radius: 999px;

  font-family: var(--font-body);
  font-weight: 600;
  letter-spacing: 0.12em;
  font-size: 0.78rem;
  text-transform: uppercase;
  line-height: 1;

  color: rgba(230, 232, 255, 0.92);
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.10),
    rgba(255, 255, 255, 0.04)
  );

  border: 1px solid rgba(230, 232, 255, 0.14);
  cursor: pointer;

  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease,
    border-color 0.25s ease;
}

.auth-choice:hover {
  transform: translateY(-1px);
  border-color: rgba(230, 232, 255, 0.18);
  box-shadow:
    0 18px 46px rgba(0, 0, 0, 0.60),
    0 0 18px rgba(155, 108, 255, 0.14);
}

.auth-choice:focus-visible {
  outline: none;
  border-color: rgba(255, 211, 106, 0.35);
  box-shadow:
    0 0 0 3px rgba(255, 211, 106, 0.12),
    0 18px 46px rgba(0, 0, 0, 0.60);
}

/* =========================
   LOGS WIDGET (BOTTOM LEFT)
   ========================= */

.logs-widget {
  position: fixed;
  left: calc(16px + env(safe-area-inset-left));
  bottom: calc(16px + env(safe-area-inset-bottom));
  z-index: 60;

  display: flex;
  flex-direction: column;
  gap: 10px;

  pointer-events: none; /* only children should be clickable */
}

.logs-toggle,
.logs-panel {
  pointer-events: auto;
}

/* button matches filters vibe */
.logs-toggle {
  position: relative;

  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;

  padding: 10px 18px;
  border-radius: 999px;

  font-family: var(--font-body);
  font-weight: 600;
  letter-spacing: 0.12em;
  font-size: 0.78rem;
  text-transform: uppercase;
  line-height: 1;

  color: rgba(154, 160, 214, 0.92);
  background: transparent;

  cursor: pointer;
  user-select: none;

  border: 1px solid rgba(230, 232, 255, 0.06);

  backdrop-filter: blur(8px);

  transition:
    background 0.25s ease,
    color 0.25s ease,
    border-color 0.25s ease,
    transform 0.25s ease,
    box-shadow 0.25s ease;
}

.logs-toggle:hover {
  background: rgba(253, 250, 250, 0.05);
  border-color: rgba(230, 232, 255, 0.10);
  transform: translateY(-1px);
  box-shadow:
    0 10px 30px rgba(0, 0, 0, 0.45),
    0 0 18px rgba(155, 108, 255, 0.10);
}

.logs-toggle:focus-visible {
  outline: none;
  border-color: rgba(255, 211, 106, 0.35);
  box-shadow:
    0 0 0 3px rgba(255, 211, 106, 0.12),
    0 12px 36px rgba(0, 0, 0, 0.55);
}

.logs-toggle-icon::before {
  content: "▾";
  display: inline-block;
  transform: translateY(-1px);
  transition: transform 0.25s ease;
  opacity: 0.9;
}

.logs-toggle.is-open .logs-toggle-icon::before {
  transform: translateY(-1px) rotate(180deg);
}

/* panel open/close like filters */
.logs-panel {
  width: min(420px, 92vw);

  max-height: 0;
  opacity: 0;
  transform: translateY(10px);
  overflow: hidden;

  border-radius: 18px;

  background: linear-gradient(
    180deg,
    rgba(10, 10, 20, 0.92),
    rgba(5, 5, 10, 0.92)
  );

  border: 1px solid rgba(230, 232, 255, 0.10);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.75);

  transition:
    max-height 0.42s cubic-bezier(0.16, 1, 0.3, 1),
    opacity 0.22s ease,
    transform 0.42s cubic-bezier(0.16, 1, 0.3, 1);

  will-change: max-height, opacity, transform;
}

.logs-panel[data-open="true"] {
  max-height: 420px;
  opacity: 1;
  transform: translateY(0);
}

.logs-head {
  padding: 12px 14px 8px;
}

.logs-head-title {
  font-family: var(--font-badge);
  font-size: 0.66rem;
  letter-spacing: 0.26em;
  text-transform: uppercase;

  color: rgba(154, 160, 214, 0.88);
  opacity: 0.85;
}

/* list */
.logs-list {
  list-style: none;
  margin: 0;
  padding: 0 12px 12px;

  display: grid;
  gap: 10px;
}

.log-item {
  padding: 10px 12px;
  border-radius: 14px;

  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(230, 232, 255, 0.06);
}

.log-time {
  font-family: var(--font-badge);
  font-size: 0.64rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;

  color: rgba(154, 160, 214, 0.82);
  opacity: 0.7;

  margin-bottom: 6px;
}

.log-text {
  font-family: var(--font-content);
  font-size: 0.86rem;
  line-height: 1.35;

  color: rgba(230, 232, 255, 0.92);
  opacity: 0.92;
}

/* =========================
   RATINGS (EDITABILITY)
   ========================= */

.rating-row.is-editable .rating-heart {
  cursor: pointer;
}

.rating-row.is-editable .rating-heart:hover {
  opacity: 1;
}

/* =========================
   LOGS — TITLE + SCORE STYLING
   ========================= */

.log-title {
  font-style: normal;
  font-size: 0.9em;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(230, 232, 255, 0.88);

  margin-inline-start: 4px;
  margin-inline-end: 3px;

  /* text-decoration: underline; */
}

.log-score {
  font-family: var(--font-badge);
  letter-spacing: 0.12em;
  font-size: 0.82em;
  opacity: 0.95;
  white-space: nowrap;
}

.log-score.vlad {
  color: #9b6cff;
  text-shadow:
    0 0 6px rgba(155, 108, 255, 0.35),
    0 0 12px rgba(155, 108, 255, 0.15);
}

.log-score.vika {
  color: #ff7abf;
  text-shadow:
    0 0 6px rgba(255, 122, 191, 0.35),
    0 0 12px rgba(255, 122, 191, 0.15);
}
