* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

:root {
    --primary-color: #66baea;
    --primary-dark: #5a67d8;
    --secondary-color: #764ba2;
    --accent-pink: #f687b3;
    --accent-teal: #38b2ac;
    --white: #ffffff;
    --bg-color: #f7fafc;
    --text-primary: #1a202c;
    --text-secondary: #718096;
    --text-muted: #a0aec0;
    --border-color: #e2e8f0;
    --hover-bg: #edf2f7;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.15);
    --shadow-xl: 0 20px 40px rgba(0, 0, 0, 0.2);
    --shadow-glow: 0 0 30px rgba(102, 126, 234, 0.4);
}

body {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    background-attachment: fixed;
}

/* Navbar Styles */
.navbar {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    padding: 0.75rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--white);
    font-size: 1.5rem;
    font-weight: bold;
}

.logo-icon {
    font-size: 1.75rem;
    font-weight: 900;
    color: #ffffff;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
}

.search-bar {
    display: flex;
    align-items: center;
    background: var(--white);
    border-radius: 25px;
    padding: 0.5rem 1rem;
    width: 400px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.search-bar input {
    border: none;
    outline: none;
    flex: 1;
    font-size: 0.95rem;
}

.search-bar button {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0.25rem;
}

.nav-icons {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-icon {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    color: var(--white);
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 1.25rem;
}

.nav-icon::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.2);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.nav-icon:hover::before {
    opacity: 1;
}

.nav-icon:hover {
    transform: translateY(-2px);
}

.nav-icon:active {
    transform: scale(0.95);
}

/* Home Icon */
.home-icon:hover {
    background: rgba(255, 255, 255, 0.25);
    box-shadow: 0 4px 15px rgba(255, 255, 255, 0.3);
}

/* Message Icon */
.message-icon:hover {
    background: rgba(255, 255, 255, 0.25);
    box-shadow: 0 4px 15px rgba(255, 255, 255, 0.3);
}

/* Notification Icon */
.notification-icon:hover {
    background: rgba(255, 255, 255, 0.25);
    box-shadow: 0 4px 15px rgba(255, 255, 255, 0.3);
}

/* Stream Icon */
.stream-icon:hover {
    background: rgba(255, 255, 255, 0.25);
    box-shadow: 0 4px 15px rgba(255, 255, 255, 0.3);
}

/* Video Icon */
.video-icon:hover {
    background: rgba(255, 255, 255, 0.25);
    box-shadow: 0 4px 15px rgba(255, 255, 255, 0.3);
}

/* Live indicator for stream icon */
.stream-icon::after {
    content: '';
    position: absolute;
    top: 6px;
    right: 6px;
    width: 8px;
    height: 8px;
    background: #ef4444;
    border-radius: 50%;
    border: 2px solid var(--white);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.badge {
    position: absolute;
    top: 2px;
    right: 2px;
    background: #ef4444;
    color: var(--white);
    font-size: 0.65rem;
    font-weight: bold;
    padding: 2px 5px;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
}

.user-profile {
    margin-left: 0.5rem;
}

.user-profile img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid var(--white);
    cursor: pointer;
    transition: transform 0.3s ease;
}

.user-profile img:hover {
    transform: scale(1.1);
}

/* Main Content Layout */
.main-content {
    display: flex;
    max-width: 1400px;
    margin: 0 auto;
    padding: 1.5rem;
    gap: 1.5rem;
}

/* Sidebar Left */
.sidebar-left {
    width: 250px;
    position: sticky;
    top: 80px;
    height: fit-content;
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.875rem 1rem;
    border-radius: 12px;
    cursor: pointer;
    color: var(--text-primary);
    font-weight: 500;
    transition: all 0.3s ease;
}

.menu-item:hover {
    background: var(--hover-bg);
    transform: translateX(5px);
}

.menu-item i {
    font-size: 1.25rem;
    color: var(--primary-color);
    width: 24px;
}

/* Feed */
.feed {
    flex: 1;
    max-width: 600px;
}

.create-post {
    background: var(--white);
    border-radius: 16px;
    padding: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

.create-post input {
    flex: 1;
    border: none;
    outline: none;
    background: var(--bg-color);
    padding: 0.75rem 1rem;
    border-radius: 25px;
    font-size: 0.95rem;
}

.post {
    background: var(--white);
    border-radius: 16px;
    padding: 1rem;
    margin-bottom: 1rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.post-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.post-header img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

.post-info h4 {
    font-size: 0.95rem;
    color: var(--text-primary);
}

.post-info span {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.post-content p {
    color: var(--text-primary);
    line-height: 1.6;
    margin-bottom: 1rem;
}

.post-actions {
    display: flex;
    justify-content: space-around;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border-color);
}

.post-actions button {
    background: none;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    color: var(--text-secondary);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

.post-actions button:hover {
    background: var(--hover-bg);
    color: var(--primary-color);
}

/* Sidebar Right */
.sidebar-right {
    width: 300px;
    position: sticky;
    top: 80px;
    height: fit-content;
}

.sidebar-right h3 {
    color: var(--text-primary);
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.ad-item {
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 1rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.ad-item img {
    width: 100%;
    height: 60px;
    object-fit: cover;
}

.ad-item p {
    padding: 0.75rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Profile Panel Styles */
.profile-header {
    background: var(--white);
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 1rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.cover-photo {
    height: 200px;
    overflow: hidden;
}

.cover-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-info {
    padding: 0 1.5rem;
    display: flex;
    align-items: flex-end;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: -75px;
    position: relative;
}

.profile-picture {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    border: 5px solid var(--white);
    overflow: hidden;
    background: var(--white);
}

.profile-picture img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-details {
    flex: 1;
    padding-bottom: 0.5rem;
    margin-left: 1rem;
}

.profile-details h2 {
    font-size: 1.5rem;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.profile-details .bio {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
}

.profile-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.profile-meta span {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.profile-meta i {
    color: var(--primary-color);
}

.profile-actions {
    display: flex;
    gap: 0.75rem;
    padding-bottom: 1rem;
}

.btn-primary, .btn-secondary {
    padding: 0.625rem 1.25rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    border: none;
    font-size: 0.9rem;
}

.btn-primary {
    background: var(--primary-color);
    color: var(--white);
}

.btn-primary:hover {
    background: #4f46e5;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.btn-secondary {
    background: var(--bg-color);
    color: var(--text-primary);
}

.btn-secondary:hover {
    background: var(--border-color);
    transform: translateY(-2px);
}

.profile-stats {
    display: flex;
    justify-content: space-around;
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.stat-item {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 1.25rem;
    font-weight: bold;
    color: var(--text-primary);
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.profile-tabs {
    display: flex;
    padding: 0 1.5rem;
}

.tab-btn {
    flex: 1;
    padding: 1rem;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--text-secondary);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.tab-btn:hover {
    color: var(--primary-color);
    background: var(--hover-bg);
}

.tab-btn.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.profile-content {
    display: flex;
    gap: 1rem;
}

.profile-posts {
    flex: 1;
}

.profile-sidebar {
    width: 300px;
}

.profile-card {
    background: var(--white);
    border-radius: 16px;
    padding: 1rem;
    margin-bottom: 1rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.profile-card h3 {
    font-size: 1rem;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.photos-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
}

.photos-grid img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.photos-grid img:hover {
    transform: scale(1.05);
}

.friends-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.friend-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
}

.friend-item img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

.friend-item span {
    color: var(--text-primary);
    font-weight: 500;
}

.friend-item:hover span {
    color: var(--primary-color);
}

.post-image {
    margin-bottom: 1rem;
    border-radius: 8px;
    overflow: hidden;
}

.post-image img {
    width: 100%;
    height: auto;
}

/* Hidden class for panel switching */
.hidden {
    display: none !important;
}

/* Active state for nav icons */
.nav-icon.active {
    background: rgba(255, 255, 255, 0.3) !important;
}

.nav-icon.active::before {
    opacity: 1 !important;
}

/* Menu item active state */
.menu-item.active {
    background: var(--hover-bg);
    transform: translateX(5px);
}

.menu-item.active i {
    color: var(--primary-color);
}

/* Create Post Styles */
.create-post {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 1rem;
    background: var(--white);
    border-radius: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    margin-bottom: 1rem;
}

.create-post-input {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.create-post-input input {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    background: var(--bg-color);
}

.create-post-input input:focus {
    outline: none;
    border-color: var(--primary-color);
    background: white;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

.create-post-preview {
    width: 100%;
    border-radius: 8px;
    overflow: hidden;
}

.create-post-preview .preview-image {
    width: 100%;
    max-height: 300px;
    object-fit: cover;
    border-radius: 8px;
}

.create-post-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 0.5rem;
    border-top: 1px solid var(--border-color);
}

.create-post-action {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    color: var(--text-secondary);
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.create-post-action:hover {
    background: var(--hover-bg);
    color: var(--primary-color);
}

.create-post-action i {
    font-size: 1.1rem;
}

.btn-post {
    padding: 0.625rem 1.5rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-post:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.btn-post:active {
    transform: translateY(0);
}

/* Responsive */
@media (max-width: 1024px) {
    .sidebar-right {
        display: none;
    }
    
    .sidebar-left {
        display: none;
    }
    
    .feed {
        max-width: 100%;
    }
}

@media (max-width: 768px) {
    .search-bar {
        display: none;
    }
    
    .navbar {
        padding: 0.75rem;
    }
    
    .logo-text {
        display: none;
    }
    
    .nav-icon {
        width: 38px;
        height: 38px;
        font-size: 1.1rem;
    }
    
    .main-content {
        padding: 1rem;
    }
}

@media (max-width: 480px) {
    .nav-icons {
        gap: 0.25rem;
    }
    
    .nav-icon {
        width: 36px;
        height: 36px;
        font-size: 1rem;
    }
    
    .badge {
        font-size: 0.55rem;
        min-width: 16px;
        padding: 1px 4px;
    }
}
