/* =====================================================
   FORUM PAGE
===================================================== */

.forum-hero{

    display:flex;

    justify-content:center;

    align-items:flex-start;

    padding:20px 0 60px;

}

.forum-card{

    width:100%;

    max-width:1500px;

    background:rgba(255,255,255,.65);

    backdrop-filter:blur(18px);

    border:1px solid rgba(255,255,255,.5);

    border-radius:34px;

    padding:55px;

    box-shadow:0 25px 60px rgba(0,0,0,.08);

    animation:fadePage .8s ease;

}

.forum-card h1{

    text-align:center;

    font-family:var(--font-title);

    font-size:62px;

    margin-bottom:25px;

}

.hero-line{

    width:180px;

    height:3px;

    margin:0 auto 30px;

    border-radius:999px;

    background:

        linear-gradient(

            to right,

            transparent,

            var(--gold),

            transparent

        );

}

.forum-description{

    max-width:950px;

    margin:0 auto 50px;

    text-align:center;

    font-size:22px;

    line-height:1.9;

    color:var(--text-light);

}

/* =====================================================
   SEARCH
===================================================== */

.forum-top{

    display:flex;

    gap:25px;

    justify-content:space-between;

    align-items:center;

    flex-wrap:wrap;

    margin-bottom:35px;

}

.forum-search{

    flex:1;

}

.forum-search input{

    width:100%;

    height:58px;

    padding:0 24px;

    border-radius:999px;

    border:1px solid rgba(199,161,90,.18);

    background:rgba(255,255,255,.75);

    backdrop-filter:blur(12px);

    font-size:17px;

    transition:.3s;

}

.forum-search input:focus{

    outline:none;

    border-color:var(--gold);

    box-shadow:0 0 0 5px rgba(199,161,90,.12);

}

.create-post-btn{

    height:58px;

    padding:0 34px;

    border-radius:999px;

    background:linear-gradient(

        135deg,

        var(--gold),

        var(--gold-dark)

    );

    color:#fff;

    font-size:17px;

    font-weight:600;

    transition:.35s;

    cursor:pointer;

}

.create-post-btn:hover{

    transform:translateY(-4px);

    box-shadow:0 18px 35px rgba(185,147,74,.28);

}
/* =====================================================
   CATEGORIES
===================================================== */

.forum-categories{

    display:grid;

    grid-template-columns:repeat(auto-fit,minmax(190px,1fr));

    gap:20px;

    margin-bottom:40px;

}

.forum-category{

    position:relative;

    overflow:hidden;

    display:flex;

    justify-content:center;

    align-items:center;

    text-align:center;

    min-height:82px;

    padding:20px;

    border-radius:22px;

    background:rgba(255,255,255,.60);

    backdrop-filter:blur(16px);

    border:1px solid rgba(255,255,255,.55);

    box-shadow:0 12px 28px rgba(0,0,0,.06);

    font-size:18px;

    font-weight:600;

    cursor:pointer;

    transition:.35s;

}

.forum-category::before{

    content:"";

    position:absolute;

    inset:0;

    background:

        linear-gradient(

            135deg,

            rgba(199,161,90,.12),

            transparent 70%

        );

    opacity:0;

    transition:.35s;

}

.forum-category:hover{

    transform:translateY(-8px);

    border-color:var(--gold);

    box-shadow:0 22px 45px rgba(0,0,0,.10);

}

.forum-category:hover::before{

    opacity:1;

}

.forum-category.active{

    background:

        linear-gradient(

            135deg,

            rgba(199,161,90,.20),

            rgba(255,255,255,.88)

        );

    border:2px solid var(--gold);

    color:var(--gold-dark);

    box-shadow:0 18px 40px rgba(199,161,90,.18);

}

.forum-category.active::after{

    content:"";

    position:absolute;

    left:0;

    bottom:0;

    width:100%;

    height:4px;

    background:var(--gold);

}

/* =====================================================
   FILTERS
===================================================== */

.forum-filters{

    display:flex;

    gap:16px;

    flex-wrap:wrap;

    margin-bottom:45px;

}

.filter-btn{

    padding:14px 28px;

    border-radius:999px;

    background:rgba(255,255,255,.70);

    border:1px solid rgba(199,161,90,.18);

    font-size:16px;

    font-weight:600;

    cursor:pointer;

    transition:.3s;

}

.filter-btn:hover{

    background:var(--gold);

    color:#fff;

    transform:translateY(-3px);

}

.filter-btn.active{

    background:var(--gold);

    color:#fff;

    box-shadow:0 14px 30px rgba(199,161,90,.22);

}
/* =====================================================
   POSTS
===================================================== */

.forum-posts{

    display:flex;

    flex-direction:column;

    gap:30px;

}

.forum-post{

    background:rgba(255,255,255,.68);

    backdrop-filter:blur(18px);

    border:1px solid rgba(255,255,255,.55);

    border-radius:28px;

    padding:32px;

    box-shadow:0 18px 45px rgba(0,0,0,.07);

    transition:.35s;

}

.forum-post:hover{

    transform:translateY(-6px);

    box-shadow:0 25px 55px rgba(0,0,0,.10);

}

.post-header{

    display:flex;

    justify-content:space-between;

    align-items:center;

    gap:20px;

    margin-bottom:24px;

}

.post-user{

    display:flex;

    align-items:center;

    gap:18px;

}

.post-avatar{

    width:62px;

    height:62px;

    border-radius:50%;

    display:flex;

    justify-content:center;

    align-items:center;

    background:

        linear-gradient(

            135deg,

            var(--gold),

            var(--gold-dark)

        );

    color:#fff;

    font-size:26px;

    font-weight:700;

    box-shadow:0 12px 25px rgba(185,147,74,.25);

}

.post-author{

    font-size:20px;

    font-weight:700;

}

.post-date{

    margin-top:6px;

    font-size:15px;

    color:var(--text-light);

}

.post-category{

    padding:10px 18px;

    border-radius:999px;

    background:rgba(199,161,90,.14);

    color:var(--gold-dark);

    font-size:15px;

    font-weight:700;

}

.post-title{

    font-family:var(--font-title);

    font-size:34px;

    margin-bottom:18px;

}

.post-text{

    font-size:19px;

    line-height:1.9;

    color:var(--text-light);

    margin-bottom:28px;

}

/* =====================================================
   POST ACTIONS
===================================================== */

.post-actions{

    display:flex;

    flex-wrap:wrap;

    gap:14px;

    align-items:center;

}

.post-actions button{

    display:flex;

    align-items:center;

    gap:10px;

    padding:14px 24px;

    border-radius:999px;

    background:rgba(199,161,90,.10);

    font-size:17px;

    cursor:pointer;

    transition:.3s;

}

.post-actions button:hover{

    background:var(--gold);

    color:#fff;

    transform:translateY(-3px);

}

.post-actions .likes{

    color:#2ea043;

}

.post-actions .dislikes{

    color:#d73a49;

}

.post-actions .comments{

    color:var(--gold-dark);

}

/* =====================================================
   AUTHOR BUTTONS
===================================================== */

.author-actions{

    display:flex;

    gap:12px;

    margin-left:auto;

}

.edit-post,

.delete-post{

    padding:12px 18px;

    border-radius:999px;

    font-size:15px;

    cursor:pointer;

    transition:.3s;

}

.edit-post{

    background:rgba(199,161,90,.12);

}

.edit-post:hover{

    background:var(--gold);

    color:#fff;

}

.delete-post{

    background:rgba(220,53,69,.10);

    color:#d73a49;

}

.delete-post:hover{

    background:#d73a49;

    color:#fff;

}
/* =====================================================
   COMMENTS
===================================================== */

.post-comments{

    margin-top:30px;

    padding-top:25px;

    border-top:1px solid rgba(199,161,90,.15);

}

.comment{

    display:flex;

    gap:16px;

    padding:18px;

    margin-bottom:18px;

    border-radius:18px;

    background:rgba(199,161,90,.08);

    transition:.3s;

}

.comment:hover{

    background:rgba(199,161,90,.12);

}

.comment-avatar{

    width:46px;

    height:46px;

    flex-shrink:0;

    border-radius:50%;

    display:flex;

    justify-content:center;

    align-items:center;

    background:var(--gold);

    color:#fff;

    font-weight:700;

}

.comment-body{

    flex:1;

}

.comment-author{

    font-weight:700;

    margin-bottom:6px;

}

.comment-date{

    font-size:14px;

    color:var(--text-light);

    margin-bottom:10px;

}

.comment-text{

    font-size:17px;

    line-height:1.8;

}

.comment-form{

    display:flex;

    flex-direction:column;

    gap:18px;

    margin-top:25px;

}

.comment-form textarea{

    width:100%;

    min-height:120px;

    padding:18px;

    border-radius:18px;

    border:1px solid rgba(199,161,90,.18);

    background:rgba(255,255,255,.75);

    resize:vertical;

    font-size:16px;

    transition:.3s;

}

.comment-form textarea:focus{

    outline:none;

    border-color:var(--gold);

    box-shadow:0 0 0 5px rgba(199,161,90,.12);

}

.comment-form button{

    align-self:flex-start;

    padding:15px 34px;

    border-radius:999px;

    background:var(--gold);

    color:#fff;

    font-weight:600;

    transition:.3s;

    cursor:pointer;

}

.comment-form button:hover{

    transform:translateY(-3px);

    box-shadow:0 15px 35px rgba(185,147,74,.25);

}

/* =====================================================
   MODAL
===================================================== */

.forum-modal{

    position:fixed;

    inset:0;

    display:flex;

    justify-content:center;

    align-items:center;

    padding:40px;

    background:rgba(15,15,15,.55);

    backdrop-filter:blur(12px);

    opacity:0;

    visibility:hidden;

    transition:.35s;

    z-index:9999;

}

.forum-modal.show{

    opacity:1;

    visibility:visible;

}

.forum-modal-content{

    position:relative;

    width:min(900px,100%);

    max-height:90vh;

    overflow-y:auto;

    padding:45px;

    border-radius:30px;

    background:rgba(255,255,255,.94);

    backdrop-filter:blur(22px);

    border:1px solid rgba(255,255,255,.55);

    box-shadow:0 30px 70px rgba(0,0,0,.18);

}

.close-forum-modal{

    position:absolute;

    top:20px;

    right:20px;

    width:48px;

    height:48px;

    border-radius:50%;

    background:rgba(199,161,90,.12);

    font-size:28px;

    color:var(--gold-dark);

    transition:.3s;

}

.close-forum-modal:hover{

    background:var(--gold);

    color:#fff;

    transform:rotate(90deg);

}

.forum-form{

    display:flex;

    flex-direction:column;

    gap:18px;

}

.forum-form label{

    font-weight:700;

}

.forum-form input,

.forum-form textarea,

.forum-form select{

    width:100%;

    padding:18px;

    border-radius:18px;

    border:1px solid rgba(199,161,90,.18);

    background:rgba(255,255,255,.75);

    font-size:17px;

    transition:.3s;

}

.forum-form textarea{

    resize:vertical;

}

.forum-form input:focus,

.forum-form textarea:focus,

.forum-form select:focus{

    outline:none;

    border-color:var(--gold);

    box-shadow:0 0 0 5px rgba(199,161,90,.12);

}

.publish-post-btn{

    margin-top:15px;

    padding:18px;

    border-radius:999px;

    background:linear-gradient(

        135deg,

        var(--gold),

        var(--gold-dark)

    );

    color:#fff;

    font-size:18px;

    font-weight:600;

    cursor:pointer;

    transition:.35s;

}

.publish-post-btn:hover{

    transform:translateY(-4px);

    box-shadow:0 18px 40px rgba(185,147,74,.30);

}
/* =====================================================
   DARK THEME
===================================================== */

body.dark .forum-card,
body.dark .forum-post,
body.dark .forum-category,
body.dark .forum-modal-content{

    background:#1E2125;

    border-color:var(--border);

}

body.dark .forum-search input,
body.dark .forum-form input,
body.dark .forum-form textarea,
body.dark .forum-form select,
body.dark .comment-form textarea{

    background:#22252A;

    color:var(--text);

    border-color:var(--border);

}

body.dark .comment{

    background:rgba(255,255,255,.05);

}

body.dark .filter-btn{

    background:#22252A;

    border-color:var(--border);

    color:var(--text);

}

body.dark .forum-category.active{

    background:rgba(199,161,90,.18);

}

body.dark .post-category{

    background:rgba(199,161,90,.18);

}

body.dark .post-actions button{

    background:rgba(255,255,255,.06);

    color:var(--text);

}

body.dark .post-actions button:hover{

    background:var(--gold);

    color:#fff;

}

/* =====================================================
   RESPONSIVE
===================================================== */

@media(max-width:1200px){

    .forum-card{

        padding:40px;

    }

    .forum-card h1{

        font-size:50px;

    }

}

@media(max-width:900px){

    .forum-top{

        flex-direction:column;

        align-items:stretch;

    }

    .create-post-btn{

        width:100%;

    }

    .forum-categories{

        grid-template-columns:repeat(2,1fr);

    }

    .post-header{

        flex-direction:column;

        align-items:flex-start;

    }

    .author-actions{

        margin-left:0;

    }

}

@media(max-width:768px){

    .forum-card{

        padding:25px;

    }

    .forum-card h1{

        font-size:38px;

    }

    .forum-description{

        font-size:18px;

    }

    .forum-categories{

        grid-template-columns:1fr;

    }

    .post-title{

        font-size:28px;

    }

    .post-text{

        font-size:17px;

    }

    .forum-modal-content{

        padding:30px;

    }

}

@media(max-width:520px){

    .forum-modal{

        padding:15px;

    }

    .forum-modal-content{

        padding:20px;

    }

    .post-avatar{

        width:50px;

        height:50px;

        font-size:20px;

    }

    .post-author{

        font-size:18px;

    }

    .post-actions{

        flex-direction:column;

        align-items:stretch;

    }

    .post-actions button{

        justify-content:center;

        width:100%;

    }

    .comment{

        flex-direction:column;

        align-items:flex-start;

    }

    .comment-avatar{

        width:42px;

        height:42px;

    }

}

/* =====================================================
   ANIMATIONS
===================================================== */

.forum-post{

    animation:fadePage .45s ease;

}

.forum-category,
.filter-btn,
.create-post-btn,
.publish-post-btn,
.post-actions button,
.comment-form button{

    transition:.3s ease;

}