﻿:root {
  /* Цветовая схема в стиле ремонта квартир */
  --primary: #2a5c8b; /* Синий строительной тематики */
  --primary-hover: #3a7cb0;
  --primary-light: #e8f4ff;
  --accent: #e67e22; /* Оранжевый - цвет инструментов, предупреждений */
  --accent-hover: #f39c12;
  --accent-light: #fff4e6;
  --secondary: #27ae60; /* Зеленый - цвет растений, экологичности */
  --secondary-hover: #2ecc71;
  --text: #2c3e50;
  --text-light: #7f8c8d;
  --text-dark: #1a252f;
  --border: #d5dbdb;
  --border-dark: #95a5a6;
  --white: #ffffff;
  --bg-light: #f9f9f9;
  --bg-card: #ffffff;
  --bg-wood: #f5e9d9; /* Цвет дерева */
  --bg-concrete: #f2f2f2; /* Цвет бетона */
  --shadow: rgba(44, 62, 80, 0.1);
  --shadow-hover: rgba(44, 62, 80, 0.15);
}

/* SVG background с тематикой ремонта квартир */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%232a5c8b' fill-opacity='0.03'%3E%3Cpath d='M11 18c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm48 25c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm-43-7c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm63 31c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM34 90c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm56-76c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM12 86c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm28-65c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm23-11c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-6 60c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm29 22c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zM32 63c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm57-13c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-9-21c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM60 91c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM35 41c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM12 60c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2z'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 300px 300px;
  z-index: -1;
  pointer-events: none;
}

/* Дополнительный фон с градиентом */
body {
  background: linear-gradient(135deg, var(--bg-concrete) 0%, var(--bg-light) 50%, var(--primary-light) 100%);
  min-height: 100vh;
}

/* Базовые стили */
body {
  max-width: 1200px;
  width: 90%;
  margin: 0 auto;
  padding: 0;
  font-family: 'Inter', 'Segoe UI', Roboto, -apple-system, BlinkMacSystemFont, Oxygen, Ubuntu, sans-serif;
  color: var(--text);
  line-height: 1.5;
  position: relative;
}

/* Заголовки с тематикой ремонта */
h1, h2, .maintitle {
  font-weight: 700;
  font-size: 26px;
  font-family: inherit;
  color: var(--text-dark);
  line-height: 1.2;
  margin: 0.8em 0;
  position: relative;
  padding-left: 15px;
}

h1::before, h2::before, .maintitle::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 4px;
  background: linear-gradient(to bottom, var(--primary), var(--accent));
  border-radius: 2px;
}

/* Таблицы форума с эффектом строительных материалов */
table.forumline {
  background-color: var(--white);
  border-radius: 8px;
  box-shadow: 0 4px 12px var(--shadow);
  margin-bottom: 20px;
  overflow: hidden;
  border: 1px solid var(--border);
  position: relative;
  transition: all 0.3s ease;
}

table.forumline::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(to right, var(--primary), var(--accent));
}

table.forumline:hover {
  box-shadow: 0 6px 20px var(--shadow-hover);
  transform: translateY(-2px);
}

/* Заголовки таблиц - как строительные планы */
th, td.th {
  color: var(--white);
  font-size: 15px;
  font-weight: 600;
  background: linear-gradient(135deg, var(--primary), #1a4a73);
  padding: 12px 16px;
  text-align: left;
  border: none;
  position: relative;
}

th::after, td.th::after {
  content: '📐';
  position: absolute;
  right: 16px;
  opacity: 0.7;
}

/* Категории с иконками ремонта */
td.cat, td.catHead, td.catLeft, td.rowpic, td.catSides, td.catRight, td.catBottom {
  color: var(--text-dark);
  font-size: 15px;
  background-color: var(--bg-wood);
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
  font-weight: 600;
  position: relative;
  padding-left: 40px;
}

td.cat::before, td.catHead::before {
  content: '🏠';
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
}

/* Строки таблицы с hover-эффектом */
.row, .row1, .row2 {
  background-color: var(--white);
  transition: all 0.2s ease;
  position: relative;
}

.row:hover, .row1:hover, .row2:hover {
  background-color: var(--primary-light);
}

.row::before, .row1::before, .row2::before {
  content: '⚒️';
  position: absolute;
  left: 16px;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.row:hover::before, .row1:hover::before, .row2:hover::before {
  opacity: 0.5;
}

/* Кнопки в стиле инструментов */
input.button, input.mainoption, input.liteoption, .fakebut {
  background-color: var(--white);
  color: var(--primary);
  font-weight: 600;
  border: 2px solid var(--primary);
  border-radius: 6px;
  padding: 10px 20px;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

input.button::before, input.mainoption::before, input.liteoption::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s ease;
}

input.button:hover::before, input.mainoption:hover::before, input.liteoption:hover::before {
  left: 100%;
}

input.button:hover, input.liteoption:hover, .fakebut:hover {
  background-color: var(--primary);
  color: var(--white);
  box-shadow: 0 4px 12px rgba(42, 92, 139, 0.2);
}

input.mainoption {
  background: linear-gradient(135deg, var(--accent), var(--accent-hover));
  color: var(--white);
  font-weight: 600;
  border: none;
}

input.mainoption:hover {
  background: linear-gradient(135deg, var(--accent-hover), #ff8c00);
  transform: translateY(-1px);
}

/* Ссылки с эффектом подчеркивания как измерительная лента */
a {
  text-decoration: none;
  color: var(--primary);
  transition: all 0.2s ease;
  position: relative;
  padding-bottom: 2px;
}

a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--accent);
  transition: width 0.3s ease;
}

a:hover::after {
  width: 100%;
}

a:hover, a:active {
  color: var(--accent);
}

/* Формы ввода - стиль строительных чертежей */
input.post, textarea.post, select {
  background-color: var(--white);
  border: 2px solid var(--border);
  border-radius: 6px;
  padding: 10px 12px;
  width: 100%;
  box-sizing: border-box;
  transition: all 0.3s ease;
  font-family: inherit;
  font-size: 15px;
}

input.post:focus, textarea.post:focus, select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-light);
  outline: none;
}

textarea.post {
  background-image: linear-gradient(transparent 39px, var(--border) 40px);
  background-size: 100% 40px;
  line-height: 40px;
  background-attachment: local;
  padding-left: 15px;
}

/* Цитаты в стиле заметок на стройке */
.quote {
  background-color: var(--accent-light);
  border: 1px solid var(--accent);
  border-left: 4px solid var(--accent);
  border-radius: 6px;
  padding: 15px;
  margin: 10px 0;
  position: relative;
}

.quote::before {
  content: '📝';
  position: absolute;
  left: -10px;
  top: -10px;
  background: var(--white);
  border-radius: 50%;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  border: 1px solid var(--accent);
}

/* Код - как спецификации материалов */
.code {
  background-color: var(--text-dark);
  color: var(--white);
  border: 1px solid var(--text-dark);
  border-radius: 6px;
  padding: 15px;
  margin: 10px 0;
  font-family: 'Fira Code', 'Courier New', monospace;
  font-size: 14px;
  position: relative;
}

.code::before {
  content: '📄 Спецификация';
  position: absolute;
  top: -10px;
  left: 10px;
  background: var(--accent);
  color: white;
  padding: 2px 10px;
  border-radius: 4px;
  font-size: 12px;
  font-family: inherit;
}

/* Навигация - как строительное меню */
table.nav {
  background-color: var(--white);
  border: 2px solid var(--primary);
  border-radius: 8px;
  padding: 12px;
  margin: 15px 0;
  box-shadow: 0 4px 12px var(--shadow);
  position: relative;
}

table.nav::before {
  content: '📋';
  position: absolute;
  right: 15px;
  top: 50%;
  transform: translateY(-50%);
  opacity: 0.3;
}

/* Пагинация - как этапы ремонта */
.pgbutt a {
  padding: 8px 15px;
  text-decoration: none;
  border: 2px solid var(--border);
  background: var(--white);
  margin: 5px 3px 0 0;
  border-radius: 6px;
  color: var(--primary);
  font-weight: 600;
  transition: all 0.2s ease;
  position: relative;
}

.pgbutt a:hover {
  border-color: var(--accent);
  background-color: var(--accent-light);
  transform: translateY(-2px);
}

.pgbutt a[href*="start="]::after {
  content: '➡️';
  margin-left: 5px;
}

/* Аватар для гостей - в стиле строительной каски */
.guestavatar {
  width: 120px;
  height: 120px;
  text-align: center;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: var(--white);
  font-size: 50px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  box-shadow: 0 6px 15px var(--shadow);
  position: relative;
  overflow: hidden;
}

.guestavatar::before {
  content: '👷';
  position: absolute;
  font-size: 40px;
}

/* QR-Code с тематикой */
#qr img {
  width: 45px;
  height: 45px;
  position: fixed;
  right: 20px;
  bottom: 20px;
  border: 2px solid var(--primary);
  padding: 5px;
  background-color: var(--white);
  border-radius: 10px;
  box-shadow: 0 4px 12px var(--shadow);
  transition: all 0.3s ease;
  z-index: 1000;
}

#qr img:hover {
  width: 200px;
  height: 200px;
  transform: translateY(-5px);
  box-shadow: 0 8px 25px var(--shadow-hover);
}

/* Дополнительные иконки для темы ремонта */
.cattitle::before {
  content: '🔨 ';
  margin-right: 5px;
}

.forumlink::before {
  content: '💬 ';
  margin-right: 5px;
}

.name::after {
  content: ' 👤';
  opacity: 0.5;
}

/* Адаптивность */
@media (max-width: 768px) {
  body {
    width: 95%;
    padding: 10px;
  }
  
  body::before {
    background-size: 200px 200px;
  }
  
  h1, h2, .maintitle {
    font-size: 22px;
    padding-left: 12px;
  }
  
  table.forumline {
    border-radius: 6px;
  }
  
  th, td.th {
    padding: 10px;
  }
  
  #qr img {
    right: 10px;
    bottom: 10px;
    width: 35px;
    height: 35px;
  }
  
  .guestavatar {
    width: 80px;
    height: 80px;
    font-size: 35px;
  }
  
  .guestavatar::before {
    font-size: 30px;
  }
}

/* Анимация загрузки - как работа дрели */
@keyframes cssbar-slide {
  0% { 
    left: -40%; 
    transform: rotate(0deg);
  }
  50% {
    transform: rotate(180deg);
  }
  100% { 
    left: 100%; 
    transform: rotate(360deg);
  }
}

#cssbar-line {
  background: linear-gradient(to right, var(--primary), var(--accent));
  position: absolute;
  height: 100%;
  width: 40%;
  border-radius: 10px;
  animation: cssbar-slide 1.5s ease-in-out infinite;
}

/* Специальные стили для важных сообщений */
.important {
  background-color: var(--accent-light);
  border: 2px solid var(--accent);
  border-radius: 8px;
  padding: 15px;
  margin: 15px 0;
  position: relative;
}

.important::before {
  content: '⚠️ Внимание!';
  display: block;
  font-weight: bold;
  color: var(--accent);
  margin-bottom: 10px;
}