body {
    max-width: 85%;
    margin: 0 auto;
    background-color: #2d2d2d; /* Темный фон - как строительная площадка */
    color: #e0e0e0;
    padding: 0px;
    font-family: 'Montserrat', 'Helvetica Neue', Arial, sans-serif;
    background-image: linear-gradient(rgba(0, 0, 0, 0.1) 1px, transparent 1px),
                      linear-gradient(90deg, rgba(0, 0, 0, 0.1) 1px, transparent 1px);
    background-size: 20px 20px; /* Сетка как чертежная бумага */
}

font, th, td, p {
    font-family: 'Montserrat', 'Helvetica Neue', Arial, sans-serif;
    font-size: 15px;
    color: #e0e0e0;
}

a {
    text-decoration: none;
    color: #ff8c21; /* Яркий оранжевый для ссылок - цвет строительных касок */
    transition: all 0.3s ease;
    font-weight: 500;
}

a:visited {
    color: #e67e22;
}

a:hover, a:active {
    color: #ffffff;
    transform: translateY(-2px);
    text-shadow: 0 0 5px rgba(255, 140, 33, 0.5);
}

/* Хедер форума - промышленный стиль */
.forum-header {
    background-color: #1a1a1a;
    border-bottom: none;
    padding: 20px;
    margin-bottom: 25px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.forum-header:before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: repeating-linear-gradient(
        45deg,
        #ff8c21,
        #ff8c21 10px,
        #222222 10px,
        #222222 20px
    ); /* Строительная предупреждающая лента */
}

.forum-header h1 {
    color: #ffffff;
    margin: 0;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 28px;
}

.forum-logo {
    display: flex;
    align-items: center;
}

.forum-logo:before {
    content: "🏗️"; /* Иконка строительства */
    font-size: 32px;
    margin-right: 15px;
}

/* Навигация в стиле инструментальной панели */
.forum-nav {
    background-color: #1a1a1a;
    margin-bottom: 25px;
    border-radius: 0;
    border-left: 4px solid #ff8c21;
}

.forum-nav ul {
    list-style-type: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
}

.forum-nav li {
    padding: 0;
}

.forum-nav a {
    display: block;
    color: #e0e0e0;
    font-weight: 600;
    padding: 15px 20px;
    border-right: 1px solid #333333;
    transition: all 0.3s ease;
    position: relative;
}

.forum-nav a:hover {
    color: #ff8c21;
    background-color: #222222;
}

.forum-nav a:hover:before {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: #ff8c21;
}

/* Таблицы форума в стиле строительных чертежей */
table.forumline {
    background-color: #1a1a1a;
    border-collapse: separate;
    border-spacing: 0;
    margin-bottom: 30px;
    width: 100%;
    border: 1px solid #3d3d3d;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.row, .row1, .row2 {
    background-color: #1a1a1a;
    transition: all 0.3s ease;
}

.row:hover, .row1:hover, .row2:hover {
    background-color: #333333;
    transform: translateY(-2px);
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
}

.row3 {
    background-color: #262626;
}

th, td.th {
    color: #ffffff;
    font-size: 16px;
    font-weight: 700;
    background-color: #ff8c21; /* Оранжевый цвет заголовков - как строительная каска */
    height: 50px;
    text-transform: uppercase;
    letter-spacing: 1px;
    border: none;
    padding: 0 20px;
}

td {
    padding: 15px 20px;
    border-bottom: 1px solid #3d3d3d;
}

/* Блоки сообщений в индустриальном стиле */
.postbody {
    font-size: 15px;
    color: #e0e0e0;
    line-height: 1.7;
    padding: 20px;
    background-color: #262626;
    border-left: 4px solid #ff8c21;
    margin: 15px 0;
}

.postprofile {
    background-color: #1a1a1a;
    padding: 20px;
    border-bottom: 3px solid #ff8c21;
    display: flex;
    align-items: center;
}

.postprofile .avatar {
    border: 3px solid #ff8c21;
    border-radius: 0;
    margin-right: 15px;
}

.username {
    font-weight: 700;
    color: #ff8c21;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.userrank {
    font-size: 13px;
    color: #999999;
    margin-top: 5px;
}

/* Метки ремонтных тем в стиле строительных этикеток */
.topic-tag {
    display: inline-block;
    padding: 5px 10px;
    font-size: 12px;
    font-weight: 700;
    margin-right: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    border: 2px solid;
}

.tag-plumbing {
    border-color: #3498db;
    color: #3498db;
}

.tag-electric {
    border-color: #f1c40f;
    color: #f1c40f;
}

.tag-painting {
    border-color: #2ecc71;
    color: #2ecc71;
}

.tag-floor {
    border-color: #e67e22;
    color: #e67e22;
}

.tag-design {
    border-color: #9b59b6;
    color: #9b59b6;
}

/* Блоки кода и цитат как технические документы */
.code, .quote {
    background-color: #1a1a1a;
    color: #f1c40f; /* Желтый для кода - маркерная лента */
    font-family: 'Source Code Pro', 'Courier New', monospace;
    border: none;
    border-left: 4px solid #f1c40f;
    padding: 20px;
    margin: 15px 0;
    position: relative;
    overflow-x: auto;
}

.quote {
    color: #e0e0e0;
    border-left: 4px solid #3498db;
}

.quote:before {
    content: "❞";
    position: absolute;
    top: 5px;
    left: 15px;
    font-size: 32px;
    color: #3498db;
    opacity: 0.5;
}

/* Кнопки как промышленные переключатели */
.button {
    display: inline-block;
    padding: 12px 25px;
    background-color: #ff8c21;
    color: #1a1a1a;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.button:hover {
    background-color: #e67e22;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.button:active {
    transform: translateY(1px);
}

.button-reply {
    background-color: #e74c3c;
    color: #ffffff;
}

.button-reply:hover {
    background-color: #c0392b;
}

/* Иконки тем в духе строительных знаков */
.topic-icon {
    display: inline-flex;
    align-items: center;
    font-weight: 600;
}

.icon-new:before {
    content: "NEW"; 
    background-color: #e74c3c;
    color: white;
    padding: 3px 8px;
    margin-right: 8px;
    font-size: 12px;
    font-weight: 700;
}

.icon-popular:before {
    content: "HOT";
    background-color: #f39c12;
    color: white;
    padding: 3px 8px;
    margin-right: 8px;
    font-size: 12px;
    font-weight: 700;
}

.icon-solved:before {
    content: "РЕШЕНО";
    background-color: #27ae60;
    color: white;
    padding: 3px 8px;
    margin-right: 8px;
    font-size: 12px;
    font-weight: 700;
}

/* Форма поиска как измерительный инструмент */
.search-form {
    background-color: #1a1a1a;
    padding: 20px;
    margin-bottom: 25px;
    border-left: 4px solid #3498db;
    display: flex;
}

.search-input {
    padding: 12px 15px;
    border: 2px solid #3d3d3d;
    background-color: #262626;
    color: #e0e0e0;
    flex-grow: 1;
    margin-right: 10px;
    transition: all 0.3s ease;
}

.search-input:focus {
    border-color: #3498db;
    outline: none;
    box-shadow: 0 0 10px rgba(52, 152, 219, 0.3);
}

.search-button {
    padding: 12px 25px;
    background-color: #3498db;
    color: #ffffff;
    border: none;
    font-weight: 700;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s ease;
}

.search-button:hover {
    background-color: #2980b9;
}

/* Пагинация как разметка строительной линейки */
.pagination {
    display: flex;
    justify-content: center;
    margin: 30px 0;
    padding: 5px;
    background-color: #1a1a1a;
    border-top: 1px solid #3d3d3d;
    border-bottom: 1px solid #3d3d3d;
}

.pagination a {
    display: inline-block;
    padding: 10px 15px;
    margin: 0 5px;
    background-color: #262626;
    color: #e0e0e0;
    font-weight: 600;
    position: relative;
}

.pagination a:hover {
    background-color: #ff8c21;
    color: #1a1a1a;
    transform: translateY(-3px);
}

.pagination .current {
    background-color: #ff8c21;
    color: #1a1a1a;
}

/* Секция советов по ремонту как инструкция по безопасности */
.repair-tips {
    background-color: #262626;
    border-left: 4px solid #f1c40f;
    padding: 20px;
    margin: 20px 0;
    position: relative;
}

.repair-tips:before {
    content: "⚠️";
    font-size: 24px;
    position: absolute;
    top: 15px;
    right: 15px;
}

.repair-tips h4 {
    color: #f1c40f;
    margin-top: 0;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 700;
}

/* Калькуляторы как панель управления */
.calc-section {
    background-color: #1a1a1a;
    padding: 20px;
    margin: 20px 0;
    border: 1px solid #3d3d3d;
    border-top: 5px solid #27ae60;
}

.calc-section h3 {
    color: #27ae60;
    margin-top: 0;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 700;
}

/* Галерея ремонтных работ */
.gallery-section {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
    margin: 20px 0;
}

.gallery-item {
    background-color: #1a1a1a;
    padding: 10px;
    border: 1px solid #3d3d3d;
    transition: all 0.3s ease;
}

.gallery-item:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
    border-color: #ff8c21;
}

.gallery-image {
    width: 100%;
    height: 150px;
    background-color: #333333;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
}

.gallery-title {
    font-weight: 600;
    margin: 0;
    padding: 5px 0;
    text-align: center;
}

/* Секция инструментов как меню магазина */
.tools-section {
    background-color: #1a1a1a;
    padding: 20px;
    margin: 20px 0;
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 15px;
}

.tool-item {
    background-color: #262626;
    padding: 15px;
    text-align: center;
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
}

.tool-item:hover {
    border-bottom-color: #ff8c21;
    transform: translateY(-5px);
}

.tool-icon {
    font-size: 32px;
    margin-bottom: 10px;
}

.tool-name {
    font-weight: 600;
    margin: 0;
}

/* Прогресс-бар для проектов как шкала строительных работ */
.progress-bar {
    height: 30px;
    background-color: #1a1a1a;
    border: 1px solid #3d3d3d;
    margin: 15px 0;
    position: relative;
}

.progress-fill {
    height: 100%;
    background: repeating-linear-gradient(
        45deg,
        #ff8c21,
        #ff8c21 10px,
        #e67e22 10px,
        #e67e22 20px
    );
    width: 75%; /* Пример значения */
    transition: width 1s ease;
}

.progress-text {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    line-height: 30px;
    text-align: center;
    color: #ffffff;
    font-weight: 600;
    text-shadow: 0 0 3px rgba(0, 0, 0, 0.5);
}

/* Адаптивность для мобильных устройств */
@media screen and (max-width: 768px) {
    body {
        max-width: 100%;
        padding: 10px;
    }
    
    .forum-header {
        flex-direction: column;
        text-align: center;
    }
    
    .forum-nav ul {
        flex-direction: column;
    }
    
    .forum-nav a {
        border-right: none;
        border-bottom: 1px solid #333333;
    }
    
    .search-form {
        flex-direction: column;
    }
    
    .search-input {
        margin-right: 0;
        margin-bottom: 10px;
    }
    
    .gallery-section {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
    
    .tools-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }
}