/* ===== БАЗОВЫЕ СТИЛИ ===== */
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
  background-color: #0f172a;
  color: #ffffff;
}

/* КРИТИЧЕСКОЕ ПЕРЕОПРЕДЕЛЕНИЕ: убираем ограничение ширины от родительского .leaderboard */
.leaderboard {
  max-width: none !important;
  width: 100% !important;
  padding: 30px !important;
  background-color: rgba(24, 24, 24, 0.85) !important;
  border-radius: 10px;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
  overflow: visible !important;
}

#root {
  min-height: 100vh;
  position: relative;
  z-index: 10;
}

/* ===== КОНТЕЙНЕР ПРИЛОЖЕНИЯ ===== */
.app-container {
  min-height: 100vh;
  color: #ffffff;
}

.content-wrapper {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* Для мобильных - на всю ширину */
@media (max-width: 640px) {
  .content-wrapper {
    padding: 0 0.5rem;
  }
}


/* ===== ЗАГОЛОВОК ===== */
.header {
  text-align: center;
  margin-bottom: 2rem;
  padding-top: 2rem;
}

.main-title {
  font-size: 2.5rem;
  font-weight: 800;
  margin: 0 0 0.5rem 0;
  background: linear-gradient(to right, #c084fc, #ec4899);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.subtitle {
  font-size: 1.125rem;
  color: #9ca3af;
  margin: 0;
}

@media (min-width: 640px) {
  .main-title {
    font-size: 3rem;
  }
}

@media (min-width: 768px) {
  .header {
    margin-bottom: 3rem;
  }
}


/* ===== TABS НАВИГАЦИЯ (ИГРА / ГИЛЬДИЯ) ===== */
.category-tabs {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 2rem;
  padding: 0 1rem;
}

.tab-button {
  padding: 0.75rem 2rem;
  font-size: 1rem;
  font-weight: 600;
  border: 2px solid rgba(168, 85, 247, 0.3);
  background-color: rgba(31, 41, 55, 0.6);
  color: #9ca3af;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.tab-button:hover {
  background-color: rgba(55, 65, 81, 0.6);
  border-color: rgba(168, 85, 247, 0.5);
  color: #e5e7eb;
  transform: translateY(-2px);
}

.tab-button.active {
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.3), rgba(236, 72, 153, 0.3));
  border-color: #a855f7;
  color: #ffffff;
  box-shadow: 0 0 20px rgba(168, 85, 247, 0.4);
}

.tab-button.active::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  animation: shimmer 2s infinite;
}

@keyframes shimmer {
  0% {
    left: -100%;
  }
  100% {
    left: 100%;
  }
}

/* Мобильная версия tabs */
@media (max-width: 640px) {
  .category-tabs {
    gap: 0.5rem;
    padding: 0 0.5rem;
  }
  
  .tab-button {
    padding: 0.6rem 1.5rem;
    font-size: 0.9rem;
  }
}


/* ===== ОСНОВНОЙ КОНТЕНТ ===== */
.main-content {
  padding: 2rem 0;
  margin-top: 2rem;
  overflow: visible !important;
}

@media (max-width: 640px) {
  .main-content {
    padding: 1.5rem 0;
  }
}

@media (min-width: 768px) {
  .main-content {
    padding: 2rem 0;
  }
}


/* ===== ПОИСКОВАЯ СТРОКА ===== */
.search-container {
  margin-bottom: 2rem;
}

.sticky-search {
  position: sticky;
  top: 1rem;
  z-index: 100;
}

.search-wrapper {
  position: relative;
}

/* Радужная анимированная рамка при фокусе */
.search-wrapper::before {
  content: '';
  background: linear-gradient(45deg, #ff0000, #ff7300, #fffb00, #48ff00, #00ffd5, #002bff, #7a00ff, #ff00c8, #ff0000);
  position: absolute;
  top: -2px;
  left: -2px;
  background-size: 400%;
  z-index: -1;
  filter: blur(5px);
  width: calc(100% + 4px);
  height: calc(100% + 4px);
  animation: glowing 20s linear infinite;
  opacity: 0;
  transition: opacity .3s ease-in-out;
  border-radius: 0.5rem;
  pointer-events: none;
}

.search-wrapper:focus-within::before {
  opacity: 1;
}

@keyframes glowing {
  0% { background-position: 0 0; }
  50% { background-position: 400% 0; }
  100% { background-position: 0 0; }
}

.search-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  height: 1.25rem;
  width: 1.25rem;
  color: #9ca3af;
  pointer-events: none;
  z-index: 1;
}

.search-input {
  width: 100%;
  padding: 0.75rem 3rem 0.75rem 2.75rem;
  background-color: #1f2937;
  border: 1px solid #374151;
  border-radius: 0.5rem;
  color: #ffffff;
  font-size: 1rem;
  outline: none;
  transition: all 0.2s ease;
  position: relative;
  z-index: 0;
}

.search-input::placeholder {
  color: #9ca3af;
}

/* Индикатор загрузки в поиске */
.search-loader {
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.2rem;
  animation: spin 1s linear infinite;
  z-index: 1;
}

.search-loader.hidden {
  display: none;
}

@keyframes spin {
  from { transform: translateY(-50%) rotate(0deg); }
  to { transform: translateY(-50%) rotate(360deg); }
}


/* ===== КОНТЕЙНЕР FAQ ===== */
.faq-container {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  min-height: 200px;
}

/* Информация о результатах */
.results-info {
  padding: 0.75rem 1rem;
  background-color: rgba(31, 41, 55, 0.6);
  border-radius: 0.5rem;
  margin-bottom: 1rem;
  font-size: 0.9rem;
  color: #9ca3af;
  text-align: center;
  border: 1px solid rgba(55, 65, 81, 0.5);
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}


/* ===== АККОРДЕОН ===== */
.accordion-item {
  border: 1px solid rgba(55, 65, 81, 0.5);
  background-color: rgba(31, 41, 55, 0.4);
  border-radius: 0.5rem;
  overflow: hidden;
  backdrop-filter: blur(4px);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
}

.accordion-item:hover {
  border-color: rgba(168, 85, 247, 0.5);
  box-shadow: 0 0 15px rgba(168, 85, 247, 0.2);
}

.accordion-button {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  text-align: left;
  padding: 1.25rem;
  background: none;
  border: none;
  color: inherit;
  cursor: pointer;
  outline: none;
  transition: background-color 0.2s ease;
}

.accordion-button:hover {
  background-color: rgba(55, 65, 81, 0.3);
}

.accordion-button:focus-visible {
  box-shadow: 0 0 0 2px #a855f7;
}

.accordion-question {
  font-size: 1.125rem;
  font-weight: 500;
  color: #f3f4f6;
  margin: 0;
  flex: 1;
}

.chevron-wrapper {
  flex-shrink: 0;
  margin-left: 1rem;
  display: flex;
  align-items: center;
}

.chevron-icon {
  width: 1.5rem;
  height: 1.5rem;
  color: #9ca3af;
  transition: transform 0.3s ease;
}

.accordion-item.open .chevron-icon {
  transform: rotate(180deg);
  color: #a855f7;
}

.accordion-answer-container {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.5s ease-in-out;
}

.accordion-item.open .accordion-answer-container {
  max-height: 100vh;
}

.accordion-answer-content {
  padding: 0 1.25rem 1.25rem;
  color: #d1d5db;
}

.accordion-answer-content p {
  margin: 0;
  line-height: 1.6;
}


/* ===== ПУСТОЕ СОСТОЯНИЕ ===== */
.empty-state {
  text-align: center;
  padding: 4rem 1.5rem;
  background-color: rgba(31, 41, 55, 0.6);
  border-radius: 0.5rem;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  border: 1px solid rgba(55, 65, 81, 0.5);
}

.empty-icon {
  width: 4rem;
  height: 4rem;
  color: #6b7280;
  margin: 0 auto 1rem;
}

.empty-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: #e5e7eb;
  margin: 0 0 0.5rem 0;
}

.empty-text {
  color: #9ca3af;
  margin: 0;
}


/* ===== ПАГИНАЦИЯ ===== */
.pagination-container {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1.5rem;
  margin-top: 2rem;
  padding: 1rem;
}

.pagination-btn {
  padding: 0.75rem 1.5rem;
  background: linear-gradient(135deg, #a855f7, #ec4899);
  color: white;
  border: none;
  border-radius: 0.5rem;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 600;
  transition: all 0.3s ease;
  box-shadow: 0 4px 6px rgba(168, 85, 247, 0.3);
}

.pagination-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(168, 85, 247, 0.4);
}

.pagination-btn:active {
  transform: translateY(0);
}

.pagination-info {
  color: #9ca3af;
  font-size: 0.9rem;
  font-weight: 500;
}

@media (max-width: 640px) {
  .pagination-container {
    gap: 1rem;
  }
  
  .pagination-btn {
    padding: 0.6rem 1.2rem;
    font-size: 0.85rem;
  }
}