/* ===== BASE STYLES ===== */
body {
    width: 100%;
    max-width: 100%;
    position: relative;
    height: auto;
    margin: 0;
    padding: 0;
    color: white;
    background: linear-gradient(45deg, #5c0325 20%, #46214e 40%, #2d083f 40%);
    font-family: 'Arial', sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    overflow-x: hidden;
}


.container {
    width: 70%;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

.text {
    color: #ffffffc9;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* loginform */

/* ===== ENHANCED NAVIGATION ===== */
#nav-link-home{
    display: block;
}

.navbar {
    position: sticky;
    top: 0;
    left: 0;
    width: 100%;
    padding: 0rem 0rem;
    background: rgba(45, 39, 61, 0.6);
    backdrop-filter: blur(10px);
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.2);
    border-bottom: 1px solid rgba(255, 159, 215, 0.1);
}
#nav-linkdiv{
    margin-right: 2em;
}

#navlogo {
    height: 50px;
    width: auto;
    transition: transform 0.3s ease;
}

#navlogo:hover {
    transform: scale(1.05);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 1.2rem;
}

.nav-links a {
    display: flex;
    align-items: center;
    flex-direction: column;
    color: #d0a8d0;
    text-decoration: none;
    font-weight: 500;
    font-size: 1rem;
    transition: all 0.3s ease;
    padding: 0.5rem 0;
    position: relative;
}

.nav-links a:hover {
    color: #ff9fd7;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #e283b7, #dd45da);
    transition: width 0.3s ease;
}

.nav-links a:hover::after {
    width: 100%;
}
.links a {
    display: flex;
    align-items: center;
    flex-direction: column;
    color: #d0a8d0;
    text-decoration: none;
    font-weight: 500;
    font-size: 1rem;
    transition: all 0.3s ease;
    padding: 0.5rem 0;
    position: relative;
}

.links a:hover {
    color: #ff9fd7;
}

.links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #e283b7, #dd45da);
    transition: width 0.3s ease;
}

.links a:hover::after {
    width: 100%;
}
.topdiv{
    display: flex;
    align-items: center;
    flex-direction: column;
    justify-content: center;
    margin-bottom: 0;
    padding-bottom: 0;

}

.user {
    display: flex;
    align-items: center;
    flex-direction: column;
    color: #e283b7;
    font-weight: 600;
    font-size: 0.9rem;
    margin-left: 1rem;
    padding: 0.5rem 1rem;
    background: rgba(226, 131, 183, 0.1);
    border-radius: 20px;
    border: 1px solid rgba(226, 131, 183, 0.2);
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 1.8rem;
    cursor: pointer;
    padding: 0.5rem;
    transition: transform 0.3s ease;
}

.menu-toggle:hover {
    transform: scale(1.1);
}

.mobile-menu {
    display: none;
    flex-direction: column;
    align-self: flex-end;
    gap: 1rem;
    margin-top: 10px ;
    padding: 1.5rem;
    background: rgba(45, 39, 61, 0.6);
    width: 30%;
    position: sticky;
    top: 0%;
    right: 0;
    z-index: 999;
    border-bottom: 1px solid rgba(255, 159, 215, 0.2);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    border-radius: 10px;
}

.mobile-menu a {
    color: #d0a8d0;
    text-decoration: none;
    padding: 0.8rem;
    border-bottom: 1px solid rgba(255, 159, 215, 0.2);
    transition: all 0.3s ease;
    border-radius: 5px;
}

.mobile-menu a:hover {
    color: #ff9fd7;
    background: rgba(226, 131, 183, 0.1);
}

#logo-img{
    width: 3em;
}

.keywords{
    margin-bottom: 0;
    padding-bottom: 0;
}

footer{
    height: 2em;
    width: 100%;
    background-color: #15031f31;
    margin-top: auto;
    position: sticky;
    z-index: 1000;
}

/* ===== POST FEED STYLES ===== */
.home-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
    width: 90%;
    max-width: 1200px;
    padding: 30px;
    margin: 20px auto;
}

.post-container {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(12px);
    border-radius: 20px;
    padding: 25px;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.2),
        inset 0 0 16px rgba(255, 255, 255, 0.05);
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.post-container:hover {
    transform: translateY(-8px);
    background: rgba(75, 47, 73, 0.3);
    box-shadow: 
        0 12px 40px rgba(214, 169, 201, 0.3),
        inset 0 0 20px rgba(226, 215, 215, 0.2);
    border-color: rgba(226, 131, 183, 0.3);
}

#post-title {
    color: #ffd6f0;
    font-size: 1.4rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    margin: 0;
    text-align: center;
}

#post-title:hover {
    color: #ff9fd7;
    text-decoration: underline;
    transform: scale(1.02);
}

.post-container p {
    color: rgba(255, 255, 255, 0.8);
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.6;
}

.post-container .post-meta {
    color: #d0a8d0;
    font-size: 0.85rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.post-image {
    width: 100%;
    height: 250px;
    object-fit: cover;
    border-radius: 12px;
    margin: 10px 0;
    transition: transform 0.5s ease;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.post-container:hover .post-image {
    transform: scale(1.02);
}

/* Empty State */
.home-container .empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 50px 20px;
}

.empty-state p {
    color: #b8c2cc;
    font-size: 1.1rem;
}

/* ===== ADD BUTTON ===== */
#addnew {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background: linear-gradient(45deg, #ff6b6b, #ff8e8e);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 20px rgba(255, 107, 107, 0.3);
    z-index: 100;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

#addnew:hover {
    transform: scale(1.1) rotate(90deg);
    box-shadow: 0 6px 25px rgba(255, 107, 107, 0.4);
}

#addnewbtn {
    width: 30px;
    filter: brightness(0) invert(1);
}

/* ===== SHOW PAGE STYLES ===== */
#showcontainer {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 60%;
    max-width: 800px;
    margin: 2rem auto;
    padding: 2.5rem;
    background: rgba(40, 36, 52, 0.7);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3),
                inset 0 0 15px rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.4s ease;
}

#caption{
    display: flex;
    justify-content: center;
    align-self: flex-start;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 20px ;
    border: none;
    padding: 3px;
    width: 90%;
    min-width: 10rem;
    height: 2em;
    margin-top: 10px;
}

.post-header {
    text-align: center;
    margin-bottom: 2rem;
}

.post-header h1 {
    color: #ffd6f0;
    font-size: 2.2rem;
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.post-meta {
    color: #d0a8d0;
    font-size: 0.9rem;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
}

.post-meta .author {
    font-weight: 600;
    color: #e283b7;
}

/* Carousel Styles */
.carousel {
    position: relative;
    width: 90%;
    max-height: 600px;
    margin: 2rem 0;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
}

.carousel-inner {
    display: flex;
    transition: transform 0.5s ease;
}

.carousel-item {
    align-items: center;
    justify-content: center;
    width: 70%;
    min-width: 100%;
    position: relative;
}

.carousel-item img {
    width: 100%;
    height: 500px;
    object-fit: contain;
    background: #000;
}

.carousel-control {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    font-size: 2rem;
    padding: 1rem;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
}

.carousel-control:hover {
    background: rgba(0, 0, 0, 0.8);
}

.carousel-control.prev {
    left: 0;
    border-radius: 0 5px 5px 0;
}

.carousel-control.next {
    right: 0;
    border-radius: 5px 0 0 5px;
}

/* Like Button Styles */
.like-section {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 1.5rem 0;
    justify-content: center;
}

#likebtn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    transition: transform 0.2s ease;
}

#heartimg {
    width: 36px;
    height: 36px;
    transition: all 0.3s ease;
}

#heartimg:hover {
    transform: scale(1.2);
}

#likecount {
    color: #ffb3e6;
    font-size: 1.2rem;
    font-weight: 500;
}

/* Edit/Delete Buttons */
#editndel {
    display: flex;
    gap: 1.5rem;
    margin: 2rem 0;
    justify-content: center;
}

.edit-btn, .delete-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    transition: all 0.3s ease;
}

.edit-btn img, .delete-btn img {
    width: 30px;
    height: 30px;
    transition: transform 0.3s ease;
}

.edit-btn:hover img {
    transform: scale(1.1) rotate(10deg);
}

.delete-btn:hover img {
    transform: scale(1.1);
}

/* Comment Form */
.comment-form {
    width: 100%;
    margin: 2.5rem 0;
}

.comment-form label {
    display: block;
    color: #d0a8d0;
    margin-bottom: 0.8rem;
    font-size: 1rem;
}

.comment-form textarea {
    width: 90%;
    padding: 10px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 159, 215, 0.2);
    border-radius: 10px;
    color: white;
    font-size: 1rem;
    line-height: 1.5;
    min-height: 120px;
    resize: vertical;
    transition: all 0.3s ease;
}

.comment-form textarea:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.12);
    border-color: #dd45da;
    box-shadow: 0 0 0 2px rgba(221, 69, 218, 0.2);
}

.thumbnail{
    width: 6em;
}

.comment-form button {
    background: linear-gradient(45deg, #e283b7, #dd45da);
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 50px;
    font-size: 1rem;
    cursor: pointer;
    margin-top: 1rem;
    transition: all 0.3s ease;
}

.comment-form button:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(221, 69, 218, 0.4);
}

/* Comments Section */
.comments-section {
    width: 100%;
    margin-top: 2rem;
}

.comments-section h3 {
    color: #ffb3e6;
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(255, 179, 230, 0.3);
}

.comment {
    background: rgba(60, 50, 70, 0.4);
    border-radius: 10px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    transition: all 0.3s ease;
    position: relative;
}

.comment:hover {
    background: rgba(80, 65, 95, 0.5);
    transform: translateX(5px);
}

.comment p {
    color: #f0e6ff;
    margin: 0 0 1rem 0;
    line-height: 1.6;
    font-size: 1.05rem;
}

.comment small {
    color: #c792ea;
    font-size: 0.85rem;
    display: block;
    margin-bottom: 1rem;
}

.delete-comment-btn {
    background: rgba(255, 99, 132, 0.15);
    color: #ff9fd7;
    border: none;
    padding: 8px 15px;
    border-radius: 5px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.delete-comment-btn:hover {
    background: rgba(255, 99, 132, 0.3);
}

.login-prompt {
    color: #d0a8d0;
    text-align: center;
    margin: 1.5rem 0;
}

.login-prompt a {
    color: #ff9fd7;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.login-prompt a:hover {
    color: #ffb3e6;
    text-decoration: underline;
}

/* Back Link */
.back-link {
    display: inline-block;
    margin-top: 2rem;
    color: #c792ea;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 1rem;
}

.back-link:hover {
    color: #ff9fd7;
    transform: translateX(-5px);
}

/* ===== FORM STYLES ===== */
.newcontainer {
    width: 50%;
    max-width: 500px;
    padding: 2.5rem;
    border-radius: 25px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2),
                inset 0 5px 15px rgba(255, 255, 255, 0.1);
}

/* ===== Create Post & Cancel Buttons Container ===== */
#post-action-buttons {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

/* ===== Create Post Button ===== */
#create-post-btn {
    background: linear-gradient(45deg, #dd45da, #e283b7);
    color: white;
    border: none;
    padding: 12px 28px;
    border-radius: 50px;
    font-size: 1rem;
    cursor: pointer;
    font-weight: 600;
    box-shadow: 0 5px 20px rgba(221, 69, 218, 0.3);
    transition: all 0.3s ease;
}

#create-post-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(221, 69, 218, 0.5);
}

/* ===== Cancel Button ===== */
#cancel-btn {
    background: rgba(255, 99, 132, 0.2);
    color: #ffb3e6;
    border: 1px solid rgba(255, 99, 132, 0.3);
    padding: 12px 28px;
    border-radius: 50px;
    font-size: 1rem;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

#cancel-btn:hover {
    background: rgba(255, 99, 132, 0.35);
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(255, 99, 132, 0.4);
}


/* ===== EDIT PAGE STYLES ===== */
.edit-container {
    width: 60%;
    max-width: 700px;
    margin: 2rem auto;
    padding: 2.5rem;
    background: rgba(40, 36, 52, 0.7);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3),
                inset 0 0 15px rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.edit-container h1 {
    color: #ffd6f0;
    text-align: center;
    margin-bottom: 2rem;
    font-size: 2rem;
}

.form-group input::placeholder {
    color: rgba(255,255,255,0.5);
  }

  .form-group input:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(221, 69, 218, 0.6);
    box-shadow: 0 0 0 3px rgba(221, 69, 218, 0.2);
  }

.form-group label {
    display: block;
    color: #d0a8d0;
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

.form-group input[type="text"],
.form-group textarea {
    width: 95%;
    padding: 12px 15px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 159, 215, 0.2);
    border-radius: 10px;
    color: white;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-group input[type="text"]:focus,
.form-group textarea:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.12);
    border-color: #dd45da;
    box-shadow: 0 0 0 2px rgba(221, 69, 218, 0.2);
}

.form-group textarea {
    min-height: 150px;
    resize: vertical;
}

.current-images {
    margin: 2rem 0;
    padding: 1.5rem;
    background: rgba(60, 50, 70, 0.4);
    border-radius: 15px;
}

.current-images h3 {
    color: #ffb3e6;
    margin-top: 0;
    margin-bottom: 1.5rem;
    font-size: 1.2rem;
}

.image-container {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
}

.image-container label {
    color: #d0a8d0;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.image-container input[type="checkbox"] {
    accent-color: #dd45da;
}

.thumbnail {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s, box-shadow 0.3s;
}

.thumbnail:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(221, 69, 218, 0.3);
    cursor: pointer;
}

.form-group input[type="file"] {
    width: 100%;
    padding: 10px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px dashed rgba(255, 159, 215, 0.3);
    border-radius: 10px;
    color: rgba(255, 255, 255, 0.671);
}

.form-group small {
    display: block;
    color: #c792ea;
    font-size: 0.8rem;
    margin-top: 0.5rem;
}

.submit-btn {
    background: linear-gradient(45deg, #e283b7, #dd45da);
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 50px;
    font-size: 1rem;
    cursor: pointer;
    margin-top: 1rem;
    transition: all 0.3s ease;
    width: 100%;
}

.submit-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(221, 69, 218, 0.4);
}

.cancel-link {
    display: inline-block;
    margin-top: 1.5rem;
    color: #c792ea;
    text-decoration: none;
    transition: all 0.3s ease;
    text-align: center;
    width: 100%;
}

.cancel-link:hover {
    color: #ff9fd7;
    text-decoration: underline;
}

/* ===== RESPONSIVE ADJUSTMENTS ===== */
@media (max-width: 1024px) {
    .navbar {
        padding: 1rem;
    }
    
    .nav-links {
        gap: 1rem;
    }
}

@media (max-width: 768px) {

    #nav-link-home{
        display: block;
        /* position: sticky; */
    }
    .navbar {
        flex-wrap: wrap;
        padding: 0.8rem;
    }
    
    .nav-links {
        display: none;
    }
    .mobile {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
    }
    .form-group{
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        width: 100%;
        padding: 0;
        margin: 0;
        margin-bottom: 1.5rem;
      }
      .form-group input {
        width: 95%;
        padding: 0.85rem 1.25rem;
        background: rgba(255, 255, 255, 0.1);
        border: 1px solid rgba(255, 255, 255, 0.3);
        border-radius: 12px;
        color: white;
        font-size: 1rem;
        transition: all 0.3s ease;
      }
    
      .form-group input::placeholder {
        color: rgba(255,255,255,0.5);
      }
    
      .form-group input:focus {
        outline: none;
        background: rgba(255, 255, 255, 0.15);
        border-color: rgba(221, 69, 218, 0.6);
        box-shadow: 0 0 0 3px rgba(221, 69, 218, 0.2);
      }
    
    .keywords{
        margin-bottom: 0;
        padding-bottom: 0;
        font-size: 1em;
    }
    #keywords{
        margin-bottom: 0;
        padding-bottom: 0;
        font-size: 0.6em;
    }
    
    .menu-toggle {
        display: block;
    }
    
    .mobile-menu.active {
        display: flex;
    }
    .mobile-menu{
        /* top: 5%; */
        position: sticky;
        z-index: 1000;
        top: 0;

    }
    
    .home-container {
        width: 95%;
        grid-template-columns: 1fr;
        padding: 15px;
    }
    
    .post-container {
        padding: 15px;
        width: 80%;

        
    }
    
    #showcontainer {
        width: 80%;
        padding: 1.0rem;
    }

    .carousel-item img {
        height: 350px;
    }

    .post-header h1 {
        font-size: 1.8rem;
    }

    .comment-form textarea {
        min-height: 100px;
    }
    
    .newcontainer {
        width: 90%;
        padding: 1.5rem;
    }
    
    #addnew {
        width: 50px;
        height: 50px;
        bottom: 20px;
        right: 20px;
    }
    
    #addnewbtn {
        width: 25px;
    }

    .edit-container {
        width: 90%;
        padding: 1rem;
    }

    .image-container {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 480px) {
    #navlogo {
        height: 40px;
    }
    
    .mobile-menu {
        padding: 1rem;
    }
    
    #showcontainer, .newcontainer, .edit-container {
        padding: 1rem;
    }
    
    .post-header h1 {
        font-size: 1.5rem;
    }
}
