/* 基础样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 自定义CSS变量 */
:root {
    --primary-color: #2c3e50;
    --secondary-color: #34495e;
    --accent-color: #e74c3c;
    --text-color: #2c3e50;
    --text-light: #7f8c8d;
    --bg-color: #ffffff;
    --bg-light: #f8f9fa;
    --border-color: #ecf0f1;
    --shadow-light: 0 2px 10px rgba(0,0,0,0.1);
    --shadow-medium: 0 4px 20px rgba(0,0,0,0.15);
    --transition: all 0.3s ease;
    --font-primary: 'Noto Serif SC', serif;
    --font-secondary: 'Inter', sans-serif;
}

/* 基础样式 */
html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-primary);
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 导航栏样式 */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-light);
    z-index: 1000;
    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 h2 {
    color: var(--primary-color);
    font-weight: 500;
    font-size: 1.5rem;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-link {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 400;
    transition: var(--transition);
    position: relative;
}

.nav-link:hover {
    color: var(--accent-color);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--accent-color);
    transition: var(--transition);
}

.nav-link:hover::after {
    width: 100%;
}

/* 汉堡菜单 */
.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.bar {
    width: 25px;
    height: 3px;
    background-color: var(--primary-color);
    margin: 3px 0;
    transition: var(--transition);
}

/* 主页横幅 */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    overflow: hidden;
}

.hero-content {
    text-align: center;
    color: white;
    z-index: 2;
    position: relative;
}

.hero-title {
    font-size: 4rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    animation: fadeInUp 1s ease-out;
}

.hero-subtitle {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
    animation: fadeInUp 1s ease-out 0.3s both;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    animation: fadeInUp 1s ease-out 0.6s both;
}

.btn {
    padding: 12px 30px;
    text-decoration: none;
    border-radius: 30px;
    font-weight: 500;
    transition: var(--transition);
    display: inline-block;
}

.btn-primary {
    background-color: var(--accent-color);
    color: white;
    border: 2px solid var(--accent-color);
}

.btn-primary:hover {
    background-color: transparent;
    color: var(--accent-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

.btn-outline {
    background-color: transparent;
    color: white;
    border: 2px solid white;
}

.btn-outline:hover {
    background-color: white;
    color: var(--primary-color);
    transform: translateY(-2px);
}

/* 浮动元素动画 */
.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
}

.floating-elements {
    position: absolute;
    width: 100%;
    height: 100%;
}

.floating-char {
    position: absolute;
    font-size: 4rem;
    color: rgba(255,255,255,0.1);
    font-weight: bold;
    animation: float 6s ease-in-out infinite;
}

.floating-char:nth-child(1) {
    top: 20%;
    left: 10%;
    animation-delay: 0s;
}

.floating-char:nth-child(2) {
    top: 60%;
    right: 15%;
    animation-delay: 1.5s;
}

.floating-char:nth-child(3) {
    top: 30%;
    right: 30%;
    animation-delay: 3s;
}

.floating-char:nth-child(4) {
    bottom: 20%;
    left: 20%;
    animation-delay: 4.5s;
}

/* 章节样式 */
section {
    padding: 80px 0;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: var(--primary-color);
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background-color: var(--accent-color);
}

/* 关于我部分 */
.about {
    background-color: var(--bg-light);
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: start;
}

.about-intro {
    font-size: 1.3rem;
    font-weight: 500;
    color: var(--accent-color);
    margin-bottom: 1.5rem;
}

.about-text p {
    margin-bottom: 1.5rem;
    text-align: justify;
    line-height: 1.8;
}

.about-features {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.feature {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: var(--shadow-light);
    transition: var(--transition);
}

.feature:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-medium);
}

.feature i {
    font-size: 2rem;
    color: var(--accent-color);
    margin-bottom: 1rem;
}

.feature h3 {
    margin-bottom: 1rem;
    color: var(--primary-color);
}

/* 诗歌作品部分 */
.poetry {
    background: white;
}

.poetry-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.poem-card {
    background: var(--bg-light);
    padding: 2rem;
    border-radius: 15px;
    border-left: 4px solid var(--accent-color);
    transition: var(--transition);
}

.poem-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-medium);
}

.poem-card h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.poem-content {
    margin-bottom: 1.5rem;
}

.poem-content p {
    line-height: 1.8;
    font-style: italic;
    color: var(--text-color);
}

.poem-meta {
    text-align: right;
}

.poem-date {
    color: var(--text-light);
    font-size: 0.9rem;
}

/* 博客部分 */
.blog {
    background-color: var(--bg-light);
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.blog-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow-light);
    transition: var(--transition);
}

.blog-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-medium);
}

.blog-image {
    height: 200px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    display: flex;
    align-items: center;
    justify-content: center;
}

.blog-image i {
    font-size: 3rem;
    color: white;
}

.blog-content {
    padding: 1.5rem;
}

.blog-content h3 {
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.blog-content p {
    margin-bottom: 1rem;
    color: var(--text-light);
    line-height: 1.6;
}

.blog-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    color: var(--text-light);
}

.blog-category {
    background-color: var(--accent-color);
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
}

/* 联系部分 */
.contact {
    background: white;
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
}

.contact-info p {
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

.contact-methods {
    margin-top: 2rem;
}

.contact-item {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
    gap: 1rem;
}

.contact-item i {
    color: var(--accent-color);
    width: 20px;
}

.contact-form {
    background: var(--bg-light);
    padding: 2rem;
    border-radius: 15px;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-family: inherit;
    transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-color);
}

/* 页脚 */
.footer {
    background-color: var(--primary-color);
    color: white;
    padding: 3rem 0 1rem;
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    margin-bottom: 2rem;
}

.footer-main h3 {
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.footer-main p {
    color: rgba(255,255,255,0.8);
}

.footer-links {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.footer-section h4 {
    margin-bottom: 1rem;
    color: var(--accent-color);
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    transition: var(--transition);
}

.footer-section a:hover {
    color: white;
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
}

.icp-info a {
    color: rgba(255,255,255,0.6);
    text-decoration: none;
    transition: var(--transition);
}

.icp-info a:hover {
    color: white;
}

/* 动画效果 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-20px);
    }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: white;
        width: 100%;
        text-align: center;
        transition: var(--transition);
        box-shadow: var(--shadow-light);
        padding: 2rem 0;
        gap: 1rem;
    }

    .nav-menu.active {
        left: 0;
    }

    .hamburger {
        display: flex;
    }

    .hamburger.active .bar:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .hamburger.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }

    .about-content,
    .contact-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .poetry-grid,
    .blog-grid {
        grid-template-columns: 1fr;
    }

    .footer-content,
    .footer-links {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .floating-char {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }

    .hero-title {
        font-size: 2rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .feature,
    .poem-card,
    .contact-form {
        padding: 1.5rem;
    }
}
