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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background-color: #fafafa;
    color: #262626;
    line-height: 1.5;
}

.container {
    max-width: 975px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.header {
    background-color: #fff;
    border-bottom: 1px solid #dbdbdb;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    height: 54px;
}

.header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

.logo h1 {
    font-family: 'Billabong', cursive;
    font-size: 29px;
    font-weight: normal;
    color: #262626;
}

.search-bar {
    position: relative;
    flex: 1;
    max-width: 268px;
    margin: 0 20px;
}

.search-bar input {
    width: 100%;
    padding: 8px 16px 8px 32px;
    border: 1px solid #dbdbdb;
    border-radius: 8px;
    background-color: #efefef;
    font-size: 14px;
    outline: none;
}

.search-bar i {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: #8e8e8e;
    font-size: 12px;
}

.nav-icons {
    display: flex;
    align-items: center;
    gap: 22px;
}

.nav-icons i {
    font-size: 22px;
    color: #262626;
    cursor: pointer;
    transition: color 0.2s;
}

.nav-icons i:hover {
    color: #8e8e8e;
}

.profile-pic img {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    cursor: pointer;
}

/* Main Content */
.main-content {
    margin-top: 54px;
    padding-top: 30px;
}

/* Stories */
.stories {
    display: flex;
    gap: 16px;
    padding: 16px 0 16px 32px;
    margin-bottom: 24px;
    background-color: #fff;
    border: 1px solid #dbdbdb;
    border-radius: 8px;
    overflow-x: auto;
}

.story {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 66px;
    cursor: pointer;
}

.story-pic {
    width: 66px;
    height: 66px;
    border-radius: 50%;
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
    padding: 2px;
    margin-bottom: 4px;
}

.story-pic img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 2px solid #fff;
    object-fit: cover;
}

.story span {
    font-size: 12px;
    color: #262626;
    text-align: center;
    max-width: 66px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Content Wrapper */
.content-wrapper {
    display: flex;
    gap: 28px;
}

/* Feed */
.feed {
    flex: 1;
    max-width: 614px;
}

/* Post */
.post {
    background-color: #fff;
    border: 1px solid #dbdbdb;
    border-radius: 8px;
    margin-bottom: 24px;
}

.post-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-pic {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.username {
    font-weight: 600;
    font-size: 14px;
    color: #262626;
    text-decoration: none;
}

.post-header i {
    color: #262626;
    cursor: pointer;
    font-size: 16px;
}

.post-image img {
    width: 100%;
    height: auto;
    display: block;
}

.post-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 16px 8px;
}

.left-actions {
    display: flex;
    gap: 16px;
}

.post-actions i {
    font-size: 24px;
    color: #262626;
    cursor: pointer;
    transition: color 0.2s;
}

.post-actions i:hover {
    color: #8e8e8e;
}

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

.likes {
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 8px;
}

.caption {
    font-size: 14px;
    margin-bottom: 4px;
}

.caption .username {
    margin-right: 4px;
}

.comments {
    font-size: 14px;
}

.view-comments {
    color: #8e8e8e;
    cursor: pointer;
    display: block;
    margin-bottom: 4px;
}

.comment {
    margin-bottom: 4px;
}

.comment .username {
    margin-right: 4px;
}

.post-time {
    font-size: 10px;
    color: #8e8e8e;
    text-transform: uppercase;
    letter-spacing: 0.2px;
    margin-top: 8px;
}

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

.user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
}

.user-profile .profile-pic {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    object-fit: cover;
}

.user-details {
    flex: 1;
}

.user-details .username {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #262626;
}

.user-details .full-name {
    display: block;
    font-size: 14px;
    color: #8e8e8e;
}

.switch-btn {
    background: none;
    border: none;
    color: #0095f6;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    text-transform: uppercase;
}

.suggestions {
    margin-bottom: 24px;
}

.suggestions-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.suggestions-header span {
    font-size: 14px;
    font-weight: 600;
    color: #8e8e8e;
}

.suggestions-header a {
    font-size: 12px;
    font-weight: 600;
    color: #262626;
    text-decoration: none;
}

.suggestion {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.suggestion-pic {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.suggestion-info {
    flex: 1;
}

.suggestion-info .username {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #262626;
}

.suggestion-info .relation {
    display: block;
    font-size: 12px;
    color: #8e8e8e;
}

.follow-btn {
    background: none;
    border: none;
    color: #0095f6;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
}

.sidebar-footer {
    font-size: 11px;
    color: #c7c7c7;
    line-height: 1.4;
}

.footer-links {
    margin-bottom: 16px;
}

.footer-links a {
    color: #c7c7c7;
    text-decoration: none;
}

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

.copyright {
    text-transform: uppercase;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .sidebar {
        display: none;
    }
    
    .feed {
        max-width: 100%;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 16px;
    }
    
    .search-bar {
        display: none;
    }
    
    .stories {
        margin: 0 -16px 24px;
        border-radius: 0;
        border-left: none;
        border-right: none;
        padding: 16px;
    }
    
    .post {
        border-radius: 0;
        border-left: none;
        border-right: none;
        margin: 0 -16px 8px;
    }
}

@media (max-width: 480px) {
    .nav-icons {
        gap: 16px;
    }
    
    .nav-icons i {
        font-size: 20px;
    }
    
    .logo h1 {
        font-size: 24px;
    }
}

/* Custom scrollbar for stories */
.stories::-webkit-scrollbar {
    display: none;
}

.stories {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* Hover effects */
.story:hover .story-pic {
    transform: scale(1.05);
    transition: transform 0.2s ease;
}

.post-actions i:active {
    transform: scale(0.9);
    transition: transform 0.1s ease;
}

.follow-btn:hover,
.switch-btn:hover {
    opacity: 0.7;
}

/* Loading animation for images */
.post-image img,
.story-pic img,
.user-pic,
.suggestion-pic,
.profile-pic img {
    background-color: #f0f0f0;
    transition: opacity 0.3s ease;
}

/* Heart animation */
@keyframes heartBeat {
    0% { transform: scale(1); }
    50% { transform: scale(1.3); }
    100% { transform: scale(1); }
}

.post-actions .fa-heart.liked {
    animation: heartBeat 0.6s ease;
    color: #ed4956;
}