/* ========== 全局样式 ========== */
:root {
    /* 主色调 */
    --primary-color: #6c5ce7;
    --primary-light: #a29bfe;
    --primary-dark: #4834d4;
    
    /* 中性色 */
    --bg-color: #f9fafb;
    --bg-dark: #0c0c16;
    --text-color: #2d3748;
    --text-light: #718096;
    --text-dark: #1a202c;
    --border-color: #e2e8f0;
    
    /* 交互色 */
    --success-color: #38b2ac;
    --warning-color: #ecc94b;
    --danger-color: #e53e3e;
    
    /* 尺寸 */
    --header-height: 70px;
    --container-max-width: 1200px;
    --section-spacing: 100px;
    --card-border-radius: 12px;
    
    /* 动画 */
    --transition-fast: 0.3s;
    --transition-normal: 0.5s;
    --transition-slow: 0.8s;
    
    /* 阴影 */
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.1), 0 1px 3px rgba(0,0,0,0.08);
    --shadow-lg: 0 10px 25px rgba(0,0,0,0.1), 0 5px 10px rgba(0,0,0,0.05);
    --shadow-hover: 0 14px 28px rgba(0,0,0,0.15), 0 10px 10px rgba(0,0,0,0.10);
}

/* 暗黑模式变量 */
[data-theme="dark"] {
    --bg-color: #0c0c16;
    --bg-dark: #070710;
    --text-color: #e2e8f0;
    --text-light: #a0aec0;
    --text-dark: #f7fafc;
    --border-color: #2d3748;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Noto Sans SC', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    font-size: 16px;
    line-height: 1.6;
    transition: background-color var(--transition-normal), color var(--transition-normal);
}

a {
    text-decoration: none;
    color: var(--primary-color);
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--primary-dark);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

.container {
    width: 100%;
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 0 20px;
}

.section-header {
    text-align: center;
    margin-bottom: 50px;
}

.section-header h2 {
    font-size: 2.5rem;
    margin-bottom: 15px;
    position: relative;
    display: inline-block;
}

.section-header h2::after {
    content: '';
    position: absolute;
    width: 60px;
    height: 4px;
    background: var(--primary-color);
    left: 50%;
    bottom: -10px;
    transform: translateX(-50%);
    border-radius: 2px;
}

.section-header p {
    color: var(--text-light);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
}

/* ========== 按钮样式 ========== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border-radius: 30px;
    font-weight: 500;
    text-align: center;
    cursor: pointer;
    transition: all var(--transition-fast);
    border: none;
    font-size: 1rem;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
    box-shadow: 0 4px 15px rgba(108, 92, 231, 0.4);
}

.btn-primary:hover {
    background: var(--primary-dark);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 7px 20px rgba(108, 92, 231, 0.5);
}

.btn-secondary {
    background: #fff;
    color: var(--primary-color);
    box-shadow: var(--shadow-md);
}

.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
    color: var(--primary-color);
}

.btn-outline {
    background: transparent;
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.7);
    text-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: white;
    color: white;
    transform: translateY(-2px);
}

.btn-small {
    padding: 8px 16px;
    font-size: 0.875rem;
}

/* ========== 导航栏 ========== */
.main-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 30px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-sm);
    z-index: 1000;
    transition: all var(--transition-normal);
}

[data-theme="dark"] .main-nav {
    background: rgba(12, 12, 22, 0.95);
}

.nav-scrolled {
    height: 60px;
    box-shadow: var(--shadow-md);
}

.nav-logo {
    display: flex;
    align-items: center;
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: 1px;
}

.nav-links {
    display: flex;
    gap: 30px;
}

.nav-links a {
    color: var(--text-color);
    font-weight: 500;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    width: 0%;
    height: 2px;
    bottom: -4px;
    left: 0;
    background-color: var(--primary-color);
    transition: width var(--transition-fast);
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

.nav-links a.active {
    color: var(--primary-color);
}

.theme-switch {
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color var(--transition-fast);
}

.theme-switch:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

[data-theme="dark"] .theme-switch:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    width: 30px;
    cursor: pointer;
}

.nav-toggle span {
    height: 2px;
    width: 100%;
    background-color: var(--text-color);
    margin: 3px 0;
    transition: all var(--transition-fast);
}

/* ========== 英雄区域 ========== */
.hero-section {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    background: linear-gradient(135deg, #000428, #004e92);
    overflow: hidden;
    color: white;
    text-align: center;
}

.stars-container {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    overflow: hidden;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    padding: 0 20px;
}

.hero-content h1 {
    font-size: 4rem;
    margin-bottom: 20px;
    letter-spacing: 1px;
}

.hero-content p {
    font-size: 1.3rem;
    margin-bottom: 40px;
    opacity: 0.9;
}

.hero-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.hero-scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    color: white;
    opacity: 0.7;
    animation: bounce 2s infinite;
}

.mouse {
    border: 2px solid white;
    border-radius: 20px;
    height: 40px;
    width: 25px;
    margin: 0 auto 10px;
    position: relative;
}

.wheel {
    background-color: white;
    border-radius: 50%;
    height: 6px;
    width: 6px;
    position: absolute;
    left: 50%;
    top: 10px;
    transform: translateX(-50%);
    animation: mouse-wheel 1.2s ease infinite;
}

.scroll-arrows {
    font-size: 20px;
    display: block;
}

@keyframes mouse-wheel {
    0% {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
    100% {
        opacity: 0;
        transform: translateX(-50%) translateY(10px);
    }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateX(-50%) translateY(0);
    }
    40% {
        transform: translateX(-50%) translateY(-10px);
    }
    60% {
        transform: translateX(-50%) translateY(-5px);
    }
}

/* ========== 精选内容区 ========== */
.featured-section {
    padding: var(--section-spacing) 0;
    background-color: var(--bg-color);
}

.featured-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 0 20px;
}

.featured-card {
    background: #fff;
    border-radius: var(--card-border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

[data-theme="dark"] .featured-card {
    background: var(--bg-dark);
}

.featured-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-hover);
}

.card-image {
    height: 200px;
    position: relative;
    overflow: hidden;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-normal);
}

.featured-card:hover .card-image img {
    transform: scale(1.05);
}

.card-category {
    position: absolute;
    top: 15px;
    right: 15px;
    background: var(--primary-color);
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.card-content {
    padding: 25px;
}

.card-content h3 {
    margin-bottom: 10px;
    font-size: 1.4rem;
    color: var(--text-dark);
}

.card-content p {
    color: var(--text-light);
    margin-bottom: 20px;
}

.card-meta {
    display: flex;
    margin-bottom: 20px;
    font-size: 0.9rem;
    color: var(--text-light);
}

.card-meta span {
    display: flex;
    align-items: center;
    margin-right: 20px;
}

.card-meta i {
    margin-right: 5px;
}

.read-more {
    display: inline-flex;
    align-items: center;
    font-weight: 500;
    color: var(--primary-color);
}

.read-more i {
    margin-left: 5px;
    transition: transform var(--transition-fast);
}

.read-more:hover i {
    transform: translateX(5px);
}

.view-all-container {
    text-align: center;
    margin-top: 50px;
}

/* ========== 项目展示区 ========== */
.projects-section {
    padding: var(--section-spacing) 0;
    background-color: var(--bg-dark);
    color: white;
}

.projects-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 0 20px;
}

.project-card {
    position: relative;
    border-radius: var(--card-border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    height: 300px;
    transform-style: preserve-3d;
    perspective: 1000px;
}

.project-image {
    width: 100%;
    height: 100%;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-normal);
}

.project-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9), transparent);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 25px;
    transform: translateZ(20px);
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.project-card:hover .project-overlay {
    opacity: 1;
}

.project-card:hover .project-image img {
    transform: scale(1.1);
}

.project-overlay h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
}

.project-overlay p {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 20px;
}

.project-links {
    display: flex;
    gap: 10px;
}

/* ========== 订阅区域 ========== */
.subscribe-section {
    padding: var(--section-spacing) 0;
    background-color: var(--bg-color);
}

.subscribe-container {
    display: flex;
    align-items: center;
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 0 20px;
}

.subscribe-content {
    flex: 1;
}

.subscribe-content h2 {
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.subscribe-content p {
    color: var(--text-light);
    margin-bottom: 30px;
    font-size: 1.1rem;
}

.subscribe-form {
    display: flex;
    margin-bottom: 30px;
    max-width: 500px;
}

.subscribe-form input {
    flex: 1;
    padding: 15px 20px;
    border: 1px solid var(--border-color);
    border-radius: 30px 0 0 30px;
    font-size: 1rem;
    outline: none;
    background-color: white;
    color: var(--text-color);
}

[data-theme="dark"] .subscribe-form input {
    background-color: var(--bg-dark);
    color: var(--text-color);
}

.subscribe-form button {
    border-radius: 0 30px 30px 0;
    padding: 0 25px;
}

.social-links {
    display: flex;
    gap: 15px;
}

.social-icon {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background-color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    box-shadow: var(--shadow-sm);
    color: var(--text-dark);
    transition: all var(--transition-fast);
}

[data-theme="dark"] .social-icon {
    background-color: var(--bg-dark);
    color: var(--text-light);
}

.social-icon:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    color: var(--primary-color);
}

.subscribe-image {
    flex: 1;
    position: relative;
    height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.floating-shape {
    position: absolute;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    opacity: 0.7;
    filter: blur(20px);
}

.floating-shape:nth-child(1) {
    width: 150px;
    height: 150px;
    top: 20%;
    left: 20%;
    animation: float1 6s ease-in-out infinite;
}

.floating-shape:nth-child(2) {
    width: 100px;
    height: 100px;
    top: 50%;
    left: 50%;
    animation: float2 8s ease-in-out infinite;
}

.floating-shape:nth-child(3) {
    width: 80px;
    height: 80px;
    bottom: 20%;
    right: 20%;
    animation: float3 7s ease-in-out infinite;
}

@keyframes float1 {
    0%, 100% {
        transform: translate(0, 0) rotate(0deg);
    }
    50% {
        transform: translate(-15px, -15px) rotate(5deg);
    }
}

@keyframes float2 {
    0%, 100% {
        transform: translate(0, 0) rotate(0deg);
    }
    50% {
        transform: translate(20px, 10px) rotate(-5deg);
    }
}

@keyframes float3 {
    0%, 100% {
        transform: translate(0, 0) rotate(0deg);
    }
    50% {
        transform: translate(-10px, 15px) rotate(8deg);
    }
}

/* ========== 页脚 ========== */
.main-footer {
    background-color: var(--bg-dark);
    color: white;
    padding-top: 70px;
}

.footer-content {
    display: flex;
    flex-wrap: wrap;
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 0 20px;
    margin-bottom: 50px;
}

.footer-logo {
    flex: 1;
    min-width: 300px;
    margin-bottom: 30px;
}

.footer-logo p {
    color: rgba(255, 255, 255, 0.7);
    margin-top: 15px;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    flex: 2;
    gap: 30px;
}

.footer-column {
    flex: 1;
    min-width: 200px;
}

.footer-column h3 {
    font-size: 1.2rem;
    margin-bottom: 20px;
    position: relative;
}

.footer-column h3::after {
    content: '';
    position: absolute;
    width: 30px;
    height: 3px;
    background: var(--primary-color);
    left: 0;
    bottom: -8px;
    border-radius: 1.5px;
}

.footer-column ul li {
    margin-bottom: 12px;
}

.footer-column ul li a {
    color: rgba(255, 255, 255, 0.7);
    transition: color var(--transition-fast);
}

.footer-column ul li a:hover {
    color: white;
}

.footer-column ul li i {
    margin-right: 10px;
    opacity: 0.7;
}

.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tag {
    padding: 5px 12px;
    border-radius: 20px;
    background-color: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.8rem;
    transition: all var(--transition-fast);
}

.tag:hover {
    background-color: var(--primary-color);
    color: white;
}

.footer-bottom {
    text-align: center;
    padding: 20px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
}

.footer-bottom p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
}

.back-to-top {
    position: absolute;
    right: 30px;
    bottom: 20px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--primary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
}

.back-to-top:hover {
    background-color: var(--primary-dark);
    transform: translateY(-5px);
    color: white;
}

/* ========== 自定义光标 ========== */
.cursor-follower {
    position: fixed;
    width: 30px;
    height: 30px;
    background: rgba(108, 92, 231, 0.3);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    transition: transform 0.1s, background 0.3s;
    transform: translate(-50%, -50%);
    backdrop-filter: blur(2px);
    border: 1px solid var(--primary-color);
    box-shadow: 0 0 10px rgba(108, 92, 231, 0.4);
    mix-blend-mode: exclusion;
}

.cursor-follower::after {
    content: '';
    position: absolute;
    width: 10px;
    height: 10px;
    background: var(--primary-color);
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 5px var(--primary-color);
}

.cursor-follower.active {
    transform: translate(-50%, -50%) scale(1.8);
    background: rgba(108, 92, 231, 0.1);
    border-color: white;
}

.cursor-follower.active::after {
    background: white;
}

/* ========== 响应式设计 ========== */
@media (max-width: 992px) {
    .hero-content h1 {
        font-size: 3.5rem;
    }

    .subscribe-container {
        flex-direction: column;
    }

    .subscribe-content {
        text-align: center;
        margin-bottom: 50px;
    }

    .subscribe-form {
        margin: 0 auto 30px;
    }

    .social-links {
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .nav-links {
        position: fixed;
        top: var(--header-height);
        left: 0;
        width: 100%;
        flex-direction: column;
        background-color: white;
        padding: 20px 0;
        gap: 20px;
        text-align: center;
        box-shadow: var(--shadow-md);
        transform: translateY(-100%);
        opacity: 0;
        transition: all var(--transition-normal);
        z-index: 999;
    }

    [data-theme="dark"] .nav-links {
        background-color: var(--bg-dark);
    }

    .nav-open .nav-links {
        transform: translateY(0);
        opacity: 1;
    }

    .nav-toggle {
        display: flex;
    }

    .nav-open .nav-toggle span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

    .nav-open .nav-toggle span:nth-child(2) {
        opacity: 0;
    }

    .nav-open .nav-toggle span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -6px);
    }

    .hero-content h1 {
        font-size: 2.8rem;
    }

    .hero-content p {
        font-size: 1.1rem;
    }

    .section-header h2 {
        font-size: 2rem;
    }

    .featured-container, .projects-container {
        grid-template-columns: 1fr;
    }

    .footer-content {
        flex-direction: column;
    }

    .footer-links {
        flex-direction: column;
    }

    .cursor-follower {
        display: none;
    }
}

@media (max-width: 576px) {
    .hero-content h1 {
        font-size: 2.3rem;
    }

    .hero-buttons {
        flex-direction: column;
        gap: 15px;
    }

    .btn {
        width: 100%;
    }

    .subscribe-form {
        flex-direction: column;
    }

    .subscribe-form input {
        border-radius: 30px;
        margin-bottom: 15px;
    }

    .subscribe-form button {
        border-radius: 30px;
    }
} 