/**
 * 追蹤列表頁面樣式
 * 包含追蹤者列表和追蹤中列表的樣式
 */

/* 頁面標題區 */
.page-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 2rem 0;
    margin-bottom: 2rem;
}

.page-header .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.page-header .header-content {
    text-align: center;
    color: white;
}

.page-header .back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: white;
    text-decoration: none;
    font-size: 0.875rem;
    margin-bottom: 1rem;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.page-header .back-link:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateX(-4px);
}

.page-header .back-icon {
    font-size: 1.25rem;
}

.page-header .page-title {
    font-size: 2rem;
    font-weight: 700;
    margin: 0 0 0.5rem 0;
}

.page-header .page-subtitle {
    font-size: 1rem;
    opacity: 0.9;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

/* 計數徽章 */
.count-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2rem;
    height: 2rem;
    padding: 0 0.75rem;
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 12px;
    font-size: 0.875rem;
    font-weight: 700;
    color: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    animation: badge-appear 0.5s ease;
}

.count-badge:hover {
    transform: scale(1.1);
    background: rgba(255, 255, 255, 0.35);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}

@keyframes badge-appear {
    0% {
        opacity: 0;
        transform: scale(0.8);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* 追蹤列表內容區 */
.follow-list-content {
    padding: 2rem 0;
    min-height: 60vh;
}

.follow-list-content .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.follow-list-wrapper {
    width: 100%;
}

/* 用戶卡片網格 */
.users-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

/* 用戶卡片 */
.user-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.user-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

/* 用戶頭像 */
.user-avatar {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 0.5rem;
}

.user-avatar img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #667eea;
}

.avatar-placeholder {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 700;
}

/* 用戶資訊 */
.user-info {
    flex: 1;
    text-align: center;
}

.user-name {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0 0 0.25rem 0;
}

.user-name a {
    color: #1f2937;
    text-decoration: none;
    transition: color 0.3s ease;
}

.user-name a:hover {
    color: #667eea;
}

.user-username {
    font-size: 0.875rem;
    color: #6b7280;
    margin: 0 0 0.5rem 0;
}

.user-bio {
    font-size: 0.875rem;
    color: #4b5563;
    line-height: 1.5;
    margin: 0.5rem 0;
    min-height: 2.5rem;
}

/* 用戶統計 */
.user-stats {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid #e5e7eb;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.875rem;
    color: #4b5563;
}

.stat-icon {
    font-size: 1rem;
}

/* 用戶操作按鈕 */
.user-actions {
    display: flex;
    justify-content: center;
    margin-top: 0.5rem;
}

.self-badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 600;
}

.btn-follow {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1.5rem;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.btn-follow:hover {
    background: #5568d3;
    transform: translateY(-2px);
}

.btn-follow.following {
    background: #6b7280;
}

.btn-follow.following:hover {
    background: #4b5563;
}

.btn-follow:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.follow-icon {
    font-size: 1rem;
    font-weight: 700;
}

.follow-text {
    font-size: 0.875rem;
}

/* 空狀態 */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: #6b7280;
}

.empty-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #4b5563;
    margin: 0 0 0.5rem 0;
}

.empty-text {
    font-size: 1rem;
    margin: 0;
}

/* 分頁 */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-top: 2rem;
    padding: 1rem 0;
}

.page-link,
.page-current {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 0.75rem;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
}

.page-link {
    background: white;
    color: #667eea;
    border: 1px solid #e5e7eb;
}

.page-link:hover {
    background: #667eea;
    color: white;
    border-color: #667eea;
    transform: translateY(-2px);
}

.page-current {
    background: #667eea;
    color: white;
    border: 1px solid #667eea;
}

/* 響應式設計 */
@media (max-width: 768px) {
    .page-header .page-title {
        font-size: 1.5rem;
    }

    .users-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .user-card {
        padding: 1rem;
    }

    .user-avatar img,
    .avatar-placeholder {
        width: 64px;
        height: 64px;
    }

    .avatar-placeholder {
        font-size: 1.5rem;
    }

    .user-stats {
        gap: 1rem;
    }

    .pagination {
        flex-wrap: wrap;
        gap: 0.25rem;
    }

    .page-link,
    .page-current {
        min-width: 36px;
        height: 36px;
        padding: 0 0.5rem;
        font-size: 0.75rem;
    }
}

/* 提示訊息樣式 */
.follow-message {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    opacity: 0;
    transform: translateY(-20px);
    transition: all 0.3s ease;
    z-index: 9999;
}

.follow-message.show {
    opacity: 1;
    transform: translateY(0);
}

.follow-message.success {
    background: #10b981;
    color: white;
}

.follow-message.error {
    background: #ef4444;
    color: white;
}

/* 統計卡片連結樣式（用於個人頁面） */
.stat-card-link {
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

.stat-card-link:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.3);
}

.stat-card-link .stat-content {
    transition: color 0.3s ease;
}

.stat-card-link:hover .stat-content {
    color: #667eea;
}
