:root {
  --bg: #0f1724;
  --card: #0b1220;
  --muted: #9aa4b2;
  --accent: #ff5c7c;
  --radius: 12px;
  --container: 1100px;
  --gap: 18px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
  color-scheme: dark;
}

/* Сброс и базовая стилизация */
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: linear-gradient(180deg, #07101a 0%, #071219 100%);
  color: #e6eef6;
  line-height: 1.35;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Контейнер */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 28px;
}

/* ===== HEADER ===== */
.site-header {
  backdrop-filter: blur(6px);
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(180deg, rgba(6, 10, 15, 0.6), rgba(6, 10, 15, 0.3));
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.logo {
  font-weight: 700;
  color: #fff;
  text-decoration: none;
  font-size: 18px;
}
.logo .dot {
  color: var(--accent);
  margin-left: 4px;
}

/* Кнопки */
.btn {
  padding: 8px 14px;
  border-radius: 10px;
  border: 0;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}
.btn.primary {
  background: linear-gradient(90deg, var(--accent), #ff8aa6);
  color: #07101a;
  box-shadow: 0 6px 18px rgba(255, 92, 124, 0.14);
}
.btn.primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(255, 92, 124, 0.22);
}
.btn.ghost {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: var(--muted);
}
.btn.ghost:hover {
  border-color: rgba(255, 255, 255, 0.1);
  color: #fff;
}

/* ===== HERO ===== */
.hero {
  padding: 48px 0;
}
.hero-inner {
  display: flex;
  gap: 32px;
  align-items: center;
}
.hero-text {
  flex: 1;
}
.hero-text h1 {
  font-size: 32px;
  margin: 0 0 10px;
}
.lead {
  color: var(--muted);
  margin: 0 0 18px;
}
.hero-cta {
  display: flex;
  gap: 12px;
  align-items: center;
}
.small-link {
  color: var(--muted);
  text-decoration: underline;
  font-size: 14px;
}
.hero-card {
  width: 320px;
  background: var(--card);
  padding: 14px;
  border-radius: 14px;
  box-shadow: 0 6px 20px rgba(2, 6, 12, 0.6);
  text-align: center;
}
.hero-card img {
  width: 100%;
  border-radius: 8px;
  display: block;
}
.price-badge {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 10px;
}
.tiny {
  font-size: 12px;
  color: var(--muted);
}

/* ===== ABOUT ===== */
.about {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), transparent);
  border-radius: 10px;
  padding: 18px;
#  margin: 18px 0;
}
.about h2 {
  margin-top: 0;
}

/* ===== КАТАЛОГ ===== */
.catalog-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}
.search {
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.04);
  background: transparent;
  color: inherit;
  min-width: 220px;
}
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 18px;
}

/* Карточки сериалов */
.card {
  background: var(--card);
  border-radius: 12px;
  padding: 12px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.03);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.poster {
  height: 140px;
  background: #08101a;
  border-radius: 8px;
  overflow: hidden;
  display: block;
}
.poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.title {
  font-weight: 700;
}
.orig {
  color: var(--muted);
  font-size: 13px;
}
.desc {
  color: var(--muted);
  font-size: 14px;
  flex: 1;
}
.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.kv {
  font-size: 13px;
  color: var(--muted);
}

/* ===== МОДАЛЫ ===== */
.modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(3, 6, 12, 0.75); /* Было 0.6 — затемнил чуть сильнее */
  z-index: 300;
  backdrop-filter: blur(6px);
}

.modal.hidden {
  display: none;
}

.modal-panel {
  background: rgba(18, 24, 34, 0.95); /* Более плотный фон, ближе к Netflix */
  padding: 22px;
  border-radius: 16px;
  min-width: 340px;
  position: relative;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
}

.modal-panel.player {
  width: 80%;
  max-width: 900px;
  min-height: 360px;
  background: rgba(12, 16, 24, 0.96);
}

.modal-close {
  position: absolute;
  right: 12px;
  top: 10px;
  border: 0;
  background: transparent;
  color: #fff;
  font-size: 28px;
  cursor: pointer;
  opacity: 0.8;
  transition: opacity 0.2s;
}
.modal-close:hover {
  opacity: 1;
}
/* ===== АВТОРИЗАЦИЯ ===== */
.tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 12px;
}
.tab {
  padding: 8px 12px;
  border-radius: 8px;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.03);
  cursor: pointer;
}
.tab.active {
  background: linear-gradient(90deg, var(--accent), #ff8aa6);
  color: #07101a;
  border: 0;
}
.form {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.form label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 14px;
}
.form input {
  padding: 10px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.04);
  background: transparent;
  color: inherit;
}
.form input:focus {
  outline: 1px solid var(--accent);
  background: rgba(255, 255, 255, 0.02);
}
.form-actions {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}
.form-error {
  color: #ff9aa8;
  font-size: 13px;
  margin-top: 8px;
}

/* ===== FOOTER ===== */
.site-footer {
  padding: 20px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.02);
  color: var(--muted);
  font-size: 14px;
}
.footer-actions {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  margin-top: 8px;
}
.footer-actions a {
  color: var(--muted);
  text-decoration: none;
}
.footer-actions a:hover {
  text-decoration: underline;
}

/* ===== АДАПТИВ ===== */
@media (max-width: 900px) {
  .hero-inner { flex-direction: column; }
  .hero-card { width: 100%; }
  .container { padding: 20px; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
}
