:root {
    --cor-forum-1:#319c36;
    --cor-forum-2:#5a9145;
    --cor-forum-3:#97c984;
}

body {
    overflow-x: hidden;
}

/* Layout Principal */
.layout {
    display: flex;
    flex-wrap: nowrap;
    height: 90.5vh;
}

/* Sidebars escondidas por padrão */
.sidebar, .right-sidebar {
    --cor-fundo: #97c984;
    width: 175px;
    transform: translateX(0);
    transition: transform 0.35s cubic-bezier(0.265, 1.130, 0.395, 1.325); /* Animação suave */
    position: relative;
    top: 0;
    bottom: 0;
    z-index: 10;
    background-color: var(--cor-fundo);
}

.sidebar {
    --mobile-closed-position: -100%;
    --mobile-open-position: 5%;
    padding: 10px;
    box-shadow: 4px 0 4px rgba(0 0 0 / 10%);
}

.right-sidebar {
    --mobile-closed-position: 100%;
    --mobile-open-position: -5%;
    right: 0;
    padding: 10px;
    box-shadow: -4px 0 4px rgba(0 0 0 / 10%);
}

/* Sidebars visíveis quando ativas */
.sidebar.active, .right-sidebar.active {
    transform: translateX(0);
}

/* Estilos das Sidebars */
.sidebar-title, .right-sidebar-title {
    margin-bottom: 1rem;
}

.sidebar-link, .right-sidebar-link {
    text-decoration: none;
    color: #3d3d3d;
    display: block;
    margin: 0.5rem 0;
    cursor: pointer;
}

/* Conteúdo Principal */
.main-content {
    flex: 1;
    padding: 1rem;
    overflow-y: auto;
    overflow-x: hidden;
    min-height: 300px;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE e Edge */
}
.main-content ::-webkit-scrollbar {
    width: 0px;
    height: 0px;
}

/* Header do Fórum */
.forum-header {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    margin-bottom: 1rem;
    max-width: 500px;
    width: 100%;
    margin-left: auto;
    margin-right: auto;
}

.forum-header input {
    flex: 1;
    margin-right: 1rem;
    padding: 0.5rem;
    border: 1px solid #ccc;
    border-radius: 5px;
}

.forum-header button {
    padding: 0.5rem 1rem;
    background-color: var(--cor-forum-1);
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

/* Discussoes */
.discussoes {
    margin-bottom: 2rem;
}

.discussoes, .publicacoes {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 0 auto;
    max-width: 100%;
}

.discussao, .publicacao {
    background-color: white;
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 1rem;
    margin-bottom: 1rem;
    display: flex;
    flex-direction: column;
    flex-wrap: wrap;
    justify-content: center;
    width: 100%;
    max-width: 500px;
}

.publicacao > div:first-child {
    width: fit-content;
}

.discussao-title a {
    text-decoration: none;
    color: #333;
    font-weight: bold;
}

.discussao-title a:hover {
    color: var(--cor-forum-2);
}

.discussao-info {
    font-size: 0.9rem;
    color: #777;
}

/* Divisória */
.divisoria-sidebar {
    border: 0;
    height: 1px;
    background-color: #3d3d3d;
    margin: 1rem 0;
}

/* User Box */
.user-box {
    text-align: center;
}

.user-box-picture img {
    width: 80px;
    height: 80px;
    border-radius: 25%;
    transition: opacity 0.5s ease-in-out;
}

.user-box-nickname {
    color: #3d3d3d;
    margin-bottom: 1rem;
}

.user-box-info {
    text-align: start;
    font-size: 14px;
}

.user-box-action {
    text-align: start;
    font-size: 14px;
}

#back-button {
    background: none;
    border: none;
    padding: 0;
    margin-right: 10px;
    cursor: pointer;
}

#remover-discussao {
    align-self: flex-end;
    background: none;
    border: none;
    padding: 0;
    margin-top: auto;
    font-size: 0.9rem;
    color: #777;
    cursor: pointer;
    text-decoration: underline;
}

#remover-discussao:hover {
    color: #ba4040;
}

/* Botões de controle no mobile */
.mobile-controls {
    display: none;
    justify-content: space-between;
    padding: 0.5rem;
    position: sticky;
    top: 0;
}

.mobile-controls button {
    background-color: var(--cor-transparente);
    border: none;
    padding: 0.5rem;
    font-size: 1rem;
    cursor: pointer;
    color: black;
}

@media (max-width: 768px) {
    .sidebar, .right-sidebar {
        transform: translateX(var(--mobile-closed-position));
        position: absolute;
        border-radius: 18px;
    }

    /* Sidebars visíveis quando ativas no mobile */
    .sidebar.active, .right-sidebar.active {
        transform: translateX(var(--mobile-open-position));
    }
}

/* Estilos responsivos */
@media (max-width: 768px) {
    .mobile-controls {
        display: flex;
    }

    .layout {
        position: relative;
        height: 83.6vh;
    }
}

@media (max-width: 468px) {
    .main-content {
        padding: 1rem;
    }
}
