@import url("https://fonts.googleapis.com/css2?family=Baloo+2:wght@600;700;800&family=Nunito:wght@400;600;700;800;900&display=swap");

:root {
  --bg: #090b10;
  --panel: #141923;
  --panel-2: #1c2330;
  --line: #2c3445;
  --line-strong: #39445a;
  --text: #f7f8fb;
  --muted: #aeb6c6;
  --accent: #ff6542;
  --accent-2: #25d0b6;
  --gold: #ffc43d;
  --danger: #ff4d6d;
  --shadow: 5px 5px 0 rgba(0, 0, 0, 0.45);
  --shadow-sm: 3px 3px 0 rgba(0, 0, 0, 0.4);
  --radius: 10px;
  --font-display: "Baloo 2", "Nunito", ui-sans-serif, system-ui, sans-serif;
  --font-body: "Nunito", ui-sans-serif, system-ui, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

::selection {
  background: var(--accent);
  color: #090b10;
}

html {
  scrollbar-color: var(--line-strong) var(--bg);
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background: var(--bg);
  font-family: var(--font-body);
  line-height: 1.5;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea {
  font: inherit;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px clamp(18px, 5vw, 72px);
  background: var(--panel);
  border-bottom: 3px solid var(--accent-2);
  box-shadow: 0 3px 0 rgba(0, 0, 0, 0.35);
}

.brand {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: 0.4px;
}

.brand::first-letter {
  color: var(--accent);
}

.nav {
  display: flex;
  gap: 20px;
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 700;
}

.nav a:hover {
  color: var(--text);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 5px;
  text-decoration-color: var(--accent);
}

.hero {
  min-height: 360px;
  display: flex;
  align-items: end;
  padding: 60px clamp(18px, 5vw, 72px);
  background:
    repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.03) 0 16px, transparent 16px 32px),
    linear-gradient(180deg, #151c29, #0d1120);
  border-bottom: 4px solid var(--accent-2);
}

.hero__content {
  max-width: 820px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--accent-2);
  font-size: 0.8rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

.hero h1 {
  max-width: 860px;
  margin-bottom: 16px;
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 6vw, 4.2rem);
  font-weight: 800;
  line-height: 1.06;
}

.hero p:last-child {
  max-width: 620px;
  color: var(--muted);
  font-size: 1.08rem;
  font-weight: 600;
  line-height: 1.7;
}

.catalog,
.watch {
  padding: 40px clamp(18px, 5vw, 72px) 84px;
}

.section-head,
.admin-head,
.panel-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

/* Put small category links on the same line as the main nav brand */
.topbar .nav {
  align-items: center;
}

.nav-section {
  margin-top: 34px;
}

.filters-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.filter-btn {
  color: var(--accent-2);
  background: var(--panel-2);
  border: 2px solid var(--accent-2);
  border-radius: 8px;
  padding: 8px 13px;
  font-weight: 800;
  font-size: 0.88rem;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
}

.filter-btn:hover {
  filter: brightness(1.15);
}

.filter-btn.is-active {
  color: #071008;
  background: var(--accent-2);
  border-color: #1da88f;
  box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.5);
}

.library-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.library-bar .filter-btn {
  padding: 8px 11px;
  min-width: 38px;
  text-align: center;
}

.section-head h2,
.admin-head h1,
.panel-title h2 {
  margin-bottom: 0;
  font-family: var(--font-display);
  font-weight: 800;
}

.panel-subtitle {
  margin-top: 18px;
  margin-bottom: 4px;
  font-weight: 900;
  font-size: 0.95rem;
  color: var(--accent-2);
}

.search {
  width: min(380px, 100%);
}

.search span {
  display: block;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
}

input,
textarea {
  width: 100%;
  color: var(--text);
  background: #0f131b;
  border: 2px solid var(--line-strong);
  border-radius: 8px;
  padding: 12px 14px;
  outline: none;
}

input:focus,
textarea:focus {
  border-color: var(--accent-2);
  box-shadow: 0 0 0 3px rgba(37, 208, 182, 0.15);
}

.anime-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 20px;
  margin-top: 24px;
}

.anime-grid--top {
  margin-top: 18px;
}

.features-quick {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 18px;
}

.top {
  margin-top: 26px;
}

.top-episode-badge {
  position: absolute;
  left: 10px;
  bottom: 10px;
  padding: 6px 10px;
  background: var(--accent);
  border: 2px solid #ff8a6b;
  color: #fff;
  border-radius: 7px;
  font-weight: 900;
  font-size: 0.78rem;
  box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.4);
}

.anime-card--top .poster {
  position: relative;
}

.anime-card {
  min-width: 0;
  overflow: hidden;
  background: var(--panel);
  border: 2px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: transform 120ms ease, box-shadow 120ms ease, border-color 120ms ease;
}

.anime-card:hover {
  transform: translate(-2px, -2px);
  box-shadow: 8px 8px 0 rgba(0, 0, 0, 0.5);
  border-color: var(--accent-2);
}

.poster {
  aspect-ratio: 2 / 3;
  display: grid;
  place-items: center;
  overflow: hidden;
  color: var(--muted);
  background: linear-gradient(160deg, #1f2736, #121722);
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 800;
}

.poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card-body {
  padding: 14px;
}

.card-body h3 {
  margin-bottom: 6px;
  font-size: 1rem;
  font-weight: 800;
}

.poster-link {
  display: block;
}

.episode-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.version-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0 4px;
}

.version-tabs .version-btn {
  color: var(--gold);
  background: var(--panel-2);
  border: 2px solid var(--gold);
}

.version-tabs .version-btn.is-active {
  color: #1a1200;
  background: var(--gold);
  border-color: #e0a800;
  box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.5);
}

.version-chip {
  display: inline-block;
  color: #ffd479;
  background: rgba(255, 179, 71, 0.12);
  border: 2px solid #ffb347;
  border-radius: 7px;
  padding: 2px 8px;
  font-size: 0.72rem;
  font-weight: 900;
  margin-right: 8px;
}

.episode-link {
  color: var(--accent-2);
  background: var(--panel-2);
  border: 2px solid var(--accent-2);
  border-radius: 7px;
  padding: 6px 11px;
  font-size: 0.84rem;
  font-weight: 800;
  text-decoration: none;
  box-shadow: var(--shadow-sm);
}

.episode-link:hover {
  filter: brightness(1.15);
}

.watch-episodes {
  margin-top: 22px;
}

.watch-episodes__title {
  margin-bottom: 10px;
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 800;
}

.episode-list--watch {
  margin-top: 0;
}

.episode-link--active {
  color: #071008;
  background: var(--accent-2);
  border-color: #1da88f;
  box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.5);
}

.card-body p,
.muted,
.empty-state {
  color: var(--muted);
}

.empty-state {
  max-width: 520px;
  margin-top: 24px;
  padding: 26px;
  background: var(--panel);
  border: 2px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  color: #1a0b06;
  background: var(--accent);
  border: 2px solid #d84e2e;
  border-radius: 9px;
  padding: 12px 18px;
  font-family: var(--font-display);
  font-weight: 800;
  cursor: pointer;
  box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.5);
  transition: transform 100ms ease, box-shadow 100ms ease;
}

.button:hover {
  filter: brightness(1.08);
}

.button:active {
  transform: translate(3px, 3px);
  box-shadow: 1px 1px 0 rgba(0, 0, 0, 0.5);
}

.button--soft {
  color: var(--accent-2);
  background: var(--panel-2);
  border: 2px solid var(--accent-2);
  box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.4);
}

.watch {
  max-width: 1120px;
  margin: 0 auto;
}

video {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: var(--radius);
  border: 3px solid var(--line-strong);
  box-shadow: var(--shadow);
}

.player-video-wrap {
  position: relative;
}

.embed-wrap {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: var(--radius);
  border: 3px solid var(--line-strong);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.embed-iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

.adblocker-note {
  margin-top: 12px;
  font-size: 0.9rem;
  color: var(--muted);
  text-align: center;
}

.adblocker-note a {
  color: var(--accent);
  font-weight: 900;
}

.adblocker-note a:hover {
  text-decoration: underline;
}

.watch-info {
  padding-top: 24px;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag {
  color: #b9f2e7;
  background: var(--panel-2);
  border: 2px solid var(--accent-2);
  border-radius: 7px;
  padding: 5px 10px;
  font-size: 0.82rem;
  font-weight: 800;
  box-shadow: var(--shadow-sm);
}

.admin-page {
  display: grid;
  grid-template-columns: 250px 1fr;
}

.sidebar {
  min-height: 100vh;
  padding: 24px;
  background: #07090d;
  border-right: 3px solid var(--line);
}

.sidebar .brand {
  display: block;
  margin-bottom: 34px;
}

.sidebar__link {
  display: block;
  width: 100%;
  margin-bottom: 8px;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-radius: 8px;
  padding: 11px 12px;
  text-align: left;
  font-weight: 700;
  cursor: pointer;
}

.sidebar__link:hover,
.sidebar__link.is-active {
  color: var(--text);
  background: var(--panel-2);
  box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.4) inset;
}

.sidebar__button {
  margin-top: 14px;
}

.admin-main {
  padding: 30px;
}

.panel {
  background: var(--panel);
  border: 2px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
}

.auth-panel {
  max-width: 500px;
  margin: 8vh auto;
}

.form {
  display: grid;
  gap: 14px;
}

label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 700;
}

.message {
  min-height: 22px;
  color: var(--accent-2);
  font-weight: 700;
}

.hidden {
  display: none !important;
}

.admin-grid {
  display: grid;
  grid-template-columns: minmax(320px, 430px) 1fr;
  gap: 22px;
  margin-top: 22px;
}

.count {
  display: inline-grid;
  min-width: 34px;
  height: 34px;
  place-items: center;
  color: #071008;
  background: var(--accent-2);
  border: 2px solid #1da88f;
  border-radius: 50%;
  font-weight: 900;
  font-family: var(--font-display);
}

.admin-list {
  display: grid;
  gap: 10px;
}

.admin-item {
  display: grid;
  grid-template-columns: 64px 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 12px;
  background: #10141e;
  border: 2px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.admin-thumb {
  width: 64px;
  aspect-ratio: 2 / 3;
  display: grid;
  place-items: center;
  overflow: hidden;
  color: var(--muted);
  background: linear-gradient(160deg, #1f2736, #121722);
  border-radius: 6px;
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 800;
}

.admin-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.admin-item h3 {
  margin-bottom: 4px;
  font-size: 1rem;
  font-weight: 800;
}

.admin-item p {
  margin-bottom: 0;
}

.danger-button {
  color: #fff;
  background: rgba(255, 77, 109, 0.18);
  border: 2px solid var(--danger);
  border-radius: 8px;
  padding: 9px 12px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
}

.danger-button:hover {
  background: rgba(255, 77, 109, 0.35);
}

@media (max-width: 860px) {
  .admin-page {
    grid-template-columns: 1fr;
  }

  .sidebar {
    min-height: auto;
    display: flex;
    gap: 8px;
    align-items: center;
    overflow-x: auto;
  }

  .sidebar .brand,
  .sidebar__link {
    margin-bottom: 0;
    white-space: nowrap;
  }

  .admin-grid,
  .section-head,
  .admin-head {
    display: grid;
    grid-template-columns: 1fr;
  }

  .admin-item {
    grid-template-columns: 52px 1fr;
  }

  .admin-item .danger-button {
    grid-column: 1 / -1;
  }
}

.episode-link--large {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  font-size: 15px;
}
.overview {
  max-width: 900px;
  margin: 0 auto;
  padding: 24px 16px;
}
.overview-hero {
  display: flex;
  gap: 24px;
  margin-bottom: 32px;
}
.overview-poster {
  width: 240px;
  aspect-ratio: 2 / 3;
  flex-shrink: 0;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--panel-2);
  border: 3px solid var(--line-strong);
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 48px;
  font-weight: 800;
  color: var(--muted);
}
.overview-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.overview-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
}
.overview-info h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 800;
}
.overview-info #overviewDescription {
  color: var(--muted);
  line-height: 1.6;
}
@media (max-width: 640px) {
  .overview-hero { flex-direction: column; align-items: center; text-align: center; }
  .overview-poster { width: 100%; }
}

.admin-episode-actions {
  display: flex;
  gap: 8px;
}
.edit-button {
  padding: 4px 12px;
  font-size: 13px;
  font-weight: 800;
  background: var(--accent-2);
  color: #071008;
  border: 2px solid #1da88f;
  border-radius: 6px;
  cursor: pointer;
}
.edit-button:hover {
  filter: brightness(1.12);
}
.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
}
.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.66);
}
.modal-content {
  position: relative;
  max-width: 520px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 24px;
}
.modal-content h2 {
  margin-top: 0;
  font-family: var(--font-display);
}
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.modal-header h2 {
  margin: 0;
}
.modal-close {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: var(--muted);
  padding: 4px 8px;
  line-height: 1;
}
.modal-close:hover {
  color: var(--text);
}
.form-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 16px;
}

.account-page {
  max-width: 720px;
  margin: 0 auto;
  padding: 40px 20px;
}

.account-panel {
  max-width: 560px;
  margin: 0 auto;
}

.tabs {
  display: flex;
  gap: 8px;
  margin: 18px 0;
}

.premium-box {
  margin: 22px 0;
  padding: 18px;
  background: rgba(37, 208, 182, 0.08);
  border: 2px solid var(--accent-2);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.premium-box h2 {
  margin-top: 0;
  font-family: var(--font-display);
}

.favorites-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.favorites-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 2px solid var(--line);
}

.favorites-item a {
  color: var(--text);
  font-weight: 700;
}

.favorites-remove {
  color: var(--muted);
  background: transparent;
  border: 2px solid var(--line-strong);
  border-radius: 8px;
  padding: 4px 10px;
  cursor: pointer;
  font-weight: 700;
}

.favorites-remove:hover {
  color: var(--danger);
  border-color: var(--danger);
}

.premium-lock {
  width: 100%;
  aspect-ratio: 16 / 9;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.78);
  border-radius: var(--radius);
  border: 3px solid var(--line-strong);
  box-shadow: var(--shadow);
  text-align: center;
}

.premium-lock__inner {
  max-width: 420px;
  padding: 24px;
}

.premium-lock h2 {
  margin-top: 0;
  font-family: var(--font-display);
  color: var(--accent-2);
}

.premium-badge {
  display: inline-block;
  color: #b9f2e7;
  background: var(--panel-2);
  border: 2px solid var(--accent-2);
  border-radius: 7px;
  padding: 3px 9px;
  font-size: 0.76rem;
  font-weight: 900;
  margin-left: 8px;
  box-shadow: var(--shadow-sm);
}

.premium-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.episode-lock {
  display: inline-block;
  color: #ffd479;
  background: rgba(255, 179, 71, 0.12);
  border: 2px solid #ffb347;
  border-radius: 7px;
  padding: 2px 8px;
  font-size: 0.72rem;
  font-weight: 900;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
}

.user-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.user-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px;
  background: var(--panel-2);
  border: 2px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.user-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.user-role-select {
  background: var(--panel);
  color: var(--text);
  border: 2px solid var(--line-strong);
  border-radius: 8px;
  padding: 6px 8px;
}

.user-role-static {
  font-size: 0.85rem;
  color: var(--muted);
  padding: 6px 8px;
}

.user-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.bio-input {
  width: 100%;
  box-sizing: border-box;
  background: #0f131b;
  color: var(--text);
  border: 2px solid var(--line-strong);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 0.95rem;
  resize: vertical;
}

.bio-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
}

.rating-section,
.comments-section {
  margin-top: 28px;
  padding-top: 20px;
  border-top: 2px solid var(--line);
}

.rating-summary {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin: 10px 0;
}

.rating-average {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 800;
}

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

.star-button {
  font-size: 1.6rem;
  line-height: 1;
  color: #465064;
  background: transparent;
  border: 0;
  cursor: pointer;
  padding: 4px;
}

.star-button.is-active {
  color: var(--gold);
}

.star-button:disabled {
  cursor: default;
}

.comment-form textarea {
  width: 100%;
  box-sizing: border-box;
  background: #0f131b;
  color: var(--text);
  border: 2px solid var(--line-strong);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 0.95rem;
  resize: vertical;
}

.comment-form__actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 10px;
}

.comment-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 18px;
}

.comment-item {
  background: var(--panel);
  border: 2px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 14px;
  box-shadow: var(--shadow-sm);
}

.comment-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}

.comment-delete {
  margin-left: auto;
  color: var(--muted);
  background: transparent;
  border: 2px solid var(--line-strong);
  border-radius: 8px;
  padding: 2px 10px;
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 700;
}

.comment-delete:hover {
  color: var(--danger);
  border-color: var(--danger);
}

.comment-content {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
}

.comment-author {
  color: var(--text);
  font-weight: 900;
}

.comment-author:hover {
  color: var(--accent);
}

.avatar {
  border-radius: 50%;
  object-fit: cover;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--panel-2);
  border: 3px solid var(--accent-2);
  overflow: hidden;
}

.avatar--md {
  width: 46px;
  height: 46px;
  font-size: 0.9rem;
}

.avatar--xl {
  width: 96px;
  height: 96px;
  font-size: 1.6rem;
}

.avatar--initials {
  color: var(--muted);
  font-family: var(--font-display);
  font-weight: 800;
}

.avatar-url-row {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.avatar-url-row input {
  flex: 1;
  min-width: 200px;
  box-sizing: border-box;
  background: #0f131b;
  color: var(--text);
  border: 2px solid var(--line-strong);
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 0.9rem;
}

.avatar-row input {
  box-sizing: border-box;
  width: 100%;
  background: #0f131b;
  color: var(--text);
  border: 2px solid var(--line-strong);
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 0.9rem;
}

.avatar-row .button {
  margin-top: 8px;
  width: 100%;
}

.users-page,
.profile-page {
  max-width: 820px;
  margin: 0 auto;
  padding: 32px 16px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.ranking-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 18px;
}

.ranking-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  background: var(--panel-2);
  border: 2px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  color: var(--text);
}

.ranking-row:hover {
  border-color: var(--accent-2);
}

.ranking-row.is-top--1 {
  border-color: var(--gold);
  background: rgba(255, 196, 61, 0.1);
}

.ranking-row.is-top--2 {
  border-color: #aab4c4;
}

.ranking-row.is-top--3 {
  border-color: #cd7f32;
}

.rank-badge {
  width: 30px;
  height: 30px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--panel);
  border: 2px solid var(--line-strong);
  color: var(--muted);
  font-family: var(--font-display);
  font-weight: 800;
}

.rank-badge--gold {
  background: var(--gold);
  color: #1a1200;
  border-color: #e0a800;
}

.rank-badge--silver {
  background: #aab4c4;
  color: #10131b;
  border-color: #8d99ac;
}

.rank-badge--bronze {
  background: #cd7f32;
  color: #fff;
  border-color: #a05f1f;
}

.ranking-meta {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.ranking-bio {
  font-size: 0.85rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ranking-count {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
}

.ranking-count strong {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 800;
}

.profile-card {
  padding: 24px;
}

.profile-head {
  display: flex;
  gap: 20px;
  align-items: flex-start;
}

.profile-head__info {
  flex: 1;
  min-width: 0;
}

.profile-head__info h1 {
  margin: 0 0 4px;
  font-family: var(--font-display);
  font-weight: 800;
}

.profile-bio {
  margin: 14px 0 0;
  white-space: pre-wrap;
  word-break: break-word;
}

.profile-stats {
  display: flex;
  gap: 16px;
  margin-top: 20px;
  padding-top: 18px;
  border-top: 2px solid var(--line);
}

.profile-stat {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  text-align: center;
}

.profile-stat strong {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 800;
}

@media (max-width: 600px) {
  .profile-head {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  .ranking-bio {
    display: none;
  }
}