/* SNS 관련 스타일 - 기존 디자인 시스템과 통일 (news 탭과 동일한 구조) */

/* SNS 필터 셀렉트 박스 - 다른 탭과 통일 */
#sns-source-filter {
    padding: 10px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    cursor: pointer;
    font-size: 14px;
    color: #fff;
    min-width: 180px;
    transition: all 0.3s ease;
}

#sns-source-filter:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(139, 92, 246, 0.3);
}

#sns-source-filter:focus {
    outline: none;
    border-color: #8b5cf6;
    box-shadow: 0 0 0 2px rgba(139, 92, 246, 0.1);
}

/* SNS 아이템 카드 - 트위터 스타일 */
.sns-item {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 0;
    padding: 15px 20px;
    margin-bottom: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;
    display: flex;
    gap: 12px;
}

.sns-item:hover {
    background: rgba(255, 255, 255, 0.04);
    border-left: 3px solid #1d9bf0;
    padding-left: 17px;
}

.sns-item:first-child {
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
}

.sns-item:last-child {
    border-bottom-left-radius: 12px;
    border-bottom-right-radius: 12px;
    border-bottom: none;
}

/* 프로필 섹션 */
.sns-profile-section {
    flex-shrink: 0;
}

.sns-profile-image {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.1);
}

/* 콘텐츠 섹션 */
.sns-content-section {
    flex: 1;
    min-width: 0;
}

/* 트위터 아이콘 */
.twitter-icon {
    width: 16px;
    height: 16px;
    opacity: 0.5;
}

/* 카드 전체 클릭 시 효과 */
.sns-item:active {
    transform: translateY(0);
    box-shadow: 0 2px 5px rgba(52, 152, 219, 0.1);
}

/* SNS 헤더 - 트위터 스타일 */
.sns-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 4px;
}

.sns-author-info {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
}

.sns-author {
    font-size: 15px;
    font-weight: 700;
    color: #fff;
}

.sns-author:hover {
    text-decoration: underline;
}

.sns-username {
    color: #71767b;
    font-size: 14px;
}

.sns-time {
    color: #71767b;
    font-size: 14px;
}

.sns-source-badge {
    display: flex;
    align-items: center;
}

/* SNS 콘텐츠 */
.sns-content {
    color: #fff;
    font-size: 15px;
    line-height: 1.6;
    margin-bottom: 12px;
    word-wrap: break-word;
}

/* SNS 특수 포맷팅 */
.sns-hashtag {
    color: #3498db;
    font-weight: 500;
}

.sns-mention {
    color: #9b59b6;
    font-weight: 500;
}

.sns-ticker {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 600;
}

/* SNS 액션 버튼들 - 트위터 스타일 */
.sns-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 12px;
    max-width: 425px;
}

.sns-action-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    background: none;
    border: none;
    color: #888;
    font-size: 13px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.2s ease;
    text-decoration: none;
}

.sns-action-btn:hover {
    background: rgba(52, 152, 219, 0.1);
    color: #3498db;
}

.action-icon {
    font-size: 16px;
}

.action-count {
    font-size: 13px;
}

/* SNS 미디어 */
.sns-media {
    margin-top: 12px;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.sns-media-image {
    width: 100%;
    max-width: 500px;
    height: auto;
    display: block;
}

/* 페이지네이션 버튼 - 기존 스타일과 통일 */
#sns-pagination .page-btn {
    padding: 8px 12px;
    margin: 0 2px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
}

#sns-pagination .page-btn:hover:not(.active):not(:disabled) {
    background: rgba(52, 152, 219, 0.2);
    border-color: rgba(52, 152, 219, 0.5);
}

#sns-pagination .page-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: transparent;
    font-weight: 600;
}

#sns-pagination .page-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* 로딩 스피너 */
.sns-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    color: #888;
}

.sns-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top-color: #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.sns-loading-text {
    margin-top: 15px;
    font-size: 14px;
}

/* SNS가 없을 때 */
.no-sns {
    text-align: center;
    padding: 60px 20px;
    color: #888;
    font-size: 16px;
}

.no-sns-icon {
    font-size: 48px;
    margin-bottom: 15px;
    opacity: 0.5;
}

/* 다시 시도 버튼 */
.retry-btn {
    padding: 10px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 8px;
    color: white;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.retry-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

/* 반응형 디자인 */
@media (max-width: 768px) {
    .sns-item {
        padding: 15px;
    }
    
    .sns-author {
        font-size: 14px;
    }
    
    .sns-content {
        font-size: 14px;
    }
    
    #sns-source-filter {
        width: 100%;
        min-width: 100%;
    }
    
    #sns-last-updated {
        text-align: center !important;
        margin-top: 10px;
    }
    
    .sns-header {
        flex-direction: column;
        gap: 8px;
    }
    
    .sns-time {
        align-self: flex-start;
    }
}

/* 라이트 모드 대응 */
body.light-theme .sns-profile-image {
    border-color: rgba(0, 0, 0, 0.1);
}

body.light-theme .sns-author {
    color: #0f1419 !important;
}

body.light-theme .sns-action-btn {
    color: #536471;
}

body.light-theme .sns-action-btn:hover {
    background: rgba(29, 155, 240, 0.1);
    color: #1d9bf0;
}

body.light-theme #sns-source-filter {
    background: rgba(0, 0, 0, 0.06) !important;
    border: 1px solid rgba(0, 0, 0, 0.3) !important;
    color: #212121 !important;
}

body.light-theme #sns-source-filter:hover {
    background: rgba(0, 0, 0, 0.08);
    border-color: rgba(139, 92, 246, 0.5);
}

body.light-theme #sns-source-filter option {
    background: #fff;
    color: #333;
}

body.light-theme .sns-item {
    background: #f8f8f8 !important;
    border: 2px solid #d0d0d0 !important;
}

body.light-theme .sns-item:hover {
    background: #f0f0f0 !important;
    border-color: #3498db !important;
    border-left: 3px solid #1d9bf0 !important;
    padding-left: 17px !important;
    box-shadow: 0 5px 15px rgba(52, 152, 219, 0.2);
}

body.light-theme .sns-content {
    color: #212121 !important;
}

body.light-theme .sns-username {
    color: #757575 !important;
}

body.light-theme .sns-source {
    color: #999 !important;
}

body.light-theme .sns-time {
    color: #757575 !important;
}

body.light-theme .sns-link {
    color: #2980b9;
}

body.light-theme .sns-link:hover {
    color: #1e6ba8;
}

body.light-theme .sns-stat {
    color: #666;
}

body.light-theme .sns-hashtag {
    color: #1976d2;
}

body.light-theme .sns-mention {
    color: #7b1fa2;
}

body.light-theme #sns-pagination .page-btn {
    background: rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.1);
    color: #333;
}

body.light-theme #sns-pagination .page-btn:hover:not(.active):not(:disabled) {
    background: rgba(52, 152, 219, 0.15);
    border-color: rgba(52, 152, 219, 0.6);
}

body.light-theme #sns-pagination .page-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
}

body.light-theme #sns-pagination .page-btn:disabled {
    opacity: 0.5;
    color: #999;
}

body.light-theme #sns-last-updated {
    color: #666;
}

body.light-theme .no-sns {
    color: #666;
}

body.light-theme .sns-loading-text {
    color: #666;
}