/* simple_community.css */

/* --- 기본 & 레이아웃 --- */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f8f9fa;
    color: #212529;
    line-height: 1.6;
    display: flex;
    justify-content: center;
}

/* --- 콘텐츠 래퍼 --- */
#content-wrapper {
    width: 100%;
    max-width: 650px;
    border-top: 1px solid #dee2e6;
}

/* --- 다크 모드 --- */
@media (prefers-color-scheme: dark) {
    body {
        background-color: #121212;
        color: #e0e0e0;
    }

    #content-wrapper {
        border-top-color: #333;
    }

    /* 링크 색상 */
    a {
        color: #bb86fc;
    }

    a:visited {
        color: #9e6ddc;
    }

    /* 맨 위로 가기 버튼 */
    .back-to-top {
        background-color: rgba(255, 255, 255, 0.15);
    }

    .back-to-top:hover {
        background-color: rgba(255, 255, 255, 0.25);
    }

    .back-to-top svg {
        fill: #e0e0e0;
    }

    /* 게시글 아이템 */
    .post-item {
        border-bottom-color: #333;
    }

    .post-link:hover {
        background-color: rgba(255, 255, 255, 0.05);
    }

    .post-footer span {
        color: #aaa;
    }

    /* 인디케이터 */
    .indicator {
        color: #aaa;
    }

    .spinner {
        border-color: rgba(255, 255, 255, 0.1);
        border-left-color: #ccc;
    }

    /* (주의) #post-list의 border-top-color는 여기서 제거 */

}

/* --- 다크 모드 끝 --- */


/* --- 게시글 목록 --- */
#post-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

/* ... 이하 post-item, post-link, post-header, site-tag 등 나머지 스타일은 동일하게 유지 ... */

.post-item {
    border-bottom: 1px solid #dee2e6;
    transition: background-color 0.15s ease-out;
}

.post-link {
    display: block;
    padding: 12px 15px;
    text-decoration: none;
    color: inherit;
}

.post-link:hover {
    background-color: #e9ecef;
}

.post-header {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
}

.site-tag {
    background-color: #6c757d;
    color: white;
    font-size: 0.75rem;
    padding: 3px 6px;
    border-radius: 4px;
    margin-right: 8px;
    white-space: nowrap;
    flex-shrink: 0;
}

.site-dc .site-tag {
    background-color: #4a56a8;
}

.site-dogdrip .site-tag {
    background-color: #2e4361;
}

.site-fmkorea .site-tag {
    background-color: #5176cf;
}

.site-humoruniv .site-tag {
    background-color: #ed1746;
}

.site-palcook .site-tag {
    background-color: #4CAF50;
}

.site-etc .site-tag {
    background-color: #6c757d;
}

.post-title {
    font-size: 1rem;
    font-weight: 500;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    flex-grow: 1;
    min-width: 0;
}

.post-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    color: #6c757d;
}

.post-upvote {
    margin-right: 10px;
}

.post-date {
    white-space: nowrap;
}

/* --- 인디케이터 --- */
.indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    color: #6c757d;
    font-size: 0.9rem;
    min-height: 60px;
}

.spinner {
    border: 4px solid rgba(0, 0, 0, 0.1);
    border-left-color: #6c757d;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    animation: spin 1s linear infinite;
    margin-right: 10px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* --- 맨 위로 가기 버튼 --- */
.back-to-top {
    position: fixed;
    bottom: 25px;
    right: 25px;
    width: 40px;
    height: 40px;
    background-color: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.7;
    transition: opacity 0.3s ease, background-color 0.3s ease;
    z-index: 1000;
    padding: 0;
}

.back-to-top svg {
    fill: white;
}

.back-to-top:hover {
    opacity: 1;
    background-color: rgba(0, 0, 0, 0.7);
}