﻿@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@500;600;700&family=Space+Grotesk:wght@400;500;600&display=swap');

:root {
  --bg: #0a0412;
  --bg-2: #12061f;
  --surface: #140820;
  --surface-2: #1a0d2a;
  --text: #f4ecff;
  --muted: #b8a5d6;
  --accent: #b45bff;
  --accent-strong: #9b2bff;
  --accent-2: #ff58d4;
  --accent-3: #5de2ff;
  --border: #2a153f;
  --shadow: 0 22px 60px rgba(0, 0, 0, 0.5);
  --glow: 0 0 30px rgba(180, 91, 255, 0.4);
  --radius: 16px;
  --max-width: 1080px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Space Grotesk', 'Segoe UI', sans-serif;
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
  line-height: 1.7;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at 12% 12%, rgba(180, 91, 255, 0.18), transparent 42%),
    radial-gradient(circle at 82% 18%, rgba(255, 88, 212, 0.14), transparent 40%),
    radial-gradient(circle at 70% 85%, rgba(93, 226, 255, 0.14), transparent 45%),
    linear-gradient(180deg, #090313 0%, #0d0517 45%, #12081f 100%);
  z-index: -2;
}

body::after {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(90deg, rgba(180, 91, 255, 0.08) 1px, transparent 1px),
    linear-gradient(0deg, rgba(180, 91, 255, 0.08) 1px, transparent 1px);
  background-size: 92px 92px;
  opacity: 0.25;
  pointer-events: none;
  z-index: -1;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

a:hover {
  color: var(--accent);
}

.page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 20px 20px 32px;
}

main.container {                                                                                                                                   
  padding-top: 110px;                                                                                                                               
} 

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
  backdrop-filter: blur(18px);
  background: rgba(10, 4, 18, 0.78);
  border-bottom: 1px solid rgba(180, 91, 255, 0.28);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 16px;
  padding-bottom: 16px;
}

.logo {
  font-family: 'Orbitron', sans-serif;
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  text-shadow: 0 0 20px rgba(180, 91, 255, 0.7);
}

/* Мобильные устройства - уменьшаем header в 2 раза */
@media (max-width: 767px) {
  .header-inner {
    padding-top: 8px;
    padding-bottom: 8px;
  }

  .logo {
    font-size: 0.9rem;
    letter-spacing: 0.15em;
  }

  .nav {
    flex-direction: column;
    gap: 4px;
  }

  .nav-link,
  .btn-ghost {
    padding: 4px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    font-size: 0;
  }

  .nav-icon {
    font-size: 1rem;
  }

  .nav-text {
    display: none !important;
  }
}

.nav {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.nav-icon {
  font-size: 1.1rem;
}

.nav-link {
  font-weight: 500;
  color: var(--muted);
}

.hero {
  margin-top: 24px;
  background: linear-gradient(145deg, rgba(20, 8, 32, 0.92), rgba(15, 7, 28, 0.85));
  border: 1px solid rgba(180, 91, 255, 0.3);
  border-radius: calc(var(--radius) + 6px);
  padding: 28px 24px;
  box-shadow: var(--shadow);
  animation: fade-up 0.7s ease both;
}

.hero-label {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.28em;
  color: var(--accent-2);
  font-weight: 600;
  margin-bottom: 8px;
}

.hero h1 {
  font-family: 'Orbitron', sans-serif;
  font-size: 2rem;
  line-height: 1.2;
  margin: 0 0 12px;
}

.hero p {
  margin: 0;
  color: var(--muted);
  max-width: 680px;
}

.filters {
  margin-top: 24px;
  padding: 16px;
  background: rgba(20, 8, 32, 0.8);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.28);
  animation: fade-up 0.7s ease both;
}

.filters-form {
  display: grid;
  gap: 16px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.9rem;
  color: var(--muted);
}

.field input,
.field select {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(180, 91, 255, 0.25);
  font-size: 1rem;
  font-family: inherit;
  background: var(--surface-2);
  color: var(--text);
}

.field input:focus,
.field select:focus {
  outline: 2px solid rgba(180, 91, 255, 0.45);
  border-color: rgba(180, 91, 255, 0.7);
  box-shadow: 0 0 18px rgba(180, 91, 255, 0.35);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 18px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: linear-gradient(120deg, rgba(180, 91, 255, 0.95), rgba(255, 88, 212, 0.95));
  color: #0a0412;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
  box-shadow: var(--glow);
}

.btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.05);
  box-shadow: 0 0 28px rgba(180, 91, 255, 0.7);
}

.btn-ghost {
  background: transparent;
  border-color: rgba(180, 91, 255, 0.55);
  color: var(--accent);
  box-shadow: none;
}

.btn-ghost:hover {
  background: rgba(180, 91, 255, 0.1);
  box-shadow: 0 0 22px rgba(180, 91, 255, 0.25);
}

.feed {
  margin-top: 28px;
  display: grid;
  gap: 20px;
}

.card {
  background: linear-gradient(160deg, rgba(20, 8, 32, 0.95), rgba(14, 6, 26, 0.96));
  border: 1px solid rgba(180, 91, 255, 0.22);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.4);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  animation: fade-up 0.6s ease both;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.5), 0 0 30px rgba(180, 91, 255, 0.25);
}

.feed .card:nth-child(1) { animation-delay: 0.05s; }
.feed .card:nth-child(2) { animation-delay: 0.1s; }
.feed .card:nth-child(3) { animation-delay: 0.15s; }
.feed .card:nth-child(4) { animation-delay: 0.2s; }
.feed .card:nth-child(5) { animation-delay: 0.25s; }
.feed .card:nth-child(6) { animation-delay: 0.3s; }

.card-media img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  filter: saturate(1.1) contrast(1.08);
}

.card-body {
  padding: 20px 20px 22px;
}

.card-title {
  margin: 6px 0 10px;
  font-family: 'Orbitron', sans-serif;
  font-size: 1.35rem;
  line-height: 1.3;
}

.card-excerpt {
  margin: 0 0 14px;
  color: var(--muted);
}

.meta {
  font-size: 0.85rem;
  color: var(--muted);
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: 999px;
  border: 1px solid rgba(180, 91, 255, 0.45);
  background: rgba(180, 91, 255, 0.12);
  font-size: 0.85rem;
  color: var(--accent);
  box-shadow: 0 0 12px rgba(180, 91, 255, 0.2);
}

.chip:hover {
  background: rgba(180, 91, 255, 0.2);
  box-shadow: 0 0 18px rgba(180, 91, 255, 0.35);
}

.pagination {
  margin: 32px 0 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
}

.page-numbers {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
}

.page-number,
.page-link {
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid rgba(180, 91, 255, 0.3);
  background: rgba(18, 8, 31, 0.9);
  color: var(--muted);
  font-weight: 500;
}

.page-number.is-active {
  background: rgba(180, 91, 255, 0.18);
  color: var(--accent);
  border-color: rgba(180, 91, 255, 0.65);
  box-shadow: 0 0 16px rgba(180, 91, 255, 0.3);
}

.post {
  margin-top: 24px;
  max-width: 820px;
  animation: fade-up 0.7s ease both;
}

.post-header h1 {
  font-family: 'Orbitron', sans-serif;
  font-size: 2.2rem;
  line-height: 1.2;
  margin: 10px 0 14px;
}

.post-content {
  margin-top: 24px;
  font-size: 1.05rem;
  color: #e5d8ff;
}

.post-content p {
  margin-bottom: 18px;
}

.post-content a.post-link {
  color: var(--accent-3);
  border-bottom: 1px solid rgba(93, 226, 255, 0.5);
  text-decoration: none;
  transition: color 0.2s ease, box-shadow 0.2s ease;
}

.post-content a.post-link:hover {
  color: var(--accent-2);
  box-shadow: 0 0 14px rgba(255, 88, 212, 0.35);
}

.inline-tag {
  display: inline-block;
  margin: 0 6px 2px 0;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid rgba(180, 91, 255, 0.45);
  background: rgba(180, 91, 255, 0.15);
  color: var(--accent);
  font-size: 0.8rem;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.post-cover img {
  border-radius: var(--radius);
  border: 1px solid rgba(180, 91, 255, 0.3);
  margin-top: 20px;
  box-shadow: var(--shadow);
}

.cta {
  margin-top: 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.similar {
  margin-top: 48px;
}

.similar h2 {
  font-family: 'Orbitron', sans-serif;
  font-size: 1.6rem;
  margin-bottom: 16px;
}

.similar-grid {
  display: grid;
  gap: 16px;
}

.card-compact .card-title {
  font-size: 1.05rem;
  margin-bottom: 6px;
}

.tag-hero {
  margin-top: 24px;
  padding: 20px;
  border-radius: var(--radius);
  border: 1px solid rgba(255, 88, 212, 0.3);
  background: rgba(20, 8, 32, 0.8);
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.4);
  animation: fade-up 0.7s ease both;
}

.tag-title {
  font-family: 'Orbitron', sans-serif;
  font-size: 1.7rem;
  margin-bottom: 8px;
}

.about {
  margin-top: 24px;
  max-width: 720px;
  animation: fade-up 0.7s ease both;
}

.about h1 {
  font-family: 'Orbitron', sans-serif;
  font-size: 2rem;
  margin-bottom: 12px;
}

.not-found {
  margin-top: 48px;
  display: flex;
  justify-content: center;
}

.not-found-card {
  padding: 32px;
  border-radius: var(--radius);
  border: 1px solid rgba(180, 91, 255, 0.35);
  background: rgba(20, 8, 32, 0.85);
  text-align: center;
  max-width: 520px;
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.45);
}

.not-found-code {
  font-size: 3rem;
  font-family: 'Orbitron', sans-serif;
  color: var(--accent);
  text-shadow: 0 0 22px rgba(180, 91, 255, 0.6);
}

.empty {
  padding: 28px;
  border-radius: var(--radius);
  border: 1px dashed rgba(180, 91, 255, 0.3);
  color: var(--muted);
  background: rgba(20, 8, 32, 0.75);
}

.site-footer {
  margin-top: auto;
  border-top: 1px solid rgba(180, 91, 255, 0.25);
  background: rgba(10, 4, 18, 0.92);
}

.footer-inner {
  display: grid;
  gap: 16px;
  padding-top: 24px;
  padding-bottom: 24px;
}

.footer-title {
  font-family: 'Orbitron', sans-serif;
  font-weight: 600;
}

.footer-text {
  color: var(--muted);
}

.footer-links {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.footer-link {
  color: var(--muted);
  font-weight: 500;
}

.footer-meta {
  color: var(--muted);
  font-size: 0.85rem;
}

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (min-width: 768px) {
  .container {
    padding: 24px 32px 40px;
  }

  .filters-form {
    grid-template-columns: 1.6fr 1fr auto;
    align-items: end;
  }

  .hero {
    padding: 36px 40px;
  }

  .hero h1 {
    font-size: 2.5rem;
  }

  .similar-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .feed {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .card-media img {
    height: 220px;
  }
}

/* Кастомный скроллбар */
::-webkit-scrollbar {
  width: 12px;
}

::-webkit-scrollbar-track {
  background: var(--bg-2);
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--accent), var(--accent-2));
  border-radius: 6px;
  border: 2px solid var(--bg-2);
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, var(--accent-strong), var(--accent));
}

/* Firefox */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--accent) var(--bg-2);
}
