/* 
 * 核心设计系统 
 * Dark Tech Theme 
 */
:root {
    --bg-color: #0f172a;
    /* 深蓝黑色背景 */
    --card-bg: #1e293b;
    /* 卡片背景 */
    --text-main: #f1f5f9;
    /* 主要文字 */
    --text-muted: #94a3b8;
    /* 次要文字 */
    --accent-color: #38bdf8;
    /* 亮蓝色强调 */
    --accent-hover: #0ea5e9;
    /* 强调色悬停 */
    --border-color: #334155;
    /* 边框颜色 */
    --success-color: #22c55e;

    --font-stack: 'Segoe UI', system-ui, -apple-system, sans-serif;
    --container-width: 1200px;
}

/* 亮色主题 (Light Mode) */
body.light-theme {
    --bg-color: #f8fafc;
    /* 浅灰背景 */
    --card-bg: #ffffff;
    /* 白卡片 */
    --text-main: #0f172a;
    /* 深色文字 */
    --text-muted: #64748b;
    /* 灰色文字 */
    --accent-color: #38bdf8;
    /* 保持亮蓝色，不使用深色 */
    --accent-hover: #0ea5e9;
    --border-color: #cbd5e1;
    /* 浅灰边框 */
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-stack);
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    transition: background-color 0.3s, color 0.3s;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

/* 
 * 布局工具类 
 */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    /* 为绝对定位元素提供锚点 */
}

/* 
 * 头部样式 
 */
.site-header {
    padding: 40px 0 30px;
    text-align: center;
    background: radial-gradient(circle at center top, var(--card-bg) 0%, var(--bg-color) 70%);
    /* 调整渐变以适应亮色 */
    transition: background 0.3s;
}

.header-identity {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 5px;
}

.logo-img {
    height: 60px;
    /* 调整回合适大小 */
    width: auto;
    display: block;
}

.site-title {
    font-size: 2.2rem;
    font-weight: 700;
    margin: 0;
    /* 移除边距 */
    letter-spacing: 1px;
    color: var(--text-main);
    line-height: 1;
}

.tagline {
    color: var(--text-muted);
    font-size: 1.1rem;
    margin-top: 5px;
}

/* 
 * 软件网格区域 
 */
.software-grid {
    display: grid;
    grid-template-columns: 1fr;
    max-width: 800px;
    margin: 0 auto;
    gap: 30px;
    padding: 40px 0 80px;
}

/* 
 * 软件卡片样式 
 */
.software-card {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 30px;
    display: flex;
    flex-direction: row;
    /* 横向排列 */
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.software-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
    border-color: var(--accent-color);
}

.card-content {
    flex: 1;
}

.software-title {
    font-size: 1.5rem;
    margin-bottom: 5px;
    display: inline-block;
}

.version-badge {
    display: inline-block;
    background: rgba(56, 189, 248, 0.1);
    color: var(--accent-color);
    font-size: 0.8rem;
    padding: 2px 8px;
    border-radius: 4px;
    margin-bottom: 15px;
    vertical-align: middle;
    margin-left: 10px;
}

.software-desc {
    color: var(--text-muted);
    margin-bottom: 20px;
    font-size: 0.95rem;
}

.features-list li {
    position: relative;
    padding-left: 20px;
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 8px;
}

.features-list li::before {
    content: "•";
    color: var(--accent-color);
    position: absolute;
    left: 0;
    font-weight: bold;
}

.card-action {
    margin: 0;
    padding: 0 0 0 30px;
    border-left: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 15px;
    min-width: 160px;
}

.file-size {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* 
 * 按钮样式 
 */
.btn {
    display: inline-block;
    padding: 10px 20px;
    border-radius: 6px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    font-size: 0.95rem;
}

.btn-primary {
    background-color: var(--accent-color);
    color: #0f172a;
}

.btn-primary:hover {
    background-color: var(--accent-hover);
    transform: scale(1.02);
}

/* 
 * 弹窗样式 (Modal) 
 */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(8px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-container {
    background: var(--card-bg);
    width: 90%;
    max-width: 500px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    transform: scale(0.9);
    transition: transform 0.3s cubic-bezier(0.18, 0.89, 0.32, 1.28);
}

.modal-overlay.active .modal-container {
    transform: scale(1);
}

.modal-header {
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    font-size: 1.2rem;
}

.close-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0 5px;
}

.close-btn:hover {
    color: var(--text-main);
}

.modal-body {
    padding: 20px;
}

.modal-tip {
    color: var(--text-muted);
    margin-bottom: 20px;
    font-size: 0.9rem;
}

/* 网盘列表项 */
.disk-item {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.disk-info {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.disk-name {
    font-weight: 600;
    color: var(--text-main);
}

.code-group {
    font-size: 0.85rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 8px;
}

.code-value {
    background: rgba(0, 0, 0, 0.3);
    padding: 2px 6px;
    border-radius: 4px;
    color: var(--accent-color);
    font-family: monospace;
}

.btn-copy {
    background: none;
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    border-radius: 4px;
    padding: 1px 6px;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.btn-copy:hover {
    color: var(--accent-color);
    border-color: var(--accent-color);
}

.btn-go {
    background: var(--accent-color);
    color: #0f172a;
    padding: 6px 16px;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    white-space: nowrap;
}

.btn-go:hover {
    background: var(--accent-hover);
}

/* 
 * 页脚样式 
 */
.site-footer {
    text-align: center;
    padding: 60px 0 40px;
    background: var(--card-bg);
    border-top: 1px solid var(--border-color);
    margin-top: auto;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

/* 社交媒体区域 */
.social-links {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 25px;
    /* 增加一点间距 */
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.social-label {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.social-item {
    position: relative;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.social-icon {
    width: 28px;
    height: 28px;
    color: var(--text-muted);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    fill: currentColor;
}

.social-item:hover .social-icon {
    color: var(--accent-color);
    transform: scale(1.1);
}

/* 微信悬停色 - 绿色 */
.social-item[aria-label="微信公众号"]:hover .social-icon {
    color: #07c160;
}

/* 抖音悬停色 - 黑色/白色(深色模式) 或 品牌色 */
.social-item[aria-label="抖音"]:hover .social-icon {
    color: var(--text-main);
    /* 简单处理，或者用品牌渐变色 */
}

/* B站悬停色 - 粉色 */
.social-item[aria-label="B站"]:hover .social-icon {
    color: #fb7299;
}

/* 二维码悬浮窗 */
.qr-popup {
    position: absolute;
    bottom: 150%;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    width: 140px;
    background: #fff;
    padding: 10px;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    text-align: center;
    z-index: 100;
}

.qr-popup::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -6px;
    border-width: 6px;
    border-style: solid;
    border-color: #fff transparent transparent transparent;
}

.social-item:hover .qr-popup {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.qr-popup img {
    width: 100%;
    height: auto;
    display: block;
    margin-bottom: 5px;
}

.qr-popup span {
    color: #333;
    font-size: 0.8rem;
    display: block;
}

.copyright-row {
    color: var(--text-muted);
    font-size: 0.9rem;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.divider {
    color: var(--border-color);
    font-size: 0.8rem;
}

.icp-link {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.2s;
}

.icp-link:hover {
    color: var(--accent-color);
}

/* 
 * 回到顶部按钮 
 */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 45px;
    height: 45px;
    background: var(--accent-color);
    color: #0f172a;
    border: none;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(56, 189, 248, 0.3);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
    z-index: 99;
    display: flex;
    align-items: center;
    justify-content: center;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    transform: translateY(-3px);
    background: var(--accent-hover);
}

/* 
 * 主题切换按钮 
 */
.theme-toggle {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid var(--border-color);
    background: var(--card-bg);
    color: var(--text-main);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    z-index: 50;
}

.theme-toggle:hover {
    border-color: var(--accent-color);
    color: var(--accent-color);
    transform: rotate(15deg);
}

.theme-icon {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

/* 移动端适配 */
@media (max-width: 600px) {
    .theme-toggle {
        top: 10px;
        right: 10px;
    }

    .header-identity {
        flex-direction: column;
        gap: 5px;
    }

    .software-card {
        flex-direction: column;
        align-items: stretch;
    }

    /* ... existing mobile styles ... */


    .card-action {
        padding-left: 0;
        border-left: none;
        border-top: 1px solid var(--border-color);
        padding-top: 20px;
        margin-top: 20px;
        flex-direction: row;
        justify-content: space-between;
    }

    .disk-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .btn-go {
        width: 100%;
        text-align: center;
    }

    .back-to-top {
        bottom: 20px;
        right: 20px;
    }
}