﻿/* ========================================
   АВТОМОБИЛЬНЫЙ ФОРУМ - Web 1.0 Стиль
   Современный ретро дизайн для автолюбителей
   ======================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 14px;
    line-height: 1.6;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    color: #333;
    min-height: 100vh;
}

/* ===== ЗАГОЛОВОК ===== */
.header {
    background: linear-gradient(90deg, #c41e3a 0%, #b31730 100%);
    padding: 20px;
    color: white;
    box-shadow: 0 4px 12px rgba(196, 30, 58, 0.3);
    border-bottom: 4px solid #ff4444;
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    font-size: 32px;
    font-weight: bold;
    letter-spacing: 2px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.logo-icon {
    display: inline-block;
    margin-right: 10px;
    font-size: 36px;
}

.tagline {
    font-size: 12px;
    opacity: 0.9;
    letter-spacing: 1px;
}

/* ===== ОСНОВНОЙ КОНТЕЙНЕР ===== */
.container {
    max-width: 1200px;
    margin: 30px auto;
    padding: 0 15px;
}

/* ===== КАТЕГОРИИ ФОРУМА ===== */
.forum-category {
    background: white;
    border-radius: 8px;
    margin-bottom: 25px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    border-left: 5px solid #c41e3a;
}

.category-header {
    background: linear-gradient(90deg, #2a2a3e 0%, #3a3a4e 100%);
    padding: 15px 20px;
    color: white;
    font-weight: bold;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.category-icon {
    font-size: 20px;
    margin-right: 10px;
}

.category-stats {
    font-size: 12px;
    opacity: 0.8;
    font-weight: normal;
}

/* ===== ФОРУМЫ В КАТЕГОРИИ ===== */
.forum-list {
    list-style: none;
}

.forum-item {
    border-bottom: 1px solid #f0f0f0;
    padding: 15px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: background-color 0.3s ease;
}

.forum-item:hover {
    background-color: #fafafa;
}

.forum-item:last-child {
    border-bottom: none;
}

.forum-info {
    flex: 1;
    display: flex;
    align-items: center;
}

.forum-icon {
    font-size: 24px;
    margin-right: 15px;
    width: 40px;
    text-align: center;
}

.forum-text h3 {
    font-size: 14px;
    margin-bottom: 5px;
}

.forum-text a {
    color: #c41e3a;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.forum-text a:hover {
    color: #ff4444;
    text-decoration: underline;
}

.forum-desc {
    font-size: 12px;
    color: #666;
    margin-top: 3px;
}

.forum-stats {
    display: flex;
    gap: 30px;
    margin-left: 20px;
    text-align: center;
    min-width: 180px;
}

.stat {
    display: flex;
    flex-direction: column;
}

.stat-number {
    font-weight: bold;
    color: #c41e3a;
    font-size: 16px;
}

.stat-label {
    font-size: 11px;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.last-post {
    margin-left: 20px;
    text-align: right;
    min-width: 200px;
    padding-left: 20px;
    border-left: 1px solid #e0e0e0;
}

.last-post-title {
    font-size: 12px;
    font-weight: 600;
    color: #333;
    margin-bottom: 3px;
}

.last-post-time {
    font-size: 11px;
    color: #999;
}

/* ===== ТОПИКИ/ПОСТЫ ===== */
.topic {
    background: white;
    border-radius: 8px;
    margin-bottom: 20px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.topic-header {
    padding: 15px 20px;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.topic-title {
    font-size: 15px;
    font-weight: 600;
    color: #2a2a3e;
    flex: 1;
}

.topic-title a {
    color: #c41e3a;
    text-decoration: none;
    transition: color 0.3s ease;
}

.topic-title a:hover {
    color: #ff4444;
    text-decoration: underline;
}

.topic-meta {
    font-size: 12px;
    color: #999;
    margin-top: 5px;
}

.topic-icon {
    margin-right: 10px;
    font-size: 16px;
}

/* ===== ПОСТЫ ===== */
.post {
    background: white;
    border-radius: 8px;
    margin-bottom: 20px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.post-header {
    background: #f8f8f8;
    padding: 12px 15px;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.post-author {
    font-weight: 600;
    color: #2a2a3e;
}

.post-author.admin {
    color: #c41e3a;
}

.post-author.moderator {
    color: #0066cc;
}

.post-date {
    font-size: 12px;
    color: #999;
}

.post-body {
    padding: 15px 20px;
    font-size: 14px;
    line-height: 1.8;
    color: #333;
}

.post-body p {
    margin-bottom: 10px;
}

.post-body a {
    color: #0066cc;
    text-decoration: none;
    transition: color 0.3s ease;
}

.post-body a:hover {
    text-decoration: underline;
    color: #ff4444;
}

.post-signature {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px dashed #ddd;
    font-size: 12px;
    color: #666;
    font-style: italic;
}

.post-footer {
    background: #f8f8f8;
    padding: 10px 15px;
    border-top: 1px solid #e0e0e0;
    display: flex;
    gap: 10px;
}

.post-actions {
    display: flex;
    gap: 15px;
}

.post-action {
    font-size: 12px;
}

.post-action a {
    color: #c41e3a;
    text-decoration: none;
    transition: color 0.3s ease;
}

.post-action a:hover {
    color: #ff4444;
    text-decoration: underline;
}

/* ===== БОКОВАЯ ПАНЕЛЬ (АВАТАР) ===== */
.post-sidebar {
    width: 120px;
    background: #f8f8f8;
    padding: 15px;
    text-align: center;
    border-right: 1px solid #e0e0e0;
}

.user-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: linear-gradient(135deg, #c41e3a 0%, #ff4444 100%);
    margin: 0 auto 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 40px;
    font-weight: bold;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.user-title {
    font-size: 12px;
    color: #666;
    margin-top: 10px;
}

.user-status {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-top: 8px;
    background: #4caf50;
}

.user-status.offline {
    background: #999;
}

/* ===== ЦИТАТЫ И КОД ===== */
.quote {
    background: #f5f5f5;
    border-left: 4px solid #c41e3a;
    padding: 12px 15px;
    margin: 10px 0;
    font-style: italic;
    color: #555;
    border-radius: 4px;
}

.quote-author {
    font-size: 12px;
    font-weight: 600;
    color: #999;
    margin-bottom: 5px;
    font-style: normal;
}

.code {
    background: #2a2a3e;
    color: #00ff00;
    border: 1px solid #444;
    padding: 12px 15px;
    margin: 10px 0;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    overflow-x: auto;
}

/* ===== КНОПКИ ===== */
.btn {
    display: inline-block;
    padding: 10px 20px;
    background: linear-gradient(90deg, #c41e3a 0%, #ff4444 100%);
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(196, 30, 58, 0.3);
}

.btn-secondary {
    background: linear-gradient(90deg, #2a2a3e 0%, #3a3a4e 100%);
}

.btn-secondary:hover {
    box-shadow: 0 4px 12px rgba(42, 42, 62, 0.3);
}

/* ===== ФОРМЫ ===== */
input[type="text"],
input[type="email"],
input[type="password"],
textarea,
select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: inherit;
    font-size: 14px;
    margin-bottom: 10px;
    transition: border-color 0.3s ease;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: #c41e3a;
    box-shadow: 0 0 0 3px rgba(196, 30, 58, 0.1);
}

textarea {
    resize: vertical;
    min-height: 150px;
}

/* ===== ПОИСК ===== */
.search-box {
    background: white;
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 25px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.search-box input {
    margin-bottom: 0;
}

.search-controls {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

/* ===== ПАГИНАЦИЯ ===== */
.pagination {
    display: flex;
    gap: 5px;
    justify-content: center;
    margin: 25px 0;
    flex-wrap: wrap;
}

.pagination a,
.pagination span {
    padding: 8px 12px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-decoration: none;
    color: #c41e3a;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.pagination a:hover {
    background: #c41e3a;
    color: white;
}

.pagination .current {
    background: #c41e3a;
    color: white;
    border-color: #c41e3a;
}

/* ===== ФУТЕР ===== */
.footer {
    background: linear-gradient(90deg, #2a2a3e 0%, #3a3a4e 100%);
    color: white;
    padding: 30px 20px;
    text-align: center;
    margin-top: 50px;
    border-top: 4px solid #c41e3a;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
}

.footer-links {
    margin-bottom: 15px;
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
}

.footer-links a {
    color: #ff9999;
    text-decoration: none;
    font-size: 13px;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: white;
    text-decoration: underline;
}

.footer-text {
    font-size: 12px;
    opacity: 0.8;
}

/* ===== МОДАЛЬНЫЕ ОКНА ===== */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 20px;
    border-radius: 8px;
    width: 90%;
    max-width: 600px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.modal-header {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 15px;
    color: #2a2a3e;
}

.close-modal {
    float: right;
    font-size: 24px;
    cursor: pointer;
    color: #999;
    transition: color 0.3s ease;
}

.close-modal:hover {
    color: #c41e3a;
}

/* ===== АДАПТИВНЫЙ ДИЗАЙН ===== */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        text-align: center;
    }

    .forum-item {
        flex-direction: column;
        align-items: flex-start;
    }

    .forum-stats,
    .last-post {
        margin-left: 0;
        margin-top: 10px;
        width: 100%;
        border-left: none;
        padding-left: 0;
    }

    .topic-header,
    .post-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .category-header {
        flex-direction: column;
    }

    .category-stats {
        margin-top: 8px;
    }

    .search-controls {
        flex-direction: column;
    }

    .footer-links {
        flex-direction: column;
        gap: 10px;
    }
}

@media (max-width: 480px) {
    body {
        font-size: 13px;
    }

    .logo {
        font-size: 24px;
    }

    .header {
        padding: 15px 10px;
    }

    .container {
        margin: 15px auto;
    }

    .post-sidebar {
        display: none;
    }

    .forum-icon {
        font-size: 20px;
    }

    .btn {
        width: 100%;
        text-align: center;
    }
}

/* ===== СПЕЦИАЛЬНЫЕ ЭФФЕКТЫ ===== */
.highlight {
    background: linear-gradient(120deg, rgba(196, 30, 58, 0.1), transparent);
    padding: 10px;
    border-radius: 4px;
}

.badge {
    display: inline-block;
    padding: 4px 10px;
    background: #c41e3a;
    color: white;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge.new {
    background: #4caf50;
}

.badge.hot {
    background: #ff6f00;
}

.icon-status {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 5px;
}

.icon-status.unread {
    background: #c41e3a;
}

.icon-status.read {
    background: #999;
}