:root {
    --bg-dark: #050508;
    --glass-bg: linear-gradient(145deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.01));
    --border-light: rgba(255, 255, 255, 0.08);
    --border-highlight: rgba(255, 255, 255, 0.15);
    --text-main: #ffffff;
    --text-sub: #a1a1aa;
    --accent: #3b82f6;
}

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

body {
    background-color: var(--bg-dark);
    font-family: 'Outfit', 'Noto Sans SC', sans-serif;
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    /* 手机端允许页面自然滚动 */
    height: auto;
}

/* === 1. 氛围背景 === */
.layer-bg {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: -1;
    background: radial-gradient(circle at 50% 0%, #1a1a2e 0%, #050508 80%);
}
.glow-orb { position: absolute; border-radius: 50%; filter: blur(120px); opacity: 0.3; }
.orb-1 { top: -10%; left: -10%; width: 60vw; height: 60vw; background: #2e1065; }
.orb-2 { bottom: -10%; right: -10%; width: 50vw; height: 50vw; background: #1e3a8a; }
.grid-mask {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background-image: linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
                      linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
    background-size: 60px 60px;
    mask-image: radial-gradient(circle at center, black 40%, transparent 100%);
}

/* === 2. 布局容器 === */
.bento-box {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: 220px 130px;
    gap: 20px;
    width: 900px;
    max-width: 92%;
    z-index: 10;
    margin: 40px 0; /* 增加上下间距 */
}

/* === 3. 卡片通用 === */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(40px);
    -webkit-backdrop-filter: blur(40px);
    border: 1px solid var(--border-light);
    border-radius: 24px;
    position: relative;
    overflow: hidden;
    box-shadow: inset 0 1px 0 0 rgba(255,255,255,0.1), 0 10px 30px rgba(0,0,0,0.3);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), border-color 0.3s;
    
    opacity: 0;
    transform: translateY(30px);
    animation: stagger-up 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
    animation-delay: calc(var(--i) * 0.1s);
}
.glass-card:hover {
    transform: translateY(-5px) scale(1.01);
    border-color: var(--border-highlight);
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.02));
}
.card-body { height: 100%; padding: 24px; }

/* === 4. 卡片细节 === */

/* Profile */
.profile-card { grid-column: span 2; }
.row-align { display: flex; align-items: center; gap: 30px; height: 100%; }
.avatar-box { position: relative; width: 100px; height: 100px; flex-shrink: 0; }
.avatar { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; border: 3px solid rgba(255,255,255,0.1); }
.status-badge {
    position: absolute; bottom: 0; right: 0;
    background: #10b981; color: #000; font-size: 0.7rem; font-weight: 700;
    padding: 3px 8px; border-radius: 12px; border: 2px solid #1a1a1a;
    display: flex; align-items: center; gap: 4px;
}
.ripple { width: 6px; height: 6px; background: #000; border-radius: 50%; animation: pulse 2s infinite; opacity: 0.5; }
@keyframes pulse { 0% { transform: scale(0.8); } 50% { transform: scale(1.2); } 100% { transform: scale(0.8); } }
.info-box h1 { font-size: 2rem; margin-bottom: 6px; font-weight: 700; letter-spacing: -0.5px; }
.bio { color: var(--text-sub); margin-bottom: 15px; font-size: 0.9rem; }
.pill-group { display: flex; gap: 8px; }
.pill {
    background: rgba(255,255,255,0.06); padding: 5px 12px; border-radius: 8px;
    font-size: 0.75rem; color: #ddd; border: 1px solid transparent; transition: 0.3s;
}
.glass-card:hover .pill { border-color: rgba(255,255,255,0.15); background: rgba(255,255,255,0.1); }

/* Clock */
.clock-card { grid-column: span 1; }
.col-align { display: flex; flex-direction: column; justify-content: center; align-items: center; height: 100%; text-align: center; }
.time-wrap {
    font-family: 'JetBrains Mono', monospace;
    font-size: 3.5rem; font-weight: 700; line-height: 1; margin-bottom: 10px;
    display: flex; align-items: baseline; letter-spacing: -2px;
}
.seconds { font-size: 1.5rem; color: var(--accent); margin-left: 6px; opacity: 0.9; font-weight: 600; }
.date-wrap { font-size: 0.9rem; color: var(--text-sub); letter-spacing: 0.5px; }

/* Actions */
.action-card { text-decoration: none; color: #fff; grid-column: span 1; display: block; }
.row-between { display: flex; align-items: center; justify-content: space-between; height: 100%; }
.left-part { display: flex; align-items: center; gap: 15px; }
.icon-btn {
    width: 48px; height: 48px; border-radius: 14px;
    display: flex; align-items: center; justify-content: center; font-size: 1.2rem;
    color: #fff; transition: 0.3s; box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}
.pink-theme { background: linear-gradient(135deg, #ec4899, #db2777); }
.blue-theme { background: linear-gradient(135deg, #3b82f6, #2563eb); }
.action-card h3 { font-size: 1.1rem; font-weight: 600; }
.arrow-icon {
    width: 32px; height: 32px; border-radius: 50%; background: rgba(255,255,255,0.05);
    display: flex; align-items: center; justify-content: center; font-size: 0.8rem;
    transition: 0.3s; color: var(--text-sub);
}
.action-card:hover .arrow-icon { background: #fff; color: #000; transform: rotate(-45deg); }

/* Tool */
.tool-card { grid-column: span 1; }
.col-align-start { display: flex; flex-direction: column; justify-content: center; height: 100%; }
.card-title { font-size: 0.8rem; color: var(--text-sub); margin-bottom: 15px; display: flex; align-items: center; gap: 8px; font-weight: 600; }
.marquee-window { width: 100%; overflow: hidden; mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent); }
.marquee-content { display: flex; gap: 20px; width: max-content; animation: scroll 15s linear infinite; }
.marquee-content a { font-size: 1.8rem; color: rgba(255,255,255,0.4); transition: 0.3s; display: flex; align-items: center; }
.marquee-content a:hover { color: #fff; transform: scale(1.15); filter: drop-shadow(0 0 8px rgba(255,255,255,0.5)); }

/* === 5. 底部 Footer (默认电脑端：悬浮) === */
.footer-bar {
    position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); z-index: 9999;
    background: rgba(20, 20, 20, 0.8); backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.1); padding: 8px 20px; border-radius: 50px;
    display: flex; align-items: center; gap: 15px; font-size: 0.8rem; color: #888;
    box-shadow: 0 10px 20px rgba(0,0,0,0.3);
    white-space: nowrap; /* 强制不换行 */
}
.divider { width: 1px; height: 12px; background: rgba(255,255,255,0.2); }
.footer-bar a { color: #888; text-decoration: none; transition: 0.2s; }
.footer-bar a:hover { color: #fff; }

@keyframes stagger-up { to { opacity: 1; transform: translateY(0); } }
@keyframes scroll { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }

/* ==============================
   🚀 移动端完美适配 (重点修改区域)
   ============================== */
@media (max-width: 768px) {
    
    body {
        /* 恢复默认流式布局，允许上下滚动 */
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        height: auto;
        padding-top: 30px;
        padding-bottom: 30px;
    }

    .bento-box {
        /* 单列布局 */
        grid-template-columns: 1fr;
        grid-template-rows: auto;
        width: 90%;
        height: auto;
        display: flex;
        flex-direction: column;
        gap: 15px;
        margin: 0;
    }

    .profile-card, .clock-card, .action-card, .tool-card {
        grid-column: span 1;
        width: 100%;
        min-height: auto; /* 移除固定高度 */
    }

    /* 个人信息卡竖排 */
    .profile-card .card-body {
        flex-direction: column;
        text-align: center;
        padding: 30px 20px;
        gap: 15px;
    }
    .pill-group { justify-content: center; }
    
    /* 时钟字号缩小 */
    .time-wrap { font-size: 2.8rem; }

    /* === Footer 移动端重构：放在最底部，不悬浮，不遮挡 === */
    .footer-bar {
        position: relative; /* 不再悬浮 */
        transform: none;
        left: auto;
        bottom: auto;
        margin-top: 30px; /* 距离上方卡片一些距离 */
        
        /* 保持胶囊样式，但适配宽度 */
        width: auto;
        max-width: 90%;
        flex-wrap: wrap; /* 允许极小屏幕换行 */
        justify-content: center;
        padding: 10px 15px;
        font-size: 0.7rem; /* 字体缩小一点 */
    }
}