/* ==========================================
   全局核心变量与基础重置
   ========================================== */
:root {
    --bg-dark: #060913;
    --panel-cyber: rgba(10, 16, 32, 0.85);
    --border-glow: #00f3ff;   /* 极客冰蓝 */
    --neon-pink: #ff007f;     /* 二次元粉 */
    --neon-purple: #9d4edd;
    --text-white: #ffffff;
    --text-gray: #8892b0;
}

/* 水色主题变量 */
body.light-theme {
    --bg-dark: #e0faff;            /* 背景浅蓝 */
    --panel-cyber: rgba(240, 255, 255, 0.85);
    --border-glow: #00cfff;        /* 水色高光 */
    --neon-pink: #80e0ff;          /* 替代粉色光 */
    --neon-purple: #66d9ff;
    --text-white: #0a0a0a;         /* 浅色背景文字深色 */
    --text-gray: #555555;
}

/* 主题切换按钮 */
.theme-toggle-btn {
    margin-top: 10px;
    display: block;
    width: 120px;
    font-size: 12px;
    padding: 6px 10px;
    border: 1px solid var(--border-glow);
    background: rgba(0, 243, 255, 0.1);
    color: var(--border-glow);
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.3s;
}

.theme-toggle-btn:hover {
    background: var(--border-glow);
    color: var(--text-white);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-white);
    font-family: 'Consolas', 'Fira Code', 'Microsoft YaHei', sans-serif;
    overflow-x: hidden;
}

/* 科技感背景网格 */
.geek-bg {
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh;
    background: 
        linear-gradient(rgba(18, 24, 48, 0.3) 1px, transparent 1px) 0 0 / 50px 50px,
        linear-gradient(90deg, rgba(18, 24, 48, 0.3) 1px, transparent 1px) 0 0 / 50px 50px,
        radial-gradient(circle at 50% 30%, rgba(157, 78, 221, 0.15), transparent 60%);
    z-index: -2;
}

.container {
    max-width: 850px;
    margin: 50px auto;
    padding: 0 20px;
}

/* ==========================================
   顶部个人中心：三栏空间精细化排版外舱
   ========================================== */
.profile-card {
    background: var(--panel-cyber);
    border: 1px solid #1e293b;
    border-left: 4px solid var(--border-glow);
    padding: 35px 40px; 
    border-radius: 8px;
    position: relative;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    display: flex;
    gap: 30px;          
    align-items: center;
    justify-content: space-between;
    overflow: hidden;   /* 坚决不允许子元素穿墙溢出 */
}

/* 圆形头像特殊控制舱 */
.avatar-container {
    position: relative;
    flex-shrink: 0;
}

.avatar-circle {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: linear-gradient(135deg, #161f38, #090d16);
    border: 2px solid rgba(0, 243, 255, 0.3);
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 0 15px rgba(0, 243, 255, 0.1);
    transition: border-color 0.3s;
}

.avatar-circle img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-card:hover .avatar-circle {
    border-color: var(--border-glow);
}

.status-badge {
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--border-glow);
    color: #060913;
    font-size: 9px;
    font-weight: 900;
    padding: 1px 6px;
    border-radius: 10px;
    letter-spacing: 0.5px;
}

/* 中间信息区：保护生存空间，限制上限防止推挤右侧 */
.profile-info {
    flex: 1 1 auto;       
    max-width: 440px;     
    min-width: 0;         
    display: flex;
    flex-direction: column;
}

.welcome-text {
    font-size: 32px;
    font-weight: 500;
    color: #ffffff !important; 
    margin-bottom: 12px;
    letter-spacing: 1px;
    white-space: nowrap; /* 整个标题保持一行 */
}

.gradient-name {
    font-weight: 900;
    background: linear-gradient(45deg, var(--border-glow), var(--neon-purple), var(--neon-pink));
    white-space: nowrap;  /* 阻止自动换行 */
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
    padding-left: 6px;
    filter: drop-shadow(0 0 12px rgba(0, 243, 255, 0.25));
}

.subtitle {
    color: #cbd5e1;
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 20px;
}

/* 随机动态 Tips 区域 */
.tips-container {
    background: rgba(14, 22, 43, 0.6);
    border: 1px solid rgba(0, 243, 255, 0.15);
    padding: 12px 16px;
    font-size: 13px;
    color: #cbd5e1;
    margin-bottom: 20px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 100%;            
}

.tips-container:hover {
    border-color: var(--border-glow);
    background: rgba(0, 243, 255, 0.04);
    box-shadow: 0 0 10px rgba(0, 243, 255, 0.1);
}

.tips-prefix {
    font-weight: bold;
    color: var(--border-glow);
    margin-right: 8px;
    font-family: monospace;
}

/* ==========================================
   流光标签簇：安全区硬核限宽与对齐
   ========================================== */
.profile-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 10px;        
    width: 220px;         
    max-width: 220px;
    justify-content: flex-start;
    align-content: center;
    flex-shrink: 0;       /* 坚决不参与中间区域的挤压 */
}

.profile-tags .tag {
    font-family: 'Consolas', monospace;
    font-size: 11px;
    font-weight: bold;
    padding: 4px 10px;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.01);
    border: 1px solid rgba(255, 255, 255, 0.05);
    cursor: default;
    transition: all 0.2s cubic-bezier(0.25, 0.8, 0.25, 1);
    user-select: none;
    white-space: nowrap;  /* 强制文本单行，绝对不换行 */
}

.profile-tags .tag.cyan {
    color: var(--border-glow);
    border-color: rgba(0, 243, 255, 0.15);
}
.profile-tags .tag.cyan:hover {
    background: rgba(0, 243, 255, 0.06);
    border-color: var(--border-glow);
    box-shadow: 0 0 12px rgba(0, 243, 255, 0.3);
}

.profile-tags .tag.purple {
    color: #b577ff;
    border-color: rgba(157, 78, 221, 0.2);
}
.profile-tags .tag.purple:hover {
    background: rgba(157, 78, 221, 0.08);
    border-color: var(--neon-purple);
    box-shadow: 0 0 12px rgba(157, 78, 221, 0.3);
}

.profile-tags .tag.pink {
    color: #00b4d8;
    border-color: rgba(0, 180, 216, 0.2);
}
.profile-tags .tag.pink:hover {
    color: var(--border-glow);
    background: rgba(0, 243, 255, 0.06);
    border-color: var(--border-glow);
    box-shadow: 0 0 12px rgba(0, 243, 255, 0.3);
}

.profile-tags .tag.gray {
    color: var(--text-gray);
    border-color: rgba(136, 146, 176, 0.15);
}
.profile-tags .tag.gray:hover {
    color: #ffffff;
    border-color: #ffffff;
    background: rgba(255, 255, 255, 0.05);
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.15);
}

.profile-tags .tag:hover {
    transform: scale(1.05) translateY(-1px);
}

/* ==========================================
   社交按钮样式：带官方图标排版
   ========================================== */
.social-links {
    display: flex;
    gap: 12px;
}

.link-btn {
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    padding: 8px 16px;
    color: var(--text-gray);
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid #1e293b;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
}

.link-btn i {
    font-size: 14px;
    transition: transform 0.2s;
}

.link-btn:hover {
    color: #ffffff;
    transform: translateY(-1px);
}

.link-btn.github:hover {
    border-color: #ffffff;
    background: rgba(255, 255, 255, 0.08);
}

.link-btn.bilibili:hover {
    border-color: #ff71bf;
    color: #ff71bf;
    background: rgba(255, 113, 191, 0.08);
}

.link-btn.discord:hover {
    border-color: #5865f2;
    color: #5865f2;
    background: rgba(88, 101, 242, 0.08);
}

.link-btn:hover i {
    transform: scale(1.1);
}

/* ==========================================
   音乐播放器排版
   ========================================== */
.music-player {
    margin-top: 25px;
    background: linear-gradient(90deg, #0f172a, var(--panel-cyber));
    border: 1px solid #1e293b;
    padding: 20px 30px;
    display: flex;
    align-items: center;
    gap: 25px;
    border-radius: 4px;
}
.track-meta { flex-grow: 1; }
.track-title { font-size: 16px; font-weight: bold; color: var(--border-glow); }
.track-artist { font-size: 12px; color: var(--text-gray); margin-top: 4px; }

.progress-bar-container {
    width: 100%; height: 4px;
    background: #1e293b;
    margin-top: 15px;
    cursor: pointer;
    position: relative;
}
.progress-bar {
    height: 100%; width: 0%;
    background: linear-gradient(90deg, var(--border-glow), var(--neon-purple));
    box-shadow: 0 0 8px var(--border-glow);
}
.ctrl-btn {
    background: transparent;
    border: 1px solid var(--border-glow);
    color: var(--border-glow);
    padding: 10px 24px;
    cursor: pointer;
    font-weight: bold;
    letter-spacing: 1px;
    transition: all 0.2s;
}
.ctrl-btn:hover {
    background: rgba(0, 243, 255, 0.1);
    box-shadow: inset 0 0 10px rgba(0, 243, 255, 0.3);
}

/* ==========================================
   项目矩阵排版
   ========================================== */
.product-grid { margin-top: 50px; }
.product-grid h2 {
    font-size: 14px;
    color: var(--text-gray);
    letter-spacing: 3px;
    margin-bottom: 25px;
    text-transform: uppercase;
}
.product-card {
    background: var(--panel-cyber);
    border: 1px solid #1e293b;
    margin-bottom: 20px;
    display: flex;
    cursor: pointer;
    transition: all 0.3s;
    border-radius: 4px;
    position: relative;
}
.product-card:hover {
    border-color: var(--border-glow);
    transform: translateX(4px);
    box-shadow: 0 5px 20px rgba(0, 243, 255, 0.1);
}
.prod-img-wrapper {
    width: 180px; height: 110px;
    background: #090d16;
    overflow: hidden;
}
.prod-img-wrapper img {
    width: 100%; height: 100%;
    object-fit: cover;
    opacity: 0.7;
    transition: opacity 0.3s;
}
.product-card:hover .prod-img-wrapper img { opacity: 1; }

.prod-details {
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
.prod-details h3 { font-size: 18px; color: #f1f5f9; }
.prod-details p { font-size: 13px; color: var(--text-gray); line-height: 1.5; }
.action-tag { font-size: 11px; font-weight: bold; letter-spacing: 1px; }

/* ----------------- 按钮统一高亮方案 ----------------- */

/* 普通状态 */
.text-link,
.text-download {
    position: relative;
    transition: all 0.2s ease;
    cursor: pointer;
    text-decoration: none;
    font-weight: bold;
}

/* 默认颜色：区别轻微 */
.text-link {
    color: #00cfff;        /* 浅蓝，和整体科技感一致 */
}

.text-download {
    color: #00b4d8;        /* 稍深的水色，区分下载按钮 */
}

/* 鼠标悬停高亮效果：统一风格，差别小 */
.product-card:hover .text-link,
.product-card:hover .text-download {
    color: #00f3ff;        /* 极客冰蓝高亮，统一风格 */
    text-shadow: 0 0 8px rgba(0, 243, 255, 0.5); /* 流光感 */
}

/* 进阶：给下载按钮增加轻微光晕，增强互动感 */
.product-card:hover .text-download {
    filter: drop-shadow(0 0 6px rgba(0, 180, 216, 0.6));
}
/* ==========================================
   下载弹窗
   ========================================== */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(3, 5, 11, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
    z-index: 100;
}
.modal-overlay.active { opacity: 1; pointer-events: auto; }
.modal-box {
    background: #0b0f19;
    border: 1px solid #22314d;
    border-top: 4px solid var(--neon-pink);
    width: 440px;
    padding: 30px;
    position: relative;
}
.modal-header {
    display: flex; justify-content: space-between;
    align-items: center; margin-bottom: 25px;
}
.modal-title { font-size: 11px; color: var(--text-gray); letter-spacing: 1px; }
.close-btn { background: transparent; border: none; color: var(--text-gray); cursor: pointer; font-size: 16px; }
.close-btn:hover { color: #fff; }
.modal-prod-name { font-size: 22px; font-weight: bold; margin-bottom: 20px; color: #fff; }

.route-item {
    display: flex; justify-content: space-between; align-items: center;
    padding: 14px 20px; border: 1px solid #1e293b;
    margin-bottom: 12px; text-decoration: none; color: #fff;
    font-size: 14px; background: rgba(255,255,255,0.01);
}
.route-item.available:hover {
    border-color: var(--neon-pink);
    background: rgba(255, 0, 127, 0.05);
}
.route-item.disabled {
    background: #0d111a; border-color: #161b22;
    color: #384252; cursor: not-allowed; pointer-events: none;
}
.status-text { font-size: 10px; font-weight: bold; }
.route-item.available .status-text { color: var(--neon-pink); }
.route-item.disabled .status-text { color: #384252; }

/* ==========================================
   移动端响应式适配 (屏幕小于 768px 时自动触发)
   ========================================== */
@media (max-width: 768px) {
    .container {
        margin: 20px auto;
        padding: 0 15px;
    }

    /* 顶部个人中心：由横向排版改为纵向居中排版 */
    .profile-card {
        flex-direction: column !important;
        align-items: center;
        text-align: center;
        padding: 30px 20px;
        gap: 20px;
    }

    /* 让头像在手机端居中 */
    .avatar-container {
        margin: 0 auto;
    }

    /* 名字与前缀字体稍微缩小 */
    .welcome-text {
        font-size: 26px;
    }

    .subtitle {
        font-size: 13px;
        text-align: left; 
        padding-left: 10px;
        border-left: 2px solid var(--neon-pink);
    }

    /* 社交按钮：手机端自动平分空间 */
    .social-links {
        justify-content: center;
        flex-wrap: wrap;
        gap: 10px;
        width: 100%;
    }

    .link-btn {
        flex: 1 1 calc(50% - 10px); 
        justify-content: center;
        font-size: 12px;
        padding: 10px;
    }

    /* 音乐播放器手机端改造 */
    .music-player {
        padding: 20px;
        gap: 15px;
    }
    .ctrl-btn {
        padding: 8px 16px;
        font-size: 12px;
    }

    /* 项目矩阵卡片：由左右并排改为上下堆叠 */
    .product-card {
        flex-direction: column;
    }

    .prod-img-wrapper {
        width: 100%;
        height: 140px; 
    }

    .prod-details {
        padding: 15px;
        gap: 10px;
    }

    .prod-details h3 {
        font-size: 16px;
    }

    /* 下载弹窗：宽度自适应 */
    .modal-box {
        width: 90%;
        max-width: 400px;
        padding: 20px;
    }
    
    .route-item {
        padding: 12px 15px;
        font-size: 13px;
    }

    /* 移动端中间信息区释放 */
    .profile-info {
        max-width: 100% !important;
        width: 100%;
    }

    /* 系统日志移动端自适应 */
    .tips-container {
        text-align: left; 
        margin-bottom: 20px;
    }

    /* 手机端彻底释放词云的硬锁死 */
    .profile-tags {
        width: 100% !important;    
        max-width: 100% !important;
        justify-content: center;    
        margin-left: 0;            
        margin-top: 15px;          
    }

    /* 稍微收紧手机端标签的内边距 */
    .profile-tags .tag {
        padding: 4px 8px;
        font-size: 11px;
    }
}


/* 标签样式 */
.tag {
    font-size: 0.8rem;
    padding: 0.1rem 0.3rem;
    border-radius: 4px;
    margin-left: 6px;
    font-weight: bold;
}

.tag.hot {
    background: linear-gradient(45deg, #ff4d4d, #ff9900);
    color: #fff;
}

.tag.new {
    background: linear-gradient(45deg, #4dd0ff, #00b4d8);
    color: #fff;
}

/* 鼠标悬停特效统一 */
.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 255, 255, 0.3);
    transition: all 0.3s ease;
}

/* 热卡片悬停特殊 */
.product-card[data-label="hot"]:hover {
    background: linear-gradient(to right, rgba(255,77,77,0.1), rgba(255,153,0,0.1));
    box-shadow: 0 0 20px rgba(255, 77, 77, 0.6);
}

/* 新卡片悬停特殊 */
.product-card[data-label="new"]:hover {
    background: linear-gradient(to right, rgba(77,208,255,0.1), rgba(0,180,216,0.1));
    box-shadow: 0 0 20px rgba(0, 180, 216, 0.6);
}