* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 返回顶部按钮样式 */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 40px;
    height: 40px;
    background-color: #0077b5;
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    display: none;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.back-to-top:hover {
    background-color: #005b8a;
    transform: translateY(-3px);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

.user-profile {
    background: white;
    border-radius: 8px;
    padding: 24px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin-bottom: 24px;
    width: 100%;
}

.subscription-history {
    background: white;
    border-radius: 8px;
    padding: 12px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    width: 100%;
    margin-bottom: 16px;
}

.timeline {
    background: white;
    border-radius: 8px;
    padding: 24px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    /* 移除固定高度和滚动条 */
    margin-bottom: 24px;
}

.timeline-tabs {
    display: flex;
    margin-bottom: 16px;
    border-bottom: 1px solid #eaeaea;
    padding-bottom: 8px;
}

.tab-btn {
    background: none;
    border: none;
    padding: 8px 16px;
    margin-right: 8px;
    cursor: pointer;
    font-size: 14px;
    color: #666;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.tab-btn:hover {
    background-color: #f5f5f5;
}

.tab-btn.active {
    color: #0077b5;
    font-weight: 600;
    background-color: #e8f4f9;
}

.header {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.avatar-container {
    margin-right: 20px;
}

.avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
}

.user-info {
    flex: 1;
    width: 0;
}

.name {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 8px;
}

.name a {
    color: #0077b5; /* LinkedIn蓝色 */
    text-decoration: underline;
    transition: all 0.2s ease;
    padding: 2px 4px;
    border-radius: 3px;
}

.name a:hover {
    background-color: #e8f4f9; /* 浅蓝色背景 */
    color: #0066a1; /* 深一点的蓝色 */
    text-decoration: underline;
}

.desc {
    color: #666;
    font-size: 14px;
    margin-bottom: 4px;
}

.desc a {
    color: #0077b5; /* LinkedIn蓝色 */
    text-decoration: underline;
    transition: all 0.2s ease;
    padding: 1px 2px;
    border-radius: 3px;
}

.desc a:hover {
    background-color: #e8f4f9; /* 浅蓝色背景 */
    color: #0066a1; /* 深一点的蓝色 */
    text-decoration: underline;
}

.source-url {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    color: #666;
    font-size: 14px;
    margin-bottom: 4px;
    max-width: 100%; /* 确保不超出父容器 */
    width: 100%; /* 占满可用空间 */
}

.url-text {
    color: #666;
    margin-right: 8px;
}

.url-text.collapsed {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: calc(100% - 60px); /* 为按钮留出空间 */
}

.url-text:not(.collapsed) {
    word-break: break-all; /* 允许在任意字符间断行 */
}

.toggle-url {
    background-color: #f0f0f0;
    border: none;
    border-radius: 4px;
    padding: 2px 8px;
    font-size: 14px;
    color: #555;
    cursor: pointer;
    margin-left: auto;
    transition: background-color 0.2s;
}

.toggle-url:hover {
    background-color: #e0e0e0;
}

/* 移动端优化 */
@media (max-width: 768px) {
    .source-url {
        font-size: 14px;
    }
}

.params {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 4px;
}

.params span {
    background: #f0f0f0;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 14px;
}

/* 移除重复的timeline样式，已在上方定义 */

/* 订阅历史表格样式 */
.toggle-container {
    display: flex;
    justify-content: center;
    margin-top: 8px;
}

.toggle-btn {
    background: none;
    border: none;
    padding: 2px 8px;
    font-size: 14px;
    color: #888;
    cursor: pointer;
    transition: color 0.2s;
}

.toggle-btn:hover {
    color: #555;
}

.subscription-table-container {
    overflow-x: auto;
}

.subscription-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.subscription-table th {
    background-color: #f5f5f5;
    text-align: left;
    padding: 6px 8px;
    font-weight: 500;
    color: #666;
    border-bottom: 1px solid #eaeaea;
    font-size: 13px;
}

.subscription-table td {
    padding: 4px 8px;
    border-bottom: 1px solid #eaeaea;
    font-size: 13px;
}

.subscription-table tr:last-child td {
    border-bottom: none;
}

.subscription-table tr:hover {
    background-color: #f9f9f9;
}

.no-data-message {
    text-align: center;
    padding: 8px;
    color: #aaa;
    font-style: italic;
    font-size: 14px;
}

.timeline-items {
    position: relative;
}

.timeline-items::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #e0e0e0;
}

.timeline-item {
    position: relative;
    padding-left: 24px;
    margin-bottom: 24px;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -5px;
    top: 0;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #1976d2;
    border: 2px solid white;
}

.timeline-item:last-child {
    margin-bottom: 0;
}

/* 积分链接样式 */
.credits-link {
    color: #0077b5;
    text-decoration: underline;
    cursor: pointer;
}

.credits-link:hover {
    color: #005582;
}

/* 弹窗样式 */
.modal {
    display: flex;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    padding: 20px;
}

.close-btn {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 24px;
    font-weight: bold;
    color: #aaa;
    cursor: pointer;
}

.close-btn:hover {
    color: #555;
}

.modal-title {
    margin-top: 0;
    margin-bottom: 16px;
    font-size: 18px;
    color: #333;
    padding-bottom: 8px;
    border-bottom: 1px solid #eaeaea;
}

.loading {
    text-align: center;
    padding: 20px;
    color: #666;
}

/* 积分消耗表格样式 */
.credits-table-container {
    overflow-x: auto;
    margin-top: 10px;
}

.credits-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.credits-table th {
    background-color: #f5f5f5;
    text-align: left;
    padding: 8px 12px;
    font-weight: 500;
    color: #666;
    border-bottom: 1px solid #eaeaea;
}

.credits-table td {
    padding: 8px 12px;
    border-bottom: 1px solid #eaeaea;
}

.credits-table tr:last-child td {
    border-bottom: none;
}

.credits-table tr:hover,
.team-history-table tr:hover {
    background-color: #f9f9f9;
}

/* 团队详情样式 */
.team-detail-container {
    margin-top: 10px;
}

.team-basic-info {
    margin-bottom: 16px;
}

.team-basic-info p {
    margin-bottom: 8px;
    font-size: 14px;
}

.team-section-title {
    margin: 16px 0 8px 0;
    font-size: 16px;
    color: #333;
    padding-bottom: 6px;
    border-bottom: 1px solid #eaeaea;
}

.team-history-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.team-history-table th {
    background-color: #f5f5f5;
    text-align: left;
    padding: 8px 12px;
    font-weight: 500;
    color: #666;
    border-bottom: 1px solid #eaeaea;
}

.team-history-table td {
    padding: 8px 12px;
    border-bottom: 1px solid #eaeaea;
}

.team-history-table tr:last-child td {
    border-bottom: none;
}

@media (max-width: 768px) {
    .container {
        padding: 16px;
    
    /* 移动端返回顶部按钮样式 */
    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 36px;
        height: 36px;
        font-size: 18px;
    }
    }

    .user-profile, .subscription-history, .timeline {
        margin-bottom: 16px;
    }
    
    .subscription-table {
        font-size: 14px;
    }
    
    .subscription-table th, .subscription-table td {
        padding: 6px 4px;
    }
    
    .modal-content {
        width: 95%;
        padding: 15px;
    }
    
    .credits-table th, .credits-table td {
        padding: 6px 8px;
        font-size: 14px;
    }
}