/* ===== 天涯秘境 — 修仙主题 ===== */
:root {
    --primary: #a78bfa;
    --primary-dark: #7c3aed;
    --bg: #0c0a1d;
    --bg-card: #13102b;
    --bg-light: #1e1a3a;
    --text: #e8e3f0;
    --text-muted: #8b82a6;
    --border: #2a2545;
    --gold: #f0c060;
    --gold-dim: #b8943a;
    --jade: #34d399;
    --radius: 12px;
    --shadow: 0 4px 24px rgba(124, 58, 237, 0.2);
    --transition: 0.3s ease;
}

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

html { scroll-behavior: smooth; font-size: 16px; }

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.7;
    overflow-x: hidden;
}

/* 背景星云粒子 */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background:
        radial-gradient(ellipse at 20% 20%, rgba(124,58,237,0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 80%, rgba(240,192,96,0.05) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 50%, rgba(52,211,153,0.03) 0%, transparent 60%);
    pointer-events: none;
    z-index: 0;
}

.container { max-width: 1100px; margin: 0 auto; padding: 0 24px; position: relative; z-index: 1; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; }

/* ===== 导航栏 ===== */
.navbar {
    position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
    background: rgba(12, 10, 29, 0.88);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
    transition: var(--transition);
}
.navbar .container { display: flex; align-items: center; justify-content: space-between; height: 64px; }

.logo {
    font-size: 1.3rem; font-weight: 700;
    background: linear-gradient(135deg, #c4b5fd, #f0c060);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-links { display: flex; list-style: none; gap: 32px; }
.nav-links a { font-size: 0.95rem; color: var(--text-muted); transition: color var(--transition); position: relative; }
.nav-links a::after {
    content: ''; position: absolute; bottom: -4px; left: 0;
    width: 0; height: 2px;
    background: linear-gradient(90deg, var(--primary), var(--gold));
    transition: width var(--transition);
}
.nav-links a:hover, .nav-links a.active { color: var(--text); }
.nav-links a:hover::after, .nav-links a.active::after { width: 100%; }

.menu-toggle { display: none; background: none; border: none; color: var(--text); font-size: 1.5rem; cursor: pointer; }

/* ===== 英雄区域 ===== */
.hero { min-height: 100vh; display: flex; align-items: center; padding-top: 64px; }
.hero .container { display: flex; align-items: center; gap: 64px; }

.greeting { font-size: 1.1rem; color: var(--gold); margin-bottom: 8px; font-weight: 500; }

.hero-content h1 {
    font-size: 3.2rem; font-weight: 800; line-height: 1.2; margin-bottom: 12px;
    background: linear-gradient(135deg, #c4b5fd, #f0c060, #34d399);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.subtitle { font-size: 1.25rem; color: var(--text-muted); margin-bottom: 16px; }
.description { font-size: 1.05rem; color: var(--text-muted); max-width: 480px; margin-bottom: 32px; }

.hero-buttons { display: flex; gap: 16px; }
.btn { display: inline-flex; align-items: center; padding: 12px 28px; border-radius: 8px; font-size: 0.95rem; font-weight: 600; transition: all var(--transition); cursor: pointer; }
.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #fff;
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 4px 20px rgba(167,139,250,0.4); }
.btn-outline { border: 2px solid var(--border); color: var(--text); }
.btn-outline:hover { border-color: var(--gold); color: var(--gold); transform: translateY(-2px); }

.hero-avatar { flex-shrink: 0; }
.avatar-placeholder {
    width: 260px; height: 260px; border-radius: 50%;
    background: linear-gradient(135deg, #4c1d95, #7c3aed, #a78bfa);
    display: flex; align-items: center; justify-content: center;
    font-size: 5rem;
    box-shadow: 0 0 80px rgba(124,58,237,0.35), 0 0 160px rgba(167,139,250,0.15);
    animation: avatarGlow 4s ease-in-out infinite;
}
@keyframes avatarGlow {
    0%, 100% { box-shadow: 0 0 80px rgba(124,58,237,0.35), 0 0 160px rgba(167,139,250,0.15); }
    50% { box-shadow: 0 0 100px rgba(240,192,96,0.4), 0 0 200px rgba(124,58,237,0.25); }
}

/* ===== 通用区域标题 ===== */
.section-title {
    font-size: 2rem; font-weight: 700; text-align: center; margin-bottom: 48px; position: relative;
}
.section-title::after {
    content: ''; display: block; width: 60px; height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--gold), var(--jade));
    margin: 16px auto 0; border-radius: 2px;
}

/* ===== 道行修为 ===== */
.about { padding: 100px 0; background: var(--bg-card); }
.about-content p { max-width: 700px; margin: 0 auto 48px; text-align: center; color: var(--text-muted); font-size: 1.05rem; }
.about-stats { display: flex; justify-content: center; gap: 64px; }
.stat { text-align: center; }
.stat-number { display: block; font-size: 2.4rem; font-weight: 800; color: var(--gold); }
.stat-label { font-size: 0.9rem; color: var(--text-muted); }

/* ===== 功法秘籍 ===== */
.skills { padding: 100px 0; }
.skills-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 24px; }
.skill-card {
    background: var(--bg-card); padding: 36px 28px; border-radius: var(--radius);
    border: 1px solid var(--border); transition: all var(--transition); text-align: center;
}
.skill-card:hover {
    transform: translateY(-6px);
    border-color: var(--primary);
    box-shadow: 0 8px 32px rgba(167,139,250,0.15);
}
.skill-icon { font-size: 2.4rem; margin-bottom: 16px; }
.skill-card h3 { font-size: 1.15rem; font-weight: 600; margin-bottom: 8px; color: var(--gold); }
.skill-card p { color: var(--text-muted); font-size: 0.9rem; }

/* ===== 仙器法宝 ===== */
.projects { padding: 100px 0; background: var(--bg-card); }
.projects-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 24px; }
.project-card {
    background: var(--bg); border-radius: var(--radius); border: 1px solid var(--border);
    overflow: hidden; transition: all var(--transition);
}
.project-card:hover {
    transform: translateY(-6px); box-shadow: var(--shadow); border-color: var(--primary);
}
.project-image { height: 180px; display: flex; align-items: center; justify-content: center; font-size: 3rem; }
.project-info { padding: 24px; }
.project-info h3 { font-size: 1.15rem; font-weight: 600; margin-bottom: 8px; color: var(--gold); }
.project-info p { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 16px; }
.project-tags { display: flex; gap: 8px; flex-wrap: wrap; }
.project-tags span {
    background: var(--bg-light); color: var(--primary); padding: 4px 12px;
    border-radius: 20px; font-size: 0.8rem; font-weight: 500;
}

/* ===== 飞剑传书 ===== */
.status-badge { display: inline-block; vertical-align: middle; margin-left: 14px; padding: 4px 14px; border-radius: 20px; font-size: 0.65rem; font-weight: 600; letter-spacing: 1px; background: linear-gradient(135deg, rgba(251,191,36,0.18), rgba(251,191,36,0.06)); border: 1px solid rgba(251,191,36,0.35); color: var(--gold); -webkit-text-fill-color: var(--gold); background-clip: border-box; position: relative; top: -4px; }
body.mortal.home-page .status-badge { background: #dbeafe; border-color: #93c5fd; color: #2563eb; }

.contact { padding: 100px 0; }
.contact-intro { text-align: center; color: var(--text-muted); margin-bottom: 40px; font-size: 1.05rem; }
.contact-links { display: flex; justify-content: center; gap: 32px; flex-wrap: wrap; }
.contact-item {
    display: flex; align-items: center; gap: 10px; padding: 16px 28px;
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius); transition: all var(--transition); font-size: 0.95rem;
}
.contact-item:hover { border-color: var(--gold); transform: translateY(-3px); box-shadow: 0 4px 16px rgba(240,192,96,0.15); }
.contact-icon { font-size: 1.3rem; }

/* ===== 页脚 ===== */
.footer { padding: 32px 0; text-align: center; border-top: 1px solid var(--border); color: var(--text-muted); font-size: 0.9rem; }

/* ===== 滚动动画 ===== */
.fade-in { opacity: 0; transform: translateY(30px); transition: opacity 0.6s ease, transform 0.6s ease; }
.fade-in.visible { opacity: 1; transform: translateY(0); }

/* ===== 仙凡切换按钮 ===== */
.mode-toggle {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: 2px solid #3b82f6;
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    color: #fff;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    box-shadow: 0 4px 20px rgba(59, 130, 246, 0.3);
    transition: all 0.3s ease;
    backdrop-filter: blur(8px);
}
.mode-toggle:hover {
    background: linear-gradient(135deg, #2563eb, #1e40af);
    transform: scale(1.15);
    box-shadow: 0 6px 28px rgba(59, 130, 246, 0.4);
}
.mode-toggle:active {
    transform: scale(0.95);
}

/* ===== 响应式 ===== */
@media (max-width: 768px) {
    .hero .container { flex-direction: column-reverse; text-align: center; gap: 40px; }
    .hero-content h1 { font-size: 2.4rem; }
    .description { margin: 0 auto 32px; }
    .hero-buttons { justify-content: center; }
    .avatar-placeholder { width: 180px; height: 180px; font-size: 3.5rem; }
    .nav-links { display: none; position: absolute; top: 64px; left: 0; right: 0; flex-direction: column; background: rgba(12,10,29,0.96); backdrop-filter: blur(16px); padding: 20px; gap: 16px; border-bottom: 1px solid var(--border); }
    .nav-links.open { display: flex; }
    .menu-toggle { display: block; }
    .about-stats { gap: 32px; }
    .contact-links { flex-direction: column; align-items: center; }
}
@media (max-width: 480px) {
    .hero-content h1 { font-size: 2rem; }
    .section-title { font-size: 1.6rem; }
    .skills-grid { grid-template-columns: 1fr; }
    .projects-grid { grid-template-columns: 1fr; }
    .about-stats { gap: 20px; }
}
