*{
    margin: 0;
    padding: 0;
	font-family: 'arial';
    box-sizing: border-box;
}
a{
 text-decoration: none;   
}
.clearFilter{
    display: block;
    text-align: center;
    width: 150px;
    padding: 10px 0;
    text-decoration: none;
    color: white;
    font-size: 1rem;
    background: #6C4C9E;
    margin: 0;
    border-radius: 12px;
    outline: none;
    border: none;
    cursor: pointer;
}
main{
    display: flex;
    gap: 10px;
    width: 90%;
    margin:0 auto;
    padding: 1rem 0;
}

.main_left{
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 0.8;
    overflow-y: auto;
    padding: 1rem 1.5rem;
    border:2px solid #EAEAEA;
    border-radius:12px;
}
.main_right_login{
    display: flex;
    justify-content:center;
    align-items: center;
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    width: 100%;
    height: 100%;
    background: #2b2b2b5b;
    border-radius: 9px;
    z-index: 3;
}
.main_right_login a{
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color:white;
    font-size: 1rem;
    background: #6C4C9E;
    height:50px;
    border-radius:12px;
    width: 50%;
}
.main_right{
    display: flex;
    flex-direction: column;
    gap: 10px;
    position: relative;
    flex: 0.2;
    border:2px solid #EAEAEA;
    border-radius:12px;
    padding: 1rem 0.875rem;
    height:100%;
}
.main_right .username{
    color: hsl(0, 0%, 30%);
}

.myPosts{
    height: 200px;
    overflow-y: auto;
}
.myPost span{
    position: absolute;
    top:0;
    left:0;
    background: #6C4C9E;
    color: white;
    font-size: 12px;
    width: 20px;
    height: 20px;
    border: 1px solid hsl(0, 0%, 80%);
    border-radius: 7px;
    display: none;
    align-items: center;
    justify-content: center;
}
.myPost{
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
    padding: 10px 0;
    text-decoration: none;
    border-radius: 12px;
    color: #5C6C74;
    
}

.myPost:hover{
    color: #000;
}

.myPost h3{
    font-size: .875rem;
}
.breakLine_ai{
    display: flex;
    width: 100%;
    height: 1px;
    background: #EAEAEA;
    margin: 0 0 10px 0;
}
.breakLine{
    display: flex;
    width: 100%;
    height: 0.5px;
    background: #EAEAEA;
}
.HalfbreakLine{
    display: flex;
    width: 80%;
    margin: 0 auto;
    height: 0.5px;
    background: #EAEAEA;
}
/* topics */
.searchTopic{
    position: relative;
    height: 56px;
    width: 100%;
    border:2px solid #EAEAEA;
    border-radius:12px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.searchTopic input{
    padding: 1rem 1.5rem;
    background: transparent;
    border: none;
    outline: none;
    height: 100%;
    width: 100%;
}

.searchTopic button{
    top: 0;
    right: 0;
    position: absolute;
    display: flex;
    align-items:center;
    justify-content: center;
    min-width: 50px;
    height: 100%;
    padding: 20px;
    border-radius:0 12px 12px 0;
    box-shadow: 0 0 4px hsl(0, 0%, 80%); 
    background: transparent;
    color: hsl(0, 0%, 45%);
    outline: none;
    border: none;
    cursor: pointer;
    transition: 0.5s;
    gap: 5px;
}
.searchTopic button:hover{
    box-shadow: 0 0 8px hsl(0, 0%, 70%); 
    color: hsl(0, 0%, 25%);
}
.main_left_topics{
    display: flex;
    flex-direction: column;
    gap: 20px;
    flex: 0.8;
}
.topics{
    padding: 1rem 1.5rem;
    border:2px solid #EAEAEA;
    border-radius:12px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    overflow-y: auto;
}
.post{
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
    border-radius:12px;
    padding: 1rem 1.5rem;
    overflow-wrap: break-word;
    text-decoration: none;
    transition: 0.5s;
}
.post h3{
    color:#000;
}
.post h4{
    color: hsl(0,0%,45%);
    font-size: .75rem;
}

.post p{
    color:#5C6C74;
}
.post:hover{
    background:#EAEAEA;
}
.post_user{
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}
.post_user_left{
    display: flex;
    align-items: center;
    gap: 10px;
}
.post_user_right{
    position: relative;
}
.post_user_right i{
    color: hsl(0,0%,40%);
    font-size: 1.125rem;
    cursor: pointer;
}
.post_user_right i:hover{
    color: black;
}
.topicDrp{
    display: none;
    position: absolute;
    width: 100px;
    background: white;
    border: 1px solid hsl(0,0%,70%);
    list-style: none;
    right:10px;
    border-radius: 9px 0 9px 9px;
}
.topicDrp button{
    border: none;
    outline: none;
    background: transparent;
    padding: 10px;
    width: 100%;
    text-align: left;
    cursor: pointer;
    font-size: 0.875rem;
    border-radius: 9px 0 9px 9px;
}
.topicDrp button:hover{
    background: hsl(0,0%,94%);
    
}

.post_user a{
    color: hsl(0,0%,45%);
    font-size: 1rem;
}
.post_user a:hover{
    color: #115BCA;
}
.topic_imgBox {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.topic_imgBox img {
    width: 100%;
    height: 100%;
    object-fit: cover; 
    object-position: center top; 
}
.createPostButton{
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color:white;
    font-size: 1rem;
    background: #6C4C9E;
    height:50px;
    border-radius:12px;
    
}
.pagination{
    display: flex;
    justify-content: center;
    width: 100%;
}
.pagination ul{
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: center;
    gap: 15px;
    list-style: none;
}
.pagination ul li a{
    text-decoration: none;
    color: black;
    padding: 10px;
    min-width: 50px;
    height: 50px;
    display: flex;
    align-items:center;
    justify-content: center;
    background: white;
    box-shadow: 0 0 4px hsl(0, 0%, 80%);
    border-radius: 12px;
    transition: 0.5s;
    cursor: pointer;
}
.pagination ul li a:hover{
     box-shadow: 0 0 8px hsl(0, 0%, 70%);
}
/* topic create */
.aiBlur{
    position: fixed;
    top:0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100vh;
    background: #00000057;
    z-index: 100;
}
.aiPopup{
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 600px;
    border-radius: 12px;
    padding: 0 2rem ;
    background: white;
    z-index: 1000;
}
.aiPopup-title{
    text-align: center;
    margin-top: 30px;
    border-bottom: 0.5px solid hsl(0, 0%, 85%);
    padding-bottom: 10px;
}
.aiPopup-body{
    padding: 1rem 0;
}
.aiPopup-footer{
    width: 100%;
    display: flex;
    justify-content: center;
}
.aiPopup-footer a{
    text-decoration: none;
    background: #6C4C9E;
    cursor: pointer;
    height: 50px;
    border-radius: 12px;
    padding:0 24px;
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    font-size:1rem;
    margin: 1rem 0;
}
.topic_create{
    flex: 1;
}
.createForm{
    width: 100%;
    height: 80vh;
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.createForm input{
    height: 50px;
    border-radius: 12px;
    padding:14px 16px;
    border: 1.5px solid #C5C5C5;
    outline:none;
    transition: 0.3s;
}
.createForm input:hover{
    border: 1.5px solid #6C4C9E;
}
.createForm input:focus{
    border: 1.5px solid #6C4C9E;
}
.createForm textarea{
    resize: none;
    height: 100%;
    border-radius: 12px;
    padding:14px 16px;
    border: 1.5px solid #C5C5C5;
    outline:none;
    transition: 0.3s;
}
.createForm textarea:hover{
    border: 1.5px solid #6C4C9E;
}
.createForm textarea:focus{
    border: 1.5px solid #6C4C9E;
}
.createForm button{
    background: #6C4C9E;
    cursor: pointer;
    height: 64px;
    border-radius: 12px;
    padding:0 24px;
    outline: none;
    border: none;
    color: white;
    font-size:1rem;
}

@media only screen and (max-width: 600px) {
    .aiPopup{
        width: 80%;
    }
}

/* topic view */
.topicPlace{
    display: flex;
    flex-direction: column;
    gap: 30px;
    width: 100%;
    height: 50vh;
    overflow-wrap: break-word;
    
}
.commentPlace{
    padding: 1rem 0;
    display: flex;
    flex-direction:column;
    gap: 30px;
    width:100%;
}
.commentPlace textarea{
    width: 100%;
    height:200px;
    resize: none;
    border-radius: 12px;
    padding:14px 16px;
    border: 1.5px solid #C5C5C5;
    outline:none;
    transition: 0.3s ease-in-out;
}
.commentPlace textarea:hover{
    border: 1.5px solid #6C4C9E;
}
.commentPlace textarea:focus{
    border: 1.5px solid #6C4C9E;
}
.commentPlace button{
    background: #6C4C9E;
    cursor: pointer;
    height: 50px;
    border-radius: 12px;
    padding:0 24px;
    outline: none;
    border: none;
    color: white;
    font-size:1rem;
    margin-top:0.875rem;
}
.comment{
    display: flex;
    flex-direction:column;
    gap: 20px;
    width: 100%;
    padding:14px 16px;
    overflow-wrap: break-word;
}

.comment_body p {
    margin-left:10px;
    padding: 10px 0;
    overflow-wrap: break-word;
}
.comment_status{
    display: flex;
    align-items:center;
}
.comment_status_box{
    display: flex;
    align-items:center;
    border-radius: 20px;
}
.comment_status_box:hover{
    background: hsl(0,0%,95%);
}

.comment_status_button{
    display: flex;
    align-items:center;
    cursor: pointer;
    gap: 2px;
     padding: 7px 15px;
     border-radius: 20px;
}
.comment_status_button:hover{
    background: hsl(0,0%,90%);
}
.comment_status_button span{
    font-size: 0.874rem;
    color: hsl(0,0%,40%);
}
.comment_status_button i{
    color: hsl(0,0%,40%);
    font-size: 1.125rem;
}
.iLikedClass{
    background:#e7b1e685 !important;
}
/* reply */
#reply span{
    display: flex;
    align-items: center;
    justify-content: center;
}
.comment_reply{
    border-left: 2px solid #EAEAEA;
    padding-left:1rem ;
}
.add_reply{
    display: none;
    align-items: center;
    gap: 10px;
    height: 50px;
    margin-bottom: 1rem;
}
.add_reply button{
    height: 100%;
    background: #6C4C9E;
    cursor: pointer;
    border-radius: 12px;
    padding: 0 24px;
    outline: none;
    border: none;
    color: white;
    font-size: 1rem;
    margin-top:0;
}
.add_reply input{
    height: 100%;
    width: 200px;
    border-radius: 12px;
    border: 1px solid hsl(0, 0%, 80%);
    padding: 0 1.5rem;
    outline: none;
}
.view_reply p{
    margin-bottom:20px;
}
@media only screen and (max-width: 600px) {
    main{
        flex-direction: column;
        width: 90%;
        margin:0 auto;
        justify-content: center;
        height: auto;
    }
    .main_left{
        order: 1;
        width: 100%;
        align-items: center;
        flex: 1;
    }
    .main_left_topics{
        order: 1;
        width: 100%;
        align-items: center;
        flex: 1;
    }
     .main_right{
         order: 0;
         display: flex;
         flex: 1;
     }
     /* pagination */
     .pagination ul{
        display: flex;
        flex-wrap: wrap;
        width: 100%;
        align-items: center;
        justify-content: center;
        gap: 10px;
        list-style: none;
    }
}

.success-message {
    background-color: #d4edda;
    color: #155724;
    padding: 12px 20px;
    border-left: 5px solid #28a745;
    border-radius: 4px;
    margin: 15px auto;
    max-width: 600px;
    font-weight: bold;
    animation: fadeOut 0.5s ease-out 3.5s forwards;
}

@keyframes fadeOut {
    to {
        opacity: 0;
        transform: translateY(-20px);
        display: none;
    }
}