:root {
    --bg-main: #0e0e0f;
    --bg-card: #141416;
    --bg-soft: #1a1a1c;
    --bg-gradient: #1a1a1c;
    --bg-shadow: rgba(255,255,255,0.05);

    --border: #252528;

    --text-main: #e6e6e9;
    --text-soft: #b9b9be;
    --text-muted: #8c8c91;

    --btn-bg: #1a1a1c;
    --btn-text: #e6e6e9;
    --btn-border: #2a2a2e;
    --btn-hover: #222225;

    --bg-header: #0f0f10;
    --bg-submenu: #18181b;
    --bg-hover: #1f1f23;

    --accent: #7c5cff;
    --accent-soft: #a592ff;
}

.forumContainer{
    width:min(900px,95%);
    margin:auto;
    padding:25px 0;
}

.forumPost{
    background:var(--bg-card);
    border:1px solid var(--border);
    border-radius:16px;
    padding:18px;
    margin-bottom:18px;
    box-shadow:0 5px 20px var(--bg-shadow);
}

input, textarea{
    width:100%;
    background:var(--bg-soft);
    border:1px solid var(--border);
    color:var(--text-main);
    padding:14px;
    border-radius:7px;
    margin-top:10px;
}

.forumPost h2{
        font-size: 28px;
    margin-bottom: 10px;
}

textarea{
    resize:vertical;
    min-height:120px;
}

.postHeading{
    font-size:30px !important;
}

.postButton{
    background:var(--accent);
    border:none;
    color:white;
    padding:12px 18px;
    border-radius:7px;
    margin-top:12px;
    cursor:pointer;
}

.postButton:hover{
    opacity:.9;
}

a{
    color:var(--accent-soft);
    text-decoration:none;
}

.post-title{
    font-size:20px;
    margin-bottom:10px;
}

.meta{
    color:var(--text-muted);
    font-size:14px;
    margin-bottom:15px;
    margin-top:15px;
}

.reply{
    border-top:1px solid var(--border);
    padding-top:15px;
    margin-top:15px;
}

.google-btn{
    display:flex;
    align-items:center;
    justify-content:center;
    gap:10px;
    background:white;
    color:black;
    padding: 6px 9px;
    border: none;
    border-radius: 7px;
    margin-top: 8px;
}

.comment{
    margin-top:18px;
}

.comment.depth-1{
    margin-left:14px;
    border-left:1px solid var(--border);
    padding-left:14px;
}

.comment-box{
    display:flex;
    gap:12px;
    align-items:flex-start;
}

.avatar{
    width:38px;
    height:38px;
    border-radius:50%;
    object-fit:cover;
    flex-shrink:0;
    border:1px solid var(--border);
}

.comment-content{
    flex:1;
    min-width:0;
}

.comment-header{
    display:flex;
    gap:8px;
    flex-wrap:wrap;
    margin-bottom:7px;
}

.comment-user{
    font-weight:600;
}

.comment-time{
    color:var(--text-muted);
    font-size:13px;
}

.comment-body{
    background:var(--bg-soft);
    border:1px solid var(--border);
    border-radius:14px;
    padding:14px;
    line-height:1.7;
    overflow-wrap:anywhere;
}

.reply-btn,
.toggle-replies{
    background:none;
    border:none;
    color:var(--accent-soft);
    padding:0;
    margin-top:10px;
    cursor:pointer;
    font-size:14px;
}

.children{
    margin-top:16px;
}

.reply-container{
    margin-top:14px;
}

@media(max-width:700px){

    .comment.depth-1{
        margin-left:8px;
        padding-left:8px;
    }

    .avatar{
        width:32px;
        height:32px;
    }

    .comment-body{
        padding:12px;
        font-size:15px;
    }
}

.postTop{
    display:flex;
    justify-content:space-between;
    align-items:flex-start;
    gap:15px;
}

.postMenu{
    position:relative;
}

.menuButton{
    background:none;
    border:none;
    color:#999;
    cursor:pointer;
    font-size:15px;
    padding:6px;
    border-radius:8px;
    transition:0.2s;
}

.menuButton:hover{
    background:var(--bg-dropdown);
    color:var(--text-main);
}

.menuDropdown{
    position:absolute;
    right:0;
    top:38px;
    background:var(--bg-dropdown);
    /* border:1px solid #2a2a2a; */
    border-radius:8px;
    min-width:170px;
    overflow:hidden;
    display:none;
    z-index:100;
    box-shadow:0 10px 30px rgba(0,0,0,0.35);
}

.postMenu.active .menuDropdown{
    display:block;
}

.menuItem{
    width:100%;
    display:flex;
    align-items:center;
    gap:10px;
    padding:14px 16px;
    background:none;
    border:none;
    color:var(--text-main);
    text-decoration:none;
    cursor:pointer;
    font-size:14px;
    transition:0.2s;
}

.menuItem:hover{
    background:var(--bg-dropdown);
    text-decoration:none;
}

.deleteTrigger:hover{
    background:#2b1111;
    color:#ff6b6b;
}

.modalOverlay{
    position:fixed;
    inset:0;
    background:rgba(0,0,0,0.7);
    display:none;
    align-items:center;
    justify-content:center;
    z-index:9999;
    backdrop-filter:blur(4px);
}

.modalOverlay.active{
    display:flex;
}

.deleteModal{
    width:90%;
    max-width:420px;
    background:#111;
    border:1px solid #2b2b2b;
    border-radius:20px;
    padding:28px;
    animation:popup 0.2s ease;
}

.deleteModal h3{
    margin-top:0;
    color:white;
}

.deleteModal p{
    color:#aaa;
    line-height:1.6;
}

.modalActions{
    display:flex;
    justify-content:flex-end;
    gap:12px;
    margin-top:25px;
}

.cancelBtn{
    background:#222;
    color:white;
    border:none;
    padding:12px 18px;
    border-radius:12px;
    cursor:pointer;
}

.confirmDeleteBtn{
    background:#d11a2a;
    color:white;
    text-decoration:none;
    padding:12px 18px;
    border-radius:12px;
    font-weight:600;
}

.confirmDeleteBtn:hover{
    background:#f02638;
}

@keyframes popup{
    from{
        opacity:0;
        transform:scale(0.95);
    }
    to{
        opacity:1;
        transform:scale(1);
    }
}

#error,
.errorBox{
    background:#2a1111;
    border:1px solid #5a1c1c;
    color:#ff8a8a;
    padding:14px 16px;
    border-radius:14px;
    margin-bottom:18px;
    font-size:14px;
}

.successBox{
    background:#102515;
    border:1px solid #1d5a2d;
    color:#7dff9b;
    padding:14px 16px;
    border-radius:14px;
    margin-bottom:18px;
    font-size:14px;
}

#loginBtn:disabled{
    opacity:0.7;
    cursor:not-allowed;
}

.pagination{
    display:flex;
    gap:10px;
    justify-content:center;
    margin-top:35px;
    flex-wrap:wrap;
}

.pageBtn{
    min-width:42px;
    height:42px;
    display:flex;
    align-items:center;
    justify-content:center;
    border-radius:12px;
    background: var(--bg-header);
    border: 1px solid var(--bg-soft);
    color: var(--text-soft);
    text-decoration:none;
    transition:0.2s;
}

.pageBtn:hover{
    background:#222;
}

.activePage{
    background: var(--accent);
    color: var(--bg-main);
    font-weight:700;
}

.errorBox{
    background:#2a1111;
    border:1px solid #5a1c1c;
    color:#ff8a8a;
    padding:14px 16px;
    border-radius:14px;
    margin-bottom:18px;
}

.successBox{
    background:#102515;
    border:1px solid #1d5a2d;
    color:#7dff9b;
    padding:14px 16px;
    border-radius:14px;
    margin-bottom:18px;
}
.postPreview{
    overflow-wrap:anywhere;
    word-break:break-word;
    line-height:1.7;
}


.editorCounter{
    margin-top:10px;
    text-align:right;
    color:#777;
    font-size:13px;
}