/* =========================================
   1. DESIGN TOKENS (FIGMA VARIABLES)
   ========================================= */
:root {
  /* --- Palette --- */
  --color-bg-main: #050505;
  --color-bg-secondary: #0b0d14;
  
  /* Brand Colors */
  --color-accent: #FFE300;       /* Primary Yellow */
  --color-accent-hover: #e6cc00;
  --color-purple: #a58bff;       /* Secondary Purple */
  --color-red: #ff5b7a;          /* Action/Error */
  
  /* Text Colors */
  --text-main: #ffffff;
  --text-muted: rgba(255, 255, 255, 0.7);
  --text-muted-2: rgba(255, 255, 255, 0.5);
  --text-on-accent: #050505;

  /* Surfaces (Glassmorphism) */
  --surface-glass: rgba(18, 18, 24, 0.65);
  --surface-glass-light: rgba(255, 255, 255, 0.03);
  --surface-glass-strong: rgba(18, 18, 24, 0.85);
  --border-glass: rgba(255, 255, 255, 0.08);
  --border-glass-hover: rgba(255, 255, 255, 0.2);
  
  /* --- Typography --- */
  --font-heading: 'Oswald', sans-serif;
  --font-body: 'Ubuntu', sans-serif;
  /* Editorial serif for long reads. Falls back to Georgia when the
     webfont isn't loaded on a page — pages that want it must include
     the Source Serif 4 Google Fonts link (article.php does). */
  --font-serif: 'Source Serif 4', 'Georgia', serif;

  /* --- Spacing & Radius --- */
  --header-height: 80px;
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --radius-pill: 999px;
  --content-width: 1440px;

  /* --- Effects --- */
  --blur-val: 16px;
  --shadow-card: 0 12px 40px rgba(0, 0, 0, 0.4);
  --shadow-hover: 0 20px 50px rgba(0, 0, 0, 0.6);
  --transition-fast: 0.2s ease;
  --transition-smooth: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* =========================================
   2. RESET & BASE
   ========================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  background-color: var(--color-bg-main);
  background-image: 
    radial-gradient(circle at 10% 20%, rgba(255, 230, 0, 0.03) 0%, transparent 40%),
    radial-gradient(circle at 90% 80%, rgba(165, 139, 255, 0.05) 0%, transparent 40%);
  color: var(--text-main);
  font-family: var(--font-body);
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
}

/* Background Noise/Image Veil */
body::before {
  content: "";
  position: fixed; inset: 0;
  background: url('https://artigosdesin.com/medialib/background1.png') center/cover no-repeat;
  opacity: 0.2;
  pointer-events: none;
  z-index: -2;
}

a { color: inherit; text-decoration: none; transition: var(--transition-fast); }
ul { list-style: none; }
img { max-width: 100%; display: block; }

/* Typography Helpers */
.oswald { font-family: var(--font-heading); font-weight: 600; text-transform: uppercase; }
.text-muted { color: var(--text-muted); }
.text-accent { color: var(--color-accent); }

/* Animated Blobs (Background) */
.animated-blobs { position: fixed; inset: 0; pointer-events: none; z-index: -1; overflow: hidden; }
.blob {
  position: absolute;
  width: 300px; height: 300px;
  background: linear-gradient(180deg, rgba(0,0,0,0), rgba(68,76,247,0.25));
  filter: blur(80px);
  border-radius: 50%;
  animation: moveBlobs 25s infinite alternate ease-in-out;
}
.blob:nth-child(2) { top: 20%; right: 10%; background: rgba(255, 227, 0, 0.15); animation-delay: -5s; }
@keyframes moveBlobs { from { transform: translate(0,0); } to { transform: translate(40px, -40px); } }

/* =========================================
   3. LAYOUT & GRID SYSTEM
   ========================================= */
.container {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 0 20px;
  width: 100%;
  position: relative;
}

/* Main Header */
.site-header {
  position: sticky; top: 0; z-index: 1000;
  width: 100%; height: var(--header-height);
  background: rgba(5, 5, 5, 0.7); /* Slightly darker for readability */
  backdrop-filter: blur(var(--blur-val));
  border-bottom: 1px solid var(--border-glass);
}

.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 100%;
  max-width: var(--content-width); margin: 0 auto; padding: 0 20px;
}

/* Grids */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.grid-articles {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 24px;
}

@media (max-width: 900px) {
  .grid-3, .grid-articles { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .grid-3, .grid-articles { grid-template-columns: 1fr; }
}

/* =========================================
   4. COMPONENTS (ATOMS)
   ========================================= */

/* --- Buttons --- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 12px 24px;
  border-radius: var(--radius-pill);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  cursor: pointer;
  border: none;
  transition: var(--transition-fast);
  gap: 8px;
}

.btn-primary {
  background: var(--color-accent);
  color: var(--text-on-accent);
}
.btn-primary:hover {
  background: var(--color-accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(255, 227, 0, 0.3);
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--border-glass-hover);
  color: var(--text-main);
}
.btn-outline:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
}

.btn-icon {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--surface-glass-light);
  border: 1px solid var(--border-glass);
  color: #fff;
  display: grid; place-items: center;
  cursor: pointer;
  transition: var(--transition-fast);
}
.btn-icon:hover { border-color: var(--color-accent); color: var(--color-accent); }

/* --- Inputs --- */
.input-dark, .search-input {
  background: rgba(0,0,0,0.3);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-pill);
  padding: 10px 20px;
  color: #fff;
  font-family: var(--font-body);
  outline: none;
  transition: var(--transition-fast);
  width: 100%;
}
.input-dark:focus, .search-input:focus {
  border-color: var(--color-accent);
  background: rgba(0,0,0,0.5);
}

/* --- Chips & Tags --- */
.chips { display: flex; gap: 8px; flex-wrap: wrap; }

.chip {
  display: inline-flex; align-items: center;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 500;
  background: var(--surface-glass-light);
  border: 1px solid var(--border-glass);
  color: var(--text-muted);
  transition: var(--transition-fast);
}
.chip:hover, .chip.active {
  background: rgba(255,255,255,0.1);
  border-color: var(--color-accent);
  color: #fff;
}

.tag-mini {
  font-size: 10px; font-weight: 800; text-transform: uppercase;
  padding: 4px 8px; border-radius: 4px;
  background: rgba(255,255,255,0.1); color: #fff;
}

/* =========================================
   5. CARDS & CONTAINERS
   ========================================= */

/* Base Glass Panel */
.glass-panel {
  background: var(--surface-glass);
  backdrop-filter: blur(var(--blur-val));
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 24px;
}

/* Movie Card (Standard) */
.card-movie {
  display: flex; flex-direction: column;
  background: var(--surface-glass-light);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: var(--transition-smooth);
  height: 100%;
  position: relative;
}
.card-movie:hover {
  transform: translateY(-6px);
  border-color: var(--border-glass-hover);
/* Blur + Shadow Big */
box-shadow: 0 7px 10px 0 rgba(0, 0, 0, 0.09), 0 40px 80px 0 rgba(0, 0, 0, 0.30);
backdrop-filter: blur(50px);
}
.card-movie .thumb {
  aspect-ratio: 2/1; /* Poster ratio */
  width: 100%;
  object-fit: cover;
  background: #111;
}
.card-movie .content { padding: 16px; flex: 1; display: flex; flex-direction: column; }
.card-movie .title {
  font-family: var(--font-heading);
  font-size: 18px; margin-bottom: 4px; line-height: 1.2;
}
.card-movie .meta {
  font-size: 12px; color: var(--text-muted); margin-bottom: 12px;
  display: flex; justify-content: space-between;
}

/* Article Card */
.card-article {
  display: flex; flex-direction: column;
  border: 1px solid var(--border-glass);
  background: rgba(255,255,255,0.02);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: var(--transition-fast);
  height: 100%;
}
.card-article:hover { border-color: var(--color-accent); transform: translateY(-2px); }
.card-article .cover {
  height: 200px; width: 100%;
  background-size: cover; background-position: center;
  position: relative;
}
.card-article .body { padding: 20px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.card-article h3 { font-family: var(--font-heading); font-size: 22px; line-height: 1.2; }

/* Editor's Pick (Featured) */
.editor-pick {
  display: grid; grid-template-columns: 1.2fr 1fr; gap: 30px;
  background: linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0.02));
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 24px;
  align-items: center;
}
@media (max-width: 800px) { .editor-pick { grid-template-columns: 1fr; } }

/* =========================================
   6. PAGE SPECIFICS
   ========================================= */

/* --- Header / Nav Specifics --- */
.brand-logo {
  font-family: var(--font-heading); font-size: 26px; font-weight: 700;
  color: #fff; letter-spacing: -0.5px; display: flex; align-items: center; gap: 4px;
}
.brand-logo span { color: var(--color-accent); }

.nav-link {
  padding: 8px 16px; color: var(--text-muted); font-size: 14px; font-weight: 500;
  transition: 0.2s; border-radius: var(--radius-pill);
}
.nav-link:hover { color: #fff; background: rgba(255,255,255,0.05); }
.nav-link.is-active { color: #000; background: #fff; font-weight: 600; }

/* --- Hero Section (Home) --- */
.hero-section {
  text-align: center; padding: 60px 20px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.hero-title {
  font-family: var(--font-heading);
  font-size: clamp(40px, 8vw, 80px);
  line-height: 1; text-transform: uppercase;
  margin-bottom: 20px;
}

/* Shiny Text Effect */
.shiny-text {
  background: linear-gradient(120deg, rgba(255,255,255,0) 40%, rgba(255,255,255,0.8) 50%, rgba(255,255,255,0) 60%);
  background-size: 200% 100%;
  -webkit-background-clip: text; background-clip: text;
  color: rgba(255,255,255,0.5);
  animation: shine 5s linear infinite;
}
@keyframes shine { 0% { background-position: 100%; } 100% { background-position: -100%; } }

/* --- Movie Detail Page --- */
.hero-frame {
  width: 100%; height: 60vh; position: relative;
  mask-image: linear-gradient(to bottom, black 0%, black 60%, transparent 100%);
  -webkit-mask-image: linear-gradient(to bottom, black 0%, black 60%, transparent 100%);
}
.hero-frame img { width: 100%; height: 100%; object-fit: cover; object-position: center 20%; opacity: 0.7; }

.movie-overlap { margin-top: -140px; position: relative; z-index: 10; padding-bottom: 60px; }

.movie-header-card {
  background: rgba(18, 18, 24, 0.4);
  backdrop-filter: blur(24px);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius-xl);
  padding: 40px;
  box-shadow: var(--shadow-card);
}

.stat-pill {
  display: inline-flex; align-items: center; padding: 6px 12px;
  border: 1px solid var(--border-glass); border-radius: 8px;
  font-size: 13px; font-weight: 600; text-transform: uppercase;
  background: rgba(255,255,255,0.05); margin-right: 8px; margin-bottom: 8px;
}
.stat-pill.accent { background: var(--color-accent); color: #000; border-color: var(--color-accent); }

/* --- Profile Page --- */
.dashboard-grid {
  display: grid; grid-template-columns: 2fr 1fr; gap: 24px; margin-top: 30px;
}
.stats-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 24px; }
.stat-card {
  background: var(--surface-glass-light); border: 1px solid var(--border-glass);
  border-radius: var(--radius-md); padding: 16px; text-align: center;
}
.stat-val { font-family: var(--font-heading); font-size: 28px; font-weight: 700; color: #fff; }

/* --- Article Reading Page --- */
.article-body { font-family: var(--font-serif); font-size: 20px; line-height: 1.8; color: #d1d5db; }
.article-body p { margin-bottom: 24px; }
.article-body h2 { font-family: var(--font-heading); color: #fff; margin-top: 40px; font-size: 32px; }

/* Progress Bar */
.read-progress-bar {
  position: fixed; top: 0; left: 0; height: 4px;
  background: var(--color-accent); z-index: 9999;
  width: 0%; transition: width 0.1s;
}

/* =========================================
   7. UTILITIES
   ========================================= */
.text-center { text-align: center; }
.mb-2 { margin-bottom: 16px; }
.mb-4 { margin-bottom: 32px; }
.full-width { width: 100%; }

/* Mobile Utilities */
.mobile-only { display: none; }
@media (max-width: 900px) {
  .mobile-only { display: flex; }
  .desktop-only { display: none; }
}

 
    /* Локальные стили только для лейаута фильтров */
    .filter-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 16px; align-items: end; }
    .field-label { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: 1px; color: var(--text-muted); margin-bottom: 8px; font-weight: 700; }
    
    .select-dark { 
        width: 100%; height: 44px; 
        background: rgba(0,0,0,0.3); border: 1px solid var(--border-glass); 
        border-radius: var(--radius-pill); color: #fff; padding: 0 16px; 
        outline: none; cursor: pointer; appearance: none;
    }
    .select-dark:focus { border-color: var(--color-accent); }

    .range-group { display: flex; gap: 8px; }
    .range-group input { text-align: center; }
    
    .mood-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
    .mood-tag { 
        background: rgba(255,255,255,0.05); border: 1px solid var(--border-glass); 
        color: var(--text-muted); padding: 6px 14px; border-radius: 99px; 
        font-size: 12px; cursor: pointer; transition: 0.2s; 
    }
    .mood-tag:hover { border-color: var(--color-accent); color: #fff; }
    .mood-tag.active { background: var(--color-accent); color: #000; border-color: var(--color-accent); font-weight: 700; }
    
    .toggle-filters-btn { width: 100%; margin-bottom: 16px; display: none; }
    @media (max-width: 768px) { 
        .toggle-filters-btn { display: flex; } 
        .filter-bar-wrap { display: none; } 
        .filter-bar-wrap.show { display: block; animation: fadeIn 0.3s ease; } 
    }
    @keyframes fadeIn { from { opacity:0; transform:translateY(-10px); } to { opacity:1; transform:translateY(0); } }

    .pagination { display: flex; justify-content: center; gap: 8px; margin: 40px 0 60px; }
    .page-link { 
        width: 40px; height: 40px; display: grid; place-items: center; 
        border-radius: 50%; background: transparent; border: 1px solid var(--border-glass); 
        color: var(--text-muted); cursor: pointer; transition: 0.2s; 
    }
    .page-link:hover { border-color: var(--color-accent); color: var(--color-accent); }
    .page-link.active { background: var(--color-accent); color: #000; border-color: var(--color-accent); font-weight: 700; }
    
    .toolbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; color: var(--text-muted); font-size: 14px; }
    .sort-select { background: transparent; border: none; color: var(--color-accent); font-weight: 700; cursor: pointer; outline:none; }

/* Основной контейнер футера */
.site-footer {
  background-color: #0b0b0b; /* Твой темный фон (подобрать под дизайн) */
  color: #888; /* Серый текст, чтобы не отвлекал */
  padding: 60px 20px 20px;
  border-top: 1px solid #222; /* Тонкая линия сверху */
  font-family: 'Inter', sans-serif; /* Твой шрифт */
  font-size: 14px;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 40px;
  margin-bottom: 40px;
}

.footer-column {
  flex: 1;
  min-width: 200px;
}

/* Стили заголовков */
.footer-logo {
  color: #fff;
  font-weight: 700;
  font-size: 20px;
  margin-bottom: 15px;
  letter-spacing: -0.5px;
}

h4 {
  color: #fff;
  font-size: 14px;
  text-transform: uppercase;
  margin-bottom: 20px;
  opacity: 0.7;
}

/* Ссылки */
.footer-column ul {
  list-style: none;
  padding: 0;
}

.footer-column ul li {
  margin-bottom: 10px;
}

.footer-column a {
  color: #888;
  text-decoration: none;
  transition: color 0.2s;
}

.footer-column a:hover {
  color: #fff; /* При наведении белый */
}

/* Социальные ссылки дизайнера */
.footer-socials {
  margin-top: 20px;
  display: flex;
  gap: 15px;
}

.footer-socials a {
  color: #fff;
  border-bottom: 1px solid rgba(255,255,255,0.3);
}

/* Юридический текст (мелкий) */
.legal-text {
  font-size: 12px;
  line-height: 1.6;
  margin-bottom: 15px;
  opacity: 0.6;
}

/* Самый низ */
.footer-bottom {
  border-top: 1px solid #1a1a1a;
  padding-top: 20px;
  text-align: center;
  font-size: 12px;
  opacity: 0.4;
}

/* Адаптив для мобилок */
@media (max-width: 768px) {
  .footer-content {
    flex-direction: column;
    gap: 30px;
  }
}