/* Forum topic page — подключается в <head>, чтобы не было скачка при загрузке длинной темы */
.forum-page {
    min-height: 100vh;
    background: #170e09;
    margin-top: 0;
    padding-top: 0;
}

.forum-header {
    position: relative;
    width: 100%;
    height: 400px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.forum-header-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
}

.forum-header-content {
    position: relative;
    z-index: 1;
    color: white;
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    align-items: center;
}

.forum-header-logo {
    display: inline-block;
}

.forum-logo-img {
    max-height: 240px;
    width: auto;
    height: auto;
    transition: transform 0.3s ease, filter 0.3s ease;
}

.forum-header-logo:hover .forum-logo-img {
    transform: scale(1.1);
    filter: brightness(1.2) drop-shadow(0 0 10px rgba(212, 175, 55, 0.6));
}

.forum-title {
    font-size: 3rem;
    font-weight: bold;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

.forum-description {
    font-size: 1.2rem;
    max-width: 800px;
    margin: 0 auto;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
}

.forum-content {
    min-height: calc(100vh - 400px);
    background-size: auto;
    background-position: top left;
    background-repeat: repeat;
    padding: 40px 20px;
}

.forum-container {
    max-width: 1400px;
    margin: 0 auto;
}

.forum-breadcrumbs {
    color: #d4af37;
    margin-bottom: 20px;
    font-size: 1.2rem;
    font-weight: bold;
}

.forum-breadcrumbs a {
    color: #d4af37;
    text-decoration: none;
    font-weight: bold;
}

.forum-topic-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 15px;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 2px solid rgba(212, 175, 55, 0.3);
}

.forum-topic-actions {
    position: relative;
}

.forum-action-dropdown {
    position: relative;
    display: inline-block;
}

.forum-action-btn {
    background: rgba(212, 175, 55, 0.2);
    border: 2px solid rgba(212, 175, 55, 0.3);
    border-radius: 5px;
    padding: 8px 15px;
    color: #d4af37;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 5px;
}

.forum-action-btn:hover {
    background: rgba(212, 175, 55, 0.3);
    border-color: #d4af37;
}

.forum-action-menu {
    position: absolute;
    bottom: 100%;
    right: 0;
    margin-bottom: 5px;
    background: rgba(0, 0, 0, 0.95);
    border: 2px solid rgba(212, 175, 55, 0.3);
    border-radius: 5px;
    min-width: 200px;
    display: block;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: opacity 0.1s ease, visibility 0.1s ease, transform 0.1s ease;
    z-index: 1000;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
    pointer-events: none;
}

.forum-action-dropdown:hover .forum-action-menu,
.forum-action-menu:hover {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

.forum-action-menu {
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: opacity 0.15s ease, visibility 0.15s ease, transform 0.15s ease;
}

.forum-action-item {
    display: block;
    width: 100%;
    padding: 10px 15px;
    background: transparent;
    border: none;
    color: #fff;
    text-align: left;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 0.9rem;
}

.forum-action-item:hover {
    background: rgba(212, 175, 55, 0.2);
    color: #d4af37;
}

.forum-action-danger {
    color: #ff4444;
}

.forum-action-danger:hover {
    background: rgba(255, 68, 68, 0.2);
    color: #ff6666;
}

.forum-post-actions {
    position: relative;
}

.forum-badge-hidden {
    background: #666;
    color: #fff;
    padding: 5px 10px;
    border-radius: 3px;
    font-size: 0.8rem;
    font-weight: bold;
}

.forum-edit-form {
    background: rgba(0, 0, 0, 0.7);
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 30px;
    border: 2px solid rgba(212, 175, 55, 0.3);
}

.forum-edit-form h3 {
    color: #d4af37;
    margin-bottom: 20px;
}

.forum-badge {
    padding: 5px 10px;
    border-radius: 3px;
    font-size: 0.9rem;
    font-weight: bold;
}

.forum-badge-pinned {
    background: #d4af37;
    color: #000;
}

.forum-badge-locked {
    background: #666;
    color: #fff;
}

.forum-posts {
    background: rgba(0, 0, 0, 0.7);
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 30px;
}

.forum-post {
    display: flex;
    gap: 20px;
    padding: 20px;
    border-bottom: 1px solid rgba(212, 175, 55, 0.2);
    margin-bottom: 20px;
}

.forum-post:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.forum-post-author {
    min-width: 200px;
    padding-right: 20px;
    border-right: 1px solid rgba(212, 175, 55, 0.2);
}

.forum-post-avatar {
    width: 160px;
    height: 160px;
    margin-bottom: 10px;
}

.forum-post-avatar img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.forum-race-icon {
    width: 160px;
    height: 160px;
    object-fit: contain;
}

.forum-post-author-name {
    color: #d4af37;
    font-weight: bold;
    font-size: 1.1rem;
    margin-bottom: 5px;
}

.forum-post-character-info {
    color: #999;
    font-size: 0.9rem;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.forum-post-reputation {
    color: #b8860b;
    font-size: 0.9rem;
    margin-top: 6px;
}

.forum-post-content {
    flex: 1;
}

.forum-post-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.forum-post-date {
    color: #999;
    font-size: 0.9rem;
    text-align: right;
}

.forum-post-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid rgba(212, 175, 55, 0.1);
}

.forum-post-title h3 {
    color: #d4af37;
    margin: 0;
    font-size: 1.3rem;
    font-weight: bold;
}

.forum-topic-title-in-post {
    color: #d4af37;
    margin: 0 0 20px 0;
    font-size: 2rem;
    font-weight: bold;
    padding-bottom: 15px;
    border-bottom: 2px solid rgba(212, 175, 55, 0.3);
}

.forum-post-votes {
    display: flex;
    gap: 10px;
}

.forum-topic-votes {
    display: flex;
    gap: 10px;
    align-items: center;
}

.forum-vote-btn {
    background: rgba(212, 175, 55, 0.1);
    border: 2px solid rgba(212, 175, 55, 0.3);
    border-radius: 5px;
    padding: 8px 15px;
    color: #d4af37;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 5px;
}

.forum-vote-btn:hover {
    background: rgba(212, 175, 55, 0.2);
    border-color: #d4af37;
}

.forum-vote-btn.active {
    background: rgba(212, 175, 55, 0.4);
    border-color: #d4af37;
    color: #f4d03f;
}

.forum-vote-like.active {
    background: rgba(76, 175, 80, 0.3);
    border-color: #4CAF50;
    color: #81C784;
}

.forum-vote-dislike.active {
    background: rgba(244, 67, 54, 0.3);
    border-color: #F44336;
    color: #E57373;
}

.vote-count {
    font-weight: bold;
}

.quote-button {
    position: absolute;
    background: rgba(212, 175, 55, 0.9);
    border: 2px solid #d4af37;
    border-radius: 5px;
    padding: 8px 15px;
    color: #000;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: bold;
    z-index: 1000;
    display: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
}

.quote-button:hover {
    background: #d4af37;
}

.forum-post-text {
    position: relative;
}

.forum-edit-post-form {
    background: rgba(0, 0, 0, 0.7);
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
    border: 2px solid rgba(212, 175, 55, 0.3);
}

.forum-edit-post-form h3 {
    color: #d4af37;
    margin-bottom: 20px;
}

.forum-post-edited {
    color: #666;
}

.forum-post-text {
    color: white;
    line-height: 1.6;
}

.forum-post-text img {
    max-width: 100%;
    height: auto;
    border-radius: 5px;
}

.forum-class-name {
    font-weight: bold;
}

.class-warrior { color: #C79C6E; }
.class-paladin { color: #F58CBA; }
.class-hunter { color: #ABD473; }
.class-rogue { color: #FFF569; }
.class-priest { color: #FFFFFF; }
.class-deathknight { color: #C41F3B; }
.class-shaman { color: #0070DE; }
.class-mage { color: #69CCF0; }
.class-warlock { color: #9482C9; }
.class-demonhunter { color: #A330C9; }
.class-druid { color: #FF7D0A; }
.class-monk { color: #00FF96; }

.forum-reply-form {
    background: rgba(0, 0, 0, 0.7);
    border-radius: 10px;
    padding: 20px;
}

.forum-reply-form h3 {
    color: #d4af37;
    margin-bottom: 20px;
}

.forum-notice {
    background: rgba(212, 175, 55, 0.2);
    border: 2px solid #d4af37;
    border-radius: 5px;
    padding: 15px;
    text-align: center;
    color: #d4af37;
}

.forum-reply-form .form-control {
    width: 100%;
    padding: 12px 15px;
    background: rgba(0, 0, 0, 0.6);
    border: 2px solid rgba(212, 175, 55, 0.3);
    border-radius: 5px;
    color: white;
    font-size: 1rem;
    transition: all 0.3s;
    font-family: inherit;
}

.forum-reply-form .form-control:focus {
    outline: none;
    border-color: #d4af37;
    background: rgba(0, 0, 0, 0.8);
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.3);
}

.forum-reply-form .btn {
    padding: 12px 30px;
    border-radius: 5px;
    border: none;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s;
    text-transform: uppercase;
    background: linear-gradient(135deg, #d4af37 0%, #f4d03f 100%);
    color: #000;
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.4);
    margin-top: 15px;
}

.forum-reply-form .btn:hover {
    background: linear-gradient(135deg, #f4d03f 0%, #d4af37 100%);
    box-shadow: 0 6px 20px rgba(212, 175, 55, 0.6);
    transform: translateY(-2px);
}

/* Кнопки в формах редактирования темы и ответов */
.forum-edit-form .form-actions,
.forum-edit-post-form .form-actions {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid rgba(212, 175, 55, 0.2);
}

.forum-edit-form .btn,
.forum-edit-post-form .btn {
    padding: 10px 24px;
    border-radius: 6px;
    border: none;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-block;
}

.forum-edit-form .btn-primary,
.forum-edit-post-form .btn-primary {
    background: linear-gradient(135deg, #d4af37 0%, #f4d03f 100%);
    color: #000;
    box-shadow: 0 2px 8px rgba(212, 175, 55, 0.4);
}

.forum-edit-form .btn-primary:hover,
.forum-edit-post-form .btn-primary:hover {
    background: linear-gradient(135deg, #f4d03f 0%, #d4af37 100%);
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.5);
    transform: translateY(-1px);
}

.forum-edit-form .btn-secondary,
.forum-edit-post-form .btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: #d4af37;
    border: 2px solid rgba(212, 175, 55, 0.4);
}

.forum-edit-form .btn-secondary:hover,
.forum-edit-post-form .btn-secondary:hover {
    background: rgba(212, 175, 55, 0.15);
    border-color: #d4af37;
    color: #fff;
}

/* Мобильная версия страницы топика */
@media (max-width: 768px) {
    .forum-header {
        height: 220px;
    }

    .forum-header-content {
        padding: 15px 12px;
    }

    .forum-logo-img {
        max-height: 120px;
    }

    .forum-content {
        min-height: auto;
        padding: 20px 12px;
    }

    .forum-container {
        padding: 0 4px;
    }

    .forum-breadcrumbs {
        font-size: 0.85rem;
        margin-bottom: 12px;
        word-break: break-word;
        line-height: 1.4;
    }

    .forum-topic-header {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
        margin-bottom: 20px;
        padding-bottom: 12px;
    }

    .forum-topic-votes {
        order: 1;
    }

    .forum-topic-actions {
        order: 2;
    }

    .forum-topic-votes,
    .forum-topic-actions {
        justify-content: flex-start;
    }

    .forum-posts {
        padding: 12px 10px;
        margin-bottom: 20px;
    }

    .forum-post {
        flex-direction: column;
        gap: 12px;
        padding: 15px 10px;
        margin-bottom: 15px;
    }

    .forum-post-author {
        min-width: 0;
        width: 100%;
        padding-right: 0;
        padding-bottom: 12px;
        border-right: none;
        border-bottom: 1px solid rgba(212, 175, 55, 0.2);
        display: flex;
        align-items: center;
        gap: 12px;
    }

    .forum-post-avatar,
    .forum-race-icon {
        width: 56px;
        height: 56px;
        min-width: 56px;
        margin-bottom: 0;
    }

    .forum-post-author-info {
        flex: 1;
        min-width: 0;
    }

    .forum-post-author-name {
        font-size: 1rem;
    }

    .forum-post-character-info {
        font-size: 0.8rem;
    }

    .forum-post-reputation {
        font-size: 0.8rem;
    }

    .forum-post-header {
        flex-wrap: wrap;
        gap: 8px;
    }

    .forum-post-date {
        font-size: 0.8rem;
        width: 100%;
        text-align: left;
    }

    .forum-topic-title-in-post {
        font-size: 1.25rem;
        margin-bottom: 12px;
        padding-bottom: 10px;
    }

    .forum-post-text {
        font-size: 0.95rem;
    }

    .forum-post-footer {
        flex-wrap: wrap;
        gap: 10px;
        margin-top: 12px;
        padding-top: 12px;
    }

    .forum-post-votes {
        flex-wrap: wrap;
    }

    .forum-vote-btn {
        padding: 6px 10px;
        font-size: 0.85rem;
    }

    .forum-action-btn {
        padding: 6px 10px;
        font-size: 0.85rem;
    }

    .forum-edit-form,
    .forum-edit-post-form,
    .forum-reply-form {
        padding: 15px 12px;
    }

    .forum-edit-form h3,
    .forum-edit-post-form h3,
    .forum-reply-form h3 {
        font-size: 1.1rem;
        margin-bottom: 15px;
    }

    .forum-reply-form .form-control {
        padding: 10px 12px;
        font-size: 16px; /* предотвращает zoom на iOS при фокусе */
    }
}
