/* 基础样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #ff80ab;
    --secondary-color: #f48fb1;
    --accent-color: #ffb6c1;
    --text-color: #5a5a5a;
    --light-text: #888;
    --background-color: #fff5f8;
    --card-background: #fff;
    --header-height: 80px;
    --footer-height: 100px;
    --max-width: 1200px;
    --border-radius: 16px;
    --box-shadow: 0 5px 15px rgba(255, 128, 171, 0.15);
    --transition: all 0.3s ease;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--background-color);
    background-image: 
        radial-gradient(#ffcdd2 2px, transparent 2px),
        radial-gradient(#ffcdd2 2px, transparent 2px);
    background-size: 40px 40px;
    background-position: 0 0, 20px 20px;
    background-attachment: fixed;
}

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 20px;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    text-decoration: none;
    color: var(--primary-color);
    transition: var(--transition);
}

ul {
    list-style: none;
}

/* 按钮样式 */
.btn {
    display: inline-block;
    padding: 10px 25px;
    background-color: var(--primary-color);
    color: white;
    border-radius: var(--border-radius);
    transition: var(--transition);
    border: none;
    cursor: pointer;
    font-weight: 500;
    text-align: center;
    box-shadow: 0 3px 6px rgba(255, 128, 171, 0.2);
}

.btn:hover {
    background-color: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: 0 5px 10px rgba(255, 128, 171, 0.3);
}

.btn-large {
    padding: 12px 30px;
    font-size: 1.1rem;
}

.center {
    text-align: center;
    margin: 2rem 0;
}

/* 头部导航 */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height);
    background-color: rgba(255, 255, 255, 0.95);
    box-shadow: 0 2px 10px rgba(255, 128, 171, 0.25);
    z-index: 1000;
    backdrop-filter: blur(10px);
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

header h1 {
    font-size: 1.8rem;
    font-weight: 600;
    color: var(--primary-color);
    letter-spacing: 1px;
    position: relative;
    display: inline-block;
}

header h1::after {
    content: '❤';
    font-size: 0.8rem;
    position: absolute;
    top: 0;
    right: -15px;
    color: var(--accent-color);
    animation: heartbeat 1.5s infinite;
}

@keyframes heartbeat {
    0% { transform: scale(1); }
    25% { transform: scale(1.2); }
    50% { transform: scale(1); }
    75% { transform: scale(1.2); }
}

.logo-link {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

.logo-link:hover {
    color: var(--secondary-color);
}

nav ul {
    display: flex;
    align-items: center;
}

nav ul li {
    margin-left: 30px;
}

nav ul li a {
    color: var(--text-color);
    font-weight: 500;
    padding: 8px 0;
    position: relative;
}

nav ul li a:hover, nav ul li a.active {
    color: var(--primary-color);
}

nav ul li a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: var(--primary-color);
    transition: var(--transition);
}

nav ul li a:hover::after, nav ul li a.active::after {
    width: 100%;
}

/* 主要内容区域 */
main {
    padding-top: var(--header-height);
    min-height: calc(100vh - var(--footer-height));
}

/* 英雄区域 */
#hero {
    height: 200px;
    background: linear-gradient(135deg, #ff80ab, #fce4ec);
    color: white;
    display: flex;
    align-items: center;
    text-align: center;
    position: relative;
    overflow: hidden;
}

#hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('https://img.freepik.com/free-photo/digital-network-connection-modern-abstract-background_53876-124420.jpg') no-repeat center center/cover;
    opacity: 0.15;
    z-index: 0;
}

.hero-content {
    position: relative;
    z-index: 1;
    width: 100%;
}

.hero-content h2 {
    font-size: 3rem;
    margin-bottom: 1rem;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3);
    color: #fff;
    background: linear-gradient(to right, #ff80ab, #ff4081);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: none;
}

.hero-content p {
    font-size: 1.2rem;
    max-width: 700px;
    margin: 0 auto;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
}

/* 章节样式 */
.section {
    padding: 80px 0;
}

.section h2 {
    font-size: 2.2rem;
    margin-bottom: 40px;
    text-align: center;
    color: var(--primary-color);
    position: relative;
    font-weight: 600;
    letter-spacing: 1px;
}

.section h2::before {
    content: '✿';
    position: absolute;
    left: 50%;
    transform: translateX(-50px);
    top: 0;
    font-size: 1.5rem;
    color: var(--accent-color);
    opacity: 0.7;
}

.section h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: linear-gradient(to right, var(--primary-color), var(--accent-color));
    border-radius: 3px;
}

/* 卡片样式 */
.card {
    background-color: var(--card-background);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 30px;
    margin-bottom: 30px;
    transition: var(--transition);
    border: 1px solid rgba(255, 182, 193, 0.2);
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    height: 4px;
    width: 100%;
    background: linear-gradient(to right, var(--primary-color), var(--accent-color));
}

.card:hover {
    transform: translateY(-5px) rotate(1deg);
    box-shadow: 0 10px 25px rgba(255, 128, 171, 0.2);
}

.card h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: var(--primary-color);
}

.card p {
    margin-bottom: 20px;
    color: var(--light-text);
}

.card img {
    border-radius: var(--border-radius);
    margin-bottom: 20px;
    width: 100%;
    height: 220px;
    object-fit: cover;
}

/* 个人介绍部分 */
#personal .card {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    align-items: center;
}

.profile-image {
    flex: 0 0 300px;
}

.profile-image img {
    width: 100%;
    height: auto;
    border-radius: var(--border-radius);
    transition: transform 0.5s ease;
    box-shadow: 0 5px 15px rgba(255, 128, 171, 0.2);
    border: 3px solid rgba(255, 182, 193, 0.4);
}

.profile-image img:hover {
    transform: scale(1.02);
}

.profile-info {
    flex: 1;
    min-width: 300px;
}

/* 朋友部分 */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}

/* 家庭部分 */
.family-tree {
    max-width: 800px;
    margin: 0 auto;
}

/* 爱好部分 */
.hobby-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
}

.hobby-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 30px 20px;
    border-radius: var(--border-radius);
    background-color: var(--card-background);
    box-shadow: var(--box-shadow);
    transition: var(--transition);
    flex: 1;
    min-width: 250px;
    margin: 15px;
    border: 1px solid rgba(255, 182, 193, 0.2);
    position: relative;
    overflow: hidden;
}

.hobby-item::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, transparent 50%, rgba(255, 182, 193, 0.2) 50%);
    border-radius: 0 0 var(--border-radius) 0;
}

.hobby-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.12);
}

.hobby-item .icon {
    width: 70px;
    height: 70px;
    background-color: rgba(255, 182, 193, 0.2);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 20px;
    position: relative;
    z-index: 1;
    transition: transform 0.3s ease;
}

.hobby-item:hover .icon {
    transform: scale(1.1) rotate(5deg);
}

.hobby-item i {
    font-size: 2rem;
    color: var(--primary-color);
}

/* 徽章样式 */
.friend-badge, .family-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--primary-color);
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    z-index: 10;
    box-shadow: 0 3px 6px rgba(255, 128, 171, 0.3);
    transform: rotate(5deg);
}

.family-badge {
    background: var(--accent-color);
}

/* 表情符号样式 */
.emoji {
    display: inline-block;
    margin: 0 2px;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
    100% { transform: translateY(0); }
}

/* 导航图标样式 */
nav ul li a i {
    margin-right: 5px;
    font-size: 0.9em;
    opacity: 0.8;
}

nav ul li a:hover i {
    transform: scale(1.1);
    opacity: 1;
}

/* 按钮图标样式 */
.btn i {
    margin-left: 8px;
    font-size: 0.9em;
    transition: transform 0.3s ease;
}

.btn:hover i {
    transform: translateX(3px);
}

/* 个人介绍标题样式 */
.profile-info h3 {
    display: flex;
    align-items: center;
    font-size: 1.6rem;
    margin-bottom: 15px;
    color: var(--primary-color);
}

.profile-info h3 .emoji {
    margin-right: 10px;
}

/* 友情和家庭卡片图片样式 */
#friends .card img, #family .card img {
    border-radius: var(--border-radius);
    transition: transform 0.5s ease;
    margin-bottom: 15px;
    border: 3px solid rgba(255, 182, 193, 0.3);
}

#friends .card:hover img, #family .card:hover img {
    transform: scale(1.03);
}

#friends .card h3, #family .card h3 {
    display: flex;
    align-items: center;
    justify-content: center;
}

#friends .card h3 .emoji, #family .card h3 .emoji {
    margin-right: 8px;
}

/* 为每个部分添加装饰性背景 */
#friends {
    background-image: url("data:image/svg+xml,%3Csvg width='20' height='20' viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23ffcdd2' fill-opacity='0.2' fill-rule='evenodd'%3E%3Ccircle cx='3' cy='3' r='3'/%3E%3Ccircle cx='13' cy='13' r='3'/%3E%3C/g%3E%3C/svg%3E");
}

#family {
    background-image: url("data:image/svg+xml,%3Csvg width='52' height='26' viewBox='0 0 52 26' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffcdd2' fill-opacity='0.2'%3E%3Cpath d='M10 10c0-2.21-1.79-4-4-4-3.314 0-6-2.686-6-6h2c0 2.21 1.79 4 4 4 3.314 0 6 2.686 6 6 0 2.21 1.79 4 4 4 3.314 0 6 2.686 6 6 0 2.21 1.79 4 4 4v2c-3.314 0-6-2.686-6-6 0-2.21-1.79-4-4-4-3.314 0-6-2.686-6-6zm25.464-1.95l8.486 8.486-1.414 1.414-8.486-8.486 1.414-1.414z' /%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

#hobbies {
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffcdd2' fill-opacity='0.2'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

/* 页脚样式 */
footer {
    background: linear-gradient(to right, #ff80ab, #f48fb1);
    color: white;
    padding: 30px 0;
    position: relative;
    overflow: hidden;
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 10px;
    background: linear-gradient(135deg, transparent 45%, rgba(255, 255, 255, 0.5) 45%, rgba(255, 255, 255, 0.5) 55%, transparent 55%);
    background-size: 20px 20px;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.social-links {
    margin-bottom: 20px;
}

.social-icon {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    background-color: var(--primary-color);
    color: white;
    border-radius: 50%;
    margin: 0 10px;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.social-icon::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.social-icon:hover::before {
    opacity: 1;
}

.social-icon i {
    position: relative;
    z-index: 1;
    font-size: 1.2rem;
}

.social-icon:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 10px rgba(255, 128, 171, 0.3);
}

/* 响应式设计 */
@media (max-width: 768px) {
    :root {
        --header-height: 70px;
    }
    
    header h1 {
        font-size: 1.5rem;
    }
    
    nav ul li {
        margin-left: 15px;
    }
    
    .hero-content h2 {
        font-size: 2.2rem;
    }
    
    .hero-content p {
        font-size: 1rem;
    }
    
    .section {
        padding: 60px 0;
    }
    
    .section h2 {
        font-size: 1.8rem;
    }
    
    #personal .card {
        flex-direction: column;
        text-align: center;
    }
    
    .profile-image {
        flex: 0 0 250px;
    }
    
    .friend-badge, .family-badge {
        padding: 4px 10px;
        font-size: 0.7rem;
    }
    
    #friends .card, #family .card {
        margin: 0 auto 30px;
        max-width: 320px;
    }
}

@media (max-width: 576px) {
    :root {
        --header-height: 60px;
    }
    
    #hero {
        height: 400px;
    }
    
    .hero-content h2 {
        font-size: 1.8rem;
    }
    
    .section {
        padding: 40px 0;
    }
    
    .hobby-item {
        flex: 0 0 100%;
    }
    
    .emoji {
        font-size: 0.9em;
    }
} 