/* Base Styles */
:root {
    --primary-color: #4682B4;
    --secondary-color: #8A2BE2;
    --background-color: #000000;
    --text-color: #ffffff;
    --border-color: #999999;
    --border-radius: 10px;
    --transition-speed: 0.3s;
    --grid-gap: 2px;
}

.add-post-button {
    position: fixed;
    top: 20px;
    right: 15px;
    z-index: 1000;
}

.add-button {
    background-color: #333;
    color: white;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(255, 255, 255, 0.2);
    border: none;
    font-size: 1.5em;
    padding: 0;
}

body {
    font-family: 'Montserrat', sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
    position: relative;
    min-height: 100vh;
}

body::-webkit-scrollbar {
    display: none;
}

/* Particles Background */
#particles-js {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: linear-gradient(135deg, rgba(70,130,180,0.05) 0%, rgba(138,43,226,0.05) 100%);
}

/* Language Selector */
.language-selector {
    background-color: rgba(0, 0, 0, 0.9);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.language-selector a {
    color: var(--text-color);
    text-decoration: none;
    font-size: 0.9rem;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    transition: all var(--transition-speed) ease;
}

.language-selector a:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.language-selector a.active {
    color: var(--primary-color);
    font-weight: 600;
}

/* Profile Section */
.profile-section {
    background-color: rgba(0, 0, 0, 0.9);
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    margin-bottom: 1rem; /* Reduced margin */
}

.profile-image {
    position: relative;
    display: inline-block;
}

.profile-image img {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border: 3px solid var(--border-color);
    padding: 3px;
    transition: transform var(--transition-speed) ease;
}

.profile-name {
    color: var(--text-color);
    font-weight: 700;
    font-size: 1.8rem;
}

.profile-bio {
    color: var(--text-color);
    max-width: 600px;
    margin: 0 auto;
    margin-bottom: 0px !important;
}

/* Posts Grid */
.posts-grid {
    margin-bottom: 3rem;
}

.posts-grid .row {
    margin: calc(-1 * var(--grid-gap));
}

.post-item {
    cursor: pointer;
    padding: var(--grid-gap);
    position: relative;
}

.post-card {
    position: relative;
    overflow: hidden;
    background-color: #000;
    aspect-ratio: 4/5;
}

.post-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all var(--transition-speed) ease;
}

.post-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    padding: 1rem;
    color: white;
    opacity: 0;
    transition: all var(--transition-speed) ease;
}

.post-card:hover .post-overlay {
    opacity: 1;
}

.post-overlay h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.post-overlay p {
    font-size: 0.9rem;
    margin: 0;
    opacity: 0.9;
}

/* Edit Buttons */
.btn-edit {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: rgba(0, 0, 0, 0.7);
    border: 2px solid rgba(255, 255, 255, 0.5);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    opacity: 0;
    transition: all var(--transition-speed) ease;
}

.btn-delete {
    position: absolute;
    top: 10px;
    left: 10px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: rgba(0, 0, 0, 0.7);
    border: 2px solid rgba(255, 255, 255, 0.5);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    opacity: 0;
    transition: all var(--transition-speed) ease;
}

.post-item:hover .btn-edit,
.post-item:hover .btn-delete,
.profile-image:hover .btn-edit {
    opacity: 1;
}

.btn-edit:hover,
.btn-delete:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
    transform: scale(1.1);
}

/* Modal Styles */
.modal-content {
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-header {
    border-bottom-color: rgba(255, 255, 255, 0.1);
}

.modal-footer {
    border-top-color: rgba(255, 255, 255, 0.1);
}

.form-control {
    background-color: rgba(255, 255, 255, 0.05) !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
    color: white !important;
}

.form-control:focus {
    background-color: rgba(255, 255, 255, 0.1) !important;
    border-color: var(--primary-color) !important;
    box-shadow: 0 0 0 0.25rem rgba(70, 130, 180, 0.25) !important;
}

/* Footer */
.footer {
    background-color: rgba(0, 0, 0, 0.9);
    padding: 1rem 0;
    position: relative;
    margin-top: auto;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Toast Notifications */
.toast {
    /* background-color: rgba(0, 0, 0, 0.9) !important;*/
    background-color: rgba(41, 180, 50, 0.9) !important;
    border: 1px solid rgba(1, 85, 2, 0.801) !important;
}

.post-item.sortable-drag {
    opacity: 0.5;
}
/* Mobile-First Grid Layout */
@media (max-width: 767px) {
    .container {
        padding-left: var(--grid-gap);
        padding-right: var(--grid-gap);
    }

    .post-item {
        padding: var(--grid-gap);
    }

    .post-card {
        border-radius: 0;
        box-shadow: none;
    }

    .col-4 {
        flex: 0 0 33.333333%;
        max-width: 33.333333%;
    }

    .post-overlay {
        display: none;
    }

    .btn-edit {
        opacity: 1;
        width: 30px;
        height: 30px;
        top: 5px;
        right: 5px;
    }

    .profile-section {
        padding: 1rem;
        border-radius: 0;
        margin-bottom: 1rem;
    }

    .profile-image img {
        width: 100px;
        height: 100px;
    }

    .profile-name {
        font-size: 1.4rem;
    }

    .profile-bio {
        font-size: 0.9rem;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}