/* Threads.com Aesthetic CSS */
:root {
    --threads-bg: #ffffff;
    --threads-nav-bg: #ffffff;
    --threads-text: #000000;
    --threads-text-secondary: #999999;
    --threads-border: #f0f0f0;
    --threads-accent: #0095f6;
    --threads-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --threads-max-width: 640px;
}

[data-theme="dark"] {
    --threads-bg: #101010;
    --threads-nav-bg: #101010;
    --threads-text: #f3f5f7;
    --threads-text-secondary: #777777;
    --threads-border: #303030;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    font-family: var(--threads-font);
    background-color: var(--threads-bg);
    color: var(--threads-text);
    line-height: 1.5;
}

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

/* Layout */
.app-container {
    display: flex;
    min-height: 100vh;
}

.nav-sidebar {
    width: 80px;
    height: 100vh;
    position: fixed;
    left: 0;
    top: 0;
    border-right: 1px solid var(--threads-border);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 0;
    background: var(--threads-nav-bg);
    z-index: 100;
}

.main-content {
    flex: 1;
    margin-left: 80px;
    background-color: var(--threads-bg);
    display: flex;
    justify-content: flex-start;
}

.content-inner {
    width: 100%;
    max-width: var(--threads-max-width);
    margin: 0;
    padding: 0 20px;
    border-right: 1px solid var(--threads-border);
    min-height: 100vh;
}

.right-sidebar {
    flex: 1;
    max-width: 400px;
    padding: 24px 32px;
    display: none;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
}

@media (min-width: 1024px) {
    .right-sidebar {
        display: block;
    }
}

.popular-topics-title {
    font-size: 16px;
    font-weight: 700;
    margin-top: 0;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--threads-text);
}

.popular-topics-title svg {
    color: #ff4500;
}

.popular-topic-item {
    margin-bottom: 14px;
}

.popular-topic-item a {
    font-size: 14px;
    font-weight: 600;
    color: var(--threads-text);
    text-decoration: none;
}

.popular-topic-item a:hover {
    text-decoration: underline;
}

/* Navigation Icons */
.nav-item {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    border-radius: 8px;
    transition: background 0.2s;
    color: var(--threads-text);
}

.nav-item:hover {
    background: rgba(128, 128, 128, 0.1);
}

.nav-item svg {
    width: 26px;
    height: 26px;
}

/* Post Entry */
.post-entry {
    display: flex;
    padding: 16px 0;
    border-bottom: 1px solid var(--threads-border);
    position: relative;
}

.post-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #ccc;
    margin-right: 12px;
    flex-shrink: 0;
    overflow: hidden;
}

.post-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.post-body {
    flex: 1;
    margin: 0;
    padding: 0;
}

.post-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 0;
    padding: 0;
}

.post-author {
    font-weight: 600;
    font-size: 15px;
}

.post-time {
    color: var(--threads-text-secondary);
    font-size: 14px;
}

.post-content {
    margin: 0;
    padding: 0;
    font-size: 15px;
}

.post-media {
    margin-bottom: 12px;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--threads-border);
}

.post-media img {
    width: 100%;
    display: block;
}

.post-actions {
    display: flex;
    gap: 16px;
    color: var(--threads-text);
}

.post-action {
    display: flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    transition: opacity 0.2s;
}

.post-action:hover {
    opacity: 0.7;
}

.post-action svg {
    width: 20px;
    height: 20px;
}

/* Mobile Adjustments */
@media (max-width: 768px) {
    .nav-sidebar {
        width: 100%;
        height: 60px;
        top: auto;
        bottom: 0;
        border-right: none;
        border-top: 1px solid var(--threads-border);
        flex-direction: row;
        justify-content: space-around;
        padding: 0;
    }

    .main-content {
        margin-left: 0;
        margin-bottom: 60px;
    }

    .content-inner {
        padding: 12px;
    }

    .nav-item {
        margin-bottom: 0;
    }
}

/* Header Logo for Mobile */
.mobile-header {
    display: none;
    height: 60px;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid var(--threads-border);
    position: sticky;
    top: 0;
    background: var(--threads-bg);
    z-index: 99;
}

@media (max-width: 768px) {
    .mobile-header {
        display: flex;
    }
}

.threads-logo {
    width: 32px;
    height: 32px;
}
