/* ===== 星逸导航 · 全局样式 ===== */
:root {
    --primary: #6366f1;
    --primary-light: #818cf8;
    --primary-dark: #4f46e5;
    --accent2: #ec4899;
    --main-text-color: #1e293b;
    --footer-text-color: #7a7f96;
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.6);
    --glass-shadow: 0 8px 32px rgba(99, 102, 241, 0.08);
    --glass-blur: blur(14px);
    --card-hover-shadow: 0 16px 48px rgba(99, 102, 241, 0.14);
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-full: 9999px;
    --bg-gradient: linear-gradient(135deg, #eef2ff 0%, #faf5ff 30%, #f0f9ff 60%, #ecfeff 100%);
}

* { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Microsoft YaHei", sans-serif; margin: 0; padding: 0; box-sizing: border-box; user-select: none; }

a { text-decoration: none; color: inherit; -webkit-tap-highlight-color: transparent; }

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-thumb { background: linear-gradient(180deg, var(--primary-light), var(--accent2)); border-radius: 6px; opacity: 0.7; }
::-webkit-scrollbar-thumb:hover { opacity: 1; }
::-webkit-scrollbar-track { background: transparent; }

html[data-theme="dark"] {
    --main-text-color: #e2e8f0;
    --footer-text-color: #94a3b8;
    --glass-bg: rgba(255, 255, 255, 0.045);
    --glass-border: rgba(255, 255, 255, 0.09);
    --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
    --card-hover-shadow: 0 16px 48px rgba(99, 102, 241, 0.18);
    --bg-gradient: linear-gradient(135deg, #0a0a14, #0f0f23, #0a0a1a, #0f0f18);
}

body {
    display: flex;
    min-height: 100vh;
    width: 100%;
    background: var(--bg-gradient);
    justify-content: center;
    color: var(--main-text-color);
    overflow-x: hidden;
    transition: background 0.4s ease;
}

#fx-bg { position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; opacity: 0.55; }

.main { width: 100%; max-width: 1200px; position: relative; z-index: 1; }

/* ---------- 左侧边栏 ---------- */
.left { width: 250px; height: 100vh; display: flex; padding: 0 15px; position: fixed; align-items: center; flex-direction: column; z-index: 10; }
.left-main { width: 100%; height: 100vh; overflow-y: auto; display: flex; align-items: center; flex-direction: column; scrollbar-width: none; }
.left-main::-webkit-scrollbar { display: none; }

.logo { flex-shrink: 0; width: 90%; position: relative; aspect-ratio: 1/1; margin-top: 50px; border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.logo-avatar { width: 88%; height: 88%; border-radius: 50%; background-size: cover; background-position: center; position: absolute; z-index: 1; transition: transform 0.5s ease; }
.logo:hover .logo-avatar { transform: scale(1.05); }
.logo-frame { position: absolute; top: -15%; left: -10%; width: 120%; aspect-ratio: 1/1; z-index: 2; pointer-events: none; transition: transform 0.5s ease; }
.logo:hover .logo-frame { transform: rotate(8deg) scale(1.02); }
.status-dot { width: 14px; height: 14px; border-radius: 50%; background: #22c55e; border: 2.5px solid #fff; position: absolute; bottom: 8%; right: 8%; z-index: 3; animation: pulse-dot 2s ease-in-out infinite; }
html[data-theme="dark"] .status-dot { border-color: #1e1e2e; }
@keyframes pulse-dot { 0%,100% { box-shadow: 0 0 0 0 rgba(34,197,94,0.4); } 50% { box-shadow: 0 0 0 10px rgba(34,197,94,0); } }

.logo-rain { position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: 4; pointer-events: none; overflow: hidden; }
#logoRain { position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: 4; pointer-events: none; }

.left-div { flex-shrink: 0; width: 100%; border-radius: var(--radius-md); margin-top: 15px; padding: 20px; background: var(--glass-bg); backdrop-filter: var(--glass-blur); -webkit-backdrop-filter: var(--glass-blur); border: 1px solid var(--glass-border); box-shadow: var(--glass-shadow); transition: box-shadow 0.3s ease, transform 0.3s ease; }
.left-div:hover { box-shadow: var(--card-hover-shadow); transform: translateY(-2px); }
.left-des { display: flex; flex-direction: column; gap: 10px; }
.left-div-item { display: flex; align-items: center; line-height: 20px; font-size: 15px; gap: 8px; overflow: hidden; }
.left-div-item svg { flex-shrink: 0; }
.left-div-item svg path { fill: var(--primary); }

.left-tag { display: flex; flex-wrap: wrap; gap: 8px; padding: 14px; }
.left-tag-item { display: flex; align-items: center; height: 28px; padding: 6px 12px; font-size: 12px; font-weight: 500; border-radius: var(--radius-full); background: linear-gradient(135deg, rgba(99,102,241,0.1), rgba(168,85,247,0.1)); border: 1px solid rgba(99,102,241,0.15); color: var(--primary-dark); transition: all 0.3s ease; cursor: default; }
.left-tag-item:hover { background: linear-gradient(135deg, var(--primary), var(--primary-light)); color: #fff; transform: translateY(-2px); box-shadow: 0 4px 12px rgba(99,102,241,0.3); border-color: transparent; }
.left-time-title { font-size: 14px; font-weight: 700; margin-bottom: 12px; letter-spacing: 1px; color: var(--primary); }
#line { width: 100%; height: 200px; font-size: 13px; padding-left: 10px; overflow-y: auto; scrollbar-width: none; }
#line::-webkit-scrollbar { display: none; }
#line li { list-style: none; position: relative; padding: 15px 0 0 15px; border-left: 2px solid #c7d2fe; color: var(--footer-text-color); transition: all 0.3s ease; }
#line li:hover { color: var(--primary); border-left-color: var(--primary); }
html[data-theme="dark"] #line li { border-left-color: rgba(99,102,241,0.3); }
.focus { width: 12px; height: 12px; border-radius: 22px; background-color: #a5b4fc; border: 2px solid #fff; position: absolute; left: -8px; top: 50%; transition: all 0.3s ease; }
#line li:hover .focus { background-color: var(--primary); transform: scale(1.3); }
#line li:first-child .focus:first-child { background-color: #22c55e; animation: focus-pulse 1.8s ease infinite; }
html[data-theme="dark"] .focus { border-color: #1e1e2e; }
@keyframes focus-pulse { 0%,100% { box-shadow: 0 0 0 0 rgba(34,197,94,0.4); } 50% { box-shadow: 0 0 0 8px rgba(34,197,94,0); } }

/* ---------- 右侧主体 ---------- */
.right { width: calc(100% - 250px); float: right; padding: 25px 35px; display: flex; flex-direction: column; }

.welcome { font-size: 56px; font-weight: 900; margin: 14px 0 18px; letter-spacing: -1px; line-height: 1.15; min-height: 1.2em; }
.tw-cursor { display: inline-block; width: 3px; height: 0.9em; vertical-align: text-bottom; margin-left: 2px; background: var(--primary); animation: time-blink 0.8s step-end infinite; }
.gradientText { -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; background-size: 200%; animation: bgShift 5s ease-in-out infinite; background-image: linear-gradient(120deg, var(--primary), var(--accent2), var(--primary-light), #38bdf8); }
@keyframes bgShift { 0%,100% { background-position: 100%; } 50% { background-position: 0%; } }

/* 时间卡片 */
.header-cards { display: contents; }

.time-card {
    float: right;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 14px 20px 12px;
    background: rgba(255,255,255,0.86);
    backdrop-filter: blur(18px) saturate(160%);
    -webkit-backdrop-filter: blur(18px) saturate(160%);
    border: 1px solid rgba(255,255,255,0.6);
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(99,102,241,0.06), inset 0 1px 0 rgba(255,255,255,0.7);
    margin: 0 0 0 20px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
html[data-theme="dark"] .time-card {
    background: rgba(20,20,50,0.75);
    border: 1px solid rgba(255,255,255,0.06);
    box-shadow: 0 8px 40px rgba(0,0,0,0.5), inset 0 1px 0 rgba(255,255,255,0.03);
}
.time-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 56px rgba(99,102,241,0.14), 0 4px 16px rgba(0,0,0,0.04), inset 0 1px 0 rgba(255,255,255,0.7);
}
.time-row { display: flex; align-items: baseline; gap: 4px; line-height: 1; }
.time-row-sub { margin-top: -6px; }
.time-digit-large { font-size: 36px; font-weight: 250; font-family: 'SF Pro Display', 'Helvetica Neue', 'PingFang SC', sans-serif; letter-spacing: -1px; color: var(--main-text-color); min-width: 58px; text-align: center; font-variant-numeric: tabular-nums; }
html[data-theme="dark"] .time-digit-large { color: rgba(255,255,255,0.92); }
.time-sep { font-size: 24px; font-weight: 100; color: var(--primary); animation: time-blink 1.5s step-end infinite; opacity: 0.4; }
@keyframes time-blink { 0%, 100% { opacity: 0.4; } 50% { opacity: 0.05; } }
.time-sec { font-size: 16px; font-weight: 200; font-variant-numeric: tabular-nums; color: var(--footer-text-color); letter-spacing: 2px; opacity: 0.6; }
.time-meta { display: flex; align-items: center; gap: 8px; font-size: 11px; font-weight: 500; color: var(--footer-text-color); letter-spacing: 1.5px; opacity: 0.7; }
.time-dot { width: 3px; height: 3px; background: var(--primary); border-radius: 50%; opacity: 0.5; }
.time-tip { font-size: 10px; font-weight: 400; color: var(--footer-text-color); opacity: 0.6; letter-spacing: 1px; }

/* 搜索框 */
.search-box { display: flex; align-items: center; gap: 10px; padding: 12px 20px; background: var(--glass-bg); backdrop-filter: var(--glass-blur); -webkit-backdrop-filter: var(--glass-blur); border: 1px solid var(--glass-border); border-radius: var(--radius-full); box-shadow: var(--glass-shadow); max-width: 520px; margin-bottom: 10px; transition: border-color 0.3s ease, box-shadow 0.3s ease; }
.search-box:focus-within { border-color: var(--primary-light); box-shadow: var(--card-hover-shadow); }
.search-icon { color: var(--primary); opacity: 0.6; flex-shrink: 0; }
.search-input { width: 100%; border: none; outline: none; background: transparent; font-size: 15px; color: var(--main-text-color); font-family: inherit; user-select: text; }
.search-input::placeholder { color: var(--footer-text-color); opacity: 0.6; }

/* 状态栏 */
.status-bar { display: flex; gap: 16px; margin-bottom: 16px; }
.status-item { padding: 12px 20px; background: var(--glass-bg); backdrop-filter: var(--glass-blur); -webkit-backdrop-filter: var(--glass-blur); border: 1px solid var(--glass-border); border-radius: var(--radius-md); box-shadow: var(--glass-shadow); display: flex; align-items: baseline; gap: 10px; }
.status-label { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 1.5px; color: var(--primary); opacity: 0.8; }
.status-value { font-size: 14px; font-weight: 600; }
.hitokoto-cursor { display: inline; font-weight: 300; color: var(--primary); animation: time-blink 0.8s step-end infinite; margin-left: 1px; }

/* 图标栏 */
.iconContainer { display: flex; gap: 8px; height: 60px; align-items: center; margin-bottom: 16px; }
.iconContainer::-webkit-scrollbar { display: none; }
.iconItem { width: 47px; height: 40px; background: var(--glass-bg); backdrop-filter: var(--glass-blur); -webkit-backdrop-filter: var(--glass-blur); border: 1px solid var(--glass-border); border-radius: var(--radius-sm); display: flex; gap: 5px; align-items: center; justify-content: center; flex-shrink: 0; transition: all 0.35s ease; box-shadow: 0 2px 8px rgba(0,0,0,0.04); }
.iconItem svg path { fill: var(--main-text-color); transition: fill 0.3s ease; }
.iconTip { white-space: nowrap; display: none; font-size: 13px; font-weight: 600; }
.iconItem:nth-child(1):hover { width: 95px; background: rgb(137,172,255); color: #fff; box-shadow: 0 8px 24px rgba(59,130,246,0.35); border-color: transparent; transform: translateY(-3px); }
.iconItem:nth-child(2):hover { width: 80px; background: rgb(251,173,255); color: #fff; box-shadow: 0 8px 24px rgba(232,68,241,0.35); border-color: transparent; transform: translateY(-3px); }
.iconItem:nth-child(3):hover { width: 80px; background: rgb(169,255,248); color: #fff; box-shadow: 0 8px 24px rgba(34,197,94,0.35); border-color: transparent; transform: translateY(-3px); }
.iconItem:nth-child(4):hover { width: 80px; background: rgb(255,167,161); color: #fff; box-shadow: 0 8px 24px rgba(239,68,68,0.35); border-color: transparent; transform: translateY(-3px); }
.iconItem:nth-child(5):hover { background: rgb(255,183,156); box-shadow: 0 8px 24px rgba(249,115,22,0.3); transform: translateY(-3px); }
.iconItem:hover .iconTip { display: block; }

/* 三档主题切换器 */
.theme-switch { display: flex; align-items: center; gap: 2px; height: 40px; padding: 3px; flex-shrink: 0; background: var(--glass-bg); backdrop-filter: var(--glass-blur); -webkit-backdrop-filter: var(--glass-blur); border: 1px solid var(--glass-border); border-radius: var(--radius-sm); box-shadow: 0 2px 8px rgba(0,0,0,0.04); }
.ts-btn { display: flex; align-items: center; justify-content: center; width: 27px; height: 32px; border: none; border-radius: 6px; background: transparent; color: var(--footer-text-color); cursor: pointer; transition: all 0.25s ease; }
.ts-btn:hover { color: var(--primary); background: rgba(99,102,241,0.12); }
.ts-btn.active { color: #fff; background: linear-gradient(135deg, var(--primary), var(--primary-light)); box-shadow: 0 2px 10px rgba(99,102,241,0.4); }

/* 搜索提示 */
.search-hint { padding: 14px 20px; margin-bottom: 10px; font-size: 13px; color: var(--footer-text-color); background: var(--glass-bg); backdrop-filter: var(--glass-blur); -webkit-backdrop-filter: var(--glass-blur); border: 1px dashed var(--glass-border); border-radius: var(--radius-md); }

/* 内容区 */
.content-section { padding-top: 10px; }
.title { display: flex; gap: 10px; align-items: center; font-size: 26px; font-weight: 800; margin: 28px 0 18px; }
.title svg path { fill: var(--main-text-color); }

.projectList { display: flex; flex-wrap: wrap; gap: 16px; }
.projectItem { display: flex; background: var(--glass-bg); backdrop-filter: var(--glass-blur); -webkit-backdrop-filter: var(--glass-blur); border: 1px solid var(--glass-border); border-radius: var(--radius-md); padding: 20px; height: 110px; width: calc(50% - 8px); transition: all 0.3s ease; box-shadow: 0 4px 16px rgba(0,0,0,0.03); overflow: hidden; position: relative; }
.projectItem:hover { border-color: var(--primary-light); box-shadow: var(--card-hover-shadow); transform: translateY(-3px); }
.projectItem-tag { display: inline-block; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 1.5px; color: var(--primary); background: rgba(99,102,241,0.1); padding: 2px 10px; border-radius: var(--radius-full); margin-bottom: 6px; }
.projectItemLeft { transition: all 0.4s ease; height: 100%; width: 80%; }
.projectItemRight { overflow: hidden; transition: all 0.4s ease; display: flex; justify-content: center; align-items: center; width: 20%; height: 100%; }
.projectItemRight img { transition: all 0.35s ease; height: 44px; width: 44px; object-fit: cover; border-radius: 10px; }
.projectItemLeft p { font-size: 13px; margin-top: 5px; color: var(--footer-text-color); }
.projectItemLeft h1 { font-weight: 700; font-size: 18px; margin: 0; transition: all 0.4s ease; color: var(--main-text-color); }
.projectItem:hover .projectItemLeft { width: 100%; }
.projectItem:hover .projectItemRight { width: 0%; }
.projectItem:hover .projectItemRight img { transform: rotate(40deg) scale(1.1); }
.projectItem:hover h1 { font-size: 19px; }

.skill { padding: 30px 25px; width: 100%; background: var(--glass-bg); backdrop-filter: var(--glass-blur); -webkit-backdrop-filter: var(--glass-blur); border: 1px solid var(--glass-border); border-radius: var(--radius-lg); box-shadow: var(--glass-shadow); }
.skill img { width: 100%; height: 100%; object-fit: cover; }
.skill #skillWap { display: none; }

/* 页脚 */
footer { padding: 30px 5px 20px; color: var(--footer-text-color); font-size: 13px; text-align: center; }
.footer-divider { width: 60px; height: 2px; background: linear-gradient(90deg, var(--primary-light), var(--accent2)); margin: 0 auto 16px; border-radius: 1px; }

/* 滚动进度环 */
.scroll-progress { position: fixed; bottom: 30px; right: 30px; width: 44px; height: 44px; z-index: 100; cursor: pointer; opacity: 0; visibility: hidden; display: flex; align-items: center; justify-content: center; transition: opacity 0.3s ease, visibility 0.3s ease; }
.scroll-progress.visible { opacity: 1; visibility: visible; }
.scroll-progress svg { position: absolute; top: 0; left: 0; }
.progress-bg { color: rgba(99,102,241,0.12); }
.progress-fill { color: var(--primary); stroke-linecap: round; stroke-dasharray: 125.6; transition: stroke-dashoffset 0.15s ease; }
.progress-text { font-size: 10px; font-weight: 700; color: var(--primary); z-index: 1; }
.scroll-progress:hover { transform: scale(1.1); }
.scroll-progress:hover .progress-bg { color: var(--primary); }

/* 移动端头像（桌面隐藏） */
.mobile-avatar { display: none; }

/* 二维码弹窗 */
.tc { position: fixed; display: flex; visibility: hidden; width: 100vw; height: 100vh; background: rgba(0,0,0,0); z-index: 99999; align-items: center; justify-content: center; flex-direction: column; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); transition: background 0.3s ease; }
.tc.active { visibility: visible; background: rgba(0,0,0,0.5); }
.tc-main { width: 80%; max-width: 300px; min-height: 200px; background: #fff; border-radius: var(--radius-lg); opacity: 0; display: flex; align-items: center; justify-content: center; overflow: hidden; transform: translateY(20%) scale(0.95); transition: all 0.25s ease; box-shadow: 0 25px 60px rgba(0,0,0,0.2); }
.tc-main.active { opacity: 1; transform: translateY(0) scale(1); }
.tc-img { width: 100%; height: 100%; object-fit: contain; }
.tc-close { display: flex; justify-content: center; align-items: center; height: 44px; width: 44px; background: var(--glass-bg); backdrop-filter: var(--glass-blur); -webkit-backdrop-filter: var(--glass-blur); margin-top: 24px; border-radius: 50%; cursor: pointer; transition: all 0.3s ease; border: 1px solid var(--glass-border); }
.tc-close svg path { fill: var(--main-text-color); }
.tc-close:hover { transform: rotate(90deg); }

/* 点击粒子（备用容器样式，实际绘制于 canvas） */
.click-burst { display: none; }

/* 减少动效偏好 */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

/* 触屏设备：禁用 hover 位移/扩散，减少滚动重绘 */
@media (hover: none) {
    .iconItem:hover, .projectItem:hover, .left-div:hover, .left-tag-item:hover, .time-card:hover {
        transform: none !important;
        box-shadow: var(--glass-shadow) !important;
    }
}

/* 移动端 */
@media (max-width: 1000px) { .projectItem { width: 100%; } }

@media (max-width: 800px) {
    .right { width: 100%; padding: 20px 16px; }
    .welcome { font-size: 36px; text-align: center; margin: 10px 0 16px; }
    header { display: flex; flex-direction: column; align-items: stretch; }
    .header-cards { display: flex; flex-direction: row; gap: 12px; align-items: stretch; margin-bottom: 14px; }
    .time-card { float: none; margin: 0; flex: 1 1 50%; width: auto; max-width: none; min-width: 0; padding: 12px 10px; }
    .time-digit-large { font-size: 28px; min-width: 0; }
    .time-sep { font-size: 20px; }
    .time-sec { font-size: 14px; }
    .time-meta { gap: 6px; font-size: 10px; letter-spacing: 0.5px; }
    .time-tip { display: none; }
    .status-bar { flex: 1 1 50%; width: auto; min-width: 0; margin: 0; flex-direction: column; align-items: stretch; }
    .status-item { flex: 1; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 8px; padding: 12px 10px; }
    .status-value { font-size: 14px; line-height: 1.5; }
    .iconContainer { flex-wrap: nowrap; justify-content: space-between; overflow-x: auto; margin-bottom: 12px; gap: 6px; }
    .iconItem { width: 40px; }
    .theme-switch { order: 0; padding: 2px; gap: 2px; }
    .ts-btn { width: 24px; height: 30px; }
    .projectItemLeft p { font-size: 14px; }
    .projectItemLeft h1 { font-size: 15px; }
    .projectItem:hover h1 { font-size: 18px; }
    .skill #skillWap { display: block; }
    .skill #skillPc { display: none; }
    .skill { padding: 20px 15px; }
    .mobile-avatar { display: flex; justify-content: center; position: relative; width: 80px; height: 80px; margin: 0 auto 12px; }
    .mobile-avatar-img { width: 88%; height: 88%; border-radius: 50%; background-size: cover; background-position: center; position: absolute; top: 6%; left: 6%; z-index: 1; }
    .mobile-avatar-frame { position: absolute; top: -15%; left: -10%; width: 120%; height: 120%; z-index: 2; pointer-events: none; }
    .mobile-avatar-dot { width: 12px; height: 12px; border-radius: 50%; background: #22c55e; border: 2.5px solid #fff; position: absolute; bottom: 4%; right: 4%; z-index: 3; animation: pulse-dot 2s ease-in-out infinite; }
    html[data-theme="dark"] .mobile-avatar-dot { border-color: #1e1e2e; }
    .left { position: fixed; z-index: 9999; padding: 0; width: 100%; height: 100%; pointer-events: none; background: none; transition: all 0.3s linear; }
    .left-main { position: absolute; float: left; width: 70vw; left: -70vw; padding: 15px; background: linear-gradient(135deg, #eef2ff, #faf5ff); transition: all 0.3s ease; box-shadow: 4px 0 30px rgba(0,0,0,0.1); }
    html[data-theme="dark"] .left-main { background: #0f0f23; }
    .left-open { pointer-events: auto; background: rgba(0,0,0,0.4); }
    .left-main-open { left: 0; }
    .scroll-progress { bottom: 20px; right: 16px; }
}
