
:root {
  /* Цвета */
  --primary: #6c5ce7;
  --primary-dark: #5649c0;
  --accent: #fd79a8;
  --text: #f5f6fa;
  --text-muted: #b2bec3;
  --bg: #0f0f1a;
  --bg-light: #1a1a2e;
  --bg-card: #242442;
  --border: rgba(255, 255, 255, 0.1);
  --shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
  --radius: 12px;
  --transition: all 0.3s ease;
}

/* Базовые стили */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  height: auto;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Кнопки */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius);
  font-weight: 600;
  transition: var(--transition);
  border: none;
  cursor: pointer;
}

.btn--primary {
  background: var(--primary);
  color: white;
}

.btn--primary:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
}

/* Шапка */
.header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(15, 15, 26, 0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 0;
}

.logo img {
  height: 40px;
}

.nav {
  display: flex;
  gap: 20px;
}

.nav__link {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
  color: var(--text-muted);
  transition: var(--transition);
}

.navlink:hover, .navlink.active {
  color: var(--text);
}

.nav__link i {
  font-size: 14px;
}

.header__actions {
  display: flex;
  align-items: center;
  gap: 15px;
}

.search {
  position: relative;
}

.search__input {
  background: var(--bg-light);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 15px;
  padding-right: 40px;
  width: 250px;
  color: var(--text);
  transition: var(--transition);
}

.search__input:focus {
  outline: none;
  border-color: var(--primary);
}

.search__btn {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
}

.theme-toggle {
  background: var(--bg-light);
  border: 1px solid var(--border);
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition);
}

.theme-toggle:hover {
  color: var(--text);
  border-color: var(--primary);
}

/* Герой */
.hero {
  background: linear-gradient(135deg, rgba(108, 92, 231, 0.15), transparent 60%),
              url('assets/hero-bg.jpg') center/cover no-repeat;
  padding: 80px 0;
  position: relative;
}


.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 15, 26, 0.7);
  z-index: 0;
}

.hero__content {
  position: relative;
  z-index: 1;
  max-width: 600px;
}

.hero__title {
  font-size: 48px;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 20px;
}

.hero__title span {
  color: var(--accent);
}

.hero__subtitle {
  font-size: 18px;
  color: var(--text-muted);
  margin-bottom: 30px;
}

/* Плеер */
.player-section {
  padding: 40px 0;
}

.player-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  margin-bottom: 20px;
}

.player-card__header {
  padding: 20px;
  border-bottom: 1px solid var(--border);
}

.player-card__header h2 {
  font-size: 24px;
  margin-bottom: 5px;
}

.player-meta {
  color: var(--text-muted);
  font-size: 14px;
}

.player-wrapper {
  position: relative;
  padding-bottom: 56.25%; /* 16:9 */
  height: 0;
}

.player {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

.player-actions {
  padding: 15px 20px;
  border-top: 1px solid var(--border);
}

.voice-selector {
  display: flex;
  gap: 10px;
}

.voice-btn {
  background: var(--bg-light);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 6px 12px;
  font-size: 14px;
  cursor: pointer;
  transition: var(--transition);
}

.voice-btn:hover, .voice-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
}

/* Список серий */
.episodes-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.episodes-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
  border-bottom: 1px solid var(--border);
}

.episodes-header h3 {
  font-size: 18px;
}

.episodes-count {
  background: var(--bg-light);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 4px 10px;
  font-size: 14px;
}

.episodes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
  gap: 10px;
  padding: 15px;
}

.episode {
  background: var(--bg-light);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 10px;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
}

.episode:hover {
  background: rgba(108, 92, 231, 0.2);
  border-color: var(--primary);
}

.episode.active {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
}

/* Каталог */
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
}

.section-header h2 {
  font-size: 28px;
}

.filters {
  display: flex;
  gap: 15px;
}

.filter-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.filter-group label {
  color: var(--text-muted);
  font-size: 14px;
}

.filter-select {
  background: var(--bg-light);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 8px 12px;
  color: var(--text);
  min-width: 120px;
}

.anime-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 40px;
}

.anime-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  overflow: hidden;
  transition: var(--transition);
  border: 1px solid var(--border);
}

.anime-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow);
  border-color: var(--primary);
}

.anime-poster {
  width: 100%;
  height: 280px;
  object-fit: cover;
  display: block;
}

.anime-info {
  padding: 15px;
}

.anime-title {
  font-weight: 600;
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 44px;
}

.anime-meta {
  display: flex;
  justify-content: space-between;
  color: var(--text-muted);
  font-size: 14px;
}

/* Пагинация */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin-top: 30px;
}

.pagination-btn {
  background: var(--bg-light);
  border: 1px solid var(--border);
  border-radius: 6px;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
}

.pagination-btn:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
}

.pagination-btn.disabled {
  opacity: 0.5;
  pointer-events: none;
}

.page-numbers {
  display: flex;
  gap: 5px;
}

.page-number {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  cursor: pointer;
  transition: var(--transition);
}

.page-number:hover, .page-number.active {
  background: var(--primary);
  color: white;
}

/* Жанры */
.genres {
  padding: 60px 0;
  background: var(--bg-light);
}

.section-title {
  text-align: center;
  font-size: 32px;
  margin-bottom: 30px;
}

.genres-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 15px;
}

.genre-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  transition: var(--transition);
  border: 1px solid var(--border);
}

.genre-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow);
  border-color: var(--accent, var(--primary));
}

.genre-card i {
  font-size: 24px;
  color: var(--accent, var(--primary));
}

.genre-card span {
  font-weight: 600;
}

/* Футер */
.footer {
  background: var(--bg-card);
  padding: 60px 0 20px;
}

.footer__inner {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 40px;
  margin-bottom: 40px;
}

.footer__col h3 {
  font-size: 18px;
  margin-bottom: 20px;
  color: var(--text);
}

.footer__col ul {
  list-style: none;
}

.footer__col li {
  margin-bottom: 10px;
}

.footer__col a {
  color: var(--text-muted);
  transition: var(--transition);
}

.footer__col a:hover {
  color: var(--primary);
}

.footer__bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  font-size: 14px;
  color: var(--text-muted);
}

.social-links {
  display: flex;
  gap: 15px;
}

.social-link {
  color: var(--text-muted);
  font-size: 18px;
  transition: var(--transition);
}

.social-link:hover {
  color: var(--primary);
}

/* Модальное окно */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(5px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: var(--transition);
}

.modal.active {
  opacity: 1;
  pointer-events: all;
}

.modal__content {
  background: var(--bg-card);
  border-radius: var(--radius);
  width: 90%;
  max-width: 600px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  box-shadow: var(--shadow);
}

.modal__close {
  position: absolute;
  top: 15px;
  right: 15px;
  background: none;
  border: none;
  font-size: 24px;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition);
}

.modal__close:hover {
  color: var(--primary);
}

.modal__body {
  padding: 30px;
}

/* Уведомления */
.toast {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--bg-card);
  color: white;
  padding: 12px 24px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  z-index: 1000;
  opacity: 0;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 10px;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Адаптив */
@media (max-width: 992px) {
  .hero__title {
    font-size: 36px;
  }
  
  .anime-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  }
}

@media (max-width: 768px) {
  .header__inner {
    flex-direction: column;
    gap: 15px;
  }
  
  .nav {
    order: 3;
    width: 100%;
    justify-content: center;
  }
  
  .search__input {
    width: 100%;
  }
  
  .hero__content {
    text-align: center;
  }
  
  .filters {
    flex-direction: column;
    width: 100%;
  }
  
  .filter-group {
    width: 100%;
  }
  
  .filter-select {
    width: 100%;
  }
}

@media (max-width: 576px) {
  .hero {
    padding: 60px 0;
  }
  
  .hero__title {
    font-size: 28px;
  }
  
  .episodes-grid {
    grid-template-columns: repeat(auto-fill, minmax(50px, 1fr));
  }
  
  .anime-grid {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  }
  
  .footer__inner {
    grid-template-columns: 1fr;
  }
  
  .footer__bottom {
    flex-direction: column;
    gap: 15px;
  }
  /* Аутентификация */
.auth-tabs {
  display: flex;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

.auth-tab {
  padding: 10px 20px;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  position: relative;
  font-weight: 600;
  transition: var(--transition);
}

.auth-tab.active {
  color: var(--primary);
}

.auth-tab.active::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--primary);
}

.auth-form {
  display: none;
}

.auth-form.active {
  display: block;
}

.form-group {
  margin-bottom: 15px;
}

.form-group label {
  display: block;
  margin-bottom: 5px;
  color: var(--text-muted);
  font-size: 14px;
}

.form-group input {
  width: 100%;
  padding: 10px;
  background: var(--bg-light);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  transition: var(--transition);
}

.form-group input:focus {
  outline: none;
  border-color: var(--primary);
}

/* Реклама */
.ad-banner {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 20px;
  margin: 20px 0;
  text-align: center;
  border: 1px solid var(--border);
}

.sidebar-ad {
  position: fixed;
  right: 20px;
  top: 100px;
  width: 160px;
  display: none;
}

@media (min-width: 1200px) {
  .sidebar-ad {
    display: block;
  }
}

.ad-banner img {
  max-width: 100%;
  border-radius: 4px;
}
.anime-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 20px;
  padding: 20px;
}

.anime-card {
  background: #1e1e2f;
  color: white;
  border-radius: 10px;
  padding: 10px;
  text-align: center;
}

.anime-poster {
  width: 100%;
  height: 250px;
  object-fit: cover;
  border-radius: 8px;
}
}