/* forumnew.css - Стили для форума в стиле Dwar-Box */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: #1a0f0a;
    background-image: radial-gradient(circle, #2d1b13 0%, #0f0805 100%);
    color: #2b1a0a;
    font-family: "Georgia", "Times New Roman", serif;
    min-height: 100vh;
}

header {
    background: linear-gradient(to bottom, #422616 0%, #21120a 100%);
    border-bottom: 3px double #8c6939;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 10px rgba(0,0,0,0.5);
}

.logo {
    color: #f4e5c3;
    font-size: 24px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-shadow: 2px 2px 4px #000;
    text-decoration: none;
}

.nav-menu {
    display: flex;
    gap: 5px;
}

.nav-link {
    color: #f4e5c3;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 3px;
    transition: background 0.3s;
    font-weight: bold;
}

.nav-link:hover {
    background: rgba(255,255,255,0.1);
}

.nav-link-active {
    background: rgba(255,255,255,0.2);
    border-bottom: 2px solid #d4af37;
}

.game-container {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 20px;
    max-width: 1200px;
    margin: 20px auto;
    padding: 0 20px;
}

.sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.dwar-box {
    background: #f4e5c3;
    border: 4px double #8c6939;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.6), inset 0 0 30px rgba(139, 115, 85, 0.2);
    padding: 20px;
    border-radius: 4px;
    position: relative;
}

.dwar-box::before {
    content: "";
    position: absolute;
    top: 2px;
    left: 2px;
    right: 2px;
    bottom: 2px;
    border: 1px solid #d4af37;
    pointer-events: none;
}

.dwar-box h1, .dwar-box h2, .dwar-box h3 {
    color: #5c1306;
    text-align: center;
    margin-top: 0;
    border-bottom: 1px dashed #8c6939;
    padding-bottom: 8px;
    text-transform: uppercase;
    font-size: 16px;
    letter-spacing: 0.5px;
}

.dwar-box h1 {
    font-size: 22px;
}

.side-menu {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.side-menu a {
    display: block;
    padding: 10px 14px;
    background: linear-gradient(to bottom, #fffdf7 0%, #e3d2aa 100%);
    border: 1px solid #6e512c;
    border-top-color: #ebdcb9;
    border-bottom-color: #523b1f;
    color: #3b240f;
    text-decoration: none;
    font-weight: bold;
    font-size: 14px;
    border-radius: 3px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
    transition: all 0.15s ease-in-out;
}

.side-menu a:hover {
    background: linear-gradient(to bottom, #731a0b 0%, #541105 100%);
    color: #fff4d4;
    border-color: #380a02;
    border-top-color: #9c2714;
    padding-left: 18px;
    text-shadow: 1px 1px 1px rgba(0,0,0,0.5);
}

.forum-page-content {
    background: #f4e5c3;
}

.forum-page-header {
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px dashed #8c6939;
}

.forum-page-header h1 {
    color: #5c1306;
    text-align: center;
    margin: 0 0 10px 0;
    font-size: 24px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.forum-breadcrumb {
    text-align: center;
    font-size: 13px;
    color: #6e512c;
}

.forum-breadcrumb a {
    color: #801c0c;
    font-weight: bold;
    text-decoration: none;
}

.forum-breadcrumb a:hover {
    color: #bd2c16;
    text-decoration: underline;
}

.forum-breadcrumb span {
    margin: 0 5px;
}

.forum-group {
    margin-bottom: 30px;
    background: rgba(255, 255, 255, 0.3);
    border: 1px solid #d4af37;
}

.forum-group-header {
    background: linear-gradient(to bottom, #422616 0%, #21120a 100%);
    padding: 12px 15px;
    border-bottom: 2px double #8c6939;
}

.forum-group-header h2 {
    color: #f4e5c3;
    margin: 0;
    font-size: 16px;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-shadow: 1px 1px 0 #000;
}

.forum-categories {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1px;
    background: #8c6939;
}

.forum-category {
    background: #f4e5c3;
    transition: all 0.2s ease;
}

.forum-category:hover {
    background: #fff8e8;
    transform: translateX(3px);
}

.forum-category-link {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    text-decoration: none;
    gap: 12px;
}

.forum-category-icon {
    font-size: 24px;
}

.forum-category-title {
    color: #3b240f;
    font-weight: bold;
    font-size: 14px;
}

.btn {
    display: inline-block;
    padding: 8px 16px;
    border: none;
    cursor: pointer;
    font-family: "Georgia", serif;
    font-weight: bold;
    font-size: 13px;
    border-radius: 3px;
    transition: all 0.15s;
}

.btn-primary {
    border: 1px solid #420b02;
    border-top-color: #e6533c;
    color: #fff2cc;
    text-shadow: 1px 1px 1px rgba(0,0,0,0.6);
    background: linear-gradient(to bottom, #bd2c16 0%, #801c0c 50%, #5c1306 100%);
}

.btn-primary:hover {
    filter: brightness(1.1);
    transform: translateY(-1px);
}

.forum-actions {
    margin-bottom: 20px;
    text-align: right;
}

.forum-topics {
    border: 1px solid #8c6939;
}

.forum-topic {
    padding: 15px;
    border-bottom: 1px solid #d4af37;
    transition: background 0.2s;
}

.forum-topic:hover {
    background: rgba(212, 175, 55, 0.15);
}

.topic-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: bold;
    margin-right: 10px;
}

.topic-pinned {
    background: #2e5c2e;
    color: #e8f5e8;
    border: 1px solid #5c8c5c;
}

.topic-closed {
    background: #5c1306;
    color: #ffccaa;
    border: 1px solid #bd2c16;
}

.topic-title {
    font-size: 16px;
    font-weight: bold;
    color: #5c1306;
    text-decoration: none;
    display: inline-block;
    margin-bottom: 8px;
}

.topic-title:hover {
    color: #bd2c16;
    text-decoration: underline;
}

.topic-meta {
    font-size: 12px;
    color: #6e512c;
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.topic-author b, .topic-replies b {
    color: #801c0c;
}

.forum-posts {
    border: 1px solid #8c6939;
    margin-bottom: 25px;
}

.forum-post {
    display: flex;
    gap: 20px;
    padding: 20px;
    border-bottom: 1px solid #d4af37;
}

.forum-post-starter {
    background: rgba(212, 175, 55, 0.1);
    border-left: 4px solid #d4af37;
}

.post-author {
    text-align: center;
    min-width: 130px;
}

.post-author-avatar {
    width: 50px;
    height: 50px;
    background: linear-gradient(to bottom, #bd2c16 0%, #5c1306 100%);
    color: #f4e5c3;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    font-weight: bold;
    margin: 0 auto 10px;
    border: 2px solid #d4af37;
}

.post-author-name {
    font-weight: bold;
    color: #5c1306;
    margin-bottom: 3px;
}

.post-author-level {
    font-size: 11px;
    color: #6e512c;
}

.post-content {
    flex: 1;
}

.post-date {
    font-size: 11px;
    color: #8c6939;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px dashed #d4af37;
}

.post-text {
    font-size: 14px;
    line-height: 1.5;
    color: #2b1a0a;
}

.post-text p {
    margin-bottom: 12px;
}

.forum-form {
    background: rgba(255, 255, 255, 0.5);
    border: 2px double #8c6939;
    padding: 20px;
    margin-top: 25px;
}

.forum-form h3 {
    color: #5c1306;
    text-align: center;
    margin: 0 0 15px 0;
    font-size: 18px;
    text-transform: uppercase;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #4a321a;
}

.form-input {
    width: 100%;
    box-sizing: border-box;
    background: #fffbf0;
    border: 1px solid #705431;
    padding: 8px 10px;
    font-size: 14px;
    color: #2b1a0a;
    border-radius: 3px;
    font-family: "Georgia", serif;
}

.form-input:focus {
    outline: none;
    border-color: #d4af37;
    box-shadow: 0 0 5px rgba(212, 175, 55, 0.6);
}

textarea.form-input {
    resize: vertical;
    min-height: 120px;
}

.form-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 15px;
}

.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin: 25px 0;
    flex-wrap: wrap;
}

.pagination-link {
    padding: 5px 12px;
    background: #f4e5c3;
    border: 1px solid #705431;
    text-decoration: none;
    color: #3b240f;
    font-weight: bold;
    border-radius: 3px;
    transition: all 0.15s;
}

.pagination-link:hover {
    background: linear-gradient(to bottom, #bd2c16 0%, #5c1306 100%);
    color: #fff2cc;
    border-color: #d4af37;
}

.pagination-link.active {
    background: linear-gradient(to bottom, #bd2c16 0%, #5c1306 100%);
    color: #fff2cc;
    border-color: #d4af37;
}

.alert {
    padding: 12px 15px;
    border-radius: 3px;
    margin-bottom: 15px;
    font-size: 13px;
}

.alert-info {
    background: #e8dcc8;
    border: 1px solid #8c6939;
    border-left: 5px solid #8c6939;
    color: #4a321a;
}

.alert-warning {
    background: #f0dcc8;
    border: 1px solid #bd2c16;
    border-left: 5px solid #bd2c16;
    color: #5c1306;
}

.error-message {
    background: #dcc8b8;
    border: 1px solid #bd2c16;
    border-left: 5px solid #bd2c16;
    color: #5c1306;
    padding: 12px 15px;
    border-radius: 3px;
    margin-bottom: 20px;
}

.empty-state {
    text-align: center;
    padding: 50px 20px;
    color: #6e512c;
    font-size: 16px;
    font-style: italic;
}

.mobile-bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #21120a;
    border-top: 2px solid #8c6939;
    padding: 10px 20px;
    justify-content: space-around;
    z-index: 1000;
}

.mobile-nav-item {
    text-align: center;
    text-decoration: none;
    color: #f4e5c3;
    transition: color 0.3s;
    padding: 5px;
}

.mobile-nav-item-active {
    color: #d4af37;
}

.mobile-nav-icon {
    display: block;
    font-size: 22px;
    margin-bottom: 4px;
}

.mobile-nav-text {
    font-size: 11px;
}

@media (max-width: 768px) {
    .game-container {
        grid-template-columns: 1fr;
        margin-bottom: 70px;
    }
    
    .forum-post {
        flex-direction: column;
        gap: 12px;
    }
    
    .post-author {
        text-align: left;
        min-width: auto;
        display: flex;
        align-items: center;
        gap: 12px;
    }
    
    .post-author-avatar {
        margin: 0;
        width: 40px;
        height: 40px;
        font-size: 18px;
    }
    
    .forum-categories {
        grid-template-columns: 1fr;
    }
    
    .topic-meta {
        flex-direction: column;
        gap: 5px;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .form-actions .btn {
        width: 100%;
        text-align: center;
    }
    
    .forum-actions {
        text-align: center;
    }
    
    .btn-primary {
        width: 100%;
        text-align: center;
    }
    
    .mobile-bottom-nav {
        display: flex;
    }
}

.forum-group,
.forum-topic,
.forum-post {
    animation: fadeIn 0.25s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}