/* 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);
}

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

.forum-menu-box {
    padding-top: 16px;
}

.forum-side-nav {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 4px;
}

.forum-side-group {
    background: rgba(255, 251, 240, 0.55);
    border: 1px solid rgba(140, 105, 57, 0.45);
    border-radius: 4px;
    padding: 10px 8px 8px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45);
}

.forum-side-group-title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 4px 10px;
    font-size: 11px;
    font-weight: bold;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: #5c1306;
    text-align: center;
}

.forum-side-group-title::before,
.forum-side-group-title::after {
    content: "";
    flex: 1;
    height: 1px;
    background: linear-gradient(to right, transparent, #8c6939, transparent);
}

.forum-side-group-title span {
    white-space: nowrap;
}

.forum-side-cats {
    gap: 5px;
}

.forum-side-cats a {
    position: relative;
    padding: 9px 12px 9px 14px;
    font-size: 13px;
    line-height: 1.25;
    border-radius: 4px;
    background: linear-gradient(to bottom, #fffdf8 0%, #ead9b4 100%);
    box-shadow: 0 1px 2px rgba(60, 35, 10, 0.18);
    overflow: hidden;
}

.forum-side-cats a::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: #c4a35a;
    opacity: 0.75;
}

.forum-side-cats a:hover {
    padding-left: 16px;
    background: linear-gradient(to bottom, #fff8e8 0%, #dfc897 100%);
    color: #5c1306;
    border-color: #8c6939;
    border-top-color: #ebdcb9;
    border-bottom-color: #6e512c;
    text-shadow: none;
}

.forum-side-cats a:hover::before {
    background: #bd2c16;
    opacity: 1;
}

.forum-side-cats a.is-active {
    background: linear-gradient(to bottom, #bd2c16 0%, #801c0c 55%, #5c1306 100%);
    color: #fff2cc;
    border-color: #420b02;
    border-top-color: #e6533c;
    box-shadow: inset 0 1px 0 rgba(255, 200, 140, 0.25), 0 2px 4px rgba(60, 10, 0, 0.25);
    text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.45);
    padding-left: 14px;
}

.forum-side-cats a.is-active::before {
    background: #d4af37;
    opacity: 1;
    width: 4px;
}

.forum-side-cats a.is-active:hover {
    padding-left: 14px;
    filter: brightness(1.05);
    color: #fff2cc;
}

.forum-side-service {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px dashed #8c6939;
}

.forum-side-service a {
    font-size: 12px;
    padding: 8px 12px;
    font-weight: normal;
    background: transparent;
    border-style: dashed;
    box-shadow: none;
    color: #6e512c;
}

.forum-side-service a:hover {
    background: rgba(189, 44, 22, 0.08);
    color: #5c1306;
    border-style: solid;
    border-color: #8c6939;
    padding-left: 12px;
    text-shadow: none;
}

.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;
}

.topic-mod-actions {
    text-align: center;
    margin-top: 10px;
}

.topic-mod-actions .post-action-link {
    margin: 0 6px;
}

.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-login-cta {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 20px;
    padding: 14px 16px;
    background: linear-gradient(135deg, rgba(255, 248, 232, 0.95) 0%, rgba(227, 210, 170, 0.75) 100%);
    border: 1px solid #8c6939;
    border-left: 4px solid #bd2c16;
    border-radius: 4px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5), 0 2px 6px rgba(60, 35, 10, 0.12);
}

.forum-login-cta-icon {
    flex-shrink: 0;
    width: 42px;
    height: 42px;
    position: relative;
    background: linear-gradient(to bottom, #bd2c16 0%, #5c1306 100%);
    border: 1px solid #d4af37;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(60, 10, 0, 0.25);
}

.forum-login-cta-icon::before {
    content: "!";
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #f4e5c3;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 22px;
    font-weight: bold;
    line-height: 42px;
    text-align: center;
    text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.45);
}

.forum-login-cta-body {
    flex: 1;
    min-width: 0;
}

.forum-login-cta-title {
    font-size: 14px;
    font-weight: bold;
    color: #5c1306;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    margin-bottom: 3px;
}

.forum-login-cta-text {
    font-size: 13px;
    color: #4a321a;
    line-height: 1.35;
}

.forum-login-cta-btn {
    flex-shrink: 0;
    text-decoration: none;
    text-align: center;
}

.forum-topics {
    display: flex;
    flex-direction: column;
    gap: 12px;
    border: none;
}

.forum-topic {
    padding: 14px 16px;
    border: 1px solid #8c6939;
    background: rgba(255, 255, 255, 0.35);
    border-radius: 3px;
    transition: background 0.2s;
}

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

.topic-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 6px;
}

.topic-card-title-wrap {
    flex: 1;
    min-width: 0;
}

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

.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;
    margin-bottom: 0;
    line-height: 1.35;
}

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

.topic-date {
    flex-shrink: 0;
    font-size: 12px;
    color: #6e512c;
    white-space: nowrap;
    padding: 3px 8px;
    border: 1px solid #d4af37;
    border-radius: 10px;
    background: rgba(255, 248, 232, 0.7);
}

.topic-author {
    font-size: 13px;
    color: #801c0c;
    font-weight: bold;
    margin-bottom: 8px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    flex-wrap: wrap;
}

.post-author-name {
    font-weight: bold;
    color: #5c1306;
    margin-bottom: 3px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    flex-wrap: wrap;
}

.player-info-link {
    display: inline-flex;
    align-items: center;
    line-height: 1;
    flex-shrink: 0;
}

.player-info-link:hover .player-info-icon {
    filter: brightness(1.2);
}

.player-info-icon {
    vertical-align: middle;
    border: 0;
}

.topic-preview {
    font-size: 13px;
    line-height: 1.45;
    color: #3b240f;
    margin-bottom: 10px;
}

.topic-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding-top: 8px;
    border-top: 1px dashed #d4af37;
    font-size: 12px;
    color: #6e512c;
}

.topic-last b {
    color: #801c0c;
}

.topic-replies {
    flex-shrink: 0;
    padding: 3px 8px;
    border: 1px solid #d4af37;
    border-radius: 10px;
    background: rgba(255, 248, 232, 0.7);
    font-weight: bold;
    color: #5c1306;
}

.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-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;
}

.post-actions {
    margin-top: 10px;
    padding-top: 8px;
    border-top: 1px dashed #d4af37;
}

.post-action-link {
    font-size: 12px;
    font-weight: bold;
    color: #801c0c;
    text-decoration: none;
}

.post-action-link:hover {
    color: #bd2c16;
    text-decoration: underline;
}

.forum-edit-post-form {
    margin-top: 4px;
}

.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;
}

.forum-format-toolbar {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 10px 0;
    padding: 8px 10px;
    background: rgba(255, 251, 240, 0.7);
    border: 1px solid #8c6939;
    border-radius: 4px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55);
}

.forum-form .forum-format-btn,
.forum-edit-post-form .forum-format-btn,
button.forum-format-btn {
    appearance: none;
    -webkit-appearance: none;
    min-width: 38px;
    height: 34px;
    margin: 0;
    padding: 0 12px;
    cursor: pointer;
    font-family: Georgia, "Times New Roman", serif !important;
    font-size: 15px;
    line-height: 1;
    color: #3b240f !important;
    background: linear-gradient(to bottom, #fffdf8 0%, #ead9b4 100%) !important;
    border: 1px solid #6e512c !important;
    border-top-color: #f0e4c4 !important;
    border-bottom-color: #523b1f !important;
    border-radius: 4px !important;
    box-shadow: 0 1px 3px rgba(60, 35, 10, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.55);
    transition: filter 0.15s ease, transform 0.1s ease;
}

.forum-form .forum-format-btn:hover,
.forum-edit-post-form .forum-format-btn:hover,
button.forum-format-btn:hover {
    color: #5c1306 !important;
    background: linear-gradient(to bottom, #fff8e8 0%, #dfc897 100%) !important;
    border-color: #8c6939 !important;
    filter: brightness(1.03);
}

.forum-form .forum-format-btn:active,
.forum-edit-post-form .forum-format-btn:active,
button.forum-format-btn:active {
    transform: translateY(1px);
    box-shadow: inset 0 1px 3px rgba(60, 35, 10, 0.25);
}

.forum-format-btn b,
.forum-format-btn i,
.forum-format-btn u {
    font-size: 15px;
    color: inherit;
}

.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;
    }

    .topic-card-header {
        flex-direction: column;
        align-items: stretch;
    }

    .topic-date {
        align-self: flex-end;
    }

    .topic-card-footer {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .form-actions .btn {
        width: 100%;
        text-align: center;
    }
    
    .forum-actions {
        text-align: center;
    }

    .forum-login-cta {
        flex-direction: column;
        text-align: center;
    }

    .forum-login-cta-btn {
        width: 100%;
    }
    
    .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);
    }
}