:root {
    --primary: #d4af37;
    /* Metallic Gold */
    --primary-dim: #b8860b;
    --bg-dark: #000000;
    /* True Black */
    --bg-panel: #121212;
    /* Instagram Dark Grey */
    --text-main: #f5f5f5;
    --text-muted: #a8a8a8;
    --accent-blue: #0095f6;
    /* Insta Blue */
    --border-color: #262626;
    --glass-border: 1px solid #262626;
    --nav-width: 245px;
    --feed-width: 470px;
    --header-height: 60px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scrollbar-width: thin;
    scrollbar-color: #333 #000;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    min-height: 100vh;
    overflow-x: hidden;
    display: flex;
}

/* Background Canvas */
#zien-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
    opacity: 0.3;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 600;
    color: var(--text-main);
}

a {
    text-decoration: none;
    color: var(--text-main);
    transition: 0.2s;
}

/* Left Sidebar (Instagram Style) */
.sidebar {
    position: fixed;
    height: 100vh;
    width: var(--nav-width);
    border-right: 1px solid var(--border-color);
    padding: 2rem 1rem;
    display: flex;
    flex-direction: column;
    background: var(--bg-dark);
    z-index: 1000;
}

.logo {
    font-family: 'Outfit', sans-serif;
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 2.5rem;
    padding-left: 0.8rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-main);
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 0.5rem;
    cursor: pointer;
    font-size: 1.1rem;
    transition: background 0.2s;
}

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

.nav-item.active {
    font-weight: 700;
}

.nav-icon {
    font-size: 1.5rem;
}

/* Main Feed Layout */
.main-content {
    margin-left: var(--nav-width);
    flex-grow: 1;
    display: flex;
    justify-content: center;
    padding-top: 2rem;
}

.feed-container {
    width: 100%;
    max-width: var(--feed-width);
    padding-bottom: 4rem;
}

/* Stories (Restricted Status) */
.stories-bar {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    overflow-x: auto;
    padding: 1rem 0;
}

.story-circle {
    min-width: 66px;
    height: 66px;
    border-radius: 50%;
    background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
    padding: 2px;
    cursor: pointer;
}

.story-inner {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: #000;
    border: 2px solid #000;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

/* Feed Posts */
.post {
    background: var(--bg-dark);
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
}

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

.post-user {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    font-weight: 600;
    font-size: 0.9rem;
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #333;
}

.post-image {
    width: 100%;
    border-radius: 4px;
    object-fit: cover;
    border: 1px solid var(--border-color);
}

.post-actions {
    padding: 0.8rem 0;
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 1.5rem;
}

.action-btn {
    cursor: pointer;
    transition: transform 0.2s;
}

.action-btn:hover {
    color: var(--text-muted);
}

.post-content {
    padding: 0 0 1rem 0;
}

.likes-count {
    font-weight: 600;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.caption {
    font-size: 0.9rem;
    line-height: 1.4;
}

.timestamp {
    color: var(--text-muted);
    font-size: 0.7rem;
    margin-top: 0.5rem;
    text-transform: uppercase;
}

/* Modals */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 2000;
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background: #262626;
    border-radius: 12px;
    width: 90%;
    max-width: 900px;
    height: 80vh;
    display: flex;
    overflow: hidden;
}

.hidden {
    display: none !important;
}

/* Chat Layout inside Modal */
.chat-sidebar {
    width: 35%;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    flex-direction: column;
}

.chat-header {
    height: 60px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 1.1rem;
}

.chat-list {
    flex-grow: 1;
    overflow-y: auto;
}

.chat-item {
    padding: 0.8rem 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    cursor: pointer;
}

.chat-item:hover,
.chat-item.active {
    background: rgba(255, 255, 255, 0.05);
}

.chat-area {
    width: 65%;
    display: flex;
    flex-direction: column;
    background: #000;
}

.chat-messages {
    flex-grow: 1;
    overflow-y: auto;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.message {
    max-width: 70%;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    line-height: 1.4;
}

.message.sent {
    align-self: flex-end;
    background: #3797f0;
    /* Insta Blue */
    color: white;
}

.message.received {
    align-self: flex-start;
    background: #262626;
    color: white;
}

.chat-input-area {
    padding: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    gap: 0.5rem;
}

.chat-input {
    flex-grow: 1;
    background: #262626;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 22px;
    padding: 0.5rem 1rem;
    color: white;
    outline: none;
}

.btn-send {
    background: none;
    border: none;
    color: #0095f6;
    font-weight: 600;
    cursor: pointer;
}

/* Utility */
.btn-primary {
    background: #0095f6;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-main);
    padding: 0.4rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        width: 70px;
        align-items: center;
        padding-top: 1rem;
    }

    .nav-label {
        display: none;
    }

    .logo {
        display: none;
    }

    .main-content {
        margin-left: 70px;
    }

    .feed-container {
        width: 100%;
    }
}