/* ===== CSS 变量 ===== */
:root {
    --primary: #FFB7C5;
    --primary-dark: #FF9AAF;
    --secondary: #87CEEB;
    --accent: #FF6B9D;
    --background: #FFF9F0;
    --text: #4A4A4A;
    --text-light: #7A7A7A;
    --mint: #B8E6B8;
    --white: #FFFFFF;
    --shadow: rgba(255, 183, 197, 0.3);
    --shadow-dark: rgba(0, 0, 0, 0.1);

    --font-display: 'ZCOOL KuaiLe', cursive;
    --font-body: 'Noto Sans SC', sans-serif;
    --font-en: 'Quicksand', sans-serif;

    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-full: 50%;

    --transition: all 0.3s ease;
}

/* ===== 基础样式 ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background-color: var(--background);
    color: var(--text);
    line-height: 1.8;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
}

button {
    border: none;
    background: none;
    cursor: pointer;
    font-family: inherit;
}

img {
    max-width: 100%;
    height: auto;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

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

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

::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 10px;
}

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

/* ===== 选中文字 ===== */
::selection {
    background: var(--primary);
    color: var(--white);
}

/* ===== 导航栏 ===== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255, 249, 240, 0.9);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px var(--shadow);
    transition: var(--transition);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 8px;
}

.logo-icon {
    font-size: 28px;
}

.logo-text {
    font-family: var(--font-display);
    font-size: 24px;
    color: var(--accent);
}

.nav-menu {
    display: flex;
    gap: 32px;
    list-style: none;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: var(--radius-md);
    transition: var(--transition);
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 3px;
    background: var(--primary);
    border-radius: 2px;
    transition: var(--transition);
    transform: translateX(-50%);
}

.nav-link:hover::after {
    width: 60%;
}

.nav-icon {
    font-size: 18px;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    padding: 10px;
}

.nav-toggle span {
    width: 25px;
    height: 3px;
    background: var(--accent);
    border-radius: 2px;
    transition: var(--transition);
}

/* ===== Hero 区域 ===== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 100px 20px 60px;
    position: relative;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.cloud {
    position: absolute;
    background: var(--white);
    border-radius: 100px;
    opacity: 0.6;
    animation: float 20s ease-in-out infinite;
}

.cloud::before,
.cloud::after {
    content: '';
    position: absolute;
    background: inherit;
    border-radius: 50%;
}

.cloud-1 {
    width: 150px;
    height: 50px;
    top: 15%;
    left: 10%;
    animation-delay: 0s;
}

.cloud-1::before {
    width: 60px;
    height: 60px;
    top: -30px;
    left: 20px;
}

.cloud-1::after {
    width: 45px;
    height: 45px;
    top: -20px;
    right: 25px;
}

.cloud-2 {
    width: 120px;
    height: 40px;
    top: 25%;
    right: 15%;
    animation-delay: -5s;
}

.cloud-2::before {
    width: 50px;
    height: 50px;
    top: -25px;
    left: 15px;
}

.cloud-2::after {
    width: 35px;
    height: 35px;
    top: -18px;
    right: 20px;
}

.cloud-3 {
    width: 100px;
    height: 35px;
    top: 60%;
    left: 5%;
    animation-delay: -10s;
}

.cloud-3::before {
    width: 40px;
    height: 40px;
    top: -20px;
    left: 15px;
}

.star {
    position: absolute;
    animation: twinkle 3s ease-in-out infinite;
}

.star-1 {
    font-size: 24px;
    top: 20%;
    left: 20%;
    animation-delay: 0s;
}

.star-2 {
    font-size: 20px;
    top: 30%;
    right: 25%;
    animation-delay: -1s;
}

.star-3 {
    font-size: 18px;
    top: 70%;
    right: 15%;
    animation-delay: -2s;
}

@keyframes float {
    0%, 100% { transform: translateY(0) translateX(0); }
    25% { transform: translateY(-20px) translateX(10px); }
    50% { transform: translateY(-10px) translateX(-5px); }
    75% { transform: translateY(-25px) translateX(5px); }
}

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

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

.hero-badge {
    display: inline-block;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: var(--white);
    padding: 8px 24px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 20px;
    animation: fadeInDown 0.8s ease;
}

.hero-title {
    margin-bottom: 16px;
}

.title-cn {
    display: block;
    font-family: var(--font-display);
    font-size: clamp(48px, 10vw, 72px);
    background: linear-gradient(135deg, var(--accent), var(--primary-dark));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: fadeInUp 0.8s ease 0.2s both;
}

.title-en {
    display: block;
    font-family: var(--font-en);
    font-size: clamp(20px, 4vw, 28px);
    color: var(--secondary);
    font-weight: 600;
    letter-spacing: 4px;
    margin-top: 8px;
    animation: fadeInUp 0.8s ease 0.4s both;
}

.hero-subtitle {
    font-size: 20px;
    color: var(--text-light);
    margin-bottom: 12px;
    animation: fadeInUp 0.8s ease 0.5s both;
}

.hero-desc {
    font-size: 16px;
    color: var(--text-light);
    margin-bottom: 32px;
    animation: fadeInUp 0.8s ease 0.6s both;
}

.hero-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: var(--white);
    padding: 14px 32px;
    border-radius: 50px;
    font-weight: 600;
    transition: var(--transition);
    animation: fadeInUp 0.8s ease 0.7s both;
}

.hero-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px var(--shadow);
}

.hero-btn svg {
    animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(5px); }
}

.hero-avatar {
    position: absolute;
    right: 10%;
    top: 50%;
    transform: translateY(-50%);
    display: none;
}

.avatar-frame {
    width: 200px;
    height: 200px;
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    padding: 5px;
    animation: fadeInRight 1s ease 0.5s both;
}

.avatar-placeholder {
    width: 100%;
    height: 100%;
    background: var(--white);
    border-radius: calc(var(--radius-lg) - 3px);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 80px;
}

.avatar-decoration {
    position: absolute;
    top: -20px;
    right: -20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.deco-item {
    font-size: 24px;
    animation: float 4s ease-in-out infinite;
}

.deco-item:nth-child(2) { animation-delay: -1s; }
.deco-item:nth-child(3) { animation-delay: -2s; }

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

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

@keyframes fadeInRight {
    from { opacity: 0; transform: translateX(50px); }
    to { opacity: 1; transform: translateX(0); }
}

/* ===== Section 通用样式 ===== */
.section {
    padding: 100px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 50px;
}

.section-emoji {
    font-size: 48px;
    display: block;
    margin-bottom: 16px;
    animation: float 3s ease-in-out infinite;
}

.section-title {
    font-family: var(--font-display);
    font-size: clamp(32px, 6vw, 48px);
    color: var(--accent);
    margin-bottom: 16px;
}

.section-line {
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    margin: 0 auto;
    border-radius: 2px;
}

.section-intro {
    text-align: center;
    color: var(--text-light);
    max-width: 600px;
    margin: -30px auto 40px;
}

/* ===== 关于我 ===== */
.about-section {
    background: linear-gradient(180deg, var(--background) 0%, rgba(255, 183, 197, 0.1) 100%);
}

.about-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

.about-card {
    background: var(--white);
    padding: 32px;
    border-radius: var(--radius-lg);
    box-shadow: 0 10px 40px var(--shadow);
    text-align: center;
    transition: var(--transition);
}

.about-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 50px var(--shadow);
}

.about-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.about-card h3 {
    font-family: var(--font-display);
    font-size: 24px;
    color: var(--accent);
    margin-bottom: 12px;
}

.about-card p {
    color: var(--text-light);
}

.about-card strong {
    color: var(--accent);
}

/* ===== 我的爱好 ===== */
.hobbies-section {
    background: var(--white);
}

.hobbies-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 32px;
}

.hobby-card {
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 0 10px 40px var(--shadow);
    transition: var(--transition);
}

.hobby-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 60px var(--shadow);
}

.hobby-image {
    height: 160px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 80px;
}

.hobby-conan .hobby-image {
    background: linear-gradient(135deg, #1a237e, #3949ab);
}

.hobby-himote .hobby-image {
    background: linear-gradient(135deg, var(--primary), var(--accent));
}

.hobby-pokemon .hobby-image {
    background: linear-gradient(135deg, #ffb300, #ff6f00);
}

.hobby-content {
    padding: 24px;
    background: var(--white);
}

.hobby-content h3 {
    font-family: var(--font-display);
    font-size: 22px;
    color: var(--text);
    margin-bottom: 12px;
}

.hobby-content p {
    color: var(--text-light);
    font-size: 14px;
    margin-bottom: 16px;
}

.hobby-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.tag {
    background: rgba(255, 183, 197, 0.2);
    color: var(--accent);
    padding: 4px 12px;
    border-radius: 50px;
    font-size: 12px;
    font-weight: 500;
}

/* ===== 我的作品 ===== */
.works-section {
    background: linear-gradient(180deg, var(--white) 0%, rgba(135, 206, 235, 0.1) 100%);
}

.filter-buttons {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 10px 24px;
    border-radius: 50px;
    font-weight: 500;
    background: var(--white);
    color: var(--text);
    box-shadow: 0 4px 15px var(--shadow);
    transition: var(--transition);
}

.filter-btn:hover,
.filter-btn.active {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: var(--white);
}

.works-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}

.work-card {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    aspect-ratio: 1;
    cursor: pointer;
    transition: var(--transition);
}

.work-card:hover {
    transform: scale(1.03);
}

.work-card.hidden {
    display: none;
}

.work-image {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    display: flex;
    align-items: center;
    justify-content: center;
}

.work-placeholder {
    font-size: 64px;
}

.work-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, transparent 60%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 24px;
    opacity: 0;
    transition: var(--transition);
}

.work-card:hover .work-overlay {
    opacity: 1;
}

.work-overlay h4 {
    color: var(--white);
    font-family: var(--font-display);
    font-size: 20px;
    margin-bottom: 8px;
}

.work-overlay p {
    color: rgba(255,255,255,0.8);
    font-size: 14px;
}

.works-placeholder-notice {
    text-align: center;
    margin-top: 40px;
    padding: 24px;
    background: var(--white);
    border-radius: var(--radius-md);
    box-shadow: 0 4px 15px var(--shadow);
}

.works-placeholder-notice code {
    background: rgba(255, 183, 197, 0.3);
    padding: 2px 8px;
    border-radius: 4px;
    font-family: monospace;
}

/* ===== 旅行日记 ===== */
.travel-section {
    background: var(--white);
}

.travel-timeline {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.travel-item {
    display: flex;
    gap: 32px;
    align-items: stretch;
}

.travel-year {
    font-family: var(--font-display);
    font-size: 28px;
    color: var(--primary);
    min-width: 100px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

.travel-content {
    flex: 1;
    display: flex;
    gap: 24px;
    background: var(--background);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 0 10px 40px var(--shadow);
    transition: var(--transition);
}

.travel-item:hover .travel-content {
    transform: translateX(10px);
    box-shadow: 0 15px 50px var(--shadow);
}

.travel-image {
    width: 200px;
    min-height: 180px;
    background: linear-gradient(135deg, var(--secondary), var(--mint));
    display: flex;
    align-items: center;
    justify-content: center;
}

.travel-placeholder {
    font-size: 64px;
}

.travel-info {
    padding: 24px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.travel-info h3 {
    font-family: var(--font-display);
    font-size: 24px;
    color: var(--accent);
    margin-bottom: 12px;
}

.travel-info p {
    color: var(--text-light);
    margin-bottom: 16px;
}

.travel-tag {
    display: inline-block;
    background: var(--primary);
    color: var(--white);
    padding: 6px 16px;
    border-radius: 50px;
    font-size: 12px;
    font-weight: 600;
    width: fit-content;
}

.travel-detail {
    margin-top: 16px;
    padding: 24px;
    background: var(--white);
    border-radius: var(--radius-md);
    box-shadow: 0 4px 15px var(--shadow);
    margin-left: 132px;
}

.travel-detail-body {
    color: var(--text);
    line-height: 1.8;
    margin-bottom: 16px;
}

.travel-detail-body p {
    margin-bottom: 12px;
}

.travel-detail-body img {
    max-width: 100%;
    border-radius: var(--radius-sm);
    margin: 8px 0;
}

.travel-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
    margin-top: 16px;
}

.travel-gallery img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
}

.travel-gallery img:hover {
    transform: scale(1.03);
    box-shadow: 0 8px 25px var(--shadow);
}

.work-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.travel-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

@media (max-width: 768px) {
    .travel-detail {
        margin-left: 0;
    }
}

/* ===== 页脚 ===== */
.footer {
    background: linear-gradient(180deg, var(--background) 0%, rgba(255, 183, 197, 0.2) 100%);
    padding: 60px 20px;
    text-align: center;
}

.footer-decoration {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-bottom: 24px;
}

.footer-decoration span {
    font-size: 24px;
    animation: float 3s ease-in-out infinite;
}

.footer-decoration span:nth-child(2) { animation-delay: -0.5s; }
.footer-decoration span:nth-child(3) { animation-delay: -1s; }
.footer-decoration span:nth-child(4) { animation-delay: -1.5s; }
.footer-decoration span:nth-child(5) { animation-delay: -2s; }

.footer-title {
    font-family: var(--font-display);
    font-size: 28px;
    color: var(--accent);
    margin-bottom: 8px;
}

.footer-subtitle {
    color: var(--text-light);
    margin-bottom: 8px;
}

.footer-school {
    font-size: 14px;
    color: var(--text-light);
}

.footer-decoration-bottom {
    margin-top: 24px;
    margin-bottom: 0;
}

/* ===== 灯箱 ===== */
.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.9);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
}

.lightbox.active {
    display: flex;
}

.lightbox-content {
    max-width: 90vw;
    max-height: 90vh;
    text-align: center;
}

.lightbox-placeholder {
    font-size: 200px;
    margin-bottom: 16px;
}

.lightbox-caption {
    color: var(--white);
    font-size: 18px;
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
    position: absolute;
    color: var(--white);
    font-size: 32px;
    padding: 16px;
    transition: var(--transition);
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-sm);
}

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
    background: rgba(255, 255, 255, 0.2);
}

.lightbox-close {
    top: 20px;
    right: 20px;
    font-size: 48px;
    padding: 8px 16px;
}

.lightbox-prev {
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
}

.lightbox-next {
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
}

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

.fade-in-up.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ===== 响应式 ===== */
@media (min-width: 1024px) {
    .hero-avatar {
        display: block;
    }
}

@media (max-width: 768px) {
    .nav-toggle {
        display: flex;
    }

    .nav-menu {
        position: absolute;
        top: 70px;
        left: 0;
        right: 0;
        background: var(--white);
        flex-direction: column;
        padding: 20px;
        gap: 12px;
        box-shadow: 0 10px 30px var(--shadow);
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: var(--transition);
    }

    .nav-menu.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }

    .nav-link {
        justify-content: center;
    }

    .section {
        padding: 60px 0;
    }

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

    .travel-item {
        flex-direction: column;
        gap: 16px;
    }

    .travel-year {
        min-width: auto;
    }

    .travel-content {
        flex-direction: column;
    }

    .travel-image {
        width: 100%;
        min-height: 150px;
    }

    .hobbies-grid {
        grid-template-columns: 1fr;
    }
}
