/* --- 1. The Reset & Base Setup --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* --- 2. The Gradient Background --- */
body {
    background: linear-gradient(135deg, #1a0b2e 0%, #000000 100%);
    background-attachment: fixed; 
    color: #ffffff;
    min-height: 100vh;
    padding-top: 70px;
    padding-bottom: 80px;
}

/* --- 3. The Neon Green Welcome Message --- */
.welcome-message {
    background-color: rgba(0, 230, 118, 0.1); 
    color: #00e676; 
    border-bottom: 1px solid #00e676; 
    text-align: center;
    padding: 15px;
    font-weight: bold;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    box-shadow: 0px 4px 15px rgba(0, 230, 118, 0.2); 
}

.welcome-message button {
    background-color: #00e676;
    color: #000000; 
    border: none;
    padding: 8px 20px;
    border-radius: 20px; 
    cursor: pointer;
    font-weight: bold;
    transition: 0.3s ease;
}

.welcome-message button:hover {
    box-shadow: 0px 0px 15px #00e676; 
}

/* --- 4. The Main Layout Container --- */
.container {
    display: flex;
    max-width: 1200px;
    margin: 0 auto;
}

/* --- 5. The Glassmorphism Sidebar --- */

.logo {
    font-size: 28px;
    font-weight: 900;
    color: #ffffff;
    margin-bottom: 40px;
    letter-spacing: 2px;
}

.logo span {
    color: #00e676; 
}

/* --- THE NAVIGATION OVERHAUL --- */

/* --- THE TOP BAR ENGINE --- */
.top-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 65px;
    background: #0b0f1a; 
    border-bottom: 2px solid #00e676; 
    display: flex; 
    align-items: center; 
    padding: 0 20px;
    z-index: 2000;
}

.top-bar .logo {
    position: absolute; 
    left: 50%;
    top: 50%; 
    transform: translate(-50%, -50%); 
    font-size: 24px;
    font-weight: bold;
    white-space: nowrap; 
    margin-bottom: 0; 
    z-index: 10; 
}

.menu-trigger {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #00e676;
    cursor: pointer;
    font-weight: bold;
    z-index: 2100; 
}

/* --- THE OVERLAY MENU (CLEANED & FIXED) --- */
.overlay-menu {
    position: fixed;
    top: 0;
    left: -100%; 
    width: 100%;
    height: 100vh;
    background: rgba(11, 15, 26, 0.98);
    z-index: 5000; 
    transition: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    padding: 40px;
    box-sizing: border-box;
}

.overlay-menu.open {
    left: 0; 
}

.menu-header { 
    display: flex; 
    justify-content: flex-end; 
    margin-bottom: 30px;
    padding-top: 10px; 
}

.close-btn { 
    color: #ff3366; 
    cursor: pointer; 
    font-size: 35px; 
}

.overlay-links { list-style: none; padding: 0; }
.overlay-links li { margin: 25px 0; border-bottom: 1px solid rgba(255,255,255,0.05); padding-bottom: 10px; }
.overlay-links a { color: white; text-decoration: none; font-size: 22px; font-weight: bold; transition: 0.2s; }
.overlay-links a:hover { color: #00e676; padding-left: 10px; }

/* 4. Bottom Nav Icon Fix */
.bottom-nav {
    position: fixed;
    bottom: 0; left: 0;
    width: 100%;
    height: 70px;
    background: #0b0f1a;
    border-top: 2px solid #00e676;
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 2000;
}

.bottom-nav a {
    color: #a09eb5;
    text-decoration: none;
    position: relative;
}

.bottom-nav .material-icons {
    font-size: 32px;
}

.notification-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #ff3366;
    color: white;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 50%;
    font-weight: bold;
    border: 2px solid #0f172a;
}

/* --- 6. The Feed & Glassmorphism Posts --- */
.feed {
    flex: 1;
    max-width: 700px; 
    margin: 0 auto; 
    padding: 0 20px;
}

.feed-header {
    padding: 30px 0 20px 0;
    position: sticky;
    top: 0;
    background: rgba(26, 11, 46, 0.8); 
    backdrop-filter: blur(10px);
    z-index: 10;
    display: flex;
    justify-content: center; 
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.feed-header h2 {
    font-size: 24px;
    font-weight: 700;
}

.post {
    background: rgba(255, 255, 255, 0.03); 
    border: 1px solid rgba(255, 255, 255, 0.05); 
    border-radius: 20px; 
    padding: 25px;
    margin-bottom: 25px;
    transition: all 0.3s ease;
}

.post:hover {
    background: rgba(255, 255, 255, 0.05); 
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5); 
    transform: translateY(-2px); 
}

.user-info {
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-info strong {
    cursor: pointer;
    font-size: 18px;
    color: #ffffff;
    transition: 0.2s;
}

.user-info strong:hover {
    color: #00e676; 
}

.time-stamp {
    color: #6a6680;
    font-size: 14px;
}

.post-content {
    font-size: 16px;
    line-height: 1.6;
    color: #d1d0dd; 
    margin-bottom: 20px;
}

/* --- Comment Section Styling --- */
.comment-section {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.comment-input-wrapper {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.comment-input {
    flex: 1;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 10px 15px;
    border-radius: 10px;
    color: white;
    outline: none; 
}

.comment-input:focus {
    border-color: #00e676; 
}

.post-comment-btn {
    background: #00e676;
    border: none;
    padding: 0 15px;
    border-radius: 10px;
    font-weight: bold;
    cursor: pointer;
}

.individual-comment {
    background: rgba(255, 255, 255, 0.02);
    padding: 10px;
    border-radius: 8px;
    margin-bottom: 8px;
    font-size: 14px;
}

.individual-comment strong {
    color: #00e676;
    margin-right: 5px;
}

/* --- Create Post Box Styling --- */
.create-post-box {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    padding: 20px;
    margin-bottom: 30px;
}

.create-post-top {
    display: flex;
    gap: 15px;
}

.mini-profile-pic {
    width: 50px;
    height: 50px;
    border-radius: 50%; 
    object-fit: cover;
}

textarea {
    flex: 1;
    background: transparent;
    border: none;
    color: white;
    font-size: 18px;
    resize: none; 
    outline: none;
    padding-top: 10px;
    min-height: 80px;
}

.media-preview-container {
    margin-top: 15px;
    display: flex;
    flex-wrap: wrap; 
    gap: 10px;
}

.preview-item {
    position: relative;
    max-width: 100%;
}

.preview-item img, .preview-item video {
    border-radius: 15px;
    max-height: 300px;
    border: 1px solid rgba(0, 230, 118, 0.3);
}

.create-post-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.upload-options {
    display: flex;
    gap: 20px;
}

.icon-btn {
    font-size: 20px;
    cursor: pointer;
    transition: 0.2s;
    padding: 8px;
    border-radius: 50%;
}

.icon-btn:hover {
    background: rgba(0, 230, 118, 0.1);
    transform: scale(1.1); 
}

.main-post-btn {
    background: #00e676;
    color: black;
    border: none;
    padding: 10px 25px;
    border-radius: 25px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
}

.main-post-btn:hover {
    box-shadow: 0 0 15px #00e676;
}

.remove-media-btn {
    position: absolute; 
    top: -10px;         
    right: -10px;       
    background: #ff3366; 
    color: white;
    border: none;
    border-radius: 50%; 
    width: 35px;
    height: 35px;
    font-size: 20px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 10px rgba(255, 51, 102, 0.4); 
    transition: 0.2s ease;
}

.remove-media-btn:hover {
    transform: scale(1.15); 
    background: #ff0040; 
}

/* ========================================= */
/* --- PROFILE PAGE SPECIFIC STYLES --- */
/* ========================================= */

.profile-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    margin-bottom: 25px;
    overflow: hidden; 
}

.profile-banner {
    height: 150px;
    background: linear-gradient(90deg, #3b82f6 0%, #00e676 100%); 
}

.profile-info-section {
    padding: 0 25px 25px 25px;
    position: relative;
}

.profile-pic-wrapper {
    position: relative;
    display: inline-block;
    margin-top: -50px; 
    border: 5px solid #0f172a; 
    border-radius: 50%;
}

.large-profile-pic {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    display: block;
}

.edit-pic-btn {
    position: absolute;
    bottom: 5px;
    right: 5px;
    background: #1e293b;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    font-size: 14px;
    transition: 0.3s;
}

.edit-pic-btn:hover {
    background: #00e676;
}

.profile-details {
    margin-top: 15px;
}

.profile-display-name {
    font-size: 24px;
    font-weight: 700;
}

.profile-username {
    color: #6a6680;
    font-size: 16px;
    margin-bottom: 15px;
}

.bio-section {
    margin-bottom: 20px;
}

.bio-text {
    font-size: 16px;
    line-height: 1.5;
    color: #d1d0dd;
    margin-bottom: 10px;
}

.edit-bio-btn {
    background: transparent;
    border: 1px solid #00e676;
    color: #00e676;
    padding: 5px 15px;
    border-radius: 15px;
    cursor: pointer;
    font-size: 14px;
    transition: 0.3s;
}

.edit-bio-btn:hover {
    background: rgba(0, 230, 118, 0.1);
}

.profile-stats-bar {
    display: flex;
    gap: 30px;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.stat-box {
    display: flex;
    flex-direction: column; 
}

.stat-number {
    font-size: 20px;
    font-weight: bold;
    color: #ffffff;
}

.stat-label {
    font-size: 14px;
    color: #6a6680;
}

.profile-tabs {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.tab-btn {
    background: none;
    border: none;
    color: #6a6680;
    font-size: 16px;
    font-weight: bold;
    padding: 10px 0;
    cursor: pointer;
    transition: 0.3s;
}

.active-tab {
    color: #00e676;
    border-bottom: 3px solid #00e676; 
}

.bio-edit-input {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid #00e676; 
    color: #ffffff;
    font-size: 16px;
    padding: 10px;
    border-radius: 10px;
    margin-bottom: 10px;
    min-height: 80px;
    resize: none; 
    outline: none;
    font-family: inherit;
    box-shadow: 0 0 10px rgba(0, 230, 118, 0.1); 
}

/* ========================================= */
/* --- MODAL POP-UP STYLES --- */
/* ========================================= */

.modal-overlay {
    position: fixed; 
    top: 0;
    left: 0;
    width: 100vw; 
    height: 100vh; 
    background: rgba(0, 0, 0, 0.7); 
    backdrop-filter: blur(10px); 
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000; 
}

.modal-card {
    background: rgba(26, 11, 46, 0.9);
    border: 1px solid rgba(255, 51, 102, 0.3); 
    border-radius: 20px;
    padding: 40px;
    width: 90%;
    max-width: 400px;
    text-align: center;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.5);
    animation: slideUp 0.3s ease-out forwards; 
}

@keyframes slideUp {
    from { transform: translateY(30px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.modal-icon {
    font-size: 40px;
    margin-bottom: 15px;
}

.modal-card h3 {
    font-size: 24px;
    color: #ffffff;
    margin-bottom: 10px;
}

.modal-card p {
    color: #a09eb5;
    font-size: 16px;
    margin-bottom: 30px;
    line-height: 1.5;
}

.modal-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.modal-cancel-btn {
    background: transparent;
    border: 1px solid #6a6680;
    color: #ffffff;
    padding: 10px 20px;
    border-radius: 12px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.2s;
    flex: 1; 
}

.modal-cancel-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.modal-confirm-btn {
    background: #ff3366; 
    border: none;
    color: #ffffff;
    padding: 10px 20px;
    border-radius: 12px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.2s;
    flex: 1;
    box-shadow: 0 4px 15px rgba(255, 51, 102, 0.3);
}

.modal-confirm-btn:hover {
    background: #ff0040;
    transform: scale(1.05);
}

/* ========================================= */
/* --- SEARCH PAGE STYLES --- */
/* ========================================= */

.search-container {
    padding: 20px;
    margin-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.search-box {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 30px; 
    padding: 5px 5px 5px 20px;
    transition: 0.3s;
}

.search-box:focus-within {
    border-color: #00e676;
    box-shadow: 0 0 15px rgba(0, 230, 118, 0.2);
}

.search-icon {
    font-size: 18px;
    margin-right: 10px;
    color: #a09eb5;
}

.search-input {
    flex: 1;
    background: transparent;
    border: none;
    color: #ffffff;
    font-size: 16px;
    outline: none; 
}

.search-btn {
    background: #00e676;
    color: #000000;
    border: none;
    padding: 10px 25px;
    border-radius: 25px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
}

.search-btn:hover {
    box-shadow: 0 0 15px #00e676;
    transform: scale(1.05);
}

.search-results-area {
    padding: 20px;
}

.search-placeholder-text {
    text-align: center;
    color: #a09eb5;
    font-size: 16px;
    margin-top: 40px;
}

/* ========================================= */
/* --- COMMENT SECTION INTERACTIVITY --- */
/* ========================================= */

.comment-input-area:hover,
.comment-input:focus {
    box-shadow: 0 0 15px rgba(0, 230, 118, 0.2);
    border-color: #00e676;
    transition: 0.3s ease-in-out;
}

.post-comment-btn:hover,
.comment-action-btn:hover {
    box-shadow: 0 0 15px #00e676;
    transform: scale(1.05); 
    transition: 0.3s ease-in-out;
}

/* --- IMAGE CONTROLS (DOWNLOAD & FULLSCREEN) --- */
.media-control-btn {
    background: rgba(255, 255, 255, 0.05);
    color: #00e676;
    padding: 5px 15px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 14px;
    font-weight: bold;
    border: 1px solid rgba(0, 230, 118, 0.3);
    cursor: pointer;
    display: inline-block; 
    transition: all 0.3s ease; 
}

.media-control-btn:hover {
    background: rgba(0, 230, 118, 0.1);
    box-shadow: 0 0 15px rgba(0, 230, 118, 0.4); 
    transform: translateY(-2px); 
}

/* ========================================= */
/* --- ENGAGEMENT BUTTONS (LIKE, COMMENT, REPOST, QUOTE) --- */
/* ========================================= */

.like-btn, .comment-btn, .repost-btn, .quote-btn {
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    transition: 0.3s;
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Base Shadow Effects */
.like-btn:hover {
    background: rgba(255, 51, 102, 0.1);
    box-shadow: 0 0 12px rgba(255, 51, 102, 0.4);
    transform: translateY(-2px);
}

.comment-btn:hover {
    background: rgba(0, 230, 118, 0.1);
    box-shadow: 0 0 12px rgba(0, 230, 118, 0.4);
    transform: translateY(-2px);
}

/* [CSS Pseudo-classes]: The new shadows for the sharing engine! */
.repost-btn:hover {
    background: rgba(0, 229, 255, 0.1);
    box-shadow: 0 0 12px rgba(0, 229, 255, 0.4);
    color: #00e5ff;
    transform: translateY(-2px);
}

.quote-btn:hover {
    background: rgba(255, 235, 59, 0.1);
    box-shadow: 0 0 12px rgba(255, 235, 59, 0.4);
    color: #ffeb3b;
    transform: translateY(-2px);
}

/* --- SMART NAVIGATION HIGHLIGHTING --- */

.nav-link-active {
    color: #00e676 !important; 
    text-shadow: 0 0 10px rgba(0, 230, 118, 0.6); 
    transform: scale(1.1); 
    transition: 0.3s ease;
}

.nav-link-active::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 5px;
    height: 5px;
    background: #00e676;
    border-radius: 50%;
    box-shadow: 0 0 8px #00e676;
}

/* ========================================= */
/* --- MOBILE RESPONSIVENESS FIXES --- */
/* ========================================= */

@media (max-width: 768px) {
    
    .container {
        flex-direction: column; 
    }

    .sidebar {
        width: 100%;
        height: 70px;
        position: fixed; 
        bottom: 0; 
        top: auto; 
        left: 0;
        padding: 0;
        display: flex;
        align-items: center;
        background: rgba(26, 11, 46, 0.95); 
        border-right: none;
        border-top: 1px solid rgba(255, 255, 255, 0.1); 
        z-index: 100; 
    }

    .top-bar .logo {
        display: block; 
        font-size: 20px;
    }

    .nav-links {
        display: flex;
        width: 100%;
        justify-content: space-around; 
    }

    .nav-links li {
        margin-bottom: 0; 
    }

    .nav-links a {
        font-size: 14px; 
        padding: 10px;
    }
    
    .nav-links a.logout {
        margin-top: 0; 
    }

    .feed {
        padding-bottom: 90px; 
        border-right: none;
    }

    .create-post-top {
        flex-direction: column; 
        align-items: flex-start;
    }

    .mini-profile-pic {
        margin-bottom: 10px;
    }

    .profile-stats-bar {
        gap: 15px; 
        justify-content: space-between;
    }
}