/* Posts Container */
#posts-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
    max-width: 800px;
    margin: 0 auto;
}

.post {
    background: rgba(255, 255, 255, 0.1);
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    text-align: left;
    animation: fadeIn 0.5s ease;
}

.post img,
.post video {
    max-width: 100%;
    border-radius: 10px;
    margin-top: 10px;
}

.post p {
    margin-top: 10px;
    color: #ddd;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Updates Section */
.updates-section {
    background: linear-gradient(135deg, #1a1a1a, #0f0f0f);
    color: white;
    padding: 50px 20px;
    text-align: center;
}

.updates-section h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.updates-section p {
    font-size: 1.2rem;
    margin-bottom: 40px;
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Text Writing Area */
textarea#post-text {
    width: 100%;
    height: 140px;
    margin-bottom: 15px;
    padding: 15px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    font-size: 1rem;
    font-family: 'Arial', sans-serif;
    color: white;
    background: linear-gradient(135deg, rgba(30, 30, 30, 1), rgba(0, 0, 0, 0.8));
    box-shadow: inset 0 4px 6px rgba(0, 0, 0, 0.4), 0 4px 6px rgba(0, 0, 0, 0.3);
    resize: none;
    transition: border-color 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
}

textarea#post-text:focus {
    border-color: #f03a47;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.9), rgba(30, 30, 30, 0.9));
    box-shadow: inset 0 6px 12px rgba(0, 0, 0, 0.6), 0 6px 12px rgba(0, 0, 0, 0.4);
    outline: none;
}

/* File Upload Button */
.file-input-label {
    display: inline-block;
    padding: 12px 20px;
    margin-bottom: 15px;
    font-size: 1rem;
    color: white;
    font-family: 'Arial', sans-serif;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(30, 30, 30, 0.8));
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    cursor: pointer;
    text-align: center;
    transition: background 0.3s ease, border-color 0.3s ease, transform 0.2s ease;
}

.file-input-label:hover {
    background: linear-gradient(135deg, rgba(30, 30, 30, 0.9), rgba(255, 255, 255, 0.1));
    border-color: #f03a47;
    transform: scale(1.02);
}

.file-input-label input {
    display: none;
}

/* Post Button */
button[type="submit"] {
    width: 100%;
    padding: 15px 20px;
    font-size: 1.2rem;
    font-weight: bold;
    color: white;
    background: linear-gradient(135deg, #f03a47, #d8323b);
    border: none;
    border-radius: 12px;
    cursor: pointer;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.4);
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: background 0.3s ease, box-shadow 0.3s ease, transform 0.2s ease;
}

button[type="submit"]:hover {
    background: linear-gradient(135deg, #d8323b, #f03a47);
    transform: scale(1.05);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.6);
}

button[type="submit"]:active {
    transform: scale(0.97);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
}


/* Create Post Area */
.create-post {
    background: rgba(255, 255, 255, 0.1);
    padding: 20px;
    border-radius: 10px;
    margin-top: 40px;
    /* Ensures the form is visually separated */
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    width: 100%;
    max-width: 600px;
    margin: 40px auto 0 auto;
    position: relative;
    /* Ensures proper layout with posts */
    z-index: 1;
    /* Ensures the form is always on top */
}

/* Post Actions */
.post-actions {
    margin-top: 10px;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.post-actions button {
    padding: 8px 15px;
    font-size: 0.9rem;
    font-weight: bold;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.2s ease;
}

.post-actions .edit-button {
    background: linear-gradient(135deg, #3a86ff, #3d71d9);
}

.post-actions .edit-button:hover {
    background: linear-gradient(135deg, #2f5db2, #2f5db2);
    transform: scale(1.05);
}

.post-actions .delete-button {
    background: linear-gradient(135deg, #f03a47, #d8323b);
}

.post-actions .delete-button:hover {
    background: linear-gradient(135deg, #c0242b, #c0242b);
    transform: scale(1.05);
}

/* Edit Textarea */
.edit-textarea {
    width: 100%;
    height: 80px;
    padding: 10px;
    margin-bottom: 10px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    font-size: 1rem;
    color: white;
    background: linear-gradient(135deg, rgba(30, 30, 30, 1), rgba(0, 0, 0, 0.8));
    box-shadow: inset 0 4px 6px rgba(0, 0, 0, 0.4);
    resize: none;
}

/* Save Button */
.save-button {
    padding: 8px 15px;
    font-size: 0.9rem;
    font-weight: bold;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    background: linear-gradient(135deg, #28a745, #218838);
    transition: background 0.3s ease, transform 0.2s ease;
}

.save-button:hover {
    background: linear-gradient(135deg, #1e7e34, #19692c);
    transform: scale(1.05);
}

/* Delete Confirmation Pop-Up */
.delete-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: scale(1.1);
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s ease;
}

.delete-popup.show {
    opacity: 1;
    visibility: visible;
    transform: scale(1);
}

.popup-content {
    background: linear-gradient(135deg, #1a1a1a, #0f0f0f);
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.6);
    text-align: center;
    width: 400px;
    max-width: 90%;
    transform: translateY(-20px);
    animation: fadeInUp 0.3s ease forwards;
}

.popup-content h3 {
    font-size: 1.8rem;
    color: #f03a47;
    margin-bottom: 10px;
}

.popup-content p {
    font-size: 1rem;
    color: white;
    margin-bottom: 20px;
}

.popup-actions {
    display: flex;
    justify-content: space-between;
    gap: 10px;
}

.popup-actions button {
    flex: 1;
    padding: 10px 20px;
    font-size: 1rem;
    font-weight: bold;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.2s ease;
}

.popup-cancel {
    background: linear-gradient(135deg, #3a86ff, #3d71d9);
}

.popup-cancel:hover {
    background: linear-gradient(135deg, #2f5db2, #2f5db2);
    transform: scale(1.05);
}

.popup-confirm {
    background: linear-gradient(135deg, #f03a47, #d8323b);
}

.popup-confirm:hover {
    background: linear-gradient(135deg, #c0242b, #c0242b);
    transform: scale(1.05);
}

/* Fade-In Animation */
@keyframes fadeInUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.hidden {
    display: none;
}

#create-post input {
    width: 100%;
    margin-bottom: 10px;
    padding: 12px;
    font-size: 1rem;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    background: linear-gradient(135deg, rgba(30, 30, 30, 1), rgba(0, 0, 0, 0.8));
    color: white;
    transition: border-color 0.3s ease;
}

#create-post input:focus {
    border-color: #f03a47;
    outline: none;
}

#create-post button {
    width: 100%;
    padding: 12px 20px;
    font-size: 1.2rem;
    font-weight: bold;
    color: white;
    background: linear-gradient(135deg, #f03a47, #d8323b);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.2s ease;
}

#create-post button:hover {
    background: linear-gradient(135deg, #d8323b, #f03a47);
    transform: scale(1.05);
}

#create-post button:active {
    transform: scale(0.97);
}

/* Login Form Inputs */
#create-post input {
    width: 100%;
    margin-bottom: 15px;
    padding: 12px;
    font-size: 1rem;
    font-family: 'Arial', sans-serif;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    color: white;
    background: linear-gradient(135deg, rgba(30, 30, 30, 1), rgba(0, 0, 0, 0.8));
    box-shadow: inset 0 4px 6px rgba(0, 0, 0, 0.6);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

#create-post input::placeholder {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.95rem;
}

#create-post input:focus {
    border-color: #f03a47;
    box-shadow: inset 0 6px 12px rgba(0, 0, 0, 0.8), 0 4px 8px rgba(0, 0, 0, 0.4);
    outline: none;
}

/* Login Form Styling */
#login-form {
    background: linear-gradient(135deg, #1a1a1a, #0f0f0f);
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.6);
    width: 100%;
    max-width: 400px;
    margin: 30px auto;
    text-align: center;
}

#login-form h3 {
    color: #f03a47;
    font-size: 1.8rem;
    margin-bottom: 15px;
}

/* Username and Password Fields */
#login input {
    width: 100%;
    margin-bottom: 15px;
    padding: 12px;
    font-size: 1rem;
    font-family: 'Arial', sans-serif;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    color: white;
    background: linear-gradient(135deg, rgba(30, 30, 30, 1), rgba(0, 0, 0, 0.8));
    box-shadow: inset 0 4px 6px rgba(0, 0, 0, 0.6);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

#login input::placeholder {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.95rem;
}

#login input:focus {
    border-color: #f03a47;
    box-shadow: inset 0 6px 12px rgba(0, 0, 0, 0.8), 0 4px 8px rgba(0, 0, 0, 0.4);
    outline: none;
}

/* Login Button */
#login button {
    width: 100%;
    padding: 12px 15px;
    font-size: 1.2rem;
    font-weight: bold;
    color: white;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    background: linear-gradient(135deg, #f03a47, #d8323b);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
    transition: background 0.3s ease, box-shadow 0.3s ease, transform 0.2s ease;
}

#login button:hover {
    background: linear-gradient(135deg, #d8323b, #f03a47);
    transform: scale(1.05);
}

#login button:active {
    transform: scale(0.97);
}

#login-form h3 {
    margin-bottom: 0px;
    /* Reduce spacing between the heading and the fine print */
}

.fine-print {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
    margin: 0 0 10px;
    /* Set margin-top to 0 and margin-bottom to 10px */
    font-style: italic;
}

.custom-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.custom-popup.show {
    opacity: 1;
    visibility: visible;
}

.custom-popup .popup-content {
    background: #1a1a1a;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    color: white;
}

.custom-popup.success .popup-content {
    border: 2px solid #4caf50;
}

.custom-popup.error .popup-content {
    border: 2px solid #f44336;
}

.custom-popup .popup-close {
    margin-top: 10px;
    padding: 8px 15px;
    font-size: 1rem;
    background: #f03a47;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    color: white;
}

#media-preview {
    margin-bottom: 15px;
    text-align: center;
}

.preview-media {
    max-width: 100%;
    max-height: 300px;
    border-radius: 10px;
    margin-top: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* Ensure pop-up is visible */
.custom-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.custom-popup.show {
    opacity: 1;
    visibility: visible;
}

.popup-content {
    background: #1a1a1a;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    color: white;
    width: 400px;
    max-width: 90%;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.6);
}

/* Edit Post Popup */
.custom-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.custom-popup.show {
    opacity: 1;
    visibility: visible;
}

.popup-content {
    background: #1a1a1a;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    color: white;
    width: 400px;
    max-width: 90%;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.6);
}

.popup-content textarea {
    width: 100%;
    height: 80px;
    padding: 10px;
    margin-bottom: 10px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    font-size: 1rem;
    color: white;
    background: #222;
    resize: none;
}

.popup-actions {
    display: flex;
    justify-content: space-between;
    gap: 10px;
}

.popup-actions button {
    flex: 1;
    padding: 10px 15px;
    font-size: 1rem;
    font-weight: bold;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.2s ease;
}

.popup-cancel {
    background: #3a86ff;
}

.popup-cancel:hover {
    background: #2f5db2;
}

.popup-save {
    background: #f03a47;
}

.popup-save:hover {
    background: #c0242b;
}

/* Footer */
footer {
    text-align: center;
    padding: 20px;
    background: #222;
    color: white;
    font-size: 0.9rem;
}