/* 基础样式 */
:root {
    --primary-color: #6c5ce7;
    --secondary-color: #00cec9;
    --accent-color: #fd79a8;
    --dark-color: #2c3e50;
    --light-color: #f8f9fa;
    --text-color: #2d3436;
    --text-light: #636e72;
    --background-color: #fff;
    --card-bg: #f5f6fa;
    --grid-color: rgba(106, 90, 205, 0.05);
    --gradient: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    --box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    --highlight-color: #ff6b6b;
    --font-main: 'Noto Sans SC', sans-serif;
    --header-back: rgba(0, 0, 0, 0.3);
    --header-title: #f5f6fa;
    --border-radius: 12px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}



html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    color: var(--text-color);
    background-color: var(--background-color);
    overflow-x: hidden;
    line-height: 1.6;
    cursor: url(../../img/pointer.cur), auto;
}

a,
button {
    cursor: url(../../img/link.cur), auto;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

.btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 30px;
    font-weight: 500;
    text-align: center;
    transition: all 0.3s ease;
    cursor: url(../../img/link.cur), auto;
    border: none;
    outline: none;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: #5a4acd;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(106, 90, 205, 0.3);
}

.btn-secondary {
    background-color: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
    background-color: var(--primary-color);
    border: 2px solid var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(106, 90, 205, 0.3);
}

.highlight {
    color: var(--highlight-color);
    font-weight: 700;
}

.section {
    padding: 80px 0;
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 50px;
    text-align: center;
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 80px;
    height: 4px;
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    margin: 15px auto 0;
    border-radius: 2px;
}

/* 网格背景 */
.grid-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: 30px 30px;
    z-index: -1;
    opacity: 0;
    transition: opacity 1s ease;
}

.grid-bg.loaded {
    opacity: 1;
}

@keyframes hamsterRun {

    0%,
    100% {
        transform: translate(-50%, -50%) rotate(0deg);
    }

    25% {
        transform: translate(-50%, -50%) rotate(10deg);
    }

    75% {
        transform: translate(-50%, -50%) rotate(-10deg);
    }
}

@keyframes wheelSpin {
    0% {
        transform: translate(-50%, -50%) rotate(0deg);
    }

    100% {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

/* 导航栏 */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 20px 0;
    z-index: 1000;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    background-color: rgba(255, 255, 255, 0.9);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.navbar.scrolled {
    padding: 15px 0;
    background-color: rgba(255, 255, 255, 0.95);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo-img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.nav-links {
    display: flex;
    gap: 30px;
}

.nav-links a {
    font-weight: 500;
    position: relative;
    transition: color 0.3s ease;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: width 0.3s ease;
}

.nav-links a:hover {
    color: var(--primary-color);
}

.nav-links a:hover::after {
    width: 100%;
}

.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    cursor: pointer;
}

.menu-toggle span {
    display: block;
    height: 3px;
    width: 100%;
    background-color: var(--primary-color);
    border-radius: 3px;
    transition: all 0.3s ease;
}

/* 英雄区域 */
.hero {
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
    background-image: linear-gradient(var(--grid-color) 1px, transparent 1px), linear-gradient(90deg, var(--grid-color) 1px, transparent 1px);
    background-size: cover;
    padding: 80px 0;
}

.hero.clear-after::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--header-back);
    /* 这里是遮罩颜色和透明度 */
    z-index: 1;
}

.hero .container {
    position: relative;
    z-index: 2;
    /* 保证文字在遮罩上方 */
    display: flex;
    align-items: center;
    gap: 50px;
}

.hero-left {
    flex: 1;
    position: relative;
    padding-right: 50px;
}

.hero-right {
    flex: 1;
}

.hero-image {
    width: 100%;
    height: 400px;
    background: #f5f6fa;
    border-radius: var(--border-radius);
    overflow: hidden;
    position: relative;
}

.hero-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    animation: shimmer 2s infinite linear;
    background-size: 100% 100%;
}

.hero-image.clear-after::before {
    background: none !important;
    animation: none !important;
}

.hero-image.clear-after {
    background-size: cover;
    /* 保证图片填满并不变形（可能裁剪） */
    background-position: center;
    /* 水平垂直居中 */
    background-repeat: no-repeat;
    /* 防止图片重复 */
    overflow: hidden;
}

@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }

    100% {
        background-position: 1000px 0;
    }
}

.floating-icons {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    pointer-events: none;
}

.floating-icon {
    position: absolute;
    width: 40px;
    height: 40px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    animation: float 6s infinite ease-in-out;
}

.scroll-down-container {
    position: absolute;
    bottom: 60px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    z-index: 3;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0) rotate(0deg);
    }

    50% {
        transform: translateY(-20px) rotate(10deg);
    }
}

.floating-icon:nth-child(1) {
    top: 10%;
    left: 10%;
    animation-delay: 0s;
    background: var(--primary-color);
}

.floating-icon:nth-child(2) {
    top: 70%;
    left: 15%;
    animation-delay: 1s;
    background: var(--secondary-color);
}

.floating-icon:nth-child(3) {
    top: 30%;
    right: 10%;
    animation-delay: 2s;
    background: var(--accent-color);
}

.floating-icon:nth-child(4) {
    bottom: 20%;
    right: 15%;
    animation-delay: 3s;
    background: var(--highlight-color);
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(106, 90, 205, 0.1) 0%, rgba(72, 209, 204, 0.1) 100%);
    z-index: -1;
}

.title {
    font-size: 3.5rem;
    margin-bottom: 50px;
    line-height: 1.2;
    background: var(--gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    font-weight: 700;
    position: relative;
    display: inline-block;
}

.subtitle {
    font-size: 1.5rem;
    color: var(--text-light);
    margin-bottom: 40px;
    text-indent: 2em;
}

.cta-buttons {
    display: flex;
    gap: 20px;
    margin-bottom: 60px;
}

.scroll-down {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: var(--primary-color);
    animation: bounce 2s infinite;
}

.scroll-down i {
    margin-top: 10px;
    font-size: 1.2rem;
}

@keyframes bounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateY(0);
    }

    40% {
        transform: translateY(-10px);
    }

    60% {
        transform: translateY(-5px);
    }
}

.floating-elements {
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;

}


.floating-element {
    position: absolute;
    width: 50px;
    height: 50px;
    background: white;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: var(--box-shadow);
    color: var(--primary-color);
    font-size: 1.2rem;
    animation: float 6s infinite ease-in-out;
}

.element1 {
    top: 100%;
    left: 85%;
    animation-delay: 0s;
}

.element2 {
    top: 100%;
    left: 72%;
    animation-delay: 1s;
}

.element3 {
    top: 98%;
    left: 95%;
    animation-delay: 2s;
}

@keyframes float {
    0% {
        transform: translateY(0) rotate(0deg);
    }

    50% {
        transform: translateY(-20px) rotate(10deg);
    }

    100% {
        transform: translateY(0) rotate(0deg);
    }
}

/* 打字动画 */
.animate-typing {
    position: relative;
}

.animate-typing::after {
    content: '|';
    position: absolute;
    right: -10px;
    animation: blink 1s infinite;
}

@keyframes blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}

/* 关于区域 */
.about-content {
    display: flex;
    align-items: center;
    gap: 50px;
}

.about-text p {
    margin: 10px 0;
}

.about-text {
    flex: 1;
}

.about-image {
    flex: 1;
    display: flex;
    justify-content: center;
}

.hamster-avatar {
    position: relative;
    width: 300px;
    height: 300px;
    background-color: #f0c674;
    border-radius: 50% 50% 40% 40%;
    animation: hamsterFloat 6s ease-in-out infinite;
}

.hamster-avatar .ear {
    position: absolute;
    width: 40px;
    height: 40px;
    background-color: #d9b56b;
    border-radius: 50%;
    top: 20px;
}

.hamster-avatar .ear.left {
    left: 7%;
}

.hamster-avatar .ear.right {
    right: 7%;
}

.hamster-avatar .face {
    position: absolute;
    width: 200px;
    height: 180px;
    background-color: #f0c674;
    border-radius: 50%;
    top: 23%;
    left: 18%;
}

.hamster-avatar .eye {
    position: absolute;
    width: 20px;
    height: 20px;
    background-color: #333;
    border-radius: 50%;
    top: 29%;
}

.hamster-avatar .eye.left {
    left: 33%;
}

.hamster-avatar .eye.right {
    right: 33%;
}

.hamster-avatar .nose {
    position: absolute;
    width: 10px;
    height: 10px;
    background-color: #333;
    border-radius: 50%;
    top: 41%;
    left: 48%;
}

.hamster-avatar .mouth {
    position: absolute;
    width: 30px;
    height: 15px;
    border-bottom: 2px solid #333;
    border-radius: 0 0 50% 50%;
    top: 64%;
    left: 45%;
}

.hamster-avatar .cheek {
    position: absolute;
    width: 40px;
    height: 30px;
    background-color: #f8a1a1;
    border-radius: 50%;
    top: 39%;
    opacity: 0.8;
}

.hamster-avatar .cheek.left {
    left: 24%;
}

.hamster-avatar .cheek.right {
    right: 24%;
}

@keyframes hamsterFloat {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-20px);
    }
}

.skills {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 30px;
}

.skill-tag {
    background-color: var(--primary-color);
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.skill-tag:hover {
    background-color: var(--secondary-color);
    transform: translateY(-3px);
}

/* 项目区域 */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.project-card {
    background-color: white;
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(106, 90, 205, 0.1);
}

.project-header {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.project-icon {
    font-size: 2rem;
    color: var(--primary-color);
    margin-right: 15px;
}

.project-title {
    font-size: 1.5rem;
    color: var(--dark-color);
}

.project-description {
    color: var(--text-light);
    margin-bottom: 20px;
    flex-grow: 1;
}

.project-features {
    margin-bottom: 25px;
}

.project-features span {
    display: block;
    margin-bottom: 8px;
    color: var(--text-color);
}

.project-features i {
    color: var(--primary-color);
    margin-right: 8px;
}

.btn-project {
    background-color: var(--primary-color);
    color: white;
    width: 100%;
    padding: 10px;
    border-radius: 5px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-project:hover {
    background-color: #5a4acd;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(106, 90, 205, 0.3);
}

/* 联系区域 */
.contact-content {
    display: flex;
    gap: 50px;
}

.contact-info {
    flex: 1;
}

.contact-form {
    flex: 1;
}

.contact-methods {
    margin-top: 30px;
}

.contact-link {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    color: var(--text-color);
    transition: color 0.3s ease;
}

.contact-link i {
    font-size: 1.2rem;
    margin-right: 10px;
    color: var(--primary-color);
    width: 30px;
    text-align: center;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-family: var(--font-main);
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 3px rgba(106, 90, 205, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

/* 页脚 */
.footer {
    background-color: var(--dark-color);
    color: white;
    padding: 60px 0 0;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-brand .logo {
    color: white;
    margin-bottom: 15px;
}

.footer-brand p {
    color: rgba(255, 255, 255, 0.7);
}

.footer-links h4,
.footer-projects h4,
.footer-social h4 {
    font-size: 1.2rem;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
}

.footer-links h4::after,
.footer-projects h4::after,
.footer-social h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 2px;
    background-color: var(--primary-color);
}

.footer-links ul li,
.footer-projects ul li {
    margin-bottom: 10px;
}

.footer-links a,
.footer-projects a {
    color: rgba(255, 255, 255, 0.7);
    transition: color 0.3s ease;
}

.footer-links a:hover,
.footer-projects a:hover {
    color: white;
}

.social-icons {
    display: flex;
    gap: 15px;
}

.social-icons a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: white;
    transition: all 0.3s ease;
}

.social-icons a:hover {
    background-color: var(--primary-color);
    transform: translateY(-3px);
}

.footer-bottom {
    text-align: center;
    padding: 20px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.9rem;
}

.footer-bottom p:first-child {
    margin-bottom: 10px;
}

/* 返回顶部按钮 */
#backToTop {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: var(--primary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    border: none;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    z-index: 999;
}

#backToTop.active {
    opacity: 1;
    visibility: visible;
}

#backToTop:hover {
    background-color: #5a4acd;
    transform: translateY(-3px);
}

/* 响应式设计 */
@media (max-width: 992px) {

    .about-content,
    .contact-content {
        flex-direction: column;
    }

    .about-image {
        order: -1;
    }

    .hero-right {
        display: none;
    }

    .footer-projects {
        display: none;
    }

    .footer-links {
        display: none;
    }

    .hero-left {
        padding-right: 0;
        padding-top: 55px;
    }
}

@media (max-width: 768px) {
    .menu-toggle {
        display: flex;
    }

    .nav-links {
        position: fixed;
        top: 80px;
        left: 0;
        width: 100%;
        background-color: white;
        flex-direction: column;
        align-items: center;
        padding: 20px 0;
        gap: 20px;
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
        transform: translateY(-150%);
        transition: transform 0.3s ease;
        z-index: 999;
    }

    .nav-links.active {
        transform: translateY(0);
    }

    .cta-buttons {
        flex-direction: column;
        gap: 15px;
    }

    .section {
        padding: 60px 0;
    }

    .section-title {
        font-size: 2rem;
        margin-bottom: 40px;
    }

    .hamster-avatar {
        width: 250px;
        height: 250px;
    }
}

@media (max-width: 576px) {

    .section-title {
        font-size: 1.8rem;
    }

    .project-card {
        padding: 20px;
    }
}

.floating-elements .iconfont {
    font-size: 25px;
}