/* ===== СБРОС И БАЗОВЫЕ ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg-primary: #0f0e17;
  --bg-secondary: #1a1932;
  --bg-card: #232147;
  --text-primary: #fffffe;
  --text-secondary: #a7a9be;
  --accent-cats: #ff8906;
  --accent-books: #e53170;
  --accent-purple: #7f5af0;
  --accent-green: #2cb67d;
  --gradient-cats: linear-gradient(135deg, #ff8906, #ff6b35);
  --gradient-books: linear-gradient(135deg, #e53170, #c2185b);
  --gradient-hero: linear-gradient(135deg, #0f0e17 0%, #1a1932 50%, #2d1b69 100%);
  --shadow-glow: 0 0 30px rgba(127, 90, 240, 0.15);
  --radius: 16px;
  --radius-sm: 10px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Nunito', system-ui, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  overflow-x: hidden;
  line-height: 1.6;
}

/* ===== ПЛАВАЮЩИЕ ЭМОДЗИ ===== */
.floating-emojis {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.floating-emoji {
  position: absolute;
  font-size: 1.5rem;
  opacity: 0.12;
  animation: floatUp linear infinite;
}

@keyframes floatUp {
  0%   { transform: translateY(110vh) rotate(0deg); opacity: 0; }
  10%  { opacity: 0.12; }
  90%  { opacity: 0.12; }
  100% { transform: translateY(-10vh) rotate(360deg); opacity: 0; }
}

/* ===== НАВБАР ===== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 2rem;
  background: rgba(15, 14, 23, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(127, 90, 240, 0.15);
  transition: var(--transition);
}

.nav-logo {
  font-size: 1.2rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--accent-cats), var(--accent-purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav-links {
  display: flex;
  gap: 1.5rem;
}

.nav-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  transition: var(--transition);
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent-purple);
  transition: var(--transition);
  border-radius: 2px;
}

.nav-links a:hover {
  color: var(--text-primary);
}

.nav-links a:hover::after {
  width: 100%;
}

/* ===== ГЕРОЙ ===== */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--gradient-hero);
  position: relative;
  overflow: hidden;
  padding: 2rem;
}

.hero::before {
  content: '';
  position: absolute;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(127, 90, 240, 0.15) 0%, transparent 70%);
  top: -200px;
  right: -200px;
  border-radius: 50%;
  animation: pulse 6s ease-in-out infinite;
}

.hero::after {
  content: '';
  position: absolute;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(255, 137, 6, 0.1) 0%, transparent 70%);
  bottom: -100px;
  left: -100px;
  border-radius: 50%;
  animation: pulse 8s ease-in-out infinite reverse;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 0.5; }
  50% { transform: scale(1.2); opacity: 1; }
}

.hero-content {
  text-align: center;
  z-index: 1;
  animation: fadeInUp 1s ease-out;
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(40px); }
  to   { opacity: 1; transform: translateY(0); }
}

.hero-emoji {
  font-size: 5rem;
  margin-bottom: 1.5rem;
  animation: bounce 2s ease-in-out infinite;
  cursor: pointer;
  user-select: none;
  filter: drop-shadow(0 0 20px rgba(255, 137, 6, 0.4));
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-15px); }
}

.hero-title {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 1rem;
}

.accent-cats {
  background: var(--gradient-cats);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.accent-books {
  background: var(--gradient-books);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: clamp(1rem, 2.5vw, 1.3rem);
  color: var(--text-secondary);
  margin-bottom: 2rem;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

.hero-btn {
  display: inline-block;
  padding: 0.9rem 2.5rem;
  background: var(--gradient-books);
  color: white;
  text-decoration: none;
  border-radius: 50px;
  font-weight: 700;
  font-size: 1.05rem;
  transition: var(--transition);
  box-shadow: 0 4px 20px rgba(229, 49, 112, 0.3);
}

.hero-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(229, 49, 112, 0.5);
}

/* Scroll indicator */
.scroll-indicator {
  position: absolute;
  bottom: 2rem;
  animation: fadeInUp 1s ease-out 0.5s both;
}

.mouse {
  width: 26px;
  height: 40px;
  border: 2px solid var(--text-secondary);
  border-radius: 14px;
  display: flex;
  justify-content: center;
  padding-top: 6px;
}

.mouse-wheel {
  width: 4px;
  height: 8px;
  background: var(--accent-purple);
  border-radius: 2px;
  animation: scroll 1.5s ease-in-out infinite;
}

@keyframes scroll {
  0%   { opacity: 1; transform: translateY(0); }
  100% { opacity: 0; transform: translateY(12px); }
}

/* ===== ОБЩЕЕ ДЛЯ СЕКЦИЙ ===== */
.section {
  padding: 5rem 1.5rem;
  position: relative;
  z-index: 1;
}

.section-container {
  max-width: 1100px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.section-title {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  font-weight: 800;
  text-align: center;
  margin-bottom: 0.75rem;
}

.cats-section .section-title {
  color: #fff;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.cats-section .section-desc {
  color: rgba(255, 255, 255, 0.9);
}

.section-icon {
  display: inline-block;
  animation: bounce 2s ease-in-out infinite;
}

.section-desc {
  text-align: center;
  color: var(--text-secondary);
  font-size: 1.1rem;
  max-width: 600px;
  margin: 0 auto 3rem;
}

/* ===== КАРТОЧКИ (КОТЫ) ===== */
.cats-section {
  background: linear-gradient(180deg, #ff8906 0%, #ff6b35 50%, #ff8906 100%);
  position: relative;
  overflow: hidden;
}

.cats-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 80%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(59, 130, 246, 0.5), transparent);
}

/* Синие лапки на фоне */
.cats-section::after {
  content: '🐾  🐾  🐾  🐾  🐾  🐾  🐾  🐾  🐾  🐾  🐾  🐾  🐾  🐾  🐾  🐾  🐾  🐾  🐾  🐾';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  font-size: 2.5rem;
  color: rgba(59, 130, 246, 0.12);
  word-spacing: 2rem;
  line-height: 5rem;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
  word-break: break-all;
  padding: 1rem;
  letter-spacing: 1rem;
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.card {
  background: rgba(255, 255, 255, 0.95);
  border-radius: var(--radius);
  padding: 2rem;
  transition: var(--transition);
  border: 2px solid #3b82f6;
  position: relative;
  overflow: hidden;
  color: #1a1a2e;
}

.card::before {
  content: '🐾';
  position: absolute;
  bottom: 8px;
  right: 10px;
  font-size: 2rem;
  color: #3b82f6;
  opacity: 0.3;
  transition: var(--transition);
}

.card::after {
  content: '🐾';
  position: absolute;
  top: 10px;
  left: 8px;
  font-size: 1.5rem;
  color: #3b82f6;
  opacity: 0.2;
  transition: var(--transition);
  transform: rotate(-20deg);
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 30px rgba(59, 130, 246, 0.3);
  border-color: #2563eb;
}

.card:hover::before {
  opacity: 0.6;
  transform: scale(1.2);
}

.card:hover::after {
  opacity: 0.4;
  transform: rotate(10deg) scale(1.1);
}

.card-emoji {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  transition: var(--transition);
}

.card:hover .card-emoji {
  transform: scale(1.2) rotate(-5deg);
}

.card h3 {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: #1e40af;
}

.card p {
  color: #374151;
  font-size: 0.95rem;
  line-height: 1.5;
}

/* ===== ИНТЕРАКТИВНЫЙ КОТ ===== */
.cat-pet {
  margin-top: 3rem;
  text-align: center;
  user-select: none;
}

.cat-pet .cat-status {
  color: #fff;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

.cat-face {
  display: inline-block;
  position: relative;
  cursor: pointer;
  transition: var(--transition);
}

.cat-face:hover {
  transform: scale(1.05);
}

.cat-head {
  width: 120px;
  height: 100px;
  background: #1a1a2e;
  border-radius: 50% 50% 45% 45%;
  position: relative;
  margin: 30px auto 0;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.cat-ears {
  display: flex;
  justify-content: space-between;
  width: 130px;
  margin: 0 auto;
  position: relative;
  top: 15px;
}

.cat-ear {
  width: 0;
  height: 0;
  border-left: 18px solid transparent;
  border-right: 18px solid transparent;
  border-bottom: 35px solid #1a1a2e;
  position: relative;
}

.cat-ear.left { transform: rotate(-10deg); }
.cat-ear.right { transform: rotate(10deg); }

.cat-ear::after {
  content: '';
  position: absolute;
  top: 8px;
  left: -10px;
  width: 0;
  height: 0;
  border-left: 10px solid transparent;
  border-right: 10px solid transparent;
  border-bottom: 20px solid #3d3d5c;
}

.cat-eyes {
  display: flex;
  justify-content: space-around;
  padding-top: 25px;
  position: relative;
}

.cat-eye {
  width: 22px;
  height: 22px;
  background: #fbbf24;
  border-radius: 50%;
  position: relative;
  overflow: hidden;
  box-shadow: 0 0 10px rgba(251, 191, 36, 0.5);
}

.cat-pupil {
  width: 10px;
  height: 18px;
  background: #111;
  border-radius: 50%;
  position: absolute;
  top: 2px;
  left: 50%;
  transform: translateX(-50%);
  transition: 0.1s ease;
}

.cat-nose {
  width: 10px;
  height: 7px;
  background: #f472b6;
  border-radius: 50% 50% 50% 50% / 30% 30% 70% 70%;
  margin: 5px auto 0;
}

.cat-mouth {
  width: 30px;
  height: 10px;
  margin: 2px auto 0;
  position: relative;
}

.cat-mouth::before, .cat-mouth::after {
  content: '';
  position: absolute;
  top: 0;
  width: 16px;
  height: 10px;
  border-bottom: 2px solid #9ca3af;
  border-radius: 0 0 50% 50%;
}

.cat-mouth::before { left: 0; }
.cat-mouth::after  { right: 0; }

.cat-whiskers {
  position: absolute;
  top: 55px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.cat-whiskers.left  { left: -35px; transform: rotate(-5deg); }
.cat-whiskers.right { right: -35px; transform: rotate(5deg); }

.whisker {
  width: 30px;
  height: 2px;
  background: #9ca3af;
  border-radius: 1px;
}

.cat-status {
  margin-top: 1rem;
  font-size: 1rem;
  color: var(--text-secondary);
  font-weight: 600;
  min-height: 1.5em;
}

/* ===== КНИГИ ===== */
.books-section {
  background: var(--bg-secondary);
  position: relative;
}

.books-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 80%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(229, 49, 112, 0.3), transparent);
}

.books-carousel {
  display: flex;
  gap: 2rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 1rem 0 2rem;
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.books-carousel::-webkit-scrollbar { display: none; }

.book-card {
  flex: 0 0 250px;
  scroll-snap-align: center;
  text-align: center;
  transition: var(--transition);
}

.book-card:hover {
  transform: translateY(-8px);
}

.book-spine {
  width: 30px;
  height: 200px;
  background: var(--spine-color);
  border-radius: 4px 0 0 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  box-shadow: -3px 0 10px rgba(0,0,0,0.3);
}

.book-title-side {
  writing-mode: vertical-rl;
  text-orientation: mixed;
  color: rgba(255,255,255,0.9);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 1px;
}

.book-cover {
  width: 180px;
  height: 220px;
  margin: -200px auto 0;
  position: relative;
  z-index: 1;
}

.book-cover-art {
  width: 100%;
  height: 100%;
  background: var(--cover-gradient);
  border-radius: 4px 12px 12px 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  box-shadow: 5px 5px 20px rgba(0,0,0,0.4);
  transition: var(--transition);
  border: 1px solid rgba(255,255,255,0.1);
}

.book-card:hover .book-cover-art {
  box-shadow: 8px 8px 30px rgba(0,0,0,0.6), 0 0 20px rgba(229, 49, 112, 0.2);
}

.book-cover-emoji {
  font-size: 3rem;
  margin-bottom: 0.5rem;
}

.book-cover-text {
  font-size: 1rem;
  font-weight: 800;
  color: white;
  text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.book-cover-author {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.7);
  margin-top: 0.3rem;
}

.book-desc {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-top: 1.5rem;
  padding: 0 0.5rem;
}

.carousel-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-top: 1rem;
}

.carousel-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid var(--accent-purple);
  background: transparent;
  color: var(--accent-purple);
  font-size: 1rem;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
}

.carousel-btn:hover {
  background: var(--accent-purple);
  color: white;
}

.carousel-dots {
  display: flex;
  gap: 6px;
}

.carousel-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(127, 90, 240, 0.3);
  transition: var(--transition);
  cursor: pointer;
}

.carousel-dot.active {
  background: var(--accent-purple);
  width: 24px;
  border-radius: 4px;
}

/* ===== ОБО МНЕ ===== */
.about-section {
  background: var(--bg-primary);
}

.about-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 80%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(127, 90, 240, 0.3), transparent);
}

.about-content {
  display: flex;
  gap: 3rem;
  align-items: flex-start;
  flex-wrap: wrap;
  justify-content: center;
}

.about-avatar {
  text-align: center;
}

.avatar-circle {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-purple), var(--accent-books));
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
  box-shadow: 0 0 30px rgba(127, 90, 240, 0.3);
  animation: glow 3s ease-in-out infinite;
}

@keyframes glow {
  0%, 100% { box-shadow: 0 0 30px rgba(127, 90, 240, 0.3); }
  50%      { box-shadow: 0 0 50px rgba(127, 90, 240, 0.5); }
}

.avatar-emoji {
  font-size: 4rem;
}

.about-stats {
  display: flex;
  gap: 2rem;
  justify-content: center;
}

.stat {
  text-align: center;
}

.stat-number {
  display: block;
  font-size: 2rem;
  font-weight: 800;
  color: var(--accent-purple);
}

.stat-label {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.about-text {
  flex: 1;
  min-width: 280px;
}

.about-text p {
  font-size: 1.1rem;
  margin-bottom: 1rem;
  color: var(--text-secondary);
}

.about-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.about-list li {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.05rem;
  padding: 0.6rem 1rem;
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.about-list li:hover {
  transform: translateX(8px);
  background: rgba(127, 90, 240, 0.15);
}

.list-icon {
  font-size: 1.3rem;
}

/* ===== ФАКТЫ ===== */
.facts-section {
  margin-top: 4rem;
  text-align: center;
}

.facts-title {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
}

.facts-container {
  position: relative;
  min-height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.fact {
  position: absolute;
  width: 100%;
  padding: 1.5rem 2rem;
  background: var(--bg-card);
  border-radius: var(--radius);
  border-left: 4px solid var(--accent-green);
  font-size: 1.1rem;
  color: var(--text-primary);
  opacity: 0;
  transform: translateX(30px);
  transition: all 0.4s ease;
  pointer-events: none;
}

.fact.active {
  opacity: 1;
  transform: translateX(0);
  position: relative;
}

.facts-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-top: 1rem;
}

.fact-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid var(--accent-green);
  background: transparent;
  color: var(--accent-green);
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
}

.fact-btn:hover {
  background: var(--accent-green);
  color: var(--bg-primary);
}

.fact-counter {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

/* ===== ФУТЕР ===== */
.footer {
  padding: 2rem;
  text-align: center;
  border-top: 1px solid rgba(127, 90, 240, 0.1);
}

.footer-text {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: 0.5rem;
}

.footer-cats {
  font-size: 1.5rem;
  display: flex;
  gap: 0.5rem;
  justify-content: center;
}

.footer-cats span {
  animation: bounce 2s ease-in-out infinite;
  display: inline-block;
}

.footer-cats span:nth-child(2) { animation-delay: 0.15s; }
.footer-cats span:nth-child(3) { animation-delay: 0.3s; }
.footer-cats span:nth-child(4) { animation-delay: 0.45s; }
.footer-cats span:nth-child(5) { animation-delay: 0.6s; }

/* ===== АДАПТИВНОСТЬ ===== */
@media (max-width: 768px) {
  .nav-links { display: none; }

  .cards-grid {
    grid-template-columns: 1fr;
  }

  .about-content {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .about-list li:hover {
    transform: none;
  }

  .hero-title {
    font-size: 1.8rem;
  }

  .hero-emoji {
    font-size: 3.5rem;
  }

  .book-card {
    flex: 0 0 220px;
  }

  .fact {
    font-size: 1rem;
    padding: 1rem 1.5rem;
  }
}

@media (min-width: 769px) and (max-width: 1024px) {
  .cards-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ===== АНИМАЦИЯ ПОЯВЛЕНИЯ ПРИ СКРОЛЛЕ ===== */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}
