:root {
  color-scheme: dark;
  color: #e8e6e1;
  background: #0d1117;
}
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  display: grid;
  place-items: center;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #0d1117;
}
.page {
  width: min(100%, 1600px);
  padding: clamp(24px, 3vw, 48px);
  margin: 0 auto;
}
.card {
  background: rgba(30, 35, 48, 0.95);
  border: 1px solid rgba(0, 0, 0, 0.2);
  border-radius: 32px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
  padding: clamp(32px, 3vw, 44px);
  text-align: center;
}
.recommendations {
  margin-top: 32px;
  background: rgba(30, 35, 48, 0.90);
  border: 1px solid rgba(0, 0, 0, 0.15);
  border-radius: 32px;
  padding: clamp(30px, 2.5vw, 42px);
}
.recommendation-header {
  text-align: left;
  margin-bottom: 28px;
}
.recommendation-header h2 {
  margin: 0 0 8px;
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  color: #e8e6e1;
}
.recommendation-header p {
  margin: 0;
  color: #b8b5aa;
  line-height: 1.6;
}
.search-bar {
  display: block;
  width: 100%;
  max-width: 400px;
  margin-top: 16px;
  padding: 12px 16px;
  font-size: 1rem;
  border: 2px solid rgba(229, 57, 70, 0.3);
  border-radius: 24px;
  background: rgba(30, 35, 48, 0.8);
  color: #e8e6e1;
  font-family: inherit;
  transition: border-color 0.2s ease, background 0.2s ease;
}
.search-bar:focus {
  outline: none;
  border-color: rgba(229, 57, 70, 0.6);
  background: rgba(30, 35, 48, 1);
}
.search-bar::placeholder {
  color: #6d7088;
}
.recommendation-grid {
  display: grid;
  gap: 32px;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}
.anime-card {
  position: relative;
  background: rgba(20, 25, 35, 0.95);
  border-radius: 24px;
  padding: 24px;
  border: 1px solid rgba(229, 57, 70, 0.1);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.3);
}
.anime-card.favorite::before {
  content: "";
  position: absolute;
  top: -10px;
  right: -10px;
  width: 56px;
  height: 56px;
  background-color: transparent;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cg fill='none' stroke='%235f331c' stroke-width='8'%3E%3Cpath d='M34 29c-7-12-23-10-27 4-4 15 9 22 16 25'/%3E%3Cpath d='M66 29c7-12 23-10 27 4 4 15-9 22-16 25'/%3E%3Cpath d='M35 59c4 12 26 17 30 0'/%3E%3C/g%3E%3Cpath d='M50 45c-5 0-8 3-8 8s3 8 8 8 8-3 8-8-3-8-8-8z' fill='%23b26a3b'/%3E%3Cpath d='M42 36c2 0 4 2 4 4s-2 4-4 4-4-2-4-4 2-4 4-4z' fill='%232a1a12'/%3E%3Cpath d='M58 36c2 0 4 2 4 4s-2 4-4 4-4-2-4-4 2-4 4-4z' fill='%232a1a12'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 100%;
  z-index: 1;
}
.card-label {
  display: inline-flex;
  margin-bottom: 14px;
  color: #c42a2a;
  font-size: 0.9rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}
.anime-card h3 {
  margin: 0 0 10px;
  font-size: 1.35rem;
  color: #e8e6e1;
}
.anime-description {
  margin: 0 0 18px;
  color: #b8b5aa;
  line-height: 1.6;
}
.quick-comment {
  margin: 0;
  color: #9d9a8f;
  line-height: 1.75;
  font-size: 0.98rem;
}
.genres {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}
.genre-chip {
  display: inline-flex;
  padding: 10px 12px;
  border-radius: 999px;
  background: rgba(229, 57, 70, 0.1);
  color: #e55050;
  font-size: 0.92rem;
  font-weight: 600;
  border: 1px solid rgba(229, 57, 70, 0.3);
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease;
}
.genre-chip:hover {
  transform: translateY(-1px);
  background: rgba(229, 57, 70, 0.2);
}
.hidden {
  display: none !important;
}
.genre-view {
  margin-top: 32px;
}
.genre-summary {
  background: rgba(30, 35, 48, 0.95);
  border: 1px solid rgba(0, 0, 0, 0.15);
  border-radius: 32px;
  padding: 24px 28px;
  margin-bottom: 28px;
  text-align: center;
}
.genre-summary .back-link {
  margin-bottom: 16px;
}
.genre-summary h1 {
  margin-bottom: 12px;
  color: #e8e6e1;
}
.genre-summary p {
  margin: 0 auto;
  max-width: 720px;
  color: #b8b5aa;
}
.related-list strong {
  display: block;
  margin-bottom: 10px;
  color: #e8e6e1;
}
.related-list ul,
.genre-group ul {
  margin: 0;
  padding-left: 20px;
  color: #b8b5aa;
  line-height: 1.7;
}
.genre-group {
  display: grid;
  gap: 16px;
}
.genre-group strong {
  display: block;
  margin-bottom: 6px;
  color: #e8e6e1;
}
@media (min-width: 780px) {
  .recommendation-grid {
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  }
}
.bear {
  position: relative;
  width: 240px;
  height: 220px;
  margin: 0 auto 28px;
}
.ear,
.head {
  position: absolute;
  background: #8b6a4d;
}
.ear {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  top: 0;
  background: linear-gradient(140deg, #9c7755 0%, #7a5b44 100%);
}
.ear.left {
  left: 0;
  transform: translateX(-20px);
}
.ear.right {
  right: 0;
  transform: translateX(20px);
}
.head {
  width: 220px;
  height: 180px;
  border-radius: 52% 48% 48% 52% / 52% 54% 46% 48%;
  top: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(180deg, #d9b48c 0%, #b6835f 100%);
}
.eye {
  position: absolute;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #2e2120;
  top: 64px;
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.32);
}
.eye.left {
  left: 52px;
}
.eye.right {
  right: 52px;
}
.nose {
  position: absolute;
  left: 50%;
  top: 100px;
  width: 40px;
  height: 26px;
  transform: translateX(-50%);
  border-radius: 22px 22px 24px 24px;
  background: #2e2120;
}
.mouth {
  position: absolute;
  top: 114px;
  left: 50%;
  width: 70px;
  height: 40px;
  transform: translateX(-50%);
  border-bottom-left-radius: 45px 30px;
  border-bottom-right-radius: 45px 30px;
  border-top-left-radius: 24px 18px;
  border-top-right-radius: 24px 18px;
  background: #3b2928;
}
.message h1 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.3rem);
  letter-spacing: -0.03em;
  color: #e8e6e1;
}
.message p {
  margin: 14px auto 0;
  max-width: 460px;
  color: #b8b5aa;
  line-height: 1.65;
  font-size: 1rem;
}
.cta-button,
.back-link a {
  display: inline-flex;
  margin-top: 22px;
  padding: 14px 22px;
  background: #b91b1b;
  color: #e8e6e1;
  text-decoration: none;
  border-radius: 999px;
  font-weight: 700;
  transition: transform 0.2s ease, background 0.2s ease;
}
.cta-button:hover,
.back-link a:hover {
  transform: translateY(-1px);
  background: #790b4f;
}
.back-link {
  margin-bottom: 20px;
}
@media (max-width: 520px) {
  .card {
    padding: 28px 20px;
  }
  .bear {
    width: 200px;
    height: 190px;
  }
}
