﻿:root {
  /* Цветовая схема в стиле внедорожников и природы */
  --primary: #8b4513; /* Цвет земли/грязи */
  --primary-hover: #a0522d;
  --primary-light: #f5e9d9;
  --accent: #228b22; /* Зеленый цвет леса */
  --accent-hover: #32a032;
  --accent-light: #e8f5e8;
  --secondary: #d2691e; /* Коричнево-оранжевый */
  --secondary-hover: #e67e22;
  --text: #2c1810;
  --text-light: #5d4037;
  --text-dark: #1a0d00;
  --border: #bcaaa4;
  --border-dark: #8d6e63;
  --white: #ffffff;
  --bg-light: #f5f1ee;
  --bg-card: #ffffff;
  --bg-mountain: #e8e4e0;
  --bg-dirt: #efebe9;
  --shadow: rgba(139, 69, 19, 0.15);
  --shadow-hover: rgba(139, 69, 19, 0.25);
}

/* SVG background с горами и ландшафтом */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url("data:image/svg+xml,%3Csvg width='400' height='300' viewBox='0 0 400 300' xmlns='http://www.w3.org/2000/svg'%3E%3Cdefs%3E%3ClinearGradient id='mount1' x1='0%25' y1='0%25' x2='100%25' y2='100%25'%3E%3Cstop offset='0%25' stop-color='%235d4037' stop-opacity='0.05'/%3E%3Cstop offset='100%25' stop-color='%238b4513' stop-opacity='0.05'/%3E%3C/linearGradient%3E%3ClinearGradient id='mount2' x1='0%25' y1='0%25' x2='100%25' y2='100%25'%3E%3Cstop offset='0%25' stop-color='%23675548' stop-opacity='0.03'/%3E%3Cstop offset='100%25' stop-color='%239c6b3a' stop-opacity='0.03'/%3E%3C/linearGradient%3E%3C/defs%3E%3Cg fill='none'%3E%3C!-- Горы на заднем плане --%3E%3Cpath d='M-20 250 L100 150 L220 250 Z' fill='url(%23mount1)'/%3E%3Cpath d='M180 250 L280 120 L380 250 Z' fill='url(%23mount1)'/%3E%3C!-- Горы на переднем плане --%3E%3Cpath d='M-40 300 L80 180 L200 300 Z' fill='url(%23mount2)'/%3E%3Cpath d='M160 300 L260 140 L360 300 Z' fill='url(%23mount2)'/%3E%3C!-- Тропа/дорога --%3E%3Cpath d='M0 280 Q 100 260, 200 280 T 400 280' stroke='%238b4513' stroke-width='3' stroke-opacity='0.1' fill='none'/%3E%3C!-- Следы от шин --%3E%3Cpath d='M50 270 Q 150 250, 250 270' stroke='%23228b22' stroke-width='2' stroke-opacity='0.08' stroke-dasharray='5,5' fill='none'/%3E%3Cpath d='M60 290 Q 160 270, 260 290' stroke='%23228b22' stroke-width='2' stroke-opacity='0.08' stroke-dasharray='5,5' fill='none'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 800px 600px;
  background-position: bottom;
  background-repeat: repeat-x;
  z-index: -1;
  pointer-events: none;
  opacity: 0.6;
}

/* Основной фон с градиентом неба и земли */
body {
  background: linear-gradient(to bottom, #87CEEB 0%, #98D8E8 30%, var(--bg-light) 70%, var(--bg-dirt) 100%);
  min-height: 100vh;
  color: var(--text);
  font: 14px 'Segoe UI', 'Roboto', 'Verdana', 'Arial', 'Helvetica', sans-serif;
  margin: 0;
  padding: 6px;
  scrollbar-width: thin;
  scrollbar-color: var(--primary) var(--bg-light);
}

/* Кастомный скроллбар в стиле внедорожника */
::-webkit-scrollbar {
  width: 14px;
  background: var(--bg-dirt);
}

::-webkit-scrollbar-track {
  background: linear-gradient(to bottom, var(--bg-light), var(--bg-dirt));
  border-radius: 8px;
  border: 2px solid var(--border);
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(to bottom, var(--primary), var(--secondary));
  border-radius: 8px;
  border: 2px solid var(--border-dark);
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.1);
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(to bottom, var(--primary-hover), var(--secondary-hover));
}

::-webkit-scrollbar-button {
  background: var(--primary);
  border: 2px solid var(--border-dark);
}

/* Общие стили таблиц */
.bodyline {
  background: var(--white);
  border: 3px solid var(--primary);
  border-radius: 12px;
  box-shadow: 0 6px 20px var(--shadow);
  margin: 10px auto;
  max-width: 1200px;
}

.forumline {
  background: linear-gradient(135deg, var(--white), var(--bg-light));
  border: 2px solid var(--border-dark);
  border-radius: 10px;
  overflow: hidden;
  transition: all 0.3s ease;
  position: relative;
}

.forumline::before {
  content: '🚙';
  position: absolute;
  right: 10px;
  top: 10px;
  opacity: 0.1;
  font-size: 20px;
  z-index: 1;
}

.forumline:hover {
  box-shadow: 0 8px 25px var(--shadow-hover);
  transform: translateY(-3px);
  border-color: var(--primary);
}

/* Строки таблиц */
.row1, .row2, .row3, td.spaceRow {
  background: var(--white);
  transition: all 0.2s ease;
  position: relative;
}

.row1:hover, .row2:hover {
  background: linear-gradient(to right, var(--primary-light), var(--white));
}

.row3 {
  background: linear-gradient(to right, var(--bg-dirt), var(--white));
}

.row3:hover {
  background: linear-gradient(to right, var(--accent-light), var(--white));
}

/* Ячейки с иконками */
td.rowpic {
  background: linear-gradient(to right, var(--primary), transparent);
  position: relative;
}

td.rowpic::before {
  content: '⛰️';
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  opacity: 0.6;
}

/* Заголовки таблиц */
th {
  background: linear-gradient(135deg, var(--primary), var(--primary-hover));
  color: var(--white);
  font-size: 14px;
  font-weight: bold;
  height: 35px;
  text-align: center;
  padding: 0 12px;
  position: relative;
  overflow: hidden;
  border-bottom: 3px solid var(--accent);
}

th::after {
  content: '🚗';
  position: absolute;
  right: 15px;
  opacity: 0.7;
}

th::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: offroad 4s linear infinite;
}

@keyframes offroad {
  0% { left: -100%; }
  100% { left: 100%; }
}

/* Категории */
td.cat, td.catHead, td.catSides, td.catLeft, td.catRight, td.catBottom {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: var(--white);
  font-weight: bold;
  letter-spacing: 1px;
  height: 32px;
  text-indent: 8px;
  border-bottom: 2px solid var(--accent);
  position: relative;
}

td.cat::before, td.catHead::before {
  content: '🚙';
  margin-right: 10px;
}

/* Заголовки */
.maintitle, h1 {
  font: bold 24px/130% 'Trebuchet MS', 'Segoe UI', Verdana, sans-serif;
  color: var(--primary);
  text-shadow: 2px 2px 4px rgba(139, 69, 19, 0.2);
  margin: 1em 0;
  padding-left: 35px;
  position: relative;
}

.maintitle::before, h1::before {
  content: '🚙';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  font-size: 28px;
}

h2, .subtitle {
  font: bold 20px/150% 'Trebuchet MS', 'Segoe UI', Verdana, sans-serif;
  color: var(--secondary);
  margin: 0.8em 0;
  padding-left: 30px;
  position: relative;
}

h2::before, .subtitle::before {
  content: '⛰️';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
}

/* Ссылки */
a:link, a:active, a:visited, a.postlink {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
  transition: all 0.2s ease;
  position: relative;
}

a:hover {
  color: var(--accent-hover);
  text-decoration: none;
}

a:hover::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(to right, var(--primary), var(--accent));
  border-radius: 1px;
}

/* Ссылки на темы */
a.topictitle:link, a.topictitle:visited {
  color: var(--secondary);
  font-size: 13px;
  font-weight: bold;
}

a.topictitle:hover {
  color: var(--accent-hover);
}

a.topictitle:hover::after {
  background: linear-gradient(to right, var(--secondary), var(--accent));
}

/* Текст сообщений */
.postbody {
  font-size: 14px;
  line-height: 1.6;
  color: var(--text);
}

.postdetails {
  font-size: 11px;
  color: var(--text-light);
  background: var(--bg-dirt);
  padding: 4px 8px;
  border-radius: 4px;
  display: inline-block;
}

.name {
  font-size: 13px;
  font-weight: bold;
  color: var(--primary);
}

.name::before {
  content: '👤 ';
}

/* Код и цитаты */
.code {
  background: linear-gradient(135deg, var(--bg-dirt), var(--white));
  border: 2px solid var(--primary);
  border-radius: 8px;
  color: var(--text-dark);
  font: 12px 'Courier New', 'Consolas', monospace;
  padding: 12px;
  margin: 10px 0;
  position: relative;
  overflow: hidden;
}

.code::before {
  content: '🔧';
  position: absolute;
  right: 10px;
  top: 10px;
  opacity: 0.3;
  font-size: 18px;
}

.quote {
  background: linear-gradient(135deg, var(--accent-light), var(--white));
  border: 2px solid var(--accent);
  border-left: 5px solid var(--accent);
  border-radius: 8px;
  color: var(--text);
  font-size: 13px;
  line-height: 1.5;
  padding: 15px;
  margin: 10px 0;
  position: relative;
}

.quote::before {
  content: '💬';
  position: absolute;
  left: -15px;
  top: -15px;
  background: var(--white);
  border-radius: 50%;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  border: 2px solid var(--accent);
  box-shadow: 0 3px 10px var(--shadow);
}

/* Формы */
input, textarea, select {
  color: var(--text-dark);
  font: 14px 'Segoe UI', Verdana, Arial, sans-serif;
  background: var(--white);
  border: 2px solid var(--border);
  border-radius: 6px;
  padding: 8px 10px;
  transition: all 0.3s ease;
}

input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(139, 69, 19, 0.2);
}

textarea.post {
  min-height: 120px;
  resize: vertical;
  background-image: linear-gradient(transparent 39px, var(--border) 40px);
  background-size: 100% 40px;
  line-height: 40px;
  background-attachment: local;
  padding-left: 15px;
}

/* Кнопки */
input.button, input.mainoption, input.catbutton {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: var(--white);
  font-size: 13px;
  font-weight: bold;
  border: 2px solid var(--primary);
  border-radius: 6px;
  padding: 10px 20px;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

input.button::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 ease;
}

input.button:hover::before {
  left: 100%;
}

input.button:hover, input.mainoption:hover, input.catbutton:hover {
  background: linear-gradient(135deg, var(--primary-hover), var(--secondary-hover));
  transform: translateY(-2px);
  box-shadow: 0 4px 15px var(--shadow-hover);
}

/* Пагинация - как следы от шин */
.pgbutt a {
  font-family: Verdana, sans-serif;
  text-decoration: none;
  border: 2px solid var(--primary);
  background: linear-gradient(135deg, var(--white), var(--bg-light));
  padding: 6px 12px;
  margin: 5px 3px 0 0;
  border-radius: 6px;
  color: var(--primary);
  font-weight: 600;
  transition: all 0.2s ease;
  position: relative;
}

.pgbutt a:hover {
  background: linear-gradient(135deg, var(--primary-light), var(--white));
  border-color: var(--accent);
  transform: translateY(-1px);
  box-shadow: 0 3px 10px var(--shadow);
}

.pgbutt a[href*="start="]::after {
  content: '→';
  margin-left: 5px;
  font-weight: bold;
}

/* Стили для разных разделов форума */
[class*="offroad"]::before { content: '🚙 '; }
[class*="4x4"]::before { content: '🚙 '; }
[class*="jeep"]::before { content: '🚙 '; }
[class*="modification"]::before { content: '🔧 '; }
[class*="tires"]::before { content: '🛞 '; }
[class*="travel"]::before { content: '🗺️ '; }
[class*="mountain"]::before { content: '⛰️ '; }

/* Специальные метки */
.offroad-badge {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: white;
  padding: 3px 8px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: bold;
  display: inline-block;
  margin-left: 5px;
}

.mud-badge {
  background: linear-gradient(135deg, #8b4513, #5d4037);
  color: white;
  padding: 3px 8px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: bold;
  display: inline-block;
  margin-left: 5px;
}

/* Навигационная панель */
.topnav {
  background: linear-gradient(135deg, var(--primary), var(--primary-hover));
  color: var(--white);
  font-size: 13px;
  height: 32px;
  border: none;
  border-radius: 8px;
  padding: 0 15px;
  display: flex;
  align-items: center;
  margin-bottom: 10px;
}

.topnav a {
  color: var(--white) !important;
  margin: 0 10px;
  padding: 5px 10px;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.topnav a:hover {
  background: rgba(255, 255, 255, 0.2);
  text-decoration: none !important;
}

/* Адаптивность */
@media (max-width: 768px) {
  body {
    padding: 10px;
  }
  
  body::before {
    background-size: 600px 450px;
    opacity: 0.4;
  }
  
  .maintitle, h1 {
    font-size: 20px;
    padding-left: 40px;
  }
  
  h1::before {
    font-size: 24px;
  }
  
  h2, .subtitle {
    font-size: 18px;
    padding-left: 35px;
  }
  
  .forumline {
    border-radius: 8px;
  }
  
  th, td.cat, td.catHead, td.catBottom {
    padding: 8px 10px;
    font-size: 12px;
  }
  
  .topnav {
    font-size: 11px;
    padding: 0 10px;
  }
}

/* Анимация движения по бездорожью */
@keyframes offroad-bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

.forumline:hover::before {
  animation: offroad-bounce 0.5s ease infinite;
  opacity: 0.3;
}

/* Стили для индикаторов сложности трассы */
.difficulty-easy {
  color: var(--accent);
  background: var(--accent-light);
  padding: 2px 8px;
  border-radius: 4px;
  font-weight: bold;
}

.difficulty-medium {
  color: var(--secondary);
  background: var(--primary-light);
  padding: 2px 8px;
  border-radius: 4px;
  font-weight: bold;
}

.difficulty-hard {
  color: #d32f2f;
  background: #ffebee;
  padding: 2px 8px;
  border-radius: 4px;
  font-weight: bold;
}

/* Копирайт в стиле внедорожника */
.copyright {
  font-family: Verdana, Arial, sans-serif;
  color: var(--text-light);
  font-size: 10px;
  text-align: center;
  padding: 15px;
  border-top: 2px solid var(--border);
  margin-top: 20px;
}

.copyright::before {
  content: '🚙 ';
}

a.copyright {
  color: var(--primary);
}

a.copyright:hover {
  color: var(--accent);
}