/**
 * SNS 공유 버튼 스타일
 */

/* 공유 버튼 컨테이너 */
.share-container {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 15px 0;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    position: relative;
    z-index: 3;
    pointer-events: auto;
}

.share-label {
    font-weight: 600;
    color: #495057;
    margin-right: 10px;
    font-size: 14px;
    position: relative;
    z-index: 4;
}

.share-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    position: relative;
    z-index: 4;
}

/* 개별 공유 버튼 */
.share-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    position: relative;
    z-index: 5;
    pointer-events: auto;
    user-select: none;
}

.share-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    z-index: 15 !important;
}

.share-btn:active {
    transform: translateY(0);
    z-index: 15 !important;
}

/* 공유 버튼 호버 시 다른 요소들과의 간섭 방지 */
.share-btn:hover,
.share-btn:focus {
    position: relative;
    z-index: 15 !important;
    pointer-events: auto !important;
}

/* 플랫폼별 버튼 색상 */
.share-btn[data-platform="facebook"] {
    background: #1877f2;
    color: white;
}

.share-btn[data-platform="facebook"]:hover {
    background: #166fe5;
}

.share-btn[data-platform="twitter"] {
    background: #1da1f2;
    color: white;
}

.share-btn[data-platform="twitter"]:hover {
    background: #1a91da;
}

.share-btn[data-platform="kakao"] {
    background: #fee500;
    color: #3c1e1e;
}

.share-btn[data-platform="kakao"]:hover {
    background: #fdd835;
}

.share-btn[data-platform="naver"] {
    background: #03c75a;
    color: white;
}

.share-btn[data-platform="naver"]:hover {
    background: #02b351;
}

.share-btn[data-platform="discord"] {
    background: #5865f2;
    color: white;
}

.share-btn[data-platform="discord"]:hover {
    background: #4752c4;
}

.share-btn[data-platform="telegram"] {
    background: #0088cc;
    color: white;
}

.share-btn[data-platform="telegram"]:hover {
    background: #0077b5;
}

.share-btn[data-platform="copy"] {
    background: #6c757d;
    color: white;
}

.share-btn[data-platform="copy"]:hover {
    background: #5a6268;
}

/* 아이콘 */
.share-btn i {
    font-size: 14px;
}

/* 스트리머 카드 내 공유 버튼 (개선된 디자인) */
.streamer-share-container {
    margin: 12px 0 0 0;
    padding: 12px 16px;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border: 1px solid #e9ecef;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    backdrop-filter: blur(10px);
}

.streamer-share-label {
    font-size: 11px;
    color: #495057;
    margin-right: 0;
    margin-bottom: 8px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: block;
    text-align: center;
}

.streamer-share-buttons {
    display: flex;
    gap: 6px;
    flex-wrap: nowrap;
    justify-content: center;
    align-items: center;
}

.streamer-share-btn {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.streamer-share-btn i {
    font-size: 14px;
    transition: transform 0.2s ease;
}

.streamer-share-btn:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.streamer-share-btn:hover i {
    transform: scale(1.1);
}

.streamer-share-btn:active {
    transform: translateY(0) scale(0.98);
    transition: all 0.1s ease;
}

/* 플랫폼별 색상 (개선된 그라디언트) */
.streamer-share-btn[data-platform="facebook"] {
    background: linear-gradient(135deg, #1877f2 0%, #42a5f5 100%);
    color: white;
}

.streamer-share-btn[data-platform="facebook"]:hover {
    background: linear-gradient(135deg, #166fe5 0%, #1976d2 100%);
}

.streamer-share-btn[data-platform="twitter"] {
    background: linear-gradient(135deg, #1da1f2 0%, #64b5f6 100%);
    color: white;
}

.streamer-share-btn[data-platform="twitter"]:hover {
    background: linear-gradient(135deg, #1a91da 0%, #2196f3 100%);
}

.streamer-share-btn[data-platform="kakao"] {
    background: linear-gradient(135deg, #fee500 0%, #fff176 100%);
    color: #3c1e1e;
}

.streamer-share-btn[data-platform="kakao"]:hover {
    background: linear-gradient(135deg, #fdd835 0%, #ffeb3b 100%);
}

.streamer-share-btn[data-platform="naver"] {
    background: linear-gradient(135deg, #03c75a 0%, #4caf50 100%);
    color: white;
}

.streamer-share-btn[data-platform="naver"]:hover {
    background: linear-gradient(135deg, #02b351 0%, #388e3c 100%);
}

.streamer-share-btn[data-platform="discord"] {
    background: linear-gradient(135deg, #5865f2 0%, #7986cb 100%);
    color: white;
}

.streamer-share-btn[data-platform="discord"]:hover {
    background: linear-gradient(135deg, #4752c4 0%, #5c6bc0 100%);
}

.streamer-share-btn[data-platform="telegram"] {
    background: linear-gradient(135deg, #0088cc 0%, #42a5f5 100%);
    color: white;
}

.streamer-share-btn[data-platform="telegram"]:hover {
    background: linear-gradient(135deg, #0077b5 0%, #1976d2 100%);
}

.streamer-share-btn[data-platform="copy"] {
    background: linear-gradient(135deg, #6c757d 0%, #90a4ae 100%);
    color: white;
}

.streamer-share-btn[data-platform="copy"]:hover {
    background: linear-gradient(135deg, #5a6268 0%, #78909c 100%);
}

/* 스트리머 카드 공유 버튼 호버 효과 */
.streamer-card .share-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

/* 스트리머 카드 공유 컨테이너 애니메이션 */
.streamer-share-container {
    opacity: 0;
    animation: fadeInUp 0.3s ease-out forwards;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 스테이션 페이지 공유 버튼 */
.station-main-content .share-container {
    margin: 20px 0;
    background: #fff;
    border: 2px solid #e9ecef;
}

.station-main-content .share-label {
    font-size: 16px;
    color: #212529;
}

.station-main-content .share-btn {
    font-size: 14px;
    padding: 10px 16px;
}

/* 사이드바 공유 버튼 */
.sidebar-section .share-container {
    margin: 15px 0;
    padding: 12px;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border: 2px solid #e9ecef;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    position: relative;
    z-index: 10;
}

.sidebar-section .share-container .share-label {
    color: #2c3e50 !important;
    font-weight: 700 !important;
    font-size: 14px !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    margin-bottom: 8px;
    display: block;
}

.sidebar-section .share-container .share-label i {
    color: #667eea !important;
    margin-right: 6px;
}

.sidebar-section .share-buttons {
    flex-direction: column;
    gap: 6px;
    position: relative;
    z-index: 11;
}

.sidebar-section .share-btn {
    width: 100%;
    justify-content: center;
    font-size: 13px;
    padding: 8px 12px;
    position: relative;
    z-index: 12;
    pointer-events: auto;
    cursor: pointer;
    user-select: none;
}

/* 반응형 디자인 */
@media (max-width: 768px) {
    .share-container {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
    }
    
    .share-label {
        text-align: center;
        margin-right: 0;
        margin-bottom: 10px;
    }
    
    .share-buttons {
        justify-content: center;
    }
    
    .share-btn {
        flex: 1;
        min-width: 0;
        justify-content: center;
    }
    
    /* 스트리머 카드 내 반응형 */
    .streamer-share-container {
        margin: 8px 0 0 0;
        padding: 10px 12px;
    }
    
    .streamer-share-buttons {
        gap: 4px;
    }
    
    .streamer-share-btn {
        width: 28px;
        height: 28px;
    }
    
    .streamer-share-btn i {
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .share-buttons {
        flex-direction: column;
    }
    
    .share-btn {
        width: 100%;
    }
    
    /* 스트리머 카드 내 모바일 최적화 */
    .streamer-share-buttons {
        flex-direction: row;
        justify-content: space-around;
        gap: 2px;
    }
    
    .streamer-share-btn {
        width: 26px;
        height: 26px;
        flex: 1;
    }
    
    .streamer-share-btn i {
        font-size: 11px;
    }
}

/* 호버 효과 개선 */
.share-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.1);
    opacity: 0;
    transition: opacity 0.2s ease;
    border-radius: 6px;
}

.share-btn:hover::before {
    opacity: 1;
}

/* 포커스 접근성 */
.share-btn:focus {
    outline: 2px solid #007bff;
    outline-offset: 2px;
}

/* 로딩 상태 */
.share-btn.loading {
    opacity: 0.7;
    pointer-events: none;
}

.share-btn.loading::after {
    content: '';
    display: inline-block;
    width: 12px;
    height: 12px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 6px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 다크 모드 지원 */
@media (prefers-color-scheme: dark) {
    .share-container {
        background: #2d3748;
        border-color: #4a5568;
    }
    
    .share-label {
        color: #e2e8f0;
    }
    
    .streamer-card .share-container {
        background: rgba(45, 55, 72, 0.9);
        border-color: rgba(255, 255, 255, 0.1);
    }
}
