/* 全局样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* 页面主体样式 */
body {
    background-color: #f5f7fa;
    color: #333;
    line-height: 1.6;
    padding: 20px;
    position: relative;
}

/* 右上角个人信息区域 */
.personal-info {
    position: absolute;
    top: 20px;
    right: 20px;
    display: flex;
    align-items: center;
    gap: 20px;
    background: white;
    padding: 10px 15px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    z-index: 100;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #24292e;
    font-size: 0.9rem;
}

.info-item a {
    color: #0366d6;
    text-decoration: none;
}

.info-item a:hover {
    text-decoration: underline;
}

.info-icon {
    font-size: 1.1rem;
    color: #0366d6;
}

.qrcode-container {
    position: relative;
}

.qrcode-img {
    width: 80px;
    height: 80px;
    border-radius: 4px;
    border: 1px solid #e1e4e8;
    object-fit: cover;
    display: none;
    position: absolute;
    top: 30px;
    right: 0;
    z-index: 101;
}

.qrcode-container:hover .qrcode-img {
    display: block;
}

/* 头部样式 */
header {
    text-align: center;
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e1e4e8;
    padding-top: 80px;
}

h1 {
    color: #24292e;
    margin-bottom: 10px;
    font-size: 2.2rem;
}

.subtitle {
    color: #6a737d;
    font-size: 1.1rem;
}

/* 模块切换导航 */
.module-nav {
    max-width: 1400px;
    margin: 0 auto 20px;
    display: flex;
    gap: 10px;
    background: white;
    padding: 10px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.module-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    background: #e8f4f8;
    color: #0366d6;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.module-btn.active {
    background: #0366d6;
    color: white;
}

.module-btn:hover:not(.active) {
    background: #d1e7f0;
}

/* 分类导航 */
.category-nav {
    max-width: 1400px;
    margin: 0 auto 20px;
    padding: 10px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    overflow-x: auto;
    white-space: nowrap;
}

.category-btn {
    background: #e8f4f8;
    border: none;
    padding: 8px 16px;
    margin: 0 5px;
    border-radius: 6px;
    cursor: pointer;
    color: #24292e;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.category-btn:hover {
    background: #0366d6;
    color: white;
}

.category-btn.active {
    background: #0366d6;
    color: white;
}

/* 仓库/工具/课程/量化卡片容器 */
.repo-container, .tool-container, .course-container, .quant-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 20px;
    max-width: 1400px;
    margin: 0 auto;
}

/* 仓库卡片样式 */
.repo-card {
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border-left: 4px solid #0366d6;
}

.repo-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.repo-name {
    font-size: 1.4rem;
    margin-bottom: 8px;
}

.repo-name a {
    color: #0366d6;
    text-decoration: none;
    font-weight: 600;
}

.repo-name a:hover {
    text-decoration: underline;
}

.repo-desc {
    color: #586069;
    margin-top: 10px;
    font-size: 0.95rem;
    min-height: 40px;
}

.repo-url {
    font-size: 0.85rem;
    color: #005cc5;
    margin-top: 10px;
    word-break: break-all;
}

/* 数字化转型&AI文章卡片样式 */
.digital-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 20px;
    max-width: 1400px;
    margin: 0 auto;
}

.digital-card {
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border-left: 4px solid #8b5cf6;
}

.digital-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.digital-title {
    font-size: 1.2rem;
    margin-bottom: 8px;
}

.digital-title a {
    color: #0366d6;
    text-decoration: none;
    font-weight: 600;
}

.digital-title a:hover {
    text-decoration: underline;
}

.digital-subtitle {
    color: #8b5cf6;
    font-size: 0.9rem;
    margin-bottom: 10px;
    font-weight: 500;
}

.digital-url {
    font-size: 0.75rem;
    color: #6a737d;
    margin-top: 10px;
    word-break: break-all;
}

/* 工具卡片样式 */
.tool-card {
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border-left: 4px solid #2ea44f;
}

.tool-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.tool-name {
    font-size: 1.4rem;
    margin-bottom: 8px;
}

.tool-name a {
    color: #0366d6;
    text-decoration: none;
    font-weight: 600;
}

.tool-name a:hover {
    text-decoration: underline;
}

.tool-category {
    display: inline-block;
    background: #e8f4f8;
    color: #0366d6;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    margin-bottom: 12px;
}

.tool-info {
    margin-bottom: 10px;
}

.tool-info-title {
    font-weight: 600;
    color: #24292e;
    margin-bottom: 4px;
    font-size: 0.95rem;
}

.tool-info-content {
    color: #586069;
    font-size: 0.9rem;
    line-height: 1.6;
}

.tool-url {
    font-size: 0.85rem;
    color: #005cc5;
    margin-top: 10px;
    word-break: break-all;
    padding-top: 10px;
    border-top: 1px solid #f0f2f5;
}

/* 课程卡片样式 */
.course-card {
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border-left: 4px solid #e36209;
}

.course-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.course-name {
    font-size: 1.4rem;
    margin-bottom: 8px;
}

.course-name a {
    color: #0366d6;
    text-decoration: none;
    font-weight: 600;
}

.course-name a:hover {
    text-decoration: underline;
}

.course-desc {
    color: #586069;
    margin-top: 10px;
    font-size: 0.95rem;
    min-height: 40px;
}

.course-url {
    font-size: 0.85rem;
    color: #005cc5;
    margin-top: 10px;
    word-break: break-all;
}

/* 量化投资卡片样式 */
.quant-card {
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border-left: 4px solid #28a745;
}

.quant-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.quant-name {
    font-size: 1.4rem;
    margin-bottom: 8px;
}

.quant-name a {
    color: #0366d6;
    text-decoration: none;
    font-weight: 600;
}

.quant-name a:hover {
    text-decoration: underline;
}

.quant-desc {
    color: #586069;
    margin-top: 10px;
    font-size: 0.95rem;
    min-height: 60px;
    line-height: 1.8;
}

.quant-url {
    font-size: 0.85rem;
    color: #005cc5;
    margin-top: 10px;
    word-break: break-all;
}

.quant-tip {
    font-size: 0.85rem;
    color: #e36209;
    margin-top: 10px;
    padding: 8px 12px;
    background: #fff5eb;
    border-radius: 4px;
    border-left: 3px solid #e36209;
}

/* 统计信息 */
.stats {
    max-width: 1400px;
    margin: 20px auto 30px;
    padding: 15px;
    background: #e8f4f8;
    border-radius: 6px;
    color: #24292e;
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.stats-item {
    flex: 1;
    min-width: 200px;
}

.stats-highlight {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 12px 18px;
    border-radius: 8px;
    font-weight: 600;
}

.stats-highlight strong {
    color: white;
}

.stats-highlight span {
    color: #ffd700;
    font-weight: bold;
}

.stats strong {
    color: #0366d6;
}

/* 模块容器 */
.module {
    display: none;
}

.module.active {
    display: block;
}

/* 空状态样式 */
.empty-state {
    max-width: 1400px;
    margin: 40px auto;
    padding: 40px 20px;
    text-align: center;
    color: #6a737d;
    background: white;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

/* 加载状态样式 */
.loading-state {
    max-width: 1400px;
    margin: 40px auto;
    padding: 40px 20px;
    text-align: center;
    color: #6a737d;
    background: white;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.loading-spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #0366d6;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

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

/* 响应式调整 */
@media (max-width: 768px) {
    .personal-info {
        position: static;
        margin: 0 auto 20px;
        justify-content: center;
        flex-wrap: wrap;
    }

    header {
        padding-top: 20px;
    }

    .repo-container, .tool-container, .course-container, .quant-container, .digital-container {
        grid-template-columns: 1fr;
    }

    h1 {
        font-size: 1.8rem;
    }

    .repo-card, .tool-card, .course-card, .quant-card, .digital-card {
        padding: 15px;
    }

    .module-nav {
        flex-direction: column;
    }

    .category-btn {
        padding: 6px 12px;
        margin: 0 3px 5px;
    }
}
