*{
    box-sizing: border-box;
    transition: 0.5 ease-in-out;
}
body{
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f0f0f0;
    margin: 0;
    overflow-x: hidden;
}
header{
   margin: 0 auto;
}
header *{
   transition: all 0.3s ease;
}
main{
    margin-top: 20px;
    margin: 0 auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
/* authentication container (login/signup) */
#auth-container {
    overflow: hidden;
    display: none;
    background-color: #555;
    color: #fff;
    position: relative;
    margin: 10px auto;
    padding: 20px;
    max-width: 400px;
    box-shadow: 0 2px 5px 1px #000000;
    border: #00b7ff solid 1px;
    border-radius: 20px;
    flex-direction: column;
    align-items: center;
}
#auth-container * {
    transition: 0.3s ease-in-out;
}

#auth-container .input-group,
#auth-container #confirm-group {
    margin-bottom: 10px;
    width: 100%;
}

#auth-container input {
    width: 100%;
    padding: 8px;
    border-radius: 10px;
    background-color: rgba(255, 255, 255, 0.137);
    box-shadow: 0px 1px 3px 0px #000000;
    border: none;
    color: #fff;
}

#auth-container .buttons {
    text-align: center;
}

#auth-container .buttons #main-btn {
    margin-top: 15px;
    padding: 8px 16px;
    border: none;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.137);
    color: #fff;
    cursor: pointer;
}
#auth-container .buttons #main-btn:hover{
    background: rgba(0, 131, 22, 0.411);
    outline: #009213 solid 1px;
    box-shadow: 0px 2px 4px #000000;
}
#auth-container .buttons #main-btn:active{
    background: rgba(0, 255, 42, 0.411);
    outline: #00ff22 solid 1px;
    box-shadow: none;
}

#auth-container .buttons a {
    color: #ffffff70;
    text-decoration: none;
}
#auth-container .buttons a:hover {
    color: #00ff15b6;
}

nav{
    height: 60px;
    background-color: #333;
    padding: 10px;
    display: flex;
    justify-content: space-between;
    width: 100%;
    align-items: center;
}
nav img{
    height: 50px;
    aspect-ratio: 1/1;
    padding: 5px;
    filter: invert(1);
    cursor: pointer;
}
nav .search-box input {
    padding: 5px 15px;
    border-radius: 20px;
    border: 1px solid #555;
    background: #444;
    color: white;
    outline: none;
}
nav .search-box button {
    padding: 5px 15px;
    border-radius: 20px;
    border: 1px solid #555;
    background: #444;
    color: white;
    margin-left: 5px;
    cursor: pointer;
}
nav .search-box button:hover {
    background-color: #555;
}
nav .search-box button:active {
    background-color: #447a4b;
    border: 1px solid #1dbd32;
}
nav .nav-menu{
    display: flex;
    gap: 20px;
    color: black;
}
nav ul{
    display: flex;
    list-style: none;
    margin: 0;
    gap: 5px;
}
nav ul li{
    background-color: #444;
    border-radius: 4px;
}
nav ul li a{
    color: #fff;
    text-decoration: none;;
    padding: 5px 8px;
    display: block;
    border: 1px solid #555;
    cursor: pointer;
}
nav ul li a:hover{
    background-color: #555;
    border-radius: 4px;
}
nav ul li a:active{
    background-color: #447a4b;
    border: 1px solid #1dbd32;
}
.posts{
    flex-wrap: wrap;
    display: flex;
    justify-content: center;
    gap: 20px;
}
.contacts{
    flex-wrap: nowrap;
    display: flex;
    justify-content: center;
    gap: 20px;
}
.contact-card{
    background-color: #fff;
    padding: 10px;
    margin: 10px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    width: 120px;
    height: 120px;
    aspect-ratio: 1/1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 30px;
}
.contact-card img{
    width: 50px;
    padding: 1px;
    border-radius: 100%;
    object-fit: cover;
    filter: brightness(0.66) saturate(0);
    cursor: pointer;
    transition: 0.5s ease-in-out;
}
.contact-card img:hover{
    width: 60px;
    filter: brightness(1) saturate(1);
    box-shadow: 0 4px 10px;
}
.contact-card h1{
    align-self: center;
    padding: 5px;
    font-size: 10px;
}
.contact-card h1 a{
    color: #000000;
    text-decoration: none;
    transition: 0.3s ease;
}
.contact-card h1 a:hover{
    color: #1dbd32;
    font-size: 1rem;
}
.post-card {
    flex-shrink: 0;
    flex-grow: 0;
    background-color: #fff;
    padding: 20px;
    margin: 10px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
    width: fit-content;
    height: fit-content;
}
.post-card *{
    transition:all 0.3s ease-in-out;
}
.post-card img {
    width: 100%;
    height: 220px;
    padding: 5px;
    border-radius: 5px;
    object-fit: cover;
}
.post-card h2 {
    margin-top: 15px;
    margin-bottom: 10px;
    align-self: center;
    padding: 10px;
}
.post-card p {
    color: #555;
    white-space: pre-wrap;
    padding: 5px;
}
.post-card a {
    display: inline-block;
    margin-top: 10px;
    color: #1dbd32;
    text-decoration: none;
    font-weight: bold;
}
.post-card .buttons{
    display: flex;
    justify-content: space-between;
    gap:10px;
}
.post-card .buttons button{
    height: 50px;
    display: flex;
    gap:5px;
    align-items: center;
    border-radius: 1rem;
    overflow: hidden;
    border: none;
    cursor: pointer;
}
.post-card .buttons #like img{
    height: 100px;
    width: 40px;
    margin: 5px;
}
.post-card .buttons #message img{
    width: 40px;
    height: 40px;
    margin: 5px;
}
.post-card .buttons button:hover{
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0px 1px 3px 0px black ;
    outline: #00b7ff;
    background-color: aqua;
    font-size: 20px;
}
.post-card .buttons button:active{
    box-shadow: none;
    background-color: blue;
    color: white;
}
.oauth {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 10px;
}
.oauth img{
    border: #fff 1px solid;
    width: 50px;
    height: 100%;
    padding: 1px;
    border-radius: 100%;
    object-fit: cover;
    filter: saturate(0);
    cursor: pointer;
    transition: 0.5s ease-in-out;
}
.oauth img:hover{
    width: 60px;
    background-color: #fff;
    filter: saturate(1);
    box-shadow: 0 4px 10px;
}
/* About section */
#about{
    margin: 10px;
    padding: 10px;
    display: none;
    flex-direction: row;
    justify-content: center;
    gap: 25px;
    align-items: center;
    border: #000000 1px solid;
    box-shadow: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    transition: 0.3 ease-in-out;
}
#about img{
    width: 150px;
}

footer{
    background-color: #333;
    color: #fff;
    text-align: center;
    padding: 10px;
    margin-top: 20px;
}
#addpost{
    display: none;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
}
#addpost *{
    transition: 0.3s all ease-in-out;
}
#addpost button {
    margin-top: 15px;
    padding: 8px 16px;
    border: none;
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.473);
    color: #ffffff;
    cursor: pointer;
    
}
#addpost button:hover{
    background: rgba(1, 95, 18, 0.534);
    outline: #009213 solid 1px;
    box-shadow: 0px 2px 4px #000000;
}
#addpost button:active{
    background: rgba(0, 255, 42, 0.411);
    outline: #00ff22 solid 1px;
    box-shadow: none;
}
#cpost {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background-color: #fff;
    padding: 20px;
    margin: 10px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
    width: 60%;
}
#cpost .inimage{
    margin: 10px;
    border: 1px solid rgba(0, 0, 0, 0.753);
    box-shadow: 0px 1px 3px 0px hsl(189, 100%, 50%);
}
#cpost #post-image {
    height: 220px;
    padding: 5px;
    border-radius: 5px;
    object-fit: contain;
}
#cpost #post-header {
    margin-bottom: 10px;
    align-self: center;
    padding: 10px;
}
#cpost #post-text {
    color: #555;
    white-space: wrap;
    padding: 5px;
    height: 100%;
    resize: vertical;
}
#cpost #post-header {
    border-radius: 1rem;
    outline: none;
    height: 2rem;
    width: 100%;
    margin: 10px;
    padding: 10px;
    text-align: center;
}
#cpost #post-text {
    border-radius: 1rem;
    outline: none;
    height: 2rem;
    margin: 10px;
    padding:10px;
    text-align: center;
    min-height: 4rem;
    width: 100%;
    resize: none;
}
@media screen and (max-width: 800px) {
    nav .search-box {
        display: none;
    }
    .post-card img {
        width: 100%;
    }
    .post-card {
        flex-grow: 1;
    }
    #about{
        flex-direction: column;
        justify-content: center;
        gap: 20px;
        overflow: hidden;
    }
    #about img{
        width: 80px
    }
    #about *{
        font-size: 10px;
    }
    #auth-container {
        margin: 5px auto;
        width: 70%;
    }
    .contacts{
        gap:5px;
    }
    .contact-card{
        min-width: 30px;
    }
    
}

/* toast message styling */
#toast {
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.8);
    color: #fff;
    padding: 6px 12px;
    font-size: 0.9rem;
    border-radius: 3px;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.2s ease;
    pointer-events: none;
    max-width: 80%;
}
#toast.visible { opacity: 1; }