/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Hide all scrollbars globally */
* {
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
}

*::-webkit-scrollbar {
    display: none; /* Safari and Chrome */
}

html, body {
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
}

html::-webkit-scrollbar, body::-webkit-scrollbar {
    display: none; /* Safari and Chrome */
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Helvetica Neue', sans-serif;
    background-color: #fafafa;
    color: #262626;
    width: 470px;
    height: 100vh;
    overflow: hidden;
    margin: 0 auto;
}

/* Instagram Header */
.instagram-header {
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 470px;
    height: 60px;
    background-color: #ffffff;
    border-bottom: 1px solid #dbdbdb;
    z-index: 1001;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    height: 100%;
}

.logo {
    font-size: 24px;
    font-weight: 700;
    color: #262626;
    font-family: 'Billabong', 'Cookie', cursive;
    letter-spacing: 0.5px;
}

.logo svg {
    width: auto;
    height: 32px;
}

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

.header-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    color: #262626;
    transition: color 0.2s ease;
}

.header-btn:hover {
    color: #8e8e8e;
}

.header-btn svg {
    width: 24px;
    height: 24px;
}

/* Main container */
.instagram-feed {
    width: 100%;
    height: 100vh;
    overflow-y: auto;
    background-color: #fafafa;
    padding-bottom: 10px;
}

/* Stories section */
.stories-container {
    background-color: #ffffff;
}

.stories-list {
    display: flex;
    gap: 12px;
    padding: 0 12px;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.stories-list::-webkit-scrollbar {
    display: none;
}

.story-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 60px;
    cursor: pointer;
    padding: 8px 0;
}

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

.story-avatar {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: #ffffff;
    padding: 2px;
}

.story-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.story-username {
    font-size: 11px;
    color: #262626;
    font-weight: 400;
    text-align: center;
    max-width: 60px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Posts container */
.posts-container {
    background-color: #fafafa;
}

/* Individual post */
.post {
    background-color: #ffffff;
    margin-bottom: 0;
}


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

.post-author {
    display: flex;
    align-items: center;
}

.author-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    margin-right: 12px;
    object-fit: cover;
}

.author-info {
    display: flex;
    flex-direction: column;
}

.author-username {
    font-size: 14px;
    font-weight: 600;
    color: #262626;
    line-height: 18px;
}

.post-location {
    font-size: 12px;
    color: #8e8e8e;
    line-height: 14px;
}

.post-menu {
    background: none;
    border: none;
    cursor: pointer;
    color: #262626;
}

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

/* Post media */
.post-media {
    width: 100%;
    position: relative;
}

.post-media img {
    width: 100%;
    height: auto;
    object-fit: cover;
    display: block;
}

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

.primary-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.action-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: #262626;
    transition: color 0.2s ease;
    display: flex;
    align-items: center;
    gap: 3px;
}

.action-btn:hover {
    color: #8e8e8e;
}

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

.action-count {
    font-size: 12px;
    font-weight: 500;
    color: #262626;
    margin-left: 2px;
}

.like-btn.liked {
    color: #ed4956;
}

.like-btn.liked svg {
    fill: #ed4956;
    stroke: none;
}

.like-btn.liked .action-count {
    color: #ed4956;
}

.bookmark-btn.bookmarked {
    color: #262626;
}

.bookmark-btn.bookmarked svg {
    fill: #262626;
}

/* Post likes */
.post-likes {
    padding: 0 16px;
    margin-bottom: 8px;
}

.post-likes span {
    font-size: 14px;
    color: #262626;
    font-weight: 400;
}

.post-likes strong {
    font-weight: 600;
}

/* Post caption */
.post-caption {
    padding: 0 8px;
    margin-bottom: 8px;
    line-height: 18px;
}

.caption-username {
    font-size: 14px;
    font-weight: 600;
    color: #262626;
    margin-right: 4px;
}

.caption-text {
    font-size: 12px;
    color: #262626;
    font-weight: 400;
    word-wrap: break-word;
}

/* Post comments */
.post-comments {
    padding: 0 16px;
    margin-bottom: 8px;
}

.view-comments {
    background: none;
    border: none;
    font-size: 14px;
    color: #8e8e8e;
    cursor: pointer;
    padding: 0;
    font-weight: 400;
}

.view-comments:hover {
    color: #262626;
}

/* Post timestamp */
.post-timestamp {
    padding: 0 16px;
}

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

/* Heart animation for double-tap */
@keyframes heartPop {
    0% {
        transform: translate(-50%, -50%) scale(0);
        opacity: 0;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.2);
        opacity: 0.8;
    }
    100% {
        transform: translate(-50%, -50%) scale(1.4);
        opacity: 0;
    }
}

.heart-animation {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 80px;
    color: #ed4956;
    pointer-events: none;
    z-index: 1000;
    animation: heartPop 0.8s ease-out;
}

/* Bottom Navigation Bar */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 470px;
    height: 60px;
    background-color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: space-around;

    z-index: 1000;
}

.nav-btn {
    background: none;
    border: none;
    cursor: pointer;
    border-radius: 50%;
    transition: background-color 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-btn:hover {
    background-color: #f0f0f0;
}

.nav-btn.active {
    color: #262626;

}

.nav-btn:not(.active) {
    color: #262626;
    
  
}

.nav-btn svg {
    width: 20px;
    height: 20px;
}

.profile-nav {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    overflow: hidden;
}

.profile-nav img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Advertisement Styles */
.sponsored-post {
    position: relative;
}



.sponsored-post .post-location {
    color: #8e8e8e;
    font-size: 12px;
    font-weight: 400;
}

.ad-cta {
    display: flex;
    border-bottom: 1px solid #eee;
}

.learn-more-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: #ffffff;
    color: #000000;
    border: none;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
}


.learn-more-btn.changed {
    background-color: #4188FE;
    color: #ffffff;
}



/* Navigation button active states */
.nav-btn.active svg {
    fill: #262626;
   
}

.nav-btn:not(.active) svg {
    fill: none;
    stroke: #262626;
}

/* Navigation animations */
.nav-btn {
    transition: all 0.2s ease;
}



.sponsored-post .post-location::before {
    content: '광고';
    font-size: 12px;
    color: #8e8e8e;
    margin-right: 0;
}

/* Prevent content from being hidden behind nav */
.posts-container {
    margin-bottom: 50px;
}

/* Mobile responsiveness for bottom nav */
@media (max-width: 470px) {
    body {
        width: 100%;
    }
    
    .instagram-header {
        width: 100%;
        left: 0;
        transform: none;
    }
    
    .bottom-nav {
        width: 100%;
        left: 0;
        transform: none;
    }

    
    .stories-list {
        gap: 12px;
    }
    
    .story-ring {
        width: 48px;
        height: 48px;
    }
    
    .story-item {
        min-width: 48px;
    }
    
    .story-username {
        max-width: 48px;
        font-size: 10px;
    }

}