/* ======================== 全局变量 ======================== */
:root {
    --bg-primary: #0f1419;
    --bg-secondary: #1a202c;
    --bg-card: #1a202c;
    --text-primary: #e2e8f0;
    --text-secondary: #a0aec0;
    --border-color: #2d3748;
    --accent: #63b3ed;
    --accent-hover: #90cdf4;
    --shadow: 0 4px 20px rgba(0,0,0,0.3);
}
[data-theme="light"] {
    --bg-primary: #f7fafc;
    --bg-secondary: #ffffff;
    --bg-card: #ffffff;
    --text-primary: #1a202c;
    --text-secondary: #4a5568;
    --border-color: #e2e8f0;
    --accent: #3182ce;
    --accent-hover: #2b6cb0;
    --shadow: 0 4px 20px rgba(0,0,0,0.06);
}
@media (prefers-color-scheme: dark) {
    [data-theme="system"] {
        --bg-primary: #0f1419;
        --bg-secondary: #1a202c;
        --bg-card: #1a202c;
        --text-primary: #e2e8f0;
        --text-secondary: #a0aec0;
        --border-color: #2d3748;
        --accent: #63b3ed;
        --accent-hover: #90cdf4;
        --shadow: 0 4px 20px rgba(0,0,0,0.3);
    }
}
@media (prefers-color-scheme: light) {
    [data-theme="system"] {
        --bg-primary: #f7fafc;
        --bg-secondary: #ffffff;
        --bg-card: #ffffff;
        --text-primary: #1a202c;
        --text-secondary: #4a5568;
        --border-color: #e2e8f0;
        --accent: #3182ce;
        --accent-hover: #2b6cb0;
        --shadow: 0 4px 20px rgba(0,0,0,0.06);
    }
}

* { margin: 0; padding: 0; box-sizing: border-box; }

/* ======================== 自定义鼠标样式 ======================== */
* { cursor: auto !important; }

#cursor {
    position: fixed;
    left: 0;
    top: 0;
    width: 18px;
    height: 18px;
    background: #3c3c43;
    border-radius: 8px;
    opacity: 0.25;
    z-index: 99999998;
    pointer-events: none;
    transform: translate(-50%, -50%);
    transition: 0.2s ease-in-out;
    transition-property: background, opacity, transform;
}

#cursor-dot {
    position: fixed;
    left: 0;
    top: 0;
    width: 10px;
    height: 10px;
    background: gray;
    border-radius: 999px;
    z-index: 99999999;
    pointer-events: none;
    transform: translate(-50%, -50%);
    transition: opacity 0.2s ease-in-out;
}

#cursor.hidden,
#cursor-dot.hidden {
    opacity: 0;
}

#cursor.hover {
    opacity: 0.1;
}

#cursor.active {
    opacity: 0.5;
    transform: translate(-50%, -50%) scale(0.5);
}

[data-theme="dark"] #cursor {
    background: #dfdfd6;
}

[data-theme="light"] #cursor {
    background: #3c3c43;
}

[data-theme="system"] #cursor {
    background: #3c3c43;
}

@media (prefers-color-scheme: dark) {
    [data-theme="system"] #cursor {
        background: #dfdfd6;
    }
}

/* ======================== 全局基础样式 ======================== */
body { 
    font-family: 'Inter', 'Segoe UI', sans-serif; 
    background: var(--bg-primary); 
    color: var(--text-primary);
    transition: background 0.3s, color 0.3s;
}

/* ======================== 导航栏 ======================== */
.navbar-custom { 
    background: var(--bg-secondary); 
    border-bottom: 1px solid var(--border-color);
    padding: 10px 0; 
    position: sticky; 
    top: 0; 
    z-index: 1000; 
    transition: background 0.3s;
}
.navbar-custom .navbar-brand { display: flex; align-items: center; gap: 10px; }
.navbar-custom .navbar-brand img { height: 40px; width: 40px; object-fit: contain; }
.navbar-custom .navbar-brand span { 
    color: var(--text-primary); 
    font-weight: 700; 
    font-size: 16px;
    letter-spacing: 0.5px;
}
.navbar-custom .nav-link { 
    color: var(--text-secondary); 
    font-weight: 500; 
    padding: 6px 16px; 
    border-radius: 8px; 
    transition: all 0.3s; 
    font-size: 13px; 
}
.navbar-custom .nav-link:hover { background: var(--border-color); color: var(--text-primary); }
.navbar-custom .nav-link.active { background: var(--accent); color: #fff; }
.theme-toggle-btn {
    cursor: pointer;
    background: var(--border-color);
    border: none;
    color: var(--text-primary);
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    font-size: 15px;
}
.theme-toggle-btn:hover {
    background: var(--accent);
    color: #fff;
    transform: rotate(20deg);
}

/* ======================== Hero区域 ======================== */
.hero-section { 
    background: var(--bg-secondary); 
    padding: 60px 0 40px; 
    border-radius: 16px; 
    margin-bottom: 30px; 
    border: 1px solid var(--border-color);
    text-align: center;
    transition: background 0.3s;
}
.hero-section h1 { font-size: 40px; font-weight: 800; margin-bottom: 12px; color: var(--text-primary); }
.hero-section p { font-size: 17px; color: var(--text-secondary); max-width: 600px; margin: 0 auto 20px; line-height: 1.6; }
.btn-hero { 
    display: inline-block; 
    padding: 10px 32px; 
    background: var(--accent); 
    color: #fff; 
    border-radius: 8px; 
    font-weight: 600; 
    text-decoration: none; 
    transition: all 0.3s; 
}
.btn-hero:hover { background: var(--accent-hover); transform: translateY(-2px); color: #fff; }

/* ======================== 特色卡片 ======================== */
.features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; margin-top: 24px; }
.feature-card { 
    background: var(--bg-card); 
    padding: 24px 20px; 
    border-radius: 12px; 
    border: 1px solid var(--border-color);
    text-align: center; 
    transition: all 0.3s; 
}
.feature-card:hover { transform: translateY(-4px); border-color: var(--accent); box-shadow: var(--shadow); }
.feature-card i { font-size: 32px; color: var(--accent); margin-bottom: 12px; }
.feature-card h3 { font-size: 17px; font-weight: 700; margin-bottom: 6px; color: var(--text-primary); }
.feature-card p { color: var(--text-secondary); font-size: 13px; line-height: 1.5; }

/* ======================== 产品卡片 ======================== */
.products-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; }
.product-card { 
    background: var(--bg-card); 
    padding: 28px 20px; 
    border-radius: 12px; 
    border: 1px solid var(--border-color);
    text-align: center; 
    transition: all 0.3s; 
}
.product-card:hover { transform: translateY(-4px); border-color: var(--accent); box-shadow: var(--shadow); }
.product-icon { 
    width: 56px; 
    height: 56px; 
    background: var(--accent); 
    border-radius: 12px; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    margin: 0 auto 12px; 
    color: #fff;
    font-size: 24px;
}
.product-card h3 { font-size: 18px; font-weight: 700; margin-bottom: 6px; color: var(--text-primary); }
.product-card p { color: var(--text-secondary); font-size: 13px; line-height: 1.5; }

/* ======================== 时间轴 ======================== */
.timeline-wrapper {
    position: relative;
    padding: 30px 0 20px;
}
.timeline-wrapper::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--accent);
    transform: translateX(-50%);
    border-radius: 10px;
    opacity: 0.5;
}
.timeline-horizontal {
    display: flex;
    flex-direction: column;
    gap: 24px;
    padding: 10px 0;
}
.timeline-row {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    position: relative;
    width: 100%;
}
.timeline-row:nth-child(odd) {
    justify-content: flex-start;
}
.timeline-row:nth-child(even) {
    justify-content: flex-end;
}
.timeline-item {
    width: 42%;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 16px 20px;
    transition: all 0.3s ease;
    position: relative;
}
.timeline-row:nth-child(odd) .timeline-item {
    margin-left: 0;
    margin-right: auto;
}
.timeline-row:nth-child(even) .timeline-item {
    margin-left: auto;
    margin-right: 0;
}
.timeline-item:hover {
    transform: translateY(-3px);
    border-color: var(--accent);
    box-shadow: var(--shadow);
}
.timeline-item .month-display {
    font-size: 24px;
    font-weight: 700;
    color: var(--accent);
    margin-bottom: 6px;
    letter-spacing: 0.5px;
}
.timeline-item .timeline-content {
    color: var(--text-secondary);
    font-size: 13px;
    line-height: 1.7;
    margin: 0;
    word-wrap: break-word;
    overflow-wrap: break-word;
    white-space: normal;
    word-break: break-word;
}
.timeline-item .timeline-connector {
    position: absolute;
    top: 50%;
    width: 20px;
    height: 2px;
    background: var(--border-color);
}
.timeline-row:nth-child(odd) .timeline-item .timeline-connector {
    right: -20px;
}
.timeline-row:nth-child(even) .timeline-item .timeline-connector {
    left: -20px;
}
.timeline-item .timeline-dot {
    position: absolute;
    top: 50%;
    width: 12px;
    height: 12px;
    background: var(--accent);
    border-radius: 50%;
    border: 2px solid var(--bg-primary);
    transform: translateY(-50%);
    z-index: 2;
}
.timeline-row:nth-child(odd) .timeline-item .timeline-dot {
    right: -26px;
}
.timeline-row:nth-child(even) .timeline-item .timeline-dot {
    left: -26px;
}

/* ======================== 友链 ======================== */
.friendlink-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 16px;
    margin-top: 12px;
}
.friendlink-item {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 16px 18px;
    text-align: center;
    transition: all 0.3s ease;
    text-decoration: none;
    display: block;
}
.friendlink-item:hover {
    transform: translateY(-3px);
    border-color: var(--accent);
    box-shadow: var(--shadow);
}
.friendlink-item .link-logo {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--accent);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 8px;
    font-weight: 700;
    font-size: 18px;
    overflow: hidden;
}
.friendlink-item .link-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.friendlink-item .link-name {
    color: var(--text-primary);
    font-weight: 600;
    font-size: 14px;
}
.friendlink-item .link-desc {
    color: var(--text-secondary);
    font-size: 12px;
    margin-top: 2px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ======================== 黑名单 ======================== */
.blacklist-section { 
    background: var(--bg-card); 
    border-radius: 12px; 
    padding: 20px; 
    border-left: 3px solid #fc8181; 
}
.blacklist-section h3 { color: var(--text-primary); font-size: 17px; }
.blacklist-section ul { list-style: none; padding: 0; }
.blacklist-section ul li { padding: 6px 0; border-bottom: 1px solid var(--border-color); display: flex; align-items: center; color: var(--text-secondary); font-size: 13px; }
.blacklist-section ul li::before { content: '•'; color: #fc8181; font-weight: bold; font-size: 18px; margin-right: 10px; }

/* ======================== Footer ======================== */
.footer-compact {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    padding: 20px 0 12px;
    margin-top: 30px;
    transition: background 0.3s;
}
.footer-compact .footer-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 20px;
    align-items: start;
}
.footer-compact h5 {
    font-weight: 600;
    font-size: 14px;
    color: var(--text-primary);
    margin-bottom: 6px;
}
.footer-compact p {
    color: var(--text-secondary);
    font-size: 12px;
    margin-bottom: 2px;
    line-height: 1.5;
}
.footer-compact .footer-divider {
    border-color: var(--border-color);
    margin: 12px 0 8px;
}
.footer-compact .copyright {
    color: var(--text-secondary);
    font-size: 11px;
    text-align: center;
    margin: 0;
}
.footer-compact .footer-logo {
    height: 28px;
    width: auto;
    margin-bottom: 4px;
}

/* ======================== 表单 ======================== */
.form-control { 
    background: var(--bg-primary); 
    border: 1px solid var(--border-color); 
    color: var(--text-primary); 
    border-radius: 8px; 
    padding: 8px 14px; 
    transition: all 0.3s;
    font-size: 13px;
}
.form-control:focus { 
    border-color: var(--accent); 
    box-shadow: 0 0 0 3px rgba(99,179,237,0.2); 
    background: var(--bg-primary); 
    color: var(--text-primary); 
}
.form-control::placeholder { color: var(--text-secondary); }
.btn-primary { 
    background: var(--accent); 
    border: none; 
    border-radius: 8px; 
    padding: 8px 20px; 
    font-weight: 500; 
    transition: all 0.3s; 
    color: #fff;
    font-size: 13px;
}
.btn-primary:hover { background: var(--accent-hover); transform: translateY(-1px); color: #fff; }

/* ======================== 团队成员卡片 ======================== */
.employee-card .card-body {
    padding: 16px;
    text-align: center !important;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}
.employee-card .avatar-wrapper {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin: 0 auto 10px;
    overflow: hidden;
    background: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.employee-card .avatar-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.employee-card .avatar-wrapper i {
    font-size: 32px;
    color: #fff;
}
.employee-card .card-title {
    color: var(--text-primary);
    font-weight: 700;
    font-size: 16px;
    margin-bottom: 2px;
    margin-top: 0;
    text-align: center !important;
    width: 100%;
    display: block;
    float: none;
}
.employee-card .card-subtitle {
    color: var(--text-secondary);
    font-size: 13px;
    text-align: center !important;
    width: 100%;
    display: block;
    margin-bottom: 0;
    margin-top: 0;
    float: none;
}
.employee-card .card-text {
    color: var(--text-secondary);
    font-size: 12px;
    margin-top: 6px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-align: center;
    width: 100%;
}
.employee-card .view-detail {
    color: var(--accent);
    font-size: 12px;
    font-weight: 500;
    margin-top: 8px;
    display: inline-block;
    padding: 4px 0;
}
.employee-card .view-detail i {
    transition: transform 0.3s;
}
.employee-card:hover .view-detail i {
    transform: translateX(4px);
}
.employee-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    justify-content: center;
    margin-top: 6px;
}
.employee-tags .tag {
    background: var(--accent);
    color: #fff;
    font-size: 10px;
    padding: 2px 10px;
    border-radius: 20px;
    white-space: nowrap;
}

/* ======================== 模态框 ======================== */
.employee-modal .modal-content {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    border-radius: 16px;
}
.employee-modal .modal-header {
    border-bottom: 1px solid var(--border-color);
    padding: 16px 24px;
}
.employee-modal .modal-body {
    padding: 24px;
}
.employee-modal .modal-footer {
    border-top: 1px solid var(--border-color);
    padding: 12px 24px;
}
.employee-modal .btn-close {
    filter: invert(1);
}
[data-theme="dark"] .employee-modal .modal-content {
    background: #1a202c;
    color: #e2e8f0;
}
[data-theme="dark"] .employee-modal .modal-header {
    border-bottom-color: #2d3748;
}
[data-theme="dark"] .employee-modal .modal-footer {
    border-top-color: #2d3748;
}
[data-theme="dark"] .employee-modal .btn-close {
    filter: invert(1);
}

/* ======================== 响应式 ======================== */
@media (max-width: 768px) {
    .hero-section h1 { font-size: 28px; }
    .hero-section { padding: 40px 20px; }
    .timeline-row:nth-child(odd),
    .timeline-row:nth-child(even) {
        justify-content: center;
    }
    .timeline-item {
        width: 85%;
    }
    .timeline-item .timeline-dot,
    .timeline-item .timeline-connector {
        display: none;
    }
    .timeline-wrapper::before {
        left: 10px;
    }
    .friendlink-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    }
    .footer-compact .footer-grid {
        grid-template-columns: 1fr;
        gap: 12px;
        text-align: center;
    }
    .navbar-custom .navbar-brand span { font-size: 14px; }
    .features-grid { grid-template-columns: 1fr; }
    .products-grid { grid-template-columns: 1fr; }
    .employee-card .avatar-wrapper {
        width: 70px;
        height: 70px;
    }
    .employee-card .card-title {
        font-size: 15px;
    }
}

/* ======================== 动画 ======================== */
.tab-pane { animation: fadeIn 0.3s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }

/* ======================== 提示 ======================== */
.alert { border-radius: 8px; border: none; font-size: 13px; }
.alert-success { background: #22543d; color: #68d391; }
.alert-danger { background: #742a2a; color: #fc8181; }
.alert-warning { background: #744210; color: #f6ad55; }

/* ======================== 隐藏h1辅助 ======================== */
.visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}
