/* 기본 스타일 리셋 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

/* 헤더 스타일 */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: white;
    border-bottom: 1px solid #dbdbdb;
    z-index: 1000;
    height: 60px;
}

.header-container {
    max-width: 975px;
    margin: 0 auto;
    padding: 0 20px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    font-size: 24px;
    font-weight: 700;
    color: #262626;
}

.logo i {
    margin-right: 8px;
    color: #0095f6;
}

.search-bar {
    position: relative;
    width: 300px;
}

.search-bar input {
    width: 100%;
    padding: 12px 40px 12px 16px;
    border: 1px solid #dbdbdb;
    border-radius: 8px;
    background: #fafafa;
    font-size: 14px;
    outline: none;
    transition: all 0.2s ease;
}

.search-bar input:focus {
    background: white;
    border-color: #0095f6;
}

.search-bar i {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #8e8e8e;
}

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

.nav-icon {
    color: #262626;
    font-size: 24px;
    text-decoration: none;
    transition: color 0.2s ease;
}

.nav-icon:hover {
    color: #0095f6;
}

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

/* 메인 컨텐츠 */
.main-content {
    margin-top: 60px;
    padding: 20px 0;
}

.content-container {
    max-width: 975px;
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 1fr 614px 300px;
    gap: 32px;
}

/* 스토리 섹션 */
.stories-section {
    grid-column: 2;
    margin-bottom: 24px;
}

.stories-container {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    padding: 16px 0;
}

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

.story-avatar {
    width: 60px;
    height: 60px;
    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: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid white;
}

.add-story .story-avatar {
    background: #dbdbdb;
    color: #8e8e8e;
    font-size: 20px;
}

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

/* 피드 섹션 */
.feed-section {
    grid-column: 2;
}

.feed-container {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.post {
    background: white;
    border: 1px solid #dbdbdb;
    border-radius: 8px;
    overflow: hidden;
}

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

.post-user-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;
}

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

.post-more {
    color: #262626;
    font-size: 18px;
    cursor: pointer;
}

.post-image {
    width: 100%;
    max-height: 614px;
    object-fit: cover;
}

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

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

.action-btn:hover {
    background: #fafafa;
}

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

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

.post-likes {
    padding: 0 16px;
    font-weight: 600;
    font-size: 14px;
    color: #262626;
    margin-bottom: 8px;
}

.post-caption {
    padding: 0 16px;
    margin-bottom: 8px;
}

.post-caption .username {
    font-weight: 600;
    margin-right: 8px;
}

.post-caption .text {
    font-size: 14px;
    color: #262626;
}

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

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

.post-comment .username {
    font-weight: 600;
    margin-right: 8px;
}

.post-comment .text {
    color: #262626;
}

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

.post-add-comment {
    padding: 16px;
    border-top: 1px solid #dbdbdb;
    display: flex;
    align-items: center;
    gap: 12px;
}

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

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

.post-add-comment button.active {
    opacity: 1;
}

/* 사이드바 */
.sidebar {
    grid-column: 3;
}

.sidebar-content {
    position: sticky;
    top: 80px;
}

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

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

.user-info strong {
    font-size: 14px;
    color: #262626;
    display: block;
}

.user-info span {
    font-size: 14px;
    color: #8e8e8e;
}

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

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

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

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

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

.suggestion-info {
    flex: 1;
}

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

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

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

/* 모바일 네비게이션 */
.mobile-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    border-top: 1px solid #dbdbdb;
    padding: 8px 0;
    z-index: 1000;
}

.mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    text-decoration: none;
    color: #8e8e8e;
    font-size: 10px;
    flex: 1;
    padding: 8px 0;
    transition: color 0.2s ease;
}

.mobile-nav-item.active {
    color: #262626;
}

.mobile-nav-item i {
    font-size: 24px;
}

/* 반응형 디자인 */
@media (max-width: 1024px) {
    .content-container {
        grid-template-columns: 1fr 614px;
        gap: 20px;
    }
    
    .sidebar {
        display: none;
    }
}

@media (max-width: 768px) {
    .header-container {
        padding: 0 16px;
    }
    
    .search-bar {
        display: none;
    }
    
    .content-container {
        grid-template-columns: 1fr;
        gap: 0;
        padding: 0;
    }
    
    .stories-section {
        grid-column: 1;
        padding: 0 16px;
    }
    
    .feed-section {
        grid-column: 1;
        padding: 0 16px;
    }
    
    .post {
        border-left: none;
        border-right: none;
        border-radius: 0;
    }
    
    .mobile-nav {
        display: flex;
    }
    
    .main-content {
        margin-bottom: 80px;
    }
}

@media (max-width: 480px) {
    .header-container {
        padding: 0 12px;
    }
    
    .stories-section {
        padding: 0 12px;
    }
    
    .feed-section {
        padding: 0 12px;
    }
    
    .post-actions {
        padding: 8px 12px;
    }
    
    .post-header {
        padding: 14px 12px;
    }
    
    .post-likes,
    .post-caption,
    .post-comments,
    .post-time,
    .post-add-comment {
        padding-left: 12px;
        padding-right: 12px;
    }
}

/* 애니메이션 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.post {
    animation: fadeIn 0.3s ease-out;
}

/* 호버 효과 */
.action-btn:hover {
    transform: scale(1.1);
}

.story-item:hover .story-avatar {
    transform: scale(1.05);
}

.story-item:hover span {
    color: #0095f6;
}

/* 스크롤바 스타일 */
.stories-container::-webkit-scrollbar {
    height: 4px;
}

.stories-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 2px;
}

.stories-container::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 2px;
}

.stories-container::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}
