:root {
    --fb-blue: #1877f2;
    --fb-bg: #f0f2f5;
    --fb-card: #ffffff;
    --fb-text-primary: #050505;
    --fb-text-secondary: #65676b;
    --fb-border: #ced0d4;
    --danger: #e41e3f;
}

body {
    font-family: SFProDisplay-Regular, Helvetica, Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: var(--fb-bg);
    color: var(--fb-text-primary);
}

/* FACEBOOK NAVIGATION HEADER BAR */
header {
    background-color: var(--fb-card);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid var(--fb-border);
}

.nav-container {
    max-width: 1250px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 16px;
    gap: 20px;
}

/* Left header area grouping logo and tabs */
.nav-left-group {
    display: flex;
    align-items: center;
    gap: 40px;
    flex-grow: 1;
}

.logo {
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -1px;
    color: var(--fb-blue);
    text-decoration: none;
    user-select: none;
}

/* INTEGRATED FACEBOOK TABS STYLE MENU */
.fb-tab-menu {
    display: flex;
    align-items: center;
    gap: 4px;
    height: 100%;
}

.tab-item {
    text-decoration: none;
    color: var(--fb-text-secondary);
    font-weight: 600;
    font-size: 0.95rem;
    padding: 10px 16px;
    border-radius: 8px;
    transition: background 0.2s, color 0.2s;
    display: inline-flex;
    align-items: center;
    cursor: pointer;
}

.tab-item:hover {
    background-color: #f2f3f5;
    color: var(--fb-blue);
}

/* Highlight for current active index page tab */
.tab-item.active {
    background-color: #e7f3ff;
    color: var(--fb-blue);
}

/* DROPDOWN CONTAINER */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: var(--fb-card);
    min-width: 220px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border: 1px solid var(--fb-border);
    border-radius: 8px;
    padding: 6px 0;
    z-index: 1000;
    margin-top: 5px;
}

.dropdown-menu a {
    color: var(--fb-text-primary);
    padding: 10px 16px;
    text-decoration: none;
    display: block;
    font-size: 0.95rem;
    font-weight: 600;
    transition: background 0.15s;
}

.dropdown-menu a:hover {
    background-color: #f2f3f5;
    color: var(--fb-blue);
}

/* Show Dropdown on Hover */
.dropdown:hover .dropdown-menu {
    display: block;
}

/* Admin State Buttons via helper classes */
.admin-btn {
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.95rem;
    transition: background 0.2s;
    flex-shrink: 0;
}

.admin-btn.logged-out {
    background-color: #e4e6eb;
    color: var(--fb-text-primary);
}

.admin-btn.logged-out:hover {
    background-color: #d8dadf;
}

.admin-btn.logged-in {
    background-color: var(--fb-blue);
    color: white;
}

.admin-btn.logged-in:hover {
    background-color: #166fe5;
}

/* TWO COLUMN WORKSPACE LAYOUT CONTAINER */
.fb-layout {
    max-width: 1250px;
    margin: 20px auto 0 auto;
    display: grid;
    grid-template-columns: 360px 1fr;
    gap: 32px;
    padding: 0 16px;
}

/* LEFT SIDEBAR AREA */
.fb-sidebar {
    position: sticky;
    top: 76px;
    height: calc(100vh - 96px);
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* PROFILE WIDGET INFO CARD */
.sidebar-card {
    background: var(--fb-card);
    border-radius: 8px;
    padding: 16px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
    border: 1px solid rgba(0,0,0,0.05);
}

.profile-header-widget {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding-bottom: 16px;
    border-bottom: 1px solid #e4e6eb;
    margin-bottom: 16px;
}

.profile-pic-large {
    width: 110px;
    height: 110px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid var(--fb-border);
    margin-bottom: 12px;
}

.profile-name {
    font-size: 1.35rem;
    font-weight: 700;
    margin: 0;
}

.intro-item {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 12px 0;
    font-size: 0.95rem;
    color: var(--fb-text-primary);
}

.intro-link {
    color: var(--fb-blue);
    text-decoration: none;
}
.intro-link:hover {
    text-decoration: underline;
}

/* PUBLIC POST IMAGE SLIDER COMPONENT */
.slider-title {
    font-size: 1.05rem;
    font-weight: 700;
    margin: 0 0 12px 0;
    color: var(--fb-text-secondary);
}

.fb-photo-slider {
    width: 100%;
    height: 220px;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    background: #000;
}

.slider-track {
    display: flex;
    width: 100%;
    height: 100%;
    transition: transform 0.5s ease-in-out;
}

.slide-img {
    min-width: 100%;
    height: 100%;
    object-fit: cover;
}

/* MAIN TIMELINE POST FEED AREA */
.fb-timeline {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.timeline-section-title {
    font-size: 1.2rem;
    font-weight: 700;
    margin: 0 0 12px 0;
    color: var(--fb-text-secondary);
}

/* FACEBOOK TIMELINE POST CARD DESIGN */
.fb-post {
    background: var(--fb-card);
    border-radius: 8px;
    border: 1px solid rgba(0,0,0,0.08);
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
    padding: 12px 0 0 0;
    position: relative;
}

/* Post Header */
.post-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px 12px 16px;
}

.post-header-left {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-grow: 1;
}

.post-user-pic {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.post-meta {
    display: flex;
    flex-direction: column;
}

.post-author {
    font-size: 0.95rem;
    font-weight: 600;
    margin: 0;
    color: var(--fb-text-primary);
}

.post-time {
    font-size: 0.8rem;
    color: var(--fb-text-secondary);
    margin: 0;
}

/* Post Text Content */
.post-content-text {
    font-size: 0.95rem;
    padding: 0 16px 12px 16px;
    margin: 0;
    color: var(--fb-text-primary);
}

/* Post Iframe Preview Display Area */
.post-preview-wrapper {
    position: relative;
    width: 100%;
    height: 320px;
    background-color: #f8fafc;
    border-top: 1px solid #e4e6eb;
    border-bottom: 1px solid #e4e6eb;
    overflow: hidden;
}

.mini-homepage {
    width: 1920px;
    height: 1080px;
    border: none;
    position: absolute;
    top: 0;
    left: 0;
    transform-origin: top left;
    pointer-events: none;
}

.preview-click-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
    z-index: 20;
    background: rgba(0, 0, 0, 0);
}

/* Post Interactivity Actions Footer */
.post-actions-footer {
    display: grid;
    grid-template-columns: 1fr 1fr;
    padding: 4px 16px;
    border-top: 1px solid #e4e6eb;
    margin-top: 2px;
}

.action-button {
    background: none;
    border: none;
    padding: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--fb-text-secondary);
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    text-decoration: none;
}

.action-button:hover {
    background-color: #f2f2f2;
}

/* Admin Management Controls */
.delete-project-btn {
    background-color: #f2f2f2;
    color: var(--fb-text-secondary);
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    align-items: center;
    justify-content: center;
}

.delete-project-btn:hover {
    background-color: var(--danger);
    color: white;
}

/* Modal System Layout Configurations */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(244, 244, 244, 0.8);
    backdrop-filter: blur(4px);
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background: var(--fb-card);
    padding: 24px;
    border-radius: 8px;
    width: 90%;
    max-width: 450px;
    position: relative;
    box-shadow: 0 12px 28px rgba(0,0,0,0.2);
    border: 1px solid var(--fb-border);
}

.close-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 24px;
    cursor: pointer;
    border: none;
    background: none;
    color: var(--fb-text-secondary);
}

.form-group {
    margin-bottom: 16px;
}

.form-group input {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--fb-border);
    border-radius: 6px;
    box-sizing: border-box;
    font-size: 0.95rem;
}

.submit-btn {
    background-color: var(--fb-blue);
    color: white;
    border: none;
    padding: 10px;
    border-radius: 6px;
    cursor: pointer;
    width: 100%;
    font-size: 1rem;
    font-weight: 600;
}

@media (max-width: 850px) {
    .fb-layout {
        grid-template-columns: 1fr;
    }
    .fb-sidebar {
        position: static;
        height: auto;
    }
    .nav-container {
        flex-direction: column;
        gap: 12px;
        padding: 12px 16px;
    }
    .nav-left-group {
        flex-direction: column;
        gap: 12px;
        width: 100%;
    }
    .fb-tab-menu {
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
    }
    .dropdown-menu {
        position: static;
        box-shadow: none;
        border: none;
        width: 100%;
        text-align: center;
        background-color: #f2f3f5;
        border-radius: 8px;
    }
    .admin-btn {
        width: 100%;
        text-align: center;
    }
}