/* Container do fórum */
.forum-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 30px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    box-shadow: 0 6px 25px var(--shadow-dark);
    backdrop-filter: blur(10px);
}

/* Abas do fórum */
.forum-tabs {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--border-color);
}

.tab-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 16px;
    background: linear-gradient(135deg, rgba(30, 24, 18, 0.6), rgba(20, 16, 12, 0.6));
    border: 1px solid var(--border-color);
    border-radius: 6px;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.tab-link::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(212, 175, 55, 0.2), transparent);
    transform: translate(-50%, -50%);
    transition: width 0.4s, height 0.4s;
}

.tab-link:hover::before {
    width: 200px;
    height: 200px;
}

.tab-icon {
    font-size: 18px;
    transition: transform 0.3s ease;
}

.tab-text {
    font-family: 'Cinzel', serif;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    letter-spacing: 0.5px;
    transition: color 0.3s ease;
}

.tab-link:hover {
    border-color: var(--accent-gold);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.3);
}

.tab-link:hover .tab-icon {
    transform: scale(1.1);
}

.tab-link:hover .tab-text {
    color: var(--accent-gold);
}

.tab-create {
    background: linear-gradient(135deg, rgba(201, 169, 97, 0.15), rgba(212, 175, 55, 0.1));
    border-color: rgba(201, 169, 97, 0.4);
}

.tab-create .tab-text {
    color: var(--primary-gold);
}

.tab-create:hover {
    background: linear-gradient(135deg, rgba(201, 169, 97, 0.25), rgba(212, 175, 55, 0.15));
    border-color: var(--accent-gold);
}

/* Alertas */
.forum-alert {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    margin-bottom: 25px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    border: 1px solid;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.alert-icon {
    font-size: 20px;
    font-weight: bold;
}

.alert-success {
    background: rgba(106, 191, 105, 0.15);
    border-color: rgba(106, 191, 105, 0.4);
    color: #8cd68b;
}

.alert-error {
    background: rgba(220, 90, 85, 0.15);
    border-color: rgba(220, 90, 85, 0.4);
    color: #e89693;
}

/* Estado vazio */
.empty-state {
    text-align: center;
    padding: 80px 40px;
    background: rgba(30, 24, 18, 0.3);
    border: 2px dashed rgba(201, 169, 97, 0.3);
    border-radius: 12px;
}

.empty-icon {
    font-size: 80px;
    display: block;
    margin-bottom: 20px;
    opacity: 0.5;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

.empty-state h3 {
    font-family: 'Cinzel', serif;
    color: var(--accent-gold);
    font-size: 24px;
    margin-bottom: 10px;
    letter-spacing: 1px;
}

.empty-state p {
    color: var(--text-secondary);
    font-size: 16px;
    margin-bottom: 30px;
}

.btn-create-topic {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 30px;
    background: linear-gradient(135deg, rgba(30, 24, 18, 0.9), rgba(20, 16, 12, 0.9));
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--accent-gold);
    text-decoration: none;
    font-family: 'Cinzel', serif;
    font-weight: 600;
    font-size: 14px;
    letter-spacing: 1px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-create-topic:hover {
    border-color: var(--accent-gold);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.3);
}

.btn-icon {
    font-size: 18px;
}

/* Wrapper dos tópicos */
.topics-wrapper {
    animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.topics-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--border-color);
}

.header-icon {
    font-size: 20px;
    color: var(--primary-gold);
    opacity: 0.6;
}

.topics-header h3 {
    font-family: 'Cinzel', serif;
    color: var(--accent-gold);
    font-size: 20px;
    font-weight: 700;
    letter-spacing: 2px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    margin: 0;
}

/* Lista de tópicos */
.topics-list {
    list-style: none;
    display: grid;
    gap: 15px;
    margin: 0;
    padding: 0;
}

.topic-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: rgba(30, 24, 18, 0.4);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    transition: all 0.3s ease;
    gap: 20px;
    min-width: 0;
    /* IMPORTANTE: permite que os filhos encolham */
}

.topic-item:hover {
    background: rgba(30, 24, 18, 0.6);
    border-color: rgba(201, 169, 97, 0.5);
    transform: translateX(5px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.topic-main {
    flex: 1;
    min-width: 0;
    /* IMPORTANTE: permite que o conteúdo quebre */
}

.topic-title-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
    flex-wrap: wrap;
    min-width: 0;
    /* IMPORTANTE: permite quebra de linha */
}

.topic-title {
    font-size: 17px;
    font-weight: 600;
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.3s ease;
    line-height: 1.4;
    word-wrap: break-word;
    /* Quebra palavras longas */
    overflow-wrap: break-word;
    /* Quebra palavras longas */
    max-width: 100%;
    /* Garante que não ultrapasse o container */
}

.topic-title:hover {
    color: var(--accent-gold);
    text-shadow: 0 0 8px rgba(212, 175, 55, 0.3);
}

.topic-category {
    padding: 4px 12px;
    background: rgba(201, 169, 97, 0.15);
    border: 1px solid rgba(201, 169, 97, 0.3);
    border-radius: 12px;
    font-size: 11px;
    color: var(--primary-gold);
    font-weight: 600;
    font-family: 'Cinzel', serif;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.topic-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: var(--text-secondary);
    flex-wrap: wrap;
}

.meta-author {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
}

.author-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-gold), var(--accent-gold));
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: #1a1410;
    font-size: 12px;
    border: 1px solid var(--border-color);
    font-family: 'Cinzel', serif;
}

.meta-separator {
    color: var(--primary-gold);
    opacity: 0.5;
}

.meta-date {
    display: flex;
    align-items: center;
    gap: 4px;
    font-style: italic;
}

.date-icon {
    font-size: 14px;
}

/* Status do tópico */
.topic-status {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-family: 'Cinzel', serif;
    white-space: nowrap;
}

.status-badge.aberto {
    background: linear-gradient(135deg, rgba(106, 191, 105, 0.2), rgba(106, 191, 105, 0.1));
    border: 1px solid rgba(106, 191, 105, 0.4);
    color: #8cd68b;
    box-shadow: 0 0 10px rgba(106, 191, 105, 0.2);
}

.status-badge.fechado {
    background: linear-gradient(135deg, rgba(220, 90, 85, 0.2), rgba(220, 90, 85, 0.1));
    border: 1px solid rgba(220, 90, 85, 0.4);
    color: #e89693;
    box-shadow: 0 0 10px rgba(220, 90, 85, 0.2);
}

.replies-count {
    font-size: 15px;
    color: var(--text-secondary);
    font-weight: 500;
    white-space: nowrap;
}

/* Paginação */
.pagination-wrapper {
    margin-top: 30px;
    padding-top: 25px;
    border-top: 2px solid var(--border-color);
    display: flex;
    justify-content: center;
}

/* Responsividade */
@media (max-width: 992px) {
    .topic-item {
        flex-direction: column;
        align-items: flex-start;
    }

    .topic-status {
        width: 100%;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
}

@media (max-width: 768px) {
    .forum-container {
        padding: 20px;
    }

    .forum-tabs {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .tab-link {
        flex-direction: row;
        justify-content: center;
        padding: 14px 20px;
    }

    .tab-icon {
        font-size: 24px;
    }

    .tab-text {
        font-size: 13px;
    }

    .empty-state {
        padding: 60px 20px;
    }

    .empty-icon {
        font-size: 60px;
    }

    .empty-state h3 {
        font-size: 20px;
    }

    .empty-state p {
        font-size: 14px;
    }

    .topics-header h3 {
        font-size: 18px;
    }

    .topic-item {
        padding: 15px;
    }

    .topic-title {
        font-size: 15px;
    }

    .topic-meta {
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .topic-title-wrapper {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .topic-status {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .status-badge {
        font-size: 11px;
        padding: 5px 12px;
    }

    .replies-count {
        font-size: 11px;
    }
}