/* ==============================================
   NARUTO WORLD - Основной стиль (style.css)
   Улучшенная версия: максимум анимаций, чакра-эффекты, плавность
   ============================================== */

/* ---------- Сброс и база ---------- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background: #0a0705;
  background-image:
    radial-gradient(circle at 20% 30%, rgba(255, 140, 0, 0.18) 0%, transparent 45%),
    radial-gradient(circle at 80% 70%, rgba(220, 30, 40, 0.15) 0%, transparent 45%),
    radial-gradient(circle at 50% 50%, rgba(100, 200, 255, 0.04) 0%, transparent 70%),
    repeating-linear-gradient(45deg, rgba(255, 215, 150, 0.03) 0px, rgba(255, 215, 150, 0.03) 2px, transparent 2px, transparent 14px);
  font-family: 'Segoe UI', 'Arial', sans-serif;
  color: #e6d7bd;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow-x: hidden;
}

/* Анимированные частицы чакры (псевдоэлементы body) */
body::before,
body::after {
  content: "";
  position: fixed;
  width: 6px;
  height: 6px;
  background: rgba(255, 180, 50, 0.7);
  border-radius: 50%;
  filter: blur(1px);
  animation: floatChakra 12s infinite ease-in-out;
  z-index: 0;
  pointer-events: none;
}
body::before { top: 15%; left: 10%; animation-delay: 0s; }
body::after  { top: 75%; left: 85%; animation-delay: -6s; background: rgba(100, 200, 255, 0.6); }

@keyframes floatChakra {
  0%, 100% { transform: translate(0, 0) scale(1); opacity: 0.4; }
  25% { transform: translate(30px, -40px) scale(1.8); opacity: 0.9; }
  50% { transform: translate(-20px, -70px) scale(0.8); opacity: 0.5; }
  75% { transform: translate(-40px, -20px) scale(1.5); opacity: 0.8; }
}

/* Главный контейнер */
.forum-container {
  width: 100%;
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 1;
}

/* ---------- Шапка и логотип ---------- */
.forum-header {
  width: 100%;
  background: linear-gradient(180deg, #2b180a 0%, #4d2b14 100%);
  border-bottom: 3px solid #ff7b00;
  box-shadow: 0 6px 30px rgba(255, 123, 0, 0.7), 0 0 60px rgba(255, 80, 0, 0.2) inset;
  position: sticky;
  top: 0;
  z-index: 1000;
  backdrop-filter: blur(12px);
  transition: all 0.3s ease;
}

/* Эффект свитка при скролле */
.forum-header.scrolled {
  background: linear-gradient(180deg, #1f1005 0%, #3a1f0d 100%);
  border-bottom-width: 4px;
  box-shadow: 0 8px 35px rgba(255, 100, 0, 0.9);
}

.header-inner {
  max-width: 1140px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  flex-wrap: wrap;
  gap: 15px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  transition: transform 0.3s;
}
.logo:hover { transform: scale(1.02); }

.logo-icon {
  width: 56px;
  height: 56px;
  background: radial-gradient(circle at 30% 30%, #ffb347, #c44d00);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  color: #fff;
  box-shadow: 0 0 25px #ff7b00, 0 0 50px rgba(255, 120, 0, 0.6);
  position: relative;
  animation: chakraPulse 2.2s infinite alternate;
}

@keyframes chakraPulse {
  from { box-shadow: 0 0 18px #ff7b00, 0 0 35px rgba(255, 100, 0, 0.5); }
  to { box-shadow: 0 0 35px #ffaa33, 0 0 70px rgba(255, 80, 0, 0.8); }
}

.logo-icon::before {
  content: "&#127845;";
  filter: drop-shadow(0 0 6px #fff);
}

.logo-text {
  font-size: 30px;
  font-weight: 900;
  font-family: 'Arial Black', sans-serif;
  letter-spacing: 3px;
  text-transform: uppercase;
  background: linear-gradient(180deg, #ffe6b3, #ff8c1a);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 2px 8px #000000b0);
}

/* ---------- ВЫПАДАЮЩЕЕ МЕНЮ (улучшенное) ---------- */
.main-nav ul {
  display: flex;
  list-style: none;
  gap: 0;
  padding: 0;
  margin: 0;
}

.main-nav li {
  position: relative;
}

/* Разделители с анимацией */
.main-nav li:not(:last-child)::after {
  content: "";
  position: absolute;
  right: 0;
  top: 20%;
  height: 60%;
  width: 2px;
  background: linear-gradient(to bottom, transparent, #ff7b00, transparent);
  transition: all 0.3s;
  opacity: 0.6;
}
.main-nav li:hover::after {
  opacity: 1;
  box-shadow: 0 0 8px #ffaa33;
}

.main-nav a {
  display: block;
  padding: 12px 20px;
  color: #ecdcc0;
  text-decoration: none;
  font-weight: 700;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  transition: all 0.3s cubic-bezier(0.2, 0.9, 0.4, 1);
  white-space: nowrap;
  position: relative;
  border-radius: 4px;
}

/* Стрелка для dropdown */
.main-nav li.dropdown > a::after {
  content: " &#9660;";
  font-size: 10px;
  margin-left: 4px;
  transition: transform 0.3s;
}
.main-nav li.dropdown:hover > a::after {
  transform: rotate(180deg);
}

.main-nav a:hover,
.main-nav a.active {
  color: #fff;
  background: rgba(255, 123, 0, 0.3);
  box-shadow: 0 0 22px rgba(255, 123, 0, 0.7);
  text-shadow: 0 0 10px #ffaa33;
}

/* Подменю с задержкой и улучшенным появлением */
.main-nav .submenu {
  display: block;
  position: absolute;
  top: calc(100% + 5px);
  left: 0;
  background: linear-gradient(160deg, #2b1a0c, #120904);
  border: 1px solid #ff7b00;
  border-radius: 0 0 12px 12px;
  box-shadow: 0 12px 35px rgba(0,0,0,0.95), 0 0 20px rgba(255,123,0,0.6);
  min-width: 190px;
  padding: 8px 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-12px) scale(0.96);
  transition: all 0.3s cubic-bezier(0.2, 0.9, 0.4, 1);
  z-index: 999;
  list-style: none;
  pointer-events: none;
}

/* Показываем подменю */
.main-nav li.dropdown:hover .submenu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

/* Задержка закрытия для удобства */
.main-nav li.dropdown:not(:hover) .submenu {
  transition-delay: 0.15s;
}

/* Пункты подменю */
.main-nav .submenu li {
  display: block;
  border-bottom: 1px solid rgba(255,123,0,0.15);
}
.main-nav .submenu li:last-child { border-bottom: none; }

.main-nav .submenu a {
  padding: 11px 22px;
  color: #ecdcc0;
  font-size: 13px;
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0.5px;
  background: transparent;
  border-radius: 0;
}

.main-nav .submenu a:hover {
  background: rgba(255, 123, 0, 0.35);
  color: #fff;
  box-shadow: none;
  text-shadow: 0 0 6px #ffaa33;
}

/* ---------- Категории и разделы ---------- */
.category {
  margin: 35px 0;
}

.category-header {
  background: rgba(20, 12, 5, 0.85);
  border-left: 7px solid #ff7b00;
  padding: 16px 24px;
  border-radius: 0 12px 12px 0;
  font-size: 22px;
  font-weight: bold;
  color: #ffaa33;
  letter-spacing: 1.5px;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 15px rgba(0,0,0,0.8), inset 0 0 10px rgba(255,120,0,0.1);
  transition: border-color 0.3s, box-shadow 0.3s;
}
.category-header:hover {
  border-left-color: #ffaa33;
  box-shadow: 0 4px 25px rgba(255,120,0,0.5), inset 0 0 20px rgba(255,120,0,0.15);
}

.category-header::before {
  content: "&#127744;";
  font-size: 26px;
  filter: drop-shadow(0 0 8px #ff7b00);
  animation: spinSlow 8s infinite linear;
}
@keyframes spinSlow {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.forum-list {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.forum-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.04);
  padding: 18px 24px;
  border-radius: 10px;
  border: 1px solid transparent;
  transition: all 0.35s ease;
  text-decoration: none;
  color: inherit;
  backdrop-filter: blur(6px);
  position: relative;
  overflow: hidden;
}

/* Эффект свитка при наведении */
.forum-row::after {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(to bottom, #ff7b00, #ff5500);
  transform: scaleY(0);
  transition: transform 0.3s ease;
}
.forum-row:hover::after {
  transform: scaleY(1);
}

.forum-row:hover {
  background: rgba(255, 123, 0, 0.1);
  border-color: #ff7b00;
  box-shadow: 0 0 25px rgba(255, 123, 0, 0.5), inset 0 0 15px rgba(255, 100, 0, 0.1);
  transform: translateY(-3px);
}

.forum-info {
  display: flex;
  align-items: center;
  gap: 20px;
  flex: 2;
  z-index: 1;
}

.forum-icon {
  font-size: 38px;
  width: 55px;
  text-align: center;
  filter: drop-shadow(0 0 10px #ff7b00);
  transition: transform 0.3s;
}
.forum-row:hover .forum-icon {
  transform: scale(1.15) rotate(5deg);
}

.forum-details h3 {
  font-size: 18px;
  color: #ffe0b2;
  margin-bottom: 3px;
  transition: color 0.3s;
}
.forum-row:hover .forum-details h3 {
  color: #ffaa33;
}

.forum-details p {
  font-size: 13px;
  color: #b0a090;
}

.forum-stats {
  display: flex;
  gap: 30px;
  color: #b0a090;
  font-size: 13px;
  flex: 1;
  justify-content: center;
  z-index: 1;
}

.forum-lastpost {
  font-size: 12px;
  color: #b0a090;
  flex: 1.5;
  text-align: right;
  z-index: 1;
}

/* ---------- Список тем ---------- */
.topic-row {
  display: flex;
  background: rgba(255, 255, 255, 0.03);
  padding: 13px 24px;
  border-bottom: 1px solid #3a2a1a;
  align-items: center;
  transition: all 0.25s ease;
}
.topic-row:hover {
  background: rgba(255, 123, 0, 0.08);
  border-bottom-color: #ff7b00;
}

.topic-title {
  flex: 3;
}
.topic-title a {
  color: #ecdcc0;
  text-decoration: none;
  font-weight: 600;
  transition: 0.2s;
}
.topic-title a:hover {
  color: #ffaa33;
  text-shadow: 0 0 12px #ff7b00;
}

/* Иконка новой темы */
.topic-new .topic-title::before {
  content: "&#127381; ";
  filter: drop-shadow(0 0 6px #ffaa33);
}

/* Закрепленная тема */
.topic-pinned {
  border-left: 4px solid #ffaa33;
  background: rgba(255, 120, 0, 0.05);
}

/* ---------- Кнопки ---------- */
.btn {
  background: linear-gradient(180deg, #ff8c1a, #d95e00);
  color: #120c08;
  border: none;
  padding: 10px 22px;
  border-radius: 22px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  letter-spacing: 0.6px;
  box-shadow: 0 4px 15px rgba(255, 123, 0, 0.6);
  position: relative;
  overflow: hidden;
}

/* Свечение при наведении */
.btn::before {
  content: "";
  position: absolute;
  top: 0; left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
  transition: left 0.5s;
}
.btn:hover::before {
  left: 100%;
}

.btn:hover {
  background: linear-gradient(180deg, #ffaa33, #ff7b00);
  box-shadow: 0 0 25px #ff7b00, 0 0 50px rgba(255, 100, 0, 0.7);
  transform: translateY(-2px);
}

.btn-secondary {
  background: transparent;
  border: 2px solid #ff7b00;
  color: #ffaa33;
  box-shadow: none;
}
.btn-secondary:hover {
  background: rgba(255,123,0,0.15);
  box-shadow: 0 0 20px #ff7b00;
  color: #fff;
}

/* ---------- Подвал ---------- */
.forum-footer {
  width: 100%;
  background: #2b180a;
  border-top: 3px solid #ff7b00;
  text-align: center;
  padding: 24px;
  color: #b0a090;
  margin-top: 50px;
  box-shadow: 0 -6px 25px rgba(0,0,0,0.9), inset 0 0 20px rgba(255,80,0,0.1);
  position: relative;
}
.forum-footer::before {
  content: "&#9961;&#65039;";
  font-size: 28px;
  display: block;
  margin-bottom: 8px;
  filter: drop-shadow(0 0 8px #ff7b00);
}

/* ---------- Скроллбар в стиле Наруто ---------- */
::-webkit-scrollbar {
  width: 10px;
}
::-webkit-scrollbar-track {
  background: #0a0705;
  box-shadow: inset 0 0 6px rgba(0,0,0,0.8);
}
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #ff7b00, #b44d00);
  border-radius: 10px;
  border: 2px solid #1a0f05;
}
::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #ffaa33, #ff5500);
  box-shadow: 0 0 10px #ff7b00;
}

/* ---------- Адаптивность ---------- */
@media (max-width: 768px) {
  .header-inner {
    flex-direction: column;
    align-items: flex-start;
  }
  .main-nav ul {
    flex-wrap: wrap;
    justify-content: center;
    width: 100%;
  }
  .main-nav li {
    position: relative;
  }
  /* Подменю на мобильных прижимается к правому краю */
  .main-nav .submenu {
    left: auto;
    right: 0;
    min-width: 160px;
  }
  .forum-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
  .forum-stats, .forum-lastpost {
    justify-content: flex-start;
    text-align: left;
    width: 100%;
  }
}

/* Для очень маленьких экранов — гамбургер-меню (по желанию дополнить HTML) */
/* Раскомментируйте, если добавите чекбокс #menu-toggle и label.hamburger */
/*
.hamburger { display: none; }
@media (max-width: 500px) {
  .hamburger {
    display: block;
    font-size: 30px;
    color: #ff7b00;
    cursor: pointer;
  }
  .main-nav { display: none; }
  #menu-toggle:checked ~ .main-nav { display: block; }
  .main-nav ul { flex-direction: column; width: 100%; }
  .main-nav li::after { display: none; }
  .main-nav .submenu {
    position: static;
    opacity: 1; visibility: visible;
    transform: none; box-shadow: none;
    background: rgba(0,0,0,0.5);
    border: none;
  }
}
*/