/* ========== 全局引入华康少女文字 ========== */
@font-face {
    font-family: 'HuaKang';
    src: url('华康少女文字 - Kelvin.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

/* ========== 滚动下滑加载动画基础样式 ========== */
.fade-in-section {
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}
.fade-in-section.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* ===== CSS变量 - 主题系统 ===== */
:root {
    /* 亮色主题 */
    --bg-primary: #f0f4f8;
    --bg-secondary: #ffffff;
    --bg-gradient-1: #667eea;
    --bg-gradient-2: #764ba2;
    --bg-gradient-3: #f093fb;
    --bg-gradient-4: #f5576c;
    
    --text-primary: #1a202c;
    --text-secondary: #4a5568;
    --text-muted: #718096;
    
    --glass-bg: rgba(255, 255, 255, 0.25);
    --glass-border: rgba(255, 255, 255, 0.3);
    --glass-shadow: rgba(0, 0, 0, 0.1);
    
    --accent-primary: #667eea;
    --accent-secondary: #764ba2;
    --accent-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    
    --card-bg: rgba(255, 255, 255, 0.7);
    --input-bg: rgba(255, 255, 255, 0.5);
    
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
    --transition-bounce: 0.5 cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

[data-theme="dark"] {
    /* 暗色主题 */
    --bg-primary: #0f0f1a;
    --bg-secondary: #1a1a2e;
    --bg-gradient-1: #1a1a2e;
    --bg-gradient-2: #16213e;
    --bg-gradient-3: #0f3460;
    --bg-gradient-4: #533483;
    
    --text-primary: #f7fafc;
    --text-secondary: #e2e8f0;
    --text-muted: #a0aec0;
    
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-shadow: rgba(0, 0, 0, 0.3);
    
    --accent-primary: #818cf8;
    --accent-secondary: #a78bfa;
    --accent-gradient: linear-gradient(135deg, #818cf8 0%, #a78bfa 100%);
    
    --card-bg: rgba(30, 30, 50, 0.7);
    --input-bg: rgba(255, 255, 255, 0.08);
}

/* ===== 基础重置 ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

/* ========== 全局应用华康少女字体 ========== */
body {
    font-family: 'HuaKang', -apple-system, BlinkMacSystemFont, "Microsoft YaHei", sans-serif !important;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    transition: background-color var(--transition-slow), color var(--transition-slow);
}

/* ===== 背景动画 ===== */
.bg-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.bg-gradient {
    position: absolute;
    width: 200%;
    height: 200%;
    top: -50%;
    left: -50%;
    background: 
        radial-gradient(circle at 20% 80%, var(--bg-gradient-1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, var(--bg-gradient-2) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, var(--bg-gradient-3) 0%, transparent 40%),
        radial-gradient(circle at 60% 60%, var(--bg-gradient-4) 0%, transparent 40%);
    opacity: 0.3;
    animation: gradientMove 20s ease-in-out infinite;
}

@keyframes gradientMove {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    25% { transform: translate(2%, 2%) rotate(5deg); }
    50% { transform: translate(-1%, 3%) rotate(-5deg); }
    75% { transform: translate(3%, -2%) rotate(3deg); }
}

.floating-shapes {
    position: absolute;
    width: 100%;
    height: 100%;
}

.shape {
    position: absolute;
    border-radius: 50%;
    background: var(--accent-gradient);
    opacity: 0.1;
    filter: blur(60px);
    animation: float 15s ease-in-out infinite;
}

.shape-1 {
    width: 400px;
    height: 400px;
    top: 10%;
    left: 10%;
    animation-delay: 0s;
}

.shape-2 {
    width: 300px;
    height: 300px;
    top: 60%;
    right: 10%;
    animation-delay: -3s;
}

.shape-3 {
    width: 250px;
    height: 250px;
    bottom: 10%;
    left: 30%;
    animation-delay: -6s;
}

.shape-4 {
    width: 350px;
    height: 350px;
    top: 30%;
    right: 30%;
    animation-delay: -9s;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(30px, -30px) scale(1.1); }
    50% { transform: translate(-20px, 20px) scale(0.9); }
    75% { transform: translate(20px, 40px) scale(1.05); }
}

/* ===== 毛玻璃效果 ===== */
.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    box-shadow: 0 8px 32px var(--glass-shadow);
}

.glass-btn {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    transition: all var(--transition-normal);
}

.glass-btn:hover {
    background: rgba(255, 255, 255, 0.35);
    transform: translateY(-3px);
    box-shadow: 0 10px 40px var(--glass-shadow);
}

/* ===== 导航栏 ===== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 5%;
    z-index: 1000;
    transition: all var(--transition-normal);
}

.navbar.scrolled {
    height: 60px;
    background: var(--card-bg);
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

.logo {
    font-size: 1.8rem;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* 导航菜单 —— 完美居中（电脑端专用） */
.nav-links {
    display: flex;
    list-style: none;
    gap: 10px;
    margin: 0 auto;
}

/* 导航文字永久黑色 */
.nav-link {
    position: relative;
    padding: 10px 20px;
    text-decoration: none;
    color: #000 !important;
    font-weight: 500;
    border-radius: 25px;
    transition: all var(--transition-normal);
}

.nav-link:hover,
.nav-link.active {
    color: #000 !important;
    background: var(--glass-bg);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 5px;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--accent-gradient);
    transition: all var(--transition-normal);
    transform: translateX(-50%);
    border-radius: 2px;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 30px;
}

/* 右侧按钮组 */
.nav-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* 头像放大 40px */
.user-avatar {
    width: 50px !important;
    height: 50px !important;
    border-radius: 50%;
    object-fit: cover;
}

/* 未登录文字黑色 */
.unlogin-text {
    color: #000 !important;
    font-size: 14px;
    text-decoration: none;
}

/* ===== 主题切换按钮 ===== */
.theme-toggle {
    position: relative;
    width: 45px;
    height: 45px;
    border: none;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border-radius: 50%;
    cursor: pointer;
    overflow: hidden;
    transition: all var(--transition-normal);
    border: 1px solid var(--glass-border);
}

.theme-toggle:hover {
    transform: rotate(15deg) scale(1.1);
}

.theme-toggle i {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font: 1.2rem;
    transition: all var(--transition-normal);
}

.theme-toggle .fa-sun {
    color: #fbbf24;
    opacity: 1;
    transform: translate(-50%, -50%) rotate(0deg);
}

.theme-toggle .fa-moon {
    color: #818cf8;
    opacity: 0;
    transform: translate(-50%, -50%) rotate(-90deg);
}

[data-theme="dark"] .theme-toggle .fa-sun {
    opacity: 0;
    transform: translate(-50%, -50%) rotate(90deg);
}

[data-theme="dark"] .theme-toggle .fa-moon {
    opacity: 1;
    transform: translate(-50%, -50%) rotate(0deg);
}

/* ===== 移动端菜单 ===== */
.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 45px;
    height: 45px;
    border: none;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border-radius: 10px;
    cursor: pointer;
    gap: 5px;
    border: 1px solid var(--glass-border);
}

.menu-toggle span {
    width: 20px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: all var(--transition-normal);
}

.menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

.mobile-menu {
    position: fixed;
    top: 80px;
    left: 5%;
    right: 5%;
    padding: 20px;
    border-radius: 20px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-20px);
    transition: all var(--transition-normal);
    z-index: 999;
}

.mobile-menu.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.mobile-nav-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.mobile-nav-links .nav-link {
    display: block;
    padding: 15px 20px;
    text-align: center;
    border-radius: 15px;
}

/* ===== Hero 区域 ===== */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 100px 5% 50px;
    position: relative;
}

.hero-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 50px;
    max-width: 1200px;
    width: 100%;
}

.hero-text {
    flex: 1;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 15px;
    line-height: 1.2;
}

.hero-desc {
    font-size: 1.1rem;
    color: var(--text-muted);
    max-width: 600px;
    margin-bottom: 30px;
}

.hero-buttons {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 15px 30px;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all var(--transition-normal);
}

.btn-primary {
    background: var(--accent-gradient);
    color: white;
    border: none;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: transparent;
    color: var(--text-primary);
    border: 2px solid var(--accent-primary);
}

.btn-secondary:hover {
    background: var(--accent-primary);
    color: white;
}

.hero-visual {
    flex: 0 0 auto;
}

/* 纯图片样式 无任何装饰 */
.hero-image {
    width: 380px;
    height: auto;
    object-fit: contain;
    animation: floatImage 6s ease-in-out infinite;
}

@keyframes floatImage {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

/* ===== 通用区域样式 ===== */
.section {
    padding: 100px 5%;
    min-height: auto;
    display: flex;
    align-items: center;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.section-title {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 60px;
    text-align: center;
    color: var(--text-primary);
}

.title-icon {
    font-size: 2.5rem;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* 网格布局 */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
}

/* 卡片通用样式 */
.card {
    padding: 32px;
    height: 100%;
    border-radius: 25px;
}

.card i {
    font-size: 30px;
    margin-bottom: 18px;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.card h3 {
    font-size: 20px;
    margin-bottom: 15px;
    color: var(--text-primary);
}

.detail-list {
    line-height: 1.8;
    color: var(--text-muted);
    font-size: 15px;
}

.data-number {
    font-size: 34px;
    font-weight: bold;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin: 15px 0;
}

/* 团队成员 */
.member-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    margin: 0 auto 20px;
    object-fit: cover;
    border: 3px solid var(--accent-primary);
}

.team-card {
    text-align: center;
    padding: 30px;
    border-radius: 25px;
}

.team-role {
    color: var(--accent-primary);
    font-weight: 600;
    margin: 10px 0;
}

/* ===== 关于我们 专属布局：左图 + 右大玻璃 ===== */
.about-wrapper {
    display: flex;
    align-items: center;
    gap: 40px;
    max-width: 1100px;
    margin: 0 auto;
}
.about-img {
    width: 380px;
    height: 380px;
    border-radius: 20px;
    object-fit: cover;
    flex-shrink: 0;
}
.about-content {
    flex: 1;
    padding: 40px;
    border-radius: 25px;
    line-height: 2;
    font-size: 16px;
}

/* ===== 作品展示 专属样式：一图一名一介绍 ===== */
.work-card {
    border-radius: 25px;
    overflow: hidden;
    text-align: center;
}
.work-img {
    width: 100%;
    height: 280px;
    object-fit: cover;
    border-radius: 20px;
    margin-bottom: 20px;
}
.work-title {
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 10px;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.work-desc {
    color: var(--text-muted);
    line-height: 1.6;
    padding: 0 10px;
}

/* ===== 页脚 ===== */
.footer {
    padding: 40px 5%;
    margin-top: 50px;
    border-radius: 30px 30px 0 0;
    text-align: center;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    color: var(--text-muted);
}

/* ===== 回到顶部 ===== */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all var(--transition-normal);
    z-index: 100;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* ===== 响应式设计 ===== */
@media (max-width: 992px) {
    .nav-links {
        display: none;
    }
    .menu-toggle {
        display: flex;
    }
    .hero-content {
        flex-direction: column-reverse;
        text-align: center;
    }
    .hero-text {
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    .hero-desc {
        text-align: center;
    }
    .hero-buttons {
        justify-content: center;
    }
    .hero-image {
        width: 300px;
    }
    /* 关于我们响应式 */
    .about-wrapper {
        flex-direction: column;
        text-align: center;
    }
    .about-img {
        width: 300px;
        height: 300px;
    }
}

@media (max-width: 768px) {
    .section {
        padding: 80px 5%;
    }
    .section-title {
        font-size: 2rem;
    }
    .hero-title {
        font-size: 2.5rem;
    }
    .hero-image {
        width: 260px;
    }
    .about-img {
        width: 260px;
        height: 260px;
    }
}

@media (max-width: 480px) {
    .hero-image {
        width: 220px;
    }
    .about-img {
        width: 220px;
        height: 220px;
    }
}