/* 기본 스타일 리셋 */
* {
    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;
}

/* 앱 컨테이너 */
.app-container {
    max-width: 600px;
    margin: 0 auto;
    background-color: #ffffff;
    min-height: 100vh;
    position: relative;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
}

/* 헤더 */
.header {
    position: sticky;
    top: 0;
    background-color: #ffffff;
    border-bottom: 1px solid #dbdbdb;
    z-index: 100;
    padding: 12px 16px;
}

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

.logo {
    font-size: 24px;
    font-weight: 600;
    color: #262626;
}

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

.icon-btn {
    background: none;
    border: none;
    font-size: 20px;
    color: #262626;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: background-color 0.2s;
}

.icon-btn:hover {
    background-color: #f8f9fa;
}

/* 메인 콘텐츠 */
.main-content {
    padding-bottom: 60px;
}

.feed-container {
    width: 100%;
}

/* 스토리 섹션 */
.stories-section {
    padding: 16px 0;
    border-bottom: 1px solid #dbdbdb;
    background-color: #ffffff;
}

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

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

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

.story-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
    padding: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.story-avatar img {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #ffffff;
}

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

/* 게시물 컨테이너 */
.posts-container {
    width: 100%;
}

/* 게시물 카드 */
.post-card {
    background-color: #ffffff;
    border-bottom: 1px solid #dbdbdb;
    margin-bottom: 8px;
}

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

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

.post-user-info {
    flex: 1;
}

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

.post-username:hover {
    text-decoration: underline;
}

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

.post-more {
    background: none;
    border: none;
    font-size: 16px;
    color: #262626;
    cursor: pointer;
    padding: 4px;
}

/* 게시물 이미지 */
.post-image {
    width: 100%;
    max-height: 600px;
    object-fit: cover;
}

/* 게시물 액션 버튼 */
.post-actions {
    padding: 12px 16px 8px;
}

.action-buttons {
    display: flex;
    gap: 16px;
    margin-bottom: 8px;
}

.action-btn {
    background: none;
    border: none;
    font-size: 24px;
    color: #262626;
    cursor: pointer;
    padding: 4px;
    transition: transform 0.1s;
}

.action-btn:hover {
    transform: scale(1.1);
}

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

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

.action-btn.bookmarked.active {
    color: #262626;
}

/* 좋아요 수 */
.likes-count {
    font-weight: 600;
    font-size: 14px;
    color: #262626;
    margin-bottom: 8px;
}

/* 게시물 내용 */
.post-content {
    padding: 0 16px 12px;
}

.post-caption {
    font-size: 14px;
    color: #262626;
    margin-bottom: 8px;
    line-height: 1.4;
}

.post-caption .username {
    font-weight: 600;
    color: #262626;
    text-decoration: none;
}

.post-caption .username:hover {
    text-decoration: underline;
}

.post-tags {
    color: #00376b;
    text-decoration: none;
}

.post-tags:hover {
    text-decoration: underline;
}

.post-time {
    font-size: 12px;
    color: #8e8e8e;
    text-transform: uppercase;
    margin-bottom: 12px;
}

/* 댓글 섹션 */
.comments-section {
    padding: 0 16px 12px;
}

.comment {
    font-size: 14px;
    color: #262626;
    margin-bottom: 4px;
    line-height: 1.4;
}

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

.comment .username:hover {
    text-decoration: underline;
}

.view-comments {
    font-size: 14px;
    color: #8e8e8e;
    cursor: pointer;
    margin-bottom: 8px;
}

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

/* 댓글 입력 */
.comment-input {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    border-top: 1px solid #dbdbdb;
    gap: 12px;
}

.comment-input input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 14px;
    color: #262626;
    background: none;
}

.comment-input input::placeholder {
    color: #8e8e8e;
}

.post-comment-btn {
    background: none;
    border: none;
    color: #0095f6;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    opacity: 0.3;
    transition: opacity 0.2s;
}

.post-comment-btn.active {
    opacity: 1;
}

.post-comment-btn.active:hover {
    color: #00376b;
}

/* 하단 네비게이션 */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 600px;
    background-color: #ffffff;
    border-top: 1px solid #dbdbdb;
    display: flex;
    justify-content: space-around;
    padding: 8px 0;
    z-index: 100;
}

.nav-btn {
    background: none;
    border: none;
    font-size: 24px;
    color: #8e8e8e;
    cursor: pointer;
    padding: 8px;
    border-radius: 4px;
    transition: color 0.2s;
}

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

.nav-btn:hover {
    color: #262626;
}

/* 반응형 디자인 */
@media (max-width: 480px) {
    .app-container {
        max-width: 100%;
        box-shadow: none;
    }
    
    .header {
        padding: 8px 12px;
    }
    
    .logo {
        font-size: 20px;
    }
    
    .header-actions {
        gap: 12px;
    }
    
    .icon-btn {
        font-size: 18px;
        padding: 6px;
    }
    
    .stories-container {
        padding: 0 12px;
        gap: 12px;
    }
    
    .story-avatar {
        width: 48px;
        height: 48px;
    }
    
    .story-avatar img {
        width: 44px;
        height: 44px;
    }
    
    .post-header {
        padding: 10px 12px;
    }
    
    .post-actions {
        padding: 10px 12px 6px;
    }
    
    .action-buttons {
        gap: 12px;
    }
    
    .action-btn {
        font-size: 22px;
    }
    
    .post-content {
        padding: 0 12px 10px;
    }
    
    .comments-section {
        padding: 0 12px 10px;
    }
    
    .comment-input {
        padding: 10px 12px;
    }
    
    .bottom-nav {
        padding: 6px 0;
    }
    
    .nav-btn {
        font-size: 22px;
        padding: 6px;
    }
}

/* 애니메이션 */
@keyframes likeAnimation {
    0% { transform: scale(1); }
    50% { transform: scale(1.3); }
    100% { transform: scale(1); }
}

.like-animation {
    animation: likeAnimation 0.3s ease-in-out;
}

/* 로딩 상태 */
.loading {
    text-align: center;
    padding: 40px 20px;
    color: #8e8e8e;
}

/* 스크롤바 숨기기 */
::-webkit-scrollbar {
    width: 0;
    height: 0;
}

