:root {
    --li-blue: #0A66C2;
    --li-blue-hover: #004182;
    --li-black: rgba(0, 0, 0, 0.9);
    --li-gray-text: rgba(0, 0, 0, 0.6);
    --li-bg-light: #f4f2ee;
    --li-bg-white: #FFFFFF;
    --li-border: rgba(0, 0, 0, 0.08);
    --li-card-shadow: 0 0 0 1px rgba(0,0,0,0.08), 0 2px 4px rgba(0,0,0,0.08); /* Sutil elevation for cards */
    --transition: all 0.2s ease-in-out;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: -apple-system, system-ui, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "Arial", sans-serif;
}

body {
    background-color: var(--li-bg-light);
    color: var(--li-black);
    line-height: 1.42857;
}

a {
    text-decoration: none;
    color: inherit;
}

/* Header Logged In */
.main-header {
    background-color: var(--li-bg-white);
    height: 52px;
    border-bottom: 1px solid var(--li-border);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-container {
    max-width: 1128px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
    padding: 0 16px;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
}

.logo svg {
    width: 34px;
    height: 34px;
}

.search-bar {
    background-color: #edf3f8;
    display: flex;
    align-items: center;
    padding: 0 8px;
    border-radius: 4px;
    height: 34px;
    min-width: 280px;
    max-width: 400px;
}

.search-bar i {
    color: var(--li-gray-text);
    margin-right: 8px;
    font-size: 14px;
}

.search-bar input {
    background: transparent;
    border: none;
    outline: none;
    width: 100%;
    font-size: 14px;
}

.nav-links-logged {
    display: flex;
    align-items: center;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0 12px;
    height: 52px;
    color: var(--li-gray-text);
    font-size: 12px;
    cursor: pointer;
    position: relative;
    min-width: 80px;
}

.nav-item i {
    font-size: 20px;
    margin-bottom: 2px;
}

.nav-item:hover {
    color: var(--li-black);
}

.nav-item.active {
    color: var(--li-black);
}

.nav-item.active::after {
    content: "";
    position: absolute;
    bottom: 0px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--li-black);
}

.avatar-small {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
}

.profile-nav i, .business-nav i {
    font-size: 12px;
    margin-left: 2px;
}

.nav-links-logged .divider {
    height: 52px;
    width: 1px;
    background-color: var(--li-border);
    margin: 0 12px;
}

.premium-text {
    color: #915907;
    text-decoration: underline;
    font-size: 12px;
    width: 80px;
    text-align: center;
    font-weight: 500;
}

/* Feed Layout */
.feed-layout {
    margin-top: 24px;
}

.container-grid {
    display: grid;
    grid-template-columns: 225px 1fr 300px;
    gap: 24px;
}

/* Generic Card Style */
.card {
    background-color: var(--li-bg-white);
    border-radius: 8px;
    border: 1px solid var(--li-border);
    margin-bottom: 12px;
    overflow: hidden;
}

/* Identity Card */
.identity-card {
    text-align: center;
    position: relative;
}

.card-top-bg {
    height: 56px;
    background-size: cover;
    background-position: center;
}

.profile-info {
    padding: 0 12px 16px;
    border-bottom: 1px solid var(--li-border);
}

.avatar-main {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    border: 2px solid white;
    margin-top: -36px;
    margin-bottom: 12px;
    object-fit: cover;
}

.profile-name {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 4px;
}

.profile-headline {
    font-size: 12px;
    color: var(--li-gray-text);
}

.stats-section {
    padding: 12px 0;
    border-bottom: 1px solid var(--li-border);
}

.stat-item {
    display: flex;
    justify-content: space-between;
    padding: 4px 12px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
}

.stat-item:hover {
    background-color: rgba(0,0,0,0.08);
}

.stat-label {
    color: var(--li-gray-text);
}

.stat-value {
    color: var(--li-blue);
}

.my-items {
    padding: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
}

.my-items:hover {
    background-color: rgba(0,0,0,0.08);
}

/* Groups Card */
.sticky-sidebar-left {
    position: sticky;
    top: 76px;
}

.group-header {
    padding: 12px 12px 4px;
    font-size: 12px;
    color: var(--li-black);
}

.group-list {
    display: flex;
    flex-direction: column;
}

.group-list a {
    padding: 4px 12px;
    font-size: 12px;
    font-weight: 600;
    color: var(--li-gray-text);
}

.group-list a i {
    margin-right: 8px;
}

.group-list a:hover {
    background-color: rgba(0,0,0,0.08);
    color: var(--li-black);
}

.group-links {
    border-top: 1px solid var(--li-border);
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.group-links a {
    font-size: 12px;
    font-weight: 600;
    color: var(--li-blue);
}

.group-links a:hover {
    text-decoration: underline;
}

.discover-more {
    border-top: 1px solid var(--li-border);
    padding: 12px;
    font-size: 14px;
    font-weight: 600;
    color: var(--li-gray-text);
    text-align: center;
    cursor: pointer;
}

.discover-more:hover {
    background-color: rgba(0,0,0,0.08);
    color: var(--li-black);
}

/* Main Feed */
.share-box {
    padding: 12px 16px 8px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.share-box-input {
    display: flex;
    align-items: center;
    gap: 12px;
}

.btn-share-trigger {
    flex: 1;
    height: 48px;
    background-color: white;
    border: 1px solid var(--li-border);
    border-radius: 24px;
    padding: 0 16px;
    text-align: left;
    color: var(--li-gray-text);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.btn-share-trigger:hover {
    background-color: rgba(0,0,0,0.08);
}

.share-box-actions {
    display: flex;
    justify-content: space-around;
}

.action-btn {
    background: transparent;
    border: none;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    color: var(--li-gray-text);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
}

.action-btn:hover {
    background-color: rgba(0,0,0,0.08);
}

.feed-divider {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    font-size: 12px;
}

.feed-divider hr {
    flex: 1;
    border: 0;
    border-top: 1px solid var(--li-border);
}

.feed-divider span {
    color: var(--li-gray-text);
}

.feed-divider b {
    color: var(--li-black);
    cursor: pointer;
}

/* Post Card */
.feed-post {
    padding: 12px 16px;
}

.post-header {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 12px;
    position: relative;
}

.post-meta {
    flex: 1;
}

.author-name {
    font-size: 14px;
    font-weight: 600;
}

.connection-degree {
    font-weight: 400;
    color: var(--li-gray-text);
}

.author-headline {
    font-size: 12px;
    color: var(--li-gray-text);
}

.post-time {
    font-size: 12px;
    color: var(--li-gray-text);
}

.btn-follow {
    color: var(--li-blue);
    background: transparent;
    border: none;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
}

.btn-follow:hover {
    background-color: rgba(10, 102, 194, 0.1);
    border-radius: 4px;
    padding: 4px 8px;
}

.post-content {
    font-size: 14px;
    margin-bottom: 12px;
}

.post-content p {
    margin-bottom: 12px;
    text-align: justify;
}

.hashtags {
    color: var(--li-blue) !important;
}

.post-image-container {
    margin: 12px -16px;
    background-color: #f9f9f9;
    display: flex;
    justify-content: center;
}

.post-image-container img {
    width: 100%;
    height: auto;
    object-fit: contain;
}

.post-interactions-stats {
    display: flex;
    justify-content: right;
    padding: 8px 0;
    border-bottom: 1px solid var(--li-border);
    font-size: 12px;
    color: var(--li-gray-text);
}

.interaction-images {
    display: flex;
    align-items: center;
    gap: -4px;
}

.interaction-images img {
    width: 16px;
    border: 2px solid white;
    border-radius: 50%;
}

.interaction-count {
    margin-left: 8px;
}

.post-actions {
    display: flex;
    justify-content: space-between;
    padding-top: 4px;
}

.post-action-btn {
    flex: 1;
    background: transparent;
    border: none;
    padding: 12px 8px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    color: var(--li-gray-text);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: var(--transition);
}

.post-action-btn:hover {
    background-color: rgba(0,0,0,0.08);
}

.post-actions.creator-actions {
    justify-content: flex-start;
    gap: 8px;
    padding: 8px 16px 4px;
}
.post-action-btn.profile-selector {
    flex: 0 0 auto;
    padding: 8px 12px 8px 4px;
    gap: 6px;
}
.avatar-tiny {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
}
.creator-comment-area {
    padding: 8px 16px 16px 16px;
}
.comment-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    border: 1px solid rgba(0, 0, 0, 0.3);
    border-radius: 30px;
    padding: 10px 16px;
    background-color: white;
}
.comment-input-wrapper input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 14px;
    background: transparent;
    color: var(--li-black);
}
.comment-input-wrapper input::placeholder {
    color: var(--li-gray-text);
}
.comment-input-icons {
    display: flex;
    gap: 16px;
    color: var(--li-gray-text);
    margin-left: 8px;
}
.comment-input-icons i {
    font-size: 20px;
    cursor: pointer;
    font-weight: 600;
}
.comment-input-icons i:hover {
    color: var(--li-black);
}
.creator-stats-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 16px 12px 16px;
    font-size: 12px;
    color: var(--li-gray-text);
}
.preview-results {
    font-weight: 600;
    cursor: pointer;
}
.preview-results i {
    margin-left: 4px;
    font-size: 10px;
}

/* Sidebar Right */
.news-header {
    padding: 12px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.news-header h2 {
    font-size: 16px;
    font-weight: 600;
}

.news-list {
    list-style: none;
}

.news-list li a {
    display: block;
    padding: 8px 16px;
}

.news-list li a:hover {
    background-color: rgba(0,0,0,0.08);
}

.news-title {
    font-size: 14px;
    font-weight: 600;
}

.news-meta {
    font-size: 12px;
    color: var(--li-gray-text);
}

.show-more-news {
    background: transparent;
    border: none;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 600;
    color: var(--li-gray-text);
    cursor: pointer;
    width: 100%;
    text-align: left;
}

.show-more-news:hover {
    background-color: rgba(0,0,0,0.08);
}

.ad-card {
    padding: 12px 16px;
    text-align: center;
}

.ad-label {
    font-size: 12px;
    color: var(--li-gray-text);
    text-align: right;
    margin-bottom: 8px;
}

.ad-content {
    font-size: 12px;
    margin-bottom: 12px;
}

.ad-image {
    width: 70px;
    height: 70px;
    border-radius: 4px;
    margin-top: 12px;
}

.btn-ad {
    border: 1px solid var(--li-blue);
    color: var(--li-blue);
    padding: 8px 16px;
    border-radius: 24px;
    font-weight: 600;
    cursor: pointer;
    background: white;
}

.btn-ad:hover {
    background-color: rgba(10, 102, 194, 0.1);
}

/* Mobile Responsiveness */
@media (max-width: 1128px) {
    .container-grid {
        grid-template-columns: 225px 1fr;
    }
    .sidebar-right {
        display: none;
    }
}

@media (max-width: 768px) {
    .container-grid {
        grid-template-columns: 1fr;
    }
    .sidebar-left {
        display: none;
    }
    .nav-item span {
        display: none;
    }
    .search-bar {
        min-width: 50px;
    }
}
