/* 科技风全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #00d4ff;
    --secondary-color: #7c3aed;
    --accent-color: #10b981;
    --bg-dark: #1a1f2e;
    --bg-darker: #141824;
    --bg-card: #252b3d;
    --bg-card-hover: #2d3548;
    --text-color: #e2e8f0;
    --text-light: #94a3b8;
    --border-color: #3d4559;
    --code-bg: #1e2432;
    --gradient-1: linear-gradient(135deg, #00d4ff 0%, #7c3aed 100%);
    --gradient-2: linear-gradient(135deg, #7c3aed 0%, #f472b6 100%);
    --glow: 0 0 20px rgba(0, 212, 255, 0.25);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.2);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.3);
    --transition: all 0.3s ease;
}

body {
    font-family: 'Segoe UI', 'SF Pro Display', -apple-system, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-darker);
    overflow-x: hidden;
}

/* 粒子背景画布 */
#particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    z-index: 1;
}

/* 头部导航样式 */
.header {
    background-color: rgba(26, 31, 46, 0.92);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
}

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.nav-brand a {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
    font-family: 'Courier New', monospace;
}

.nav-brand a:hover {
    color: var(--secondary-color);
    text-shadow: var(--glow);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-menu a {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-1);
    transition: width 0.3s ease;
}

.nav-menu a:hover {
    color: var(--primary-color);
}

.nav-menu a:hover::after {
    width: 100%;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 5px;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background-color: var(--text-color);
    transition: var(--transition);
}

/* Hero区域 - 科技风 */
.hero {
    min-height: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    position: relative;
    overflow: hidden;
    padding: 100px 20px 30px;
}

.hero-content {
    max-width: 800px;
    position: relative;
    z-index: 1;
    text-align: center;
}

/* 语言切换 - 导航栏 */
.lang-switch {
    display: flex;
    gap: 0.3rem;
    background: rgba(255, 255, 255, 0.05);
    padding: 0.2rem;
    border-radius: 16px;
    border: 1px solid var(--border-color);
}

.lang-btn {
    padding: 0.35rem 0.7rem;
    background: transparent;
    border: none;
    color: var(--text-light);
    font-size: 0.8rem;
    font-weight: 600;
    border-radius: 12px;
    cursor: pointer;
    transition: var(--transition);
}

.lang-btn:hover {
    color: var(--text-color);
}

.lang-btn.active {
    background: var(--gradient-1);
    color: white;
}

/* 右上角控制栏 - 已移除 */

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
}

.title-bracket {
    color: var(--primary-color);
    font-family: 'Courier New', monospace;
}

.title-text {
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-tagline {
    color: var(--text-light);
    font-size: 1.1rem;
    margin-bottom: 1rem;
    letter-spacing: 2px;
}

.hero-mission {
    color: var(--text-color);
    font-size: 1.25rem;
    line-height: 1.6;
    margin-bottom: 2rem;
    text-align: center;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin-bottom: 2rem;
}

.stat-block {
    text-align: center;
}

.stat-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.25rem;
}

.stat-value::after {
    content: '+';
}

.stat-label {
    color: var(--text-light);
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
}

.stat-bar {
    width: 80px;
    height: 4px;
    background: var(--border-color);
    border-radius: 2px;
    margin: 0 auto;
    overflow: hidden;
}

.stat-progress {
    height: 100%;
    background: var(--gradient-1);
    border-radius: 2px;
    animation: loadProgress 1.5s ease-out;
}

@keyframes loadProgress {
    from { width: 0; }
}

.tech-stack {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 2rem;
}

.tech-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--bg-card);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.tech-item:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.tech-icon {
    font-size: 1.2rem;
}

.tech-name {
    color: var(--text-color);
    font-size: 0.85rem;
    font-weight: 500;
}

.hero-content {
    max-width: 800px;
    position: relative;
    z-index: 1;
}

.terminal-header {
    background: #2d333b;
    padding: 12px 16px;
    border-radius: 12px 12px 0 0;
    display: flex;
    gap: 8px;
    align-items: center;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.dot.red { background: #ff5f56; }
.dot.yellow { background: #ffbd2e; }
.dot.green { background: #27c93a; }

.terminal-body {
    background: var(--code-bg);
    padding: 24px;
    border-radius: 0 0 12px 12px;
    border: 1px solid var(--border-color);
    border-top: none;
    font-family: 'Courier New', 'Consolas', monospace;
    font-size: 1rem;
    line-height: 1.8;
}

.terminal-line {
    margin-bottom: 8px;
}

.prompt {
    color: var(--accent-color);
    margin-right: 8px;
}

.command {
    color: #f8f8f2;
}

.terminal-output {
    color: var(--text-light);
    margin-left: 24px;
    margin-bottom: 16px;
}

.cursor {
    color: var(--primary-color);
    animation: blink 1s infinite;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 2rem;
    flex-wrap: wrap;
}

/* 按钮样式 */
.btn {
    padding: 12px 30px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    font-size: 1rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-icon {
    font-size: 1.1rem;
}

.btn-primary {
    background: var(--gradient-1);
    color: white;
    box-shadow: var(--glow);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 0 30px rgba(0, 212, 255, 0.4);
}

.btn-secondary {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
    background: var(--primary-color);
    color: var(--bg-darker);
    transform: translateY(-3px);
}

/* 通用区块样式 */
.section {
    padding: 80px 0;
    position: relative;
    z-index: 1;
}

.section-compact {
    padding: 20px 0;
}

.section-title-sm {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

/* 紧凑型导航卡片 */
.nav-cards-compact {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.nav-card-compact {
    background: var(--bg-card);
    padding: 0.6rem 1rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    transition: var(--transition);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-card-compact:hover {
    transform: translateY(-2px);
    border-color: var(--primary-color);
    box-shadow: var(--shadow);
    background: var(--bg-card-hover);
}

.nav-card-icon-sm {
    font-size: 1.2rem;
}

.nav-card-title {
    color: var(--text-color);
    font-size: 0.85rem;
    font-weight: 500;
}

.section-alt {
    background-color: rgba(26, 31, 46, 0.6);
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 1rem;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.code-tag {
    font-family: 'Courier New', monospace;
    font-size: 0.7em;
    opacity: 0.5;
}

.section-desc {
    text-align: center;
    color: var(--text-light);
    margin-bottom: 3rem;
    font-size: 1.1rem;
}

/* 导航卡片 */
.nav-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 2rem;
}

.nav-card {
    background: var(--bg-card);
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    transition: var(--transition);
    text-decoration: none;
    display: block;
    position: relative;
    overflow: hidden;
}

.nav-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-1);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.nav-card:hover {
    transform: translateY(-8px);
    border-color: var(--primary-color);
    box-shadow: var(--shadow-lg);
    background: var(--bg-card-hover);
}

.nav-card:hover::before {
    opacity: 1;
}

.nav-card-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.nav-card h3 {
    margin-bottom: 0.75rem;
    color: var(--text-color);
    font-size: 1.3rem;
}

.nav-card p {
    color: var(--text-light);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* 卡片网格 */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}

.tech-card {
    background: var(--bg-card);
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.tech-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-1);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.tech-card:hover {
    transform: translateY(-8px);
    border-color: var(--primary-color);
    box-shadow: var(--shadow-lg);
    background: var(--bg-card-hover);
}

.tech-card:hover::before {
    opacity: 1;
}

.tech-card-link {
    cursor: pointer;
    text-decoration: none;
    display: block;
}

.tech-card-link h3,
.tech-card-link p {
    color: inherit;
}

.tech-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.tech-card h3 {
    margin-bottom: 0.75rem;
    color: var(--text-color);
    font-size: 1.3rem;
}

.tech-card p {
    color: var(--text-light);
    font-size: 0.95rem;
    margin-bottom: 1rem;
    line-height: 1.7;
}

.tech-tags {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.tech-tags span {
    background: rgba(0, 212, 255, 0.1);
    color: var(--primary-color);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    border: 1px solid rgba(0, 212, 255, 0.2);
}

/* 联系区域样式 */
.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.contact-info {
    position: relative;
    z-index: 1;
}

.contact-code {
    background: var(--code-bg);
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    overflow-x: auto;
}

.contact-code pre {
    margin: 0;
}

.contact-code code {
    font-family: 'Courier New', 'Consolas', monospace;
    font-size: 0.95rem;
    line-height: 1.8;
    color: #f8f8f2;
}

.contact-code .keyword {
    color: #c678dd;
}

.contact-code .property {
    color: #e06c75;
}

.contact-code .string {
    color: #98c379;
}

.contact-code .boolean {
    color: #56b6c2;
}

.contact-desc {
    color: var(--text-light);
    margin-top: 1.5rem;
    line-height: 1.8;
}

/* 表单样式 */
.contact-form {
    background: var(--bg-card);
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
    font-weight: 500;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    background: var(--bg-dark);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 1rem;
    transition: var(--transition);
    font-family: inherit;
    color: var(--text-color);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.1);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-light);
}

/* 页脚样式 */
.footer {
    background: #FFFFFF !important;
    background-color: #FFFFFF !important;
    border-top: 3px solid #00d4ff !important;
    padding: 2rem 0 !important;
    position: relative !important;
    z-index: 9999 !important;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15) !important;
    margin-top: 2rem !important;
    opacity: 1 !important;
}

.footer * {
    opacity: 1 !important;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.8rem;
    background: #FFFFFF !important;
    opacity: 1 !important;
}

.copyright {
    color: #6B7280;
    font-size: 0.9rem;
    font-weight: 400;
}

.beian a,
.beian-info a {
    color: #1F2937;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.beian-info a:hover {
    color: #2563EB;
}

.beian-info {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
    padding: 10px 20px;
    background: #F3F4F6;
    border-radius: 6px;
}

.beian-divider {
    color: #9CA3AF;
    font-weight: 300;
}

/* AI助手悬浮按钮 - 动漫真人角色 */
.ai-float-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 60px;
    height: 110px;
    background: transparent;
    border: none;
    cursor: grab;
    z-index: 9999;
    user-select: none;
    filter: drop-shadow(0 5px 15px rgba(0, 0, 0, 0.2));
}

.ai-float-btn:active {
    cursor: grabbing;
}

/* 角色容器 */
.human-character {
    position: relative;
    width: 60px;
    height: 110px;
}

.character-body {
    position: relative;
    width: 100%;
    height: 100%;
}

/* 头部 */
.character-head {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 28px;
    height: 32px;
    z-index: 5;
}

/* 头发 */
.hair {
    position: absolute;
    width: 32px;
    height: 20px;
    background: linear-gradient(180deg, #2c1810 0%, #3d2817 50%, #4a3420 100%);
    border-radius: 50% 50% 20% 20%;
    top: -3px;
    left: -2px;
}

.hair::before {
    content: '';
    position: absolute;
    width: 8px;
    height: 12px;
    background: #2c1810;
    border-radius: 50%;
    top: 2px;
    left: 2px;
}

/* 脸 */
.face {
    position: absolute;
    width: 26px;
    height: 28px;
    background: linear-gradient(180deg, #fce4d6 0%, #f5d0c0 100%);
    border-radius: 50% 50% 45% 45%;
    top: 4px;
    left: 1px;
}

/* 眉毛 */
.eyebrows {
    position: absolute;
    top: 6px;
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 4px;
}

.eyebrow {
    width: 6px;
    height: 2px;
    background: #2c1810;
    border-radius: 1px;
}

/* 眼睛 */
.eyes {
    position: absolute;
    top: 10px;
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 4px;
}

.eye {
    width: 6px;
    height: 6px;
    background: white;
    border-radius: 50%;
    position: relative;
}

.pupil {
    position: absolute;
    width: 4px;
    height: 4px;
    background: radial-gradient(circle at 30% 30%, #4a3728 0%, #1a0f0a 100%);
    border-radius: 50%;
    top: 1px;
    left: 1px;
}

.pupil::after {
    content: '';
    position: absolute;
    width: 1.5px;
    height: 1.5px;
    background: white;
    border-radius: 50%;
    top: 0.5px;
    left: 0.5px;
}

/* 鼻子 */
.nose {
    position: absolute;
    top: 16px;
    left: 50%;
    transform: translateX(-50%);
    width: 3px;
    height: 4px;
    background: #e8c4b4;
    border-radius: 50%;
}

/* 嘴巴 */
.mouth {
    position: absolute;
    bottom: 5px;
    left: 50%;
    transform: translateX(-50%);
    width: 5px;
    height: 2px;
    background: #d4847a;
    border-radius: 0 0 3px 3px;
}

/* 脖子 */
.neck {
    position: absolute;
    top: 32px;
    left: 50%;
    transform: translateX(-50%);
    width: 8px;
    height: 6px;
    background: #fce4d6;
    z-index: 4;
}

/* 身体 */
.torso {
    position: absolute;
    top: 36px;
    left: 50%;
    transform: translateX(-50%);
    width: 26px;
    height: 30px;
    background: linear-gradient(180deg, #3b82f6 0%, #2563eb 100%);
    border-radius: 6px 6px 2px 2px;
    z-index: 3;
}

.shirt-collar {
    position: absolute;
    top: 2px;
    left: 50%;
    transform: translateX(-50%);
    width: 12px;
    height: 3px;
    background: white;
    border-radius: 0 0 3px 3px;
}

.shirt-detail {
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 1px;
    height: 18px;
    background: rgba(255,255,255,0.3);
}

/* 手臂 */
.arm {
    position: absolute;
    top: 38px;
    width: 10px;
    height: 25px;
    z-index: 2;
    transform-origin: top center;
}

.arm.left {
    left: 5px;
}

.arm.right {
    right: 5px;
}

.upper-arm {
    width: 8px;
    height: 12px;
    background: linear-gradient(180deg, #3b82f6 0%, #2563eb 100%);
    border-radius: 3px;
    margin: 0 auto;
}

.lower-arm {
    width: 7px;
    height: 10px;
    background: #fce4d6;
    border-radius: 3px;
    margin: 2px auto 0;
    position: relative;
}

.hand {
    position: absolute;
    bottom: -4px;
    left: 50%;
    transform: translateX(-50%);
    width: 8px;
    height: 6px;
    background: #fce4d6;
    border-radius: 3px;
}

/* 裤子 */
.pants {
    position: absolute;
    top: 64px;
    left: 50%;
    transform: translateX(-50%);
    width: 24px;
    height: 8px;
    background: linear-gradient(180deg, #1e3a5f 0%, #152a45 100%);
    border-radius: 2px;
    z-index: 2;
}

/* 腿 */
.legs {
    position: absolute;
    top: 70px;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 30px;
}

.leg {
    position: absolute;
    width: 8px;
    height: 30px;
    transform-origin: top center;
}

.leg.left { left: 0; }
.leg.right { right: 0; }

.leg::before {
    content: '';
    position: absolute;
    width: 7px;
    height: 22px;
    background: linear-gradient(180deg, #1e3a5f 0%, #152a45 100%);
    border-radius: 2px;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
}

.foot {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 9px;
    height: 5px;
    background: #2d1b0e;
    border-radius: 2px;
}

/* 阴影 */
.character-shadow {
    position: absolute;
    bottom: -3px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 8px;
    background: radial-gradient(ellipse, rgba(0,0,0,0.25) 0%, transparent 70%);
}

/* 配饰 - 咖啡杯 */
.coffee-cup {
    position: absolute;
    top: 48px;
    right: -8px;
    width: 14px;
    height: 18px;
    opacity: 0;
    z-index: 10;
}

.cup-body {
    width: 10px;
    height: 14px;
    background: linear-gradient(180deg, #fff 0%, #e0e0e0 100%);
    border-radius: 0 0 3px 3px;
    border: 1px solid #ccc;
}

.cup-handle {
    position: absolute;
    right: -4px;
    top: 3px;
    width: 5px;
    height: 8px;
    border: 2px solid #ccc;
    border-left: none;
    border-radius: 0 3px 3px 0;
}

.steam {
    position: absolute;
    top: -6px;
    left: 50%;
    transform: translateX(-50%);
    width: 6px;
    height: 6px;
}

.steam::before,
.steam::after {
    content: '';
    position: absolute;
    width: 2px;
    height: 5px;
    background: rgba(255,255,255,0.6);
    border-radius: 2px;
    animation: steam-rise 1s ease-in-out infinite;
}

.steam::before { left: 0; }
.steam::after { right: 0; animation-delay: 0.3s; }

@keyframes steam-rise {
    0% { opacity: 0; transform: translateY(0); }
    50% { opacity: 1; }
    100% { opacity: 0; transform: translateY(-5px); }
}

/* 配饰 - 笔记本 */
.laptop {
    position: absolute;
    top: 55px;
    left: -12px;
    width: 18px;
    height: 14px;
    opacity: 0;
    z-index: 10;
}

.laptop-screen {
    width: 16px;
    height: 10px;
    background: linear-gradient(180deg, #1a1a2e 0%, #16213e 100%);
    border: 1px solid #333;
    border-radius: 2px 2px 0 0;
}

.laptop-screen::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 12px;
    height: 6px;
    background: linear-gradient(90deg, #00d4ff 0%, #7c3aed 100%);
    opacity: 0.5;
}

.laptop-base {
    width: 18px;
    height: 2px;
    background: #888;
    border-radius: 0 0 2px 2px;
}

/* ===== 动作动画 ===== */

/* 待机 */
.action-idle .character-body {
    animation: idle-breathe 3s ease-in-out infinite;
}

@keyframes idle-breathe {
    0%, 100% { transform: scaleY(1); }
    50% { transform: scaleY(1.02); }
}

/* 走路 */
.action-walk .leg.left {
    animation: walk-leg 0.5s ease-in-out infinite;
}

.action-walk .leg.right {
    animation: walk-leg 0.5s ease-in-out infinite 0.25s;
}

.action-walk .arm.left {
    animation: walk-arm 0.5s ease-in-out infinite 0.25s;
}

.action-walk .arm.right {
    animation: walk-arm 0.5s ease-in-out infinite;
}

.action-walk .character-body {
    animation: walk-body 0.25s ease-in-out infinite;
}

@keyframes walk-leg {
    0%, 100% { transform: rotate(15deg); }
    50% { transform: rotate(-15deg); }
}

@keyframes walk-arm {
    0%, 100% { transform: rotate(10deg); }
    50% { transform: rotate(-10deg); }
}

@keyframes walk-body {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-2px); }
}

/* 思考 */
.action-think .character-head {
    animation: think-head 2s ease-in-out infinite;
}

.action-think .arm.right {
    animation: think-arm 2s ease-in-out infinite;
}

@keyframes think-head {
    0%, 100% { transform: translateX(-50%) rotate(0deg); }
    50% { transform: translateX(-50%) rotate(8deg) translateY(2px); }
}

@keyframes think-arm {
    0%, 100% { transform: rotate(0deg); }
    50% { transform: rotate(-40deg) translateX(-3px); }
}

/* 伸懒腰 */
.action-stretch .arm.left,
.action-stretch .arm.right {
    animation: stretch-arms 2s ease-in-out;
}

.action-stretch .character-head {
    animation: stretch-head 2s ease-in-out;
}

@keyframes stretch-arms {
    0%, 100% { transform: rotate(0deg); }
    30%, 70% { transform: rotate(-80deg); }
}

@keyframes stretch-head {
    0%, 100% { transform: translateX(-50%) rotate(0deg); }
    50% { transform: translateX(-50%) rotate(-10deg) translateY(-3px); }
}

/* 喝咖啡 */
.action-coffee .coffee-cup {
    opacity: 1;
    animation: coffee-show 3s ease-in-out;
}

.action-coffee .arm.right {
    animation: coffee-arm 3s ease-in-out;
}

.action-coffee .character-head {
    animation: coffee-head 3s ease-in-out;
}

@keyframes coffee-show {
    0%, 100% { opacity: 0; }
    20%, 80% { opacity: 1; }
}

@keyframes coffee-arm {
    0%, 100% { transform: rotate(0deg); }
    20%, 80% { transform: rotate(-60deg) translateY(-5px); }
}

@keyframes coffee-head {
    0%, 20%, 80%, 100% { transform: translateX(-50%) rotate(0deg); }
    40%, 60% { transform: translateX(-50%) rotate(15deg) translateY(-3px); }
}

/* 敲代码 */
.action-code .laptop {
    opacity: 1;
    animation: code-laptop 4s ease-in-out;
}

.action-code .arm.left,
.action-code .arm.right {
    animation: code-type 0.3s ease-in-out infinite;
}

.action-code .character-head {
    animation: code-head 4s ease-in-out;
}

@keyframes code-laptop {
    0%, 100% { opacity: 0; }
    10%, 90% { opacity: 1; }
}

@keyframes code-type {
    0%, 100% { transform: rotate(10deg); }
    50% { transform: rotate(15deg) translateY(2px); }
}

@keyframes code-head {
    0%, 100% { transform: translateX(-50%) rotate(0deg); }
    50% { transform: translateX(-50%) rotate(-5deg) translateY(2px); }
}

/* 看手机 */
.action-phone .arm.right {
    animation: phone-arm 3s ease-in-out;
}

.action-phone .character-head {
    animation: phone-head 3s ease-in-out;
}

@keyframes phone-arm {
    0%, 100% { transform: rotate(0deg); }
    20%, 80% { transform: rotate(-30deg) translateY(-8px); }
}

@keyframes phone-head {
    0%, 20%, 80%, 100% { transform: translateX(-50%) rotate(0deg); }
    40%, 60% { transform: translateX(-50%) rotate(20deg) translateY(5px); }
}

/* 挥手 */
.action-wave .arm.right {
    animation: wave-hand 0.5s ease-in-out 3;
}

.action-wave .character-head {
    animation: wave-head 0.5s ease-in-out 3;
}

@keyframes wave-hand {
    0%, 100% { transform: rotate(0deg); }
    50% { transform: rotate(-50deg); }
}

@keyframes wave-head {
    0%, 100% { transform: translateX(-50%) rotate(0deg); }
    50% { transform: translateX(-50%) rotate(10deg); }
}

/* AI助手弹出窗口 */
.ai-chat-popup {
    position: fixed;
    bottom: 100px;
    right: 30px;
    width: 380px;
    max-height: 600px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    z-index: 9998;
    display: none;
    flex-direction: column;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

.ai-chat-popup.active {
    display: flex;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.ai-popup-header {
    background: var(--gradient-1);
    padding: 15px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.ai-popup-title {
    color: white;
    font-weight: 600;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.ai-popup-close {
    background: rgba(255,255,255,0.2);
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    color: white;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.ai-popup-close:hover {
    background: rgba(255,255,255,0.3);
}

.ai-popup-messages {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 400px;
}

.ai-popup-message {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    max-width: 90%;
}

.ai-popup-message.user {
    flex-direction: row-reverse;
    align-self: flex-end;
}

.ai-popup-message.assistant {
    align-self: flex-start;
}

.message-avatar {
    font-size: 1.2rem;
    flex-shrink: 0;
}

.user-avatar {
    font-size: 1.2rem;
}

.message-content {
    padding: 10px 14px;
    border-radius: 12px;
    font-size: 0.9rem;
    line-height: 1.5;
    max-width: 100%;
    word-wrap: break-word;
}

.ai-popup-message.user .message-content {
    background: var(--gradient-1);
    color: white;
}

.ai-popup-message.assistant .message-content {
    background: var(--bg-card-hover);
    color: var(--text-color);
}

.ai-popup-input-area {
    padding: 15px;
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 10px;
}

.ai-popup-input {
    flex: 1;
    background: var(--bg-darker);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 10px 14px;
    color: var(--text-color);
    font-size: 0.9rem;
    outline: none;
    transition: var(--transition);
}

.ai-popup-input:focus {
    border-color: var(--primary-color);
}

.ai-popup-send {
    background: var(--gradient-1);
    border: none;
    border-radius: 12px;
    padding: 10px 16px;
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.ai-popup-send:hover {
    transform: scale(1.05);
}

.ai-popup-send:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* AI助手打字动画 */
.typing-indicator {
    display: flex;
    gap: 4px;
    padding: 10px 14px;
    background: var(--bg-card-hover);
    border-radius: 12px;
    align-self: flex-start;
}

.typing-indicator span {
    width: 8px;
    height: 8px;
    background: var(--primary-color);
    border-radius: 50%;
    animation: typing 1.4s infinite;
}

.typing-indicator span:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-indicator span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typing {
    0%, 100% {
        opacity: 0.3;
        transform: scale(0.8);
    }
    50% {
        opacity: 1;
        transform: scale(1);
    }
}

.beian a:hover {
    color: var(--primary-color);
}

/* 响应式设计 */
@media (max-width: 968px) {
    .contact-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

@media (max-width: 768px) {
    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: var(--bg-dark);
        flex-direction: column;
        padding: 1rem;
        gap: 0;
        border-bottom: 1px solid var(--border-color);
    }

    .nav-menu.active {
        display: flex;
    }

    .nav-menu li {
        width: 100%;
    }

    .nav-menu a {
        display: block;
        padding: 1rem;
        border-bottom: 1px solid var(--border-color);
    }

    .nav-menu a::after {
        display: none;
    }

    .hamburger {
        display: flex;
    }
    
    .lang-switch {
        display: none;
    }

    .hero {
        padding: 100px 20px 40px;
    }

    .terminal-body {
        font-size: 0.85rem;
    }

    .hero-buttons {
        flex-direction: column;
    }

    .btn {
        width: 100%;
        text-align: center;
    }

    .section-title {
        font-size: 2rem;
    }

    .cards-grid,
    .nav-cards {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .nav {
        padding: 1rem;
    }

    .hero-content {
        padding: 0 10px;
    }

    .section {
        padding: 60px 0;
    }

    .section-title {
        font-size: 1.75rem;
        margin-bottom: 2rem;
    }

    .tech-card,
    .nav-card {
        padding: 1.5rem;
    }
}

/* 平滑滚动 */
html {
    scroll-behavior: smooth;
}

/* 选择文本样式 */
::selection {
    background-color: var(--primary-color);
    color: var(--bg-darker);
}

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-darker);
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color);
}
