
/* ==========================================================================
   2. СБРОС И БАЗОВЫЕ СТИЛИ (RESET & BASE)
   ========================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--bg-main);
  background-image: 
    radial-gradient(circle at 20% 20%, rgba(114, 81, 242, 0.05) 0%, transparent 40%),
    radial-gradient(circle at 80% 80%, rgba(0, 229, 255, 0.03) 0%, transparent 40%);
  background-attachment: fixed;
  color: var(--text-primary);
  font-family: var(--font-main);
  line-height: 1.6;
  font-size: 15px;
  min-height: 100vh;
}

a {
  color: var(--accent-secondary);
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  color: var(--accent-hover);
  text-shadow: 0 0 8px rgba(0, 229, 255, 0.4);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-main);
}
::-webkit-scrollbar-thumb {
  background: var(--bg-surface-hover);
  border-radius: var(--radius-sm);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--accent-primary);
}

/* ==========================================================================
   3. ОБЩИЙ КАРКАС И СЕТКА (LAYOUT)
   ========================================================================== */
.wrapper {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 20px;
}

.main-content {
  display: grid;
  grid-template-columns: 1fr 300px; /* Основная зона и боковая панель (сайдбар) */
  gap: 24px;
  margin-top: 24px;
}

/* ==========================================================================
   4. ВЕРХНЯЯ ПАНЕЛЬ И НАВИГАЦИЯ (HEADER & NAVBAR)
   ========================================================================== */
.header {
  background: var(--bg-glass);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 15px 0;
}

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-links {
  display: flex;
  gap: 20px;
  list-style: none;
}

.nav-links a {
  color: var(--text-secondary);
  font-weight: 500;
}

.nav-links a:hover {
  color: var(--text-primary);
}

/* ==========================================================================
   5. СПИСОК ФОРУМОВ И КАТЕГОРИИ (FORUM STRUCTURE)
   ========================================================================== */
.category-block {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  margin-bottom: 24px;
  overflow: hidden;
  box-shadow: var(--shadow-main);
}

.category-header {
  background: linear-gradient(90deg, rgba(114,81,242,0.15) 0%, transparent 100%);
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-color);
  font-weight: 600;
  color: #fff;
  display: flex;
  justify-content: space-between;
}

.forum-row {
  display: flex;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-color);
  transition: var(--transition);
}

.forum-row:last-child {
  border-bottom: none;
}

.forum-row:hover {
  background: var(--bg-surface-hover);
}

.forum-icon {
  width: 40px;
  height: 40px;
  background: rgba(114, 81, 242, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 16px;
  color: var(--accent-primary);
}

.forum-info {
  flex-grow: 1;
}

.forum-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 4px;
}

.forum-description {
  color: var(--text-secondary);
  font-size: 0.88rem;
}

/* ==========================================================================
   6. ИГРОВОЙ ПОСТ И АНКЕТА АКТЕРА (TOPIC & POST LAYOUT)
   ========================================================================== */
.post-card {
  display: grid;
  grid-template-columns: 220px 1fr;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  margin-bottom: 20px;
  overflow: hidden;
}

/* Левая колонка: Профиль игрока/персонажа */
.post-author {
  background: rgba(0, 0, 0, 0.2);
  padding: 20px;
  text-align: center;
  border-right: 1px solid var(--border-color);
}

.author-avatar {
  width: 140px;
  height: 140px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  border: 2px solid var(--border-color);
  box-shadow: var(--shadow-glow);
  margin-bottom: 12px;
}

.author-name {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--accent-primary);
  margin-bottom: 6px;
}

.author-rank {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Правая колонка: Сам текст ролевого поста */
.post-content-wrap {
  display: flex;
  flex-direction: column;
  padding: 20px;
}

.post-header {
  display: flex;
  justify-content: space-between;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-bottom: 16px;
}

.post-body {
  font-family: var(--font-rp); /* Специальный шрифт для атмосферного чтения */
  font-size: 1rem;
  line-height: 1.8;
  color: var(--text-primary);
  flex-grow: 1;
}

/* ==========================================================================
   7. СПЕЦИАЛЬНЫЕ РОЛЕВЫЕ ЭЛЕМЕНТЫ (SPOILERS, QUOTES, CODE)
   ========================================================================== */
blockquote {
  background: rgba(114, 81, 242, 0.05);
  border-left: 3px solid var(--accent-primary);
  margin: 16px 0;
  padding: 12px 16px;
  font-style: italic;
  color: var(--text-secondary);
}

.spoiler-box {
  background: var(--bg-main);
  border: 1px dashed var(--border-color);
  border-radius: var(--radius-sm);
  padding: 10px;
  margin: 12px 0;
}

/* ==========================================================================
   8. ФОРМЫ, ВВОД ТЕКСТА И КНОПКИ (FORMS & BUTTONS)
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  font-weight: 600;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  transition: var(--transition);
}

.btn-primary {
  background: var(--accent-primary);
  color: #fff;
  box-shadow: var(--shadow-glow);
}

.btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
}

input, textarea, select {
  width: 100%;
  background: var(--bg-main);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 12px;
  color: var(--text-primary);
  outline: none;
  transition: var(--transition);
}

input:focus, textarea:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 8px rgba(114, 81, 242, 0.4);
}

/* ==========================================================================
   9. АДАПТИВНОСТЬ (RESPONSIVE DESIGN)
   ========================================================================== */
@media (max-width: 992px) {
  .main-content {
    grid-template-columns: 1fr; /* Отключаем сайдбар на планшетах */
  }
}

@media (max-width: 768px) {
  .post-card {
    grid-template-columns: 1fr; /* Пост и профиль становятся в одну колонку */
  }
  
  .post-author {
    border-right: none;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 16px;
    text-align: left;
  }
  
  .author-avatar {
    width: 60px;
    height: 60px;
    margin-bottom: 0;
  }
}

/* ==========================================================================
   2. СБРОС И БАЗОВЫЕ СТИЛИ (RESET & BASE)
   ========================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--bg-main);
  background-image: 
    radial-gradient(circle at 20% 20%, rgba(114, 81, 242, 0.05) 0%, transparent 40%),
    radial-gradient(circle at 80% 80%, rgba(0, 229, 255, 0.03) 0%, transparent 40%);
  background-attachment: fixed;
  color: var(--text-primary);
  font-family: var(--font-main);
  line-height: 1.6;
  font-size: 15px;
  min-height: 100vh;
}
/* ==========================================================================
   3. ОБЩИЙ КАРКАС И СЕТКА (LAYOUT)
   ========================================================================== */
.wrapper {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 20px;
}

.main-content {
  display: grid;
  grid-template-columns: 1fr 300px; /* Основная зона и боковая панель (сайдбар) */
  gap: 24px;
  margin-top: 24px;
}

/* ==========================================================================
   4. ВЕРХНЯЯ ПАНЕЛЬ И НАВИГАЦИЯ (HEADER & NAVBAR)
   ========================================================================== */
.header {
  background: var(--bg-glass);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 15px 0;
}

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-links {
  display: flex;
  gap: 20px;
  list-style: none;
}

.nav-links a {
  color: var(--text-secondary);
  font-weight: 500;
}

.nav-links a:hover {
  color: var(--text-primary);
}

/* ==========================================================================
   5. СПИСОК ФОРУМОВ И КАТЕГОРИИ (FORUM STRUCTURE)
   ========================================================================== */
.category-block {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  margin-bottom: 24px;
  overflow: hidden;
  box-shadow: var(--shadow-main);
}

.category-header {
  background: linear-gradient(90deg, rgba(114,81,242,0.15) 0%, transparent 100%);
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-color);
  font-weight: 600;
  color: #fff;
  display: flex;
  justify-content: space-between;
}

.forum-row {
  display: flex;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-color);
  transition: var(--transition);
}

.forum-row:last-child {
  border-bottom: none;
}

.forum-row:hover {
  background: var(--bg-surface-hover);
}

.forum-icon {
  width: 40px;
  height: 40px;
  background: rgba(114, 81, 242, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 16px;
  color: var(--accent-primary);
}

.forum-info {
  flex-grow: 1;
}

.forum-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 4px;
}

.forum-description {
  color: var(--text-secondary);
  font-size: 0.88rem;
}

/* ==========================================================================
   6. ИГРОВОЙ ПОСТ И АНКЕТА АКТЕРА (TOPIC & POST LAYOUT)
   ========================================================================== */
.post-card {
  display: grid;
  grid-template-columns: 220px 1fr;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  margin-bottom: 20px;
  overflow: hidden;
}

/* Левая колонка: Профиль игрока/персонажа */
.post-author {
  background: rgba(0, 0, 0, 0.2);
  padding: 20px;
  text-align: center;
  border-right: 1px solid var(--border-color);
}

.author-avatar {
  width: 140px;
  height: 140px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  border: 2px solid var(--border-color);
  box-shadow: var(--shadow-glow);
  margin-bottom: 12px;
}

.author-name {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--accent-primary);
  margin-bottom: 6px;
}

.author-rank {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Правая колонка: Сам текст ролевого поста */
.post-content-wrap {
  display: flex;
  flex-direction: column;
  padding: 20px;
}

.post-header {
  display: flex;
  justify-content: space-between;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-bottom: 16px;
}

.post-body {
  font-family: var(--font-rp); /* Специальный шрифт для атмосферного чтения */
  font-size: 1rem;
  line-height: 1.8;
  color: var(--text-primary);
  flex-grow: 1;
}

/* ==========================================================================
   7. СПЕЦИАЛЬНЫЕ РОЛЕВЫЕ ЭЛЕМЕНТЫ (SPOILERS, QUOTES, CODE)
   ========================================================================== */
blockquote {
  background: rgba(114, 81, 242, 0.05);
  border-left: 3px solid var(--accent-primary);
  margin: 16px 0;
  padding: 12px 16px;
  font-style: italic;
  color: var(--text-secondary);
}

.spoiler-box {
  background: var(--bg-main);
  border: 1px dashed var(--border-color);
  border-radius: var(--radius-sm);
  padding: 10px;
  margin: 12px 0;
}

/* ==========================================================================
   8. ФОРМЫ, ВВОД ТЕКСТА И КНОПКИ (FORMS & BUTTONS)
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  font-weight: 600;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  transition: var(--transition);
}

.btn-primary {
  background: var(--accent-primary);
  color: #fff;
  box-shadow: var(--shadow-glow);
}

.btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
}

input, textarea, select {
  width: 100%;
  background: var(--bg-main);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 12px;
  color: var(--text-primary);
  outline: none;
  transition: var(--transition);
}

input:focus, textarea:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 8px rgba(114, 81, 242, 0.4);
}

/* ==========================================================================
   9. АДАПТИВНОСТЬ (RESPONSIVE DESIGN)
   ========================================================================== */
@media (max-width: 992px) {
  .main-content {
    grid-template-columns: 1fr; /* Отключаем сайдбар на планшетах */
  }
}

@media (max-width: 768px) {
  .post-card {
    grid-template-columns: 1fr; /* Пост и профиль становятся в одну колонку */
  }
  
  .post-author {
    border-right: none;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 16px;
    text-align: left;
  }
  
  .author-avatar {
    width: 60px;
    height: 60px;
    margin-bottom: 0;
  }
}
