/* 1. Variáveis de Cores do Tema (:root) */
:root {
  --bg-primary: #0b0d17;
  --bg-secondary: #131722;
  --bg-card: rgba(22, 27, 41, 0.8);
  --text-main: #f3f4f6;
  --text-muted: #9ca3af;
  --accent-color: #00f2fe;

  --genre-shonen: #ff4757;
  --genre-action: #ff6b81;
  --genre-fantasy: #a29bfe;
  --genre-scifi: #00d2d3;
  --genre-adventure: #ffa502;
  --genre-supernatural: #5f27cd;
  --genre-romance: #ff78ae;
  --genre-isekai: #2ed573;
  --genre-mecha: #70a1ff;
  --genre-horror: #eb4d4b;
  --genre-comedy: #eccc68;
  --genre-sports: #ff7f50;
  --genre-sliceoflife: #74b9ff;
  --genre-mystery: #341f97;
  --genre-seinen: #57606f;
  --genre-drama: #4b6584;

  --font-title: 'Outfit', sans-serif;
  --font-body: 'Roboto', sans-serif;
}

* {
  box-sizing: border-box;
}

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

.app-container {
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: 100vh;
  position: relative;
}

.sidebar {
  background-color: var(--bg-secondary);
  border-right: 1px solid rgba(255, 255, 255, 0.06);
  padding: 1.5rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.logo-icon-glow {
  background: linear-gradient(135deg, #00d2d3, #00f2fe);
  color: #0b0d17;
  font-weight: 800;
  font-size: 1.1rem;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 12px rgba(0, 242, 254, 0.4);
}

.logo h2 {
  font-family: var(--font-title);
  font-size: 1.6rem;
  color: #ffffff;
  margin: 0;
}

.logo h2 span {
  color: var(--accent-color);
}

.nav-menu {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.nav-item {
  color: var(--text-muted);
  text-decoration: none;
  padding: 0.7rem 1rem;
  border-radius: 10px;
  font-size: 0.92rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.8rem;
  transition: all 0.2s ease;
}

.nav-item:hover, .nav-item.active {
  background: rgba(0, 242, 254, 0.12);
  color: var(--accent-color);
  transform: translateX(3px);
}

.submenu-wrapper {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  padding-left: 1.2rem;
  border-left: 2px solid rgba(0, 210, 211, 0.2);
  margin-left: 0.8rem;
}

.submenu-items {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.sub-item {
  color: #94a3b8;
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  padding: 0.4rem 0.6rem;
  border-radius: 6px;
  display: block;
  transition: all 0.2s ease;
}

.sub-item:hover, .sub-item.active {
  color: #00f2fe;
  background: rgba(0, 242, 254, 0.1);
  padding-left: 0.8rem;
}

.main-content {
  padding: 2rem 2.5rem;
  overflow-y: auto;
}

.header-banner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.banner-title h1 {
  font-family: var(--font-title);
  font-size: 2.2rem;
  font-weight: 800;
  margin: 0;
  color: #ffffff;
}

.banner-title p {
  color: var(--text-muted);
  margin: 0.4rem 0 0 0;
  font-size: 0.95rem;
}

.search-container {
  min-width: 280px;
}

.search-input {
  width: 100%;
  padding: 0.65rem 1.1rem;
  font-size: 0.9rem;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background-color: rgba(255, 255, 255, 0.06);
  color: #ffffff;
  outline: none;
  transition: all 0.25s ease;
}

.search-input:focus {
  border-color: var(--accent-color);
  box-shadow: 0 0 12px rgba(0, 242, 254, 0.3);
}

.hero-banner {
  background: linear-gradient(135deg, rgba(19, 23, 34, 0.95), rgba(11, 13, 23, 0.9)),
              url('https://cdn.myanimelist.net/images/anime/1015/138006.jpg') center/cover no-repeat;
  background-blend-mode: overlay;
  border: 1px solid rgba(0, 242, 254, 0.25);
  border-radius: 20px;
  padding: 2.2rem 2.5rem;
  margin: 1.5rem 0 2rem 0;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.6), 0 0 25px rgba(0, 242, 254, 0.15);
  position: relative;
  overflow: hidden;
}

.hero-content {
  max-width: 650px;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.hero-badge {
  display: inline-block;
  align-self: flex-start;
  background: linear-gradient(135deg, #ff4757, #ff6b81);
  color: #ffffff;
  font-weight: 800;
  font-size: 0.78rem;
  padding: 0.3rem 0.8rem;
  border-radius: 20px;
  letter-spacing: 0.5px;
  box-shadow: 0 4px 12px rgba(255, 71, 87, 0.3);
}

.hero-content h2 {
  font-family: var(--font-title);
  font-size: 2.2rem;
  font-weight: 800;
  color: #ffffff;
  margin: 0;
  line-height: 1.2;
}

.hero-synopsis {
  font-size: 0.95rem;
  line-height: 1.6;
  color: #cbd5e1;
  margin: 0;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  margin-top: 0.6rem;
}

.hero-btn {
  padding: 0.75rem 1.4rem;
  border-radius: 12px;
  font-family: var(--font-title);
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.25s ease;
  border: none;
}

.hero-btn.primary-btn {
  background: linear-gradient(135deg, #00d2d3, #00f2fe);
  color: #0b0d17;
  box-shadow: 0 4px 15px rgba(0, 242, 254, 0.3);
}

.hero-btn.primary-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(0, 242, 254, 0.5);
}

.hero-btn.secondary-btn {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.hero-btn.secondary-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: translateY(-3px);
}

.details-drawer {
  position: fixed;
  top: 0;
  right: -420px;
  width: 380px;
  height: 100vh;
  background-color: var(--bg-secondary);
  border-left: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: -10px 0 30px rgba(0, 0, 0, 0.6);
  z-index: 1000;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  transition: right 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  overflow-y: auto;
}

.details-drawer.active {
  right: 0;
}

.close-drawer-btn {
  position: absolute;
  top: 15px;
  right: 15px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #ffffff;
  font-size: 1.2rem;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.close-drawer-btn:hover {
  background: #ff4757;
  border-color: #ff4757;
}

.drawer-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  text-align: center;
}

.drawer-cover {
  width: 130px;
  height: 185px;
  object-fit: cover;
  border-radius: 12px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5);
  border: 2px solid rgba(255, 255, 255, 0.08);
}

.drawer-badges-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.drawer-rating {
  background: rgba(255, 221, 89, 0.15);
  color: #ffdd59;
  border: 1px solid rgba(255, 221, 89, 0.3);
  padding: 0.2rem 0.6rem;
  border-radius: 12px;
  font-weight: 700;
  font-size: 0.85rem;
}

.drawer-synopsis-text {
  font-size: 0.85rem;
  line-height: 1.5;
  color: #cbd5e1;
  margin: 0.2rem 0 0 0;
  background: rgba(255, 255, 255, 0.03);
  padding: 0.8rem;
  border-radius: 8px;
  border-left: 3px solid #00d2d3;
  text-align: left;
  max-height: 100px;
  overflow-y: auto;
}

.drawer-nav-tabs {
  display: flex;
  gap: 0.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 0.8rem;
}

.drawer-tab-btn {
  flex: 1;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
  padding: 0.6rem 0.8rem;
  border-radius: 8px;
  font-family: var(--font-title);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s ease;
}

.drawer-tab-btn.active {
  background: linear-gradient(135deg, rgba(0, 210, 211, 0.2), rgba(0, 242, 254, 0.3));
  border-color: var(--accent-color);
  color: var(--accent-color);
}

.drawer-tab-panel {
  display: none;
  flex-direction: column;
  gap: 1.2rem;
}

.drawer-tab-panel.active {
  display: flex;
}

.progress-container {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.progress-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.82rem;
  color: #00d2d3;
  font-weight: 600;
}

.progress-bar-bg {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  overflow: hidden;
}

.progress-bar-fill {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, #00d2d3, #00f2fe);
  transition: width 0.3s ease;
}

.episodes-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-height: 45vh;
  overflow-y: auto;
}

.episodes-list li {
  background: rgba(255, 255, 255, 0.04);
  padding: 0.6rem 0.8rem;
  border-radius: 8px;
  font-size: 0.88rem;
  border: 1px solid rgba(255, 255, 255, 0.04);
}

/* Botões de Paginação */
.pagination-container {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  margin: 2.5rem 0 1rem 0;
}

.page-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #ffffff;
  padding: 0.6rem 1rem;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.page-btn:hover {
  background: rgba(0, 242, 254, 0.15);
  border-color: #00f2fe;
  color: #00f2fe;
}

.page-btn.active {
  background: linear-gradient(135deg, #00d2d3, #00f2fe);
  color: #0b0d17;
  border-color: #00f2fe;
}