/* Connect - Social Media App */
:root {
    --primary: #4f46e5;
    --primary-dark: #4338ca;
    --secondary: #6366f1;
    --bg-main: #f3f4f6;
    --bg-white: #ffffff;
    --bg-dark: #111827;
    --text-dark: #111827;
    --text-muted: #6b7280;
    --text-light: #9ca3af;
    --border: #e5e7eb;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--bg-main);
    color: var(--text-dark);
    line-height: 1.5;
}

/* Header */
.site-header {
    background: var(--bg-white);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.3rem;
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-dark);
}

.search-bar {
    flex: 1;
    max-width: 400px;
    margin: 0 40px;
}

.search-bar input {
    width: 100%;
    padding: 10px 16px;
    border: none;
    background: var(--bg-main);
    border-radius: 20px;
    font-size: 0.95rem;
}

.search-bar input:focus {
    outline: 2px solid var(--primary);
}

.header-nav {
    display: flex;
    gap: 20px;
    align-items: center;
}

.nav-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--bg-main);
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: var(--text-dark);
    font-size: 1.2rem;
    transition: background 0.2s;
}

.nav-icon:hover {
    background: var(--border);
}

.nav-icon.active {
    background: rgba(79, 70, 229, 0.1);
    color: var(--primary);
}

/* Main Layout */
.main-layout {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    display: grid;
    grid-template-columns: 280px 1fr 320px;
    gap: 20px;
}

/* Sidebar */
.sidebar {
    position: sticky;
    top: 80px;
    height: fit-content;
}

.sidebar-nav {
    background: var(--bg-white);
    border-radius: 12px;
    padding: 15px 0;
    margin-bottom: 20px;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 500;
    transition: background 0.2s;
}

.sidebar-link:hover {
    background: var(--bg-main);
}

.sidebar-link.active {
    color: var(--primary);
    background: rgba(79, 70, 229, 0.1);
}

.sidebar-link .icon {
    font-size: 1.3rem;
}

.sidebar-section {
    background: var(--bg-white);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
}

.sidebar-section h3 {
    font-size: 0.9rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 15px;
}

.page-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    text-decoration: none;
    color: var(--text-dark);
    font-size: 0.95rem;
}

.page-link:hover {
    color: var(--primary);
}

.page-avatar {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
}

.page-avatar-img {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    object-fit: cover;
}

/* Feed */
.feed {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Post Card */
.post-card {
    background: var(--bg-white);
    border-radius: 12px;
    overflow: hidden;
}

.post-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
}

.post-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
}

.post-avatar-img {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
}

.post-meta {
    flex: 1;
}

.post-author {
    font-weight: 600;
    color: var(--text-dark);
}

.post-author a {
    color: inherit;
    text-decoration: none;
}

.post-author a:hover {
    text-decoration: underline;
}

.post-time {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.post-badge {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}

.post-badge.breaking {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
}

.post-badge.trending {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning);
}

.post-badge.news {
    background: rgba(79, 70, 229, 0.1);
    color: var(--primary);
}

.post-content {
    padding: 0 16px 16px;
}

.post-content p {
    color: var(--text-dark);
    margin-bottom: 12px;
    font-size: 0.95rem;
}

.post-link {
    display: block;
    background: var(--bg-main);
    border-radius: 8px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: background 0.2s;
}

.post-link:hover {
    background: var(--border);
}

.post-link-image {
    height: 200px;
    background: var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    color: var(--text-light);
}

.post-link-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}

.post-link-content {
    padding: 12px 16px;
}

.post-link-domain {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.post-link-title {
    font-weight: 600;
    margin: 4px 0;
}

.post-link-desc {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.post-actions {
    display: flex;
    border-top: 1px solid var(--border);
    padding: 8px 16px;
}

.post-action {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 8px;
    border: none;
    background: none;
    color: var(--text-muted);
    font-size: 0.9rem;
    cursor: pointer;
    border-radius: 6px;
    transition: background 0.2s;
}

.post-action:hover {
    background: var(--bg-main);
    color: var(--primary);
}

/* Right Sidebar */
.right-sidebar {
    position: sticky;
    top: 80px;
    height: fit-content;
}

.trending-card {
    background: var(--bg-white);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
}

.trending-card h3 {
    font-size: 1.1rem;
    margin-bottom: 15px;
}

.trending-item {
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
}

.trending-item:last-child {
    border-bottom: none;
}

.trending-topic {
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 2px;
}

.trending-posts {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.alert-banner {
    background: linear-gradient(135deg, var(--danger) 0%, #dc2626 100%);
    color: white;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
}

.alert-banner h3 {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.alert-banner p {
    font-size: 0.9rem;
    opacity: 0.95;
}

.alert-banner a {
    color: white;
    font-weight: 600;
}

/* Responsive */
@media (max-width: 1024px) {
    .main-layout {
        grid-template-columns: 1fr;
    }
    
    .sidebar,
    .right-sidebar {
        display: none;
    }
}

@media (max-width: 768px) {
    .search-bar {
        display: none;
    }
}
