/* 상단 네비게이션 */
.top-nav {
    margin-top:50px;
    left: 0;
    right: 0;
    background: white;
    z-index: 100;
    border-bottom: 1px solid #eee;
    padding: 10px 0;
}

.top-nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
}

.nav-tabs {
    display: flex;
    gap: 30px;
}

.nav-tab {
    color: #666;
    font-size: 16px;
    font-weight: 500;
    text-decoration: none;
    position: relative;
}

.nav-tab.active {
    color: #333;
    font-weight: 600;
}

.nav-tab.active::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    right: 0;
    height: 2px;
    background: #ff4757;
}

.nav-tab .badge {
    background: #ff4757;
    color: white;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    font-size: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: 5px;
}

.search-icon {
    font-size: 20px;
    color: #666;
}

/* 카테고리 탭 */
.category-tabs {
    margin-top:50px;
    left: 0;
    right: 0;
    background: white;
    z-index: 99;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
    overflow-x: auto;
    white-space: nowrap;
}

.category-tabs::-webkit-scrollbar {
    display: none;
}

.category-list {
    display: flex;
    gap: 20px;
    padding: 0 20px;
}

.category-item {
    color: #666;
    font-size: 14px;
    text-decoration: none;
    white-space: nowrap;
    padding: 5px 0;
}

.category-item.active {
    color: #333;
    font-weight: 600;
    border-bottom: 2px solid #ff4757;
}

/* 레이아웃 전환 버튼 */
.layout-controls {
    position: fixed;
    bottom: 80px;
    right: 10px;
    z-index: 98;
    background: white;
    border-radius: 20px;
    padding: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.layout-btn {
    width: 30px;
    height: 30px;
    border: none;
    background: transparent;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #666;
    font-size: 14px;
}

.layout-btn.active {
    background: #ff4757;
    color: white;
}

/* 메인 컨텐츠 */
.main-content {
    padding: 5px;
}

/* 피드 레이아웃 */
.feed-container {
    display: grid;
    gap: 5px;
}

.feed-container.grid-2 {
    grid-template-columns: 1fr 1fr;
}

.feed-container.grid-1 {
    grid-template-columns: 1fr;
}

.feed-item {
    background: white;
    /*border-radius: 12px;*/
    overflow: hidden;
    /*box-shadow: 0 2px 8px rgba(0,0,0,0.1);*/
}

.feed-image {
    width: 100%;
    aspect-ratio: 0;
    object-fit: cover;
}

.feed-content {
    padding: 12px;
}

.feed-title {
    font-size: 14px;
    font-weight: 500;
    color: #333;
    line-height: 1.4;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.feed-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: #666;
}

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

.feed-stats {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-left: auto;
}

.feed-stats span {
    display: flex;
    align-items: center;
    gap: 3px;
}

/* 1열 레이아웃 전용 스타일 */
.feed-container.grid-1 .feed-item {
    display: flex;
    gap: 12px;
}

.feed-container.grid-1 .feed-image {
    width: 120px;
    height: 120px;
    flex-shrink: 0;
    aspect-ratio: 1;
}

.feed-container.grid-1 .feed-content {
    flex: 1;
    padding: 8px 12px 8px 0;
}

.feed-container.grid-1 .feed-title {
    font-size: 15px;
    -webkit-line-clamp: 3;
}