/* Final request polish: home-like cards on grid pages, unified background, and cleaner send buttons. */
:root {
  --eric-home-background: radial-gradient(circle at 12% 0%, rgba(83, 67, 142, .36), transparent 28rem),
    radial-gradient(circle at 84% 58%, rgba(119, 63, 154, .28), transparent 34rem),
    linear-gradient(180deg, #141021 0%, #100d1a 46%, #090911 100%);
}

body,
body[data-route-page],
#app,
.app-shell,
.app-shell > .app-main,
.app-shell > .app-main[data-active-page],
.page,
.page.container {
  background: var(--eric-home-background);
  background-color: #090911;
}

body[data-route-page="home"] .hero,
body[data-route-page="home"] .hero[data-hero-slider],
.search-page-list-mode,
.history-page-watch-mode,
.library-page,
.bookmark-page,
.genre-page,
.watch-page,
.detail-page {
  background-color: transparent;
}

body[data-route-page="library"] .page .anime-grid,
body[data-route-page="bookmark"] .page .anime-grid,
body[data-route-page="favorite"] .page .anime-grid,
body[data-route-page="genre"] .page .anime-grid {
  grid-template-columns: repeat(auto-fill, minmax(145px, 1fr));
  gap: 14px;
  padding: 0 2px 18px;
}

body[data-route-page="library"] .anime-card,
body[data-route-page="bookmark"] .anime-card,
body[data-route-page="favorite"] .anime-card,
body[data-route-page="genre"] .anime-card {
  background: transparent;
  border: 0;
  box-shadow: none;
}

body[data-route-page="library"] .anime-card .poster,
body[data-route-page="library"] .anime-card .poster-wrap,
body[data-route-page="bookmark"] .anime-card .poster,
body[data-route-page="bookmark"] .anime-card .poster-wrap,
body[data-route-page="favorite"] .anime-card .poster,
body[data-route-page="favorite"] .anime-card .poster-wrap,
body[data-route-page="genre"] .anime-card .poster,
body[data-route-page="genre"] .anime-card .poster-wrap {
  border-color: rgba(255,255,255,.08);
  border-radius: 2px;
  box-shadow: none;
}

body[data-route-page="library"] .anime-card .episode-badge,
body[data-route-page="bookmark"] .anime-card .episode-badge,
body[data-route-page="favorite"] .anime-card .episode-badge,
body[data-route-page="genre"] .anime-card .episode-badge {
  left: 5px;
  bottom: 6px;
  min-width: 36px;
  min-height: 18px;
  padding: 2px 6px;
  border-radius: 999px;
  font-size: .56rem;
  line-height: 1;
  box-shadow: none;
}

body[data-route-page="library"] .anime-card .card-body,
body[data-route-page="bookmark"] .anime-card .card-body,
body[data-route-page="favorite"] .anime-card .card-body,
body[data-route-page="genre"] .anime-card .card-body {
  padding: 8px 0 0;
}

body[data-route-page="library"] .anime-card .card-body h3,
body[data-route-page="bookmark"] .anime-card .card-body h3,
body[data-route-page="favorite"] .anime-card .card-body h3,
body[data-route-page="genre"] .anime-card .card-body h3 {
  margin: 0;
  min-height: 0;
  height: calc(1.28em * 2);
  max-height: calc(1.28em * 2);
  overflow: hidden;
  color: #f4f4f5;
  font-size: 1.03rem;
  line-height: 1.28;
  font-weight: 500;
}

body[data-route-page="library"] .anime-card .card-body h3 a,
body[data-route-page="bookmark"] .anime-card .card-body h3 a,
body[data-route-page="favorite"] .anime-card .card-body h3 a,
body[data-route-page="genre"] .anime-card .card-body h3 a {
  color: inherit;
}

.wa-send-btn {
  position: relative;
  display: inline-grid;
  place-items: center;
  overflow: hidden;
}

.wa-send-btn .fi-rr-paper-plane {
  display: none;
}

.wa-send-btn::before {
  content: "➜";
  display: block;
  transform: translateX(1px);
  font-size: 1.38rem;
  line-height: 1;
  font-weight: 950;
}

.watch-page .watch-comments-separate {
  margin-top: 1px;
}

.watch-page .watch-comments-panel {
  padding: 1px;
}

.watch-page .watch-comment-form {
  grid-template-columns: minmax(0, 1fr) 58px;
  gap: 6px;
  height: auto;
  min-height: 58px;
  margin: 0 0 6px;
}

.watch-page .watch-comment-form textarea,
.watch-page .watch-reply-form textarea {
  min-height: 58px;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 18px;
  background: rgba(24, 20, 36, .86);
  color: #fff;
  padding: 14px 16px;
}

.watch-page .watch-comment-form textarea:focus,
.watch-page .watch-reply-form textarea:focus {
  border-color: rgba(168,85,247,.54);
  box-shadow: 0 0 0 3px rgba(168,85,247,.12);
}

.watch-page .watch-comment-form .wa-send-btn {
  width: 58px;
  height: 58px;
  min-width: 58px;
  border-radius: 18px;
  border: 1px solid rgba(216,180,254,.28);
  background: linear-gradient(135deg, rgba(124,58,237,.98), rgba(168,85,247,.94));
  box-shadow: 0 14px 28px rgba(124,58,237,.24), inset 0 1px 0 rgba(255,255,255,.16);
  color: #fff;
}

.watch-page .watch-comment-form .wa-send-btn::before {
  font-size: 1.42rem;
}

.live-chat-input-row .wa-send-btn,
.live-chat-form .wa-send-btn {
  border-radius: 18px;
  border: 1px solid rgba(216,180,254,.25);
  background: linear-gradient(135deg, rgba(124,58,237,.96), rgba(139,92,246,.86));
  box-shadow: 0 12px 24px rgba(37,99,235,.24), inset 0 1px 0 rgba(255,255,255,.14);
}

.live-chat-input-row .wa-send-btn::before,
.live-chat-form .wa-send-btn::before {
  font-size: 1.32rem;
}

.watch-page .watch-comments-list,
.watch-page .watch-replies-list {
  gap: 1px;
}

.watch-comments-panel .watch-comment-item,
.watch-comments-panel .watch-comment-reply {
  margin: 0;
  padding: 0;
}

@media (max-width: 640px) {
  body[data-route-page="library"] .page .anime-grid,
  body[data-route-page="bookmark"] .page .anime-grid,
  body[data-route-page="favorite"] .page .anime-grid,
  body[data-route-page="genre"] .page .anime-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px 10px;
  }

  body[data-route-page="library"] .anime-card .card-body h3,
  body[data-route-page="bookmark"] .anime-card .card-body h3,
  body[data-route-page="favorite"] .anime-card .card-body h3,
  body[data-route-page="genre"] .anime-card .card-body h3 {
    height: calc(1.25em * 2);
    max-height: calc(1.25em * 2);
    font-size: .78rem;
    line-height: 1.25;
  }
}
