:root{
    --bg-color:	#F5F5F5;
   --primary-text-color: #222;
    --secondary-text-color: #444444;
    --nav-bg-color:#FFFBF5;
    --logo-color: #d54d7b;
    --transition-value:0.5s;

    --color1:#e3e4e8;
    --color2:#ffffff;
    --color3:#f1faee;
    --color4:#007bff;
  }
  button{
    cursor: pointer;
  }
  
  * {
    margin: 0;
    padding: 0;
    font-family: source-serif-pro, Georgia, Cambria, "Times New Roman", Times, serif;
    box-sizing: border-box;
  }
  
  
 
  body {
    
    background: var(--bg-color);
    color: var(--primary-text-color);
    transition: var(--transition-value);
    height: 100%;
  
  }

  
  .dark-mode{
    --bg-color:#0d1117;;
    --primary-text-color: #fff;
    --secondary-text-color: #f5f5f5;
  --nav-bg-color:#000;
  --logo-color: #d54d7b;
  --color1:#3d3b3b;
    --color2:#30363d;
    --color3:#1a033b;
--color4:#6c757d;
  --transition-value:1s;

  }
  #toggleBtn{
    cursor: pointer;
  }
  .user_pic {
    width: 50px;
    cursor: pointer;
    
  }
  

.btn-2 {
  background-color: var(--color4); 
  color: #ffff;
  border: none;
  border-radius: 4px;
  padding: 8px 10px;
  font-size: 16px;
  cursor: pointer;
  height: 32px;
  font-weight: 500;
}

.btn-3{
  background-color: var(--color3);
  color: var(--primary-text-color);
}

.btn-4{
  background-color: var(--color2);
  color: var(--secondary-text-color);
}

  .logo {
    color:var(--logo-color);
    font-family: "Great Vibes", cursive;
    font-size: 1.5rem;
    font-weight: normal;
    text-shadow: 0 1px 1px #fff;
    
  }
  
  .logo a{
    text-decoration: none;
    color: #a19196;
    font-family: "Great Vibes", cursive;
    font-size: 30px;
    font-weight: normal;
    text-shadow: 0 1px 1px #fff;
  }
  
  .user_pic img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid var(--color1);
   
    
  }
  
  nav{
    background: var(--nav-bg-color);
    display: flex;
    width: 100%;
    padding: 10px 10%;
   justify-content: space-between;
    position: relative;
  
  }
  nav ul{
    width: 100%;
    text-align: center;
  }
  nav ul li{
    display: inline-block;
    list-style: none;
  
  }
  nav ul li a, .post_card footer a{
    color: var(--primary-text-color);
    text-decoration: none;
    background: var(--bg-color);
    display: inline-block;
    margin: 5px 4px;
    padding: 0.5rem 0.5rem;
    text-align: center;
    border-radius: 5px;
    font-weight: bold;
  }
  
  
   .modal{
    position: fixed;
    top: 0%;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,.3);
    visibility: hidden;
    
  } 
  .modal.modalOn{
    visibility: visible;
    z-index: 10;
  }
  .sub-menu-wrapper{
    width: 18rem;
    position: absolute;
    top:8%;
    right: 8%;
    max-height: 0px;
    overflow: hidden;
    transition: var(--transition-value);
    
  }
  .sub-menu-wrapper.open{
  
    max-height: 400px;
    
  }
  .sub-menu{
    background: var(--bg-color);
    padding: 20px;
    margin: 10px;
    color: var(--primary-text-color);
    z-index: 1;
  }
  .user-info{
    display: flex;
    align-items: center;
    flex-wrap: wrap;
  }
  
  
  .user-info img{
    width: 50px;
    height: 50px;
    border-radius: 50%;
    margin-right: 15px;
    border: 2px solid var(--color1);
  }
  .sub-menu hr{
    width: 100%;
    height: 1px;
    background:var(--bg-color);
    margin: 15px 0 10px;
  }
  .sub-menu-link{
    display: flex;
    align-items: center;
    text-decoration: none;
    margin: 12px 0;
    color: var(--secondary-text-color)
   
  }
  .sub-menu-link p{
    width: 100%;
  
  }
  .icons{
    color: var(--primary-text-color);
  transform: scale(1.5);
    margin-right: 20px;
  }
  .sub-menu-link img{
    width: 50px;
    height: 50px;
    border-radius: 50%;
    padding: 8px;
    margin-right: 15px;
  }
  .sub-menu-link span{
    font-size: 22px;
    transition: transform 0.5s;
  }
  
  
  .sub-menu-link:hover span{
  transform: translateX(5px);
  }
  
  .sub-menu-link:hover p{
     font-weight: 600;
  }
  
  .user-picture{
      display: block;
      margin-left: auto;
      margin-right: auto;
      width: 50%;
      height: 200px;
      width: 200px;
    
  }
   .posts{
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    margin-top: .5rem;

  } 

  .text-container {
    margin-top: 1rem;
max-height: 72px;  /* Adjust as needed */
    white-space: nowrap;  /* Prevents text from wrapping */
    overflow: hidden;    /* Hides the text that goes beyond the width */
    text-overflow: ellipsis; /* Adds an ellipsis (…) at the end */
    font-size: 14px;
}
  .post_card{
   
     background: var(--color2);
     border: none;
    border-bottom: 1px solid var(--logo-color);

    padding: 1.5rem;
 width: 100%;
 max-width: 750px;
  line-height: 1.5;


  }
  .post_card a{
    text-decoration: none;
    color: var(--primary-text-color);
  }
  .post_title{
    
    font-size: 1rem;
    line-height: 1.25;
    
  }
  .post_card footer{
    margin-top: 1rem;
  display: flex;
   gap:0.5rem;
   align-items: flex-start;
    
  }
  .post_card footer button{
    font-weight: 600;
  }
  
  .post_date{
    opacity: 0.6;
    
  }
 
  .post_card h4 a{
    text-decoration: solid;
    color: var(--primary-text-color);
  }

.post-card-footer{
  margin-top: 1rem;

}


.post-card-footer a{
  text-decoration: none;
  color: #ffffff;
  font-weight: 600;
}

.btn{
  border: none;
  padding: 0.5em 0.75em;
  border-radius: .5rem;
  background: var(--color2);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  color: var(--primary-text-color);
}
.draft-btn{
  display: inline-block;
  background-color: #ffcc00; 
  color: #000; 
  padding: .2rem .4rem;
  border-radius: 5px;
  border: 1px solid #e6b800;
}
.btn:hover, .btn:focus{
  background: var(--color3);
}
.btn + .btn{
  margin-left: .25rem;
}
.btn-outline{
  background: none;
    color: var(--primary-text-color);

}


  /* Login and sign up form */
  .login-box, .singup-box{
    width: 100%;
    margin-top:2rem;
  
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    
  }
  .login-box h2, .singup-box h2{
    margin-top: 0.5rem;
  }
  .login-box form, .singup-box form{
    display: flex;
    max-width: 600px;
    width: 100% ;
    flex-direction: column;
   justify-content: center;
   align-items: center;
   background:var(--color2);
   color: var(--primary-text-color);
   padding: 1rem 2rem;
  }
  .login-box form input, .singup-box form input{
    width: 100% ;
    height: 100%;
    padding-left: 1rem;
    outline: none;
    font-size: 1rem;
    border: 1px solid #bababa;
    border-radius: 1rem;
    transition: 0.3s all ease;
    
    color: var(--primary-text-color);
  }
  
  .user-box{
    height: 3rem;
    position: relative;
    margin-top: 2rem;
    width: 100% ;
  }
  .user-box label{
    position: absolute;
    top: 50%;
    left: 3rem;
    transform: translateY(-50%);
    pointer-events: none;
    color: #999999;
    font-size: 1.2rem;
    transition: 0.3s;

  }


  .login-box button, .singup-box button{
    width: 100%;
    border: none;
    padding: 0.7rem;
    margin: 12px 0 10px 0;
background: #002365;
color: #fff;
font-size: 17px;
cursor: pointer;
border-radius: 1rem;
  }

  .forgot-pass {
    
    text-decoration: none;
    align-self: center;
    margin: 0.5rem 0 0.5rem 0;
    
color: #d54d7b
}
.new-acc{
  text-decoration: none;
  font-size: 1.3rem;
  align-self: center;
  margin-top: 1rem;
  background-color: var(--nav-bg-color);
  padding: 0.5rem;
  border-radius: 1rem;
  color: #d54d7b
}

.login-box form input:focus~label, .singup-box form input:focus~label, .login-box form input:valid~label, .singup-box form input:valid~label {
  top: 0;
  font-size: 0.8rem;
  transform: translateY(-50%);
  background-color: var(--color2);
  padding: 0.2rem;
  color: var(--primary-text-color);
  
}

.read-more-btn{
	background-color: var(--color2);
	border-radius:1rem;
	display:inline-block;
	cursor:pointer;
  font-weight: 600;
	color:var(--primary-text-color);
	padding:8px 30px;
	text-decoration:none;
  margin-top: 1rem;

}
.messages{
  margin: 0.5rem 0 0.5rem 0;
  padding: 0.5rem;
}
.error-message{
  color: red;
}
.success-message{
  color: #4BB543;
  font-weight: 600;
  font-size: 1.2rem;
}
.logout-btn{
  border: none;
  background-color: inherit;
  padding: 0 1rem 0 3rem;
  cursor: pointer;
}










/* toggle modal for delete post */


.modal-wrapper, .image-modal-wrapper{
  position: fixed;
  left: 0;
  top:0;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  text-align: center;
  background-color: rgba(0,0,0,.6);
  visibility: hidden;
  z-index: 10;
 
  }

  .preview-modal{
   position: fixed;
   left: 0;
  top:0;
    width: 100%;
    height: 100%;
    overflow-y : auto;
    display: flex;
    justify-content: center;
    background-color: rgba(0,0,0,.6);
    visibility: hidden;
    z-index: 1;
  }
  
  .modal-contain{
  margin: auto;
    padding: 1rem;
    width: 100%;
    max-width: 400px;
    border-radius: 1rem;
    background-color: var(--color2);
    
  } 
.image-modal-contain{
  position: fixed;
  height: 100%;
  width: 100%;
  top: 0;
  left: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;


}
.image-modal-contain img{
  display: block;
  border-radius: 2rem;
  max-width: 60%;
  max-height: 80%;
  margin: 10rem auto;
  border: 2px solid var(--nav-bg-color);
}
.close{
  
  position: absolute;
  top: 2%;
  right: 3%;
  color: var(--primary-text-color);
  font-size: 2rem;
  font-weight: bold;
  cursor: pointer;

}
.close:hover, .close:focus{

  color: var(--secondary-text-color);
  text-decoration: none;
  
}
  
 
  .show-modal{
   
    visibility: visible;
   
  }
  .btn-group{
    display: flex;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 1rem;
  
  }
   .action-btn{
    display: flex;
justify-content: space-around;
flex-wrap: wrap;
gap: 0.5rem;
padding: 1rem;
--border: 1px solid var(--primary-text-color);
border-bottom: var(--border);
border-left: var(--border);
border-right: var(--border);
border-bottom-right-radius: 0.5rem;
border-bottom-left-radius: .5rem;
  }

.action-btn{
  border: none;
}
.share-btn{
  margin:1rem auto;
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  border: 1px solid var(--primary-text-color);
  width: 80%;
  min-width: 250px;
  padding: .5rem;
  border-radius: .5rem;
}

 .share-btn svg{
  margin-top: .5rem;
  

 }


  



.btn-primary{
  display: inline-block;
  outline: 0;
  border: none;
  color: var(--primary-text-color);
  cursor: pointer;
  font-weight: 600;
  border-radius: 4px;
  font-size: 13px;
  height: 30px;
  padding: 0 20px;
  background-color: var(--color1);
}
 
  .btn-primary:hover {
      background-color: var(--color2);
  }
.btn-secondary{
  display: inline-block;
  outline: 0;
  border: none;
  color: var(--primary-text-color);
  background-color: var(--color3);
  cursor: pointer;
  font-weight: 600;
  border-radius: 4px;
  font-size: 13px;
  height: 30px;
  padding: 0 1rem;
}

.btn-secondary:hover{
  background-color: var(--color2);
}
.btn-link{
  color: var(--primary-text-color);
  text-decoration: none;
  text-align: center;
  background: var(--color3);
  padding: 5px 20px;
  border-radius: 5px;
  font-weight: bold;
}


/* textbox style and scrolbar style */


.textbox-wrapper{
  margin-top: .5rem;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  width: 100%;
  background: var(--color2);
  max-width: 1000px;
  padding-bottom: 1rem;
  border-radius: 0.375rem;
}


.textbox-wrapper h3{
  margin: 1rem;
  text-align:center;
  
}
.textbox-wrapper form{
  display: flex;
  flex-direction: column;
width: 100%;
}
.textbox-wrapper label{
  align-self: flex-start;
  font-size: 1.3rem;
}
.textbox-wrapper form input[name="title"]{
  outline: none;
  margin: 1rem 0 1rem 0;
  padding: 1rem;
border: none;
  background: var(--color2);
  font-size: 2em;
  color: var(--primary-text-color);
  border-bottom: 1px solid var(--primary-text-color);
}

.image-upload-toolbar{
  display: flex;
  gap: 1rem;
  padding: .5rem;
  background: var(--nav-bg-color);
}

.image-upload-toolbar input{

    padding: .3em;
    outline: none;
    font-size: 1rem;
    border: 2px solid rgb(212,212,212);
    border-radius: 0.375rem;
    line-height:1.5;
    background-color: var(--color2);
    color:var(--primary-text-color);
    transition: all 0.3s;
  }
 .image-upload-toolbar input:focus{
    border-color:var(--color3);
  }

.upload-image{
  cursor: pointer;
  margin-top: .5rem;
}
.textbox-wrapper textarea{
  resize: none;
  overflow: auto;
  outline: none;
  border: none;
  padding: 1rem;
  background: var(--color2);
  color: var(--primary-text-color);
  font-size: 1.3em;
  margin-top: 1rem;
  border-bottom: 1px solid var(--primary-text-color);
}




::-webkit-scrollbar{
  width: 0.5rem;
}
::-webkit-scrollbar-track{
  box-shadow: inset 0 0 5px grey;
  border-radius: 1rem;

}

::-webkit-scrollbar-thumb{
  background-color: var(--primary-text-color);
  border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover{
  background: #b30000;
  cursor: grab;
}

/* single post style */



.single_post_card{
  margin-top: .5rem;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
  z-index: 1;
    text-align: center;
    max-width: 1000px;
width: 100%;
   background-color: var(--color2);
     overflow-wrap: break-word;
     
}
 

.single_post_card .user-name a{
  color: var(--primary-text-color);
}
.creator{
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
}

.single_post_date p{
  opacity: 0.6;
  margin-bottom: 2rem ;
}
.single_post_title{
  max-width: 680px;
  line-height: 32px;
  font-size: 22px;
  margin: 1rem 0;
}
.user-info-container{
  display: flex;
  width: 100%;
  max-width: 680px;
  padding: .5rem;
  margin: .5rem 0;
  justify-content: start;
}
.user-info-container a{
  text-decoration: none;
  color: var(--primary-text-color);
}


.single_post_contain{
  display: flex;
  flex-direction: column;
text-align: left;
width: 100%;
max-width: 680px;
padding: 0.5rem 0 0.5rem 0.5rem;
line-height: 32px;
font-size: 20px;
}
.single_post_contain a{
  color: var(--primary-text-color);
}


.single_post_contain img{
  overflow: hidden;
  max-width: 100%;
  padding:0.5rem .5rem 0.5rem 0rem;
}


 .single_post_contain ol, .single_post_contain ul{
  padding: 0 1rem;

}





  code{
 
  background-color: var(--color1);
  color: #e5305d;
  padding: 2px 4px;
  border-radius: 2px;
  font-size: 75%;

}


  pre {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    white-space: pre-wrap;
    word-wrap: break-word;
    background-color: var(--color1);
  color: #e5305d;
  padding: .1rem;
  
    font-family: 'Courier New', Courier, monospace;
    
  } 


  .if-draft-post{
    margin: .3rem;
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
  }
  .preview-modal-close{
    font-size: 2rem;
    color: black;
    position: absolute;
    top: 0;
    right: 10px;
    cursor: pointer;
  }


#preview{
  background: var(--bg-color);
  line-height: 1.5;
  position: relative;
  width: 100%;
  max-width: 1000px;
}

.profile-wrapper{
  display: grid;
background-color: var(--color2);
  grid-template-columns: repeat(2,1fr);
  grid-template-rows: auto;

  
}
.profile-pic{

 padding: 0.5rem;
 display: flex;
 justify-content: center;
 align-items: center;
 
 
  
}
.main-wrapper{
  
  display: flex;
  flex-direction: column;
  min-height: 60vh;
justify-content: flex-start;
align-items: center;

background: var(--bg-color);
  
}
.profile-pic img{
  width: 13rem;
  height: 13rem;
  border: 2px solid var(--color1);
  object-fit: cover;
  border-radius: 50%;
  cursor: pointer;
}
.user-intro{
  width: 100%;
  padding: .5rem;
  max-width: 650px;
 display: flex;
 flex-direction: column;
 justify-content: center;
 gap: .5rem;
 align-items: flex-start;
 line-height: 1.4rem;
}



.user-intro .name{
display: flex;
flex-wrap: wrap;
align-items: center;
gap: 1rem;

}
.user-footer{
  display: flex;
  flex-wrap: wrap;
  font-size: 16px;
  gap: 1rem;
  margin-top: .5rem;
  padding: .3rem .75rem;
  align-items: center;
}
.footer-wrapper{
  
  margin-top: 10rem;
  background-color: var(--nav-bg-color);
  font-size:1.1em;
  line-height:24px;
  color:#737373;
  padding:0.5rem 1rem

}
.footer-wrapper p{
  padding: 0.5rem 0.3rem;
}
.footer-wrapper h5{
  color: var(--primary-text-color);
  font-size:18px;
  text-transform:uppercase;
  letter-spacing:2px

}

.copy-right p{
  margin-top: 1rem;
  text-align: center;
  
}
.footer-wrapper hr{
  border-top-color:#bbb;
  width: 100%;
  opacity:0.5
}

/* file upload form style */
.form-wrapper h3{
  font-size: 30px;
  padding: 20px 0 20px;
text-align: center;
}

.main{
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  flex-direction: column-reverse;
  align-items: center;
}

.main form {
  width: 16rem;
  margin: 10px 10px 0;
  text-align: center;
  }
  
  .main form > input[type=file], form > input[type=file]:before {
  display: block;
  margin: 0 auto;
  line-height: 3rem;
  text-align: center;
  cursor: pointer;
  }
  form > input[type=file] {
  position: relative;
  width: 80%;
  }
  
  .main form > input[type=file]:before {
  content: 'Choose a Photo';
  position: absolute;
font-weight: bold;
  background: var(--color2);
  width: 100%;
  top: -2px;
  left: -2px;
  border-radius: 3px;
  border: 2px solid #3c5b6d;

  }
  .main form > button[type=submit] {
  border-radius: 3px;
  border: none;
  cursor: pointer;
  margin: 1rem;
  width: 80%;
  height: 3rem;
background-color: var(--color3);
  }
  





@media (max-width:600px) {
 
 

  .profile-wrapper{
    grid-template-columns: 1fr;
    grid-template-rows: auto;
  }
  

  .sub-menu-wrapper{
    right: 0;
    width: 90%;
  }
 
  .image-modal-contain img{
    max-width: 90%;
  } 

  .single_post_contain{
    width: 100%;
    margin: 1rem auto;
    padding: 0 0.75rem;
    
  }
 
.single_post_contain{

  font-size: 18px;
}
}
