/* 重置样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 根变量 */
:root {
    --primary-color: #2c3e50;
    --secondary-color: #3498db;
    --accent-color: #e74c3c;
    --text-color: #2c3e50;
    --text-light: #7f8c8d;
    --bg-color: #ffffff;
    --bg-light: #f8f9fa;
    --border-color: #ecf0f1;
    --shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 8px 30px rgba(0, 0, 0, 0.15);
    --gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --font-primary: 'Noto Serif SC', serif;
    --font-secondary: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* 基础样式 */
body {
    font-family: var(--font-primary);
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
    overflow-x: hidden;
}

.container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* 头部样式 */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
}

.logo-img {
    height: 58px;
    width: auto;
    margin-bottom: 0.2rem;
    transition: all 0.3s ease;
}

.logo-img:hover {
    transform: scale(1.05);
}

.logo .domain {
    font-size: 0.9rem;
    color: var(--text-light);
    font-family: var(--font-secondary);
}

.nav {
    display: flex;
    gap: 2rem;
}

.nav-link {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 400;
    transition: all 0.3s ease;
    position: relative;
    padding: 0.5rem 0;
}

.nav-link:hover,
.nav-link.active {
    color: var(--secondary-color);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--secondary-color);
    transition: width 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

/* 主要内容区域 */
.main {
    flex: 1;
    margin-top: 80px;
}

/* 英雄区域 */
.hero {
    min-height: 70vh;
    background: var(--gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="50" cy="50" r="1" fill="%23ffffff" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>') repeat;
    opacity: 0.3;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    padding: 0 2rem;
}

.hero-title {
    font-size: 3rem;
    font-weight: 300;
    margin-bottom: 1rem;
    opacity: 0;
    animation: fadeInUp 1s ease 0.5s forwards;
}

.hero-subtitle {
    font-size: 1.2rem;
    opacity: 0.9;
    margin-bottom: 3rem;
    opacity: 0;
    animation: fadeInUp 1s ease 0.8s forwards;
}

.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    opacity: 0;
    animation: fadeInUp 1s ease 1.2s forwards;
}

.scroll-indicator span {
    display: block;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    opacity: 0.8;
}

.scroll-arrow {
    width: 20px;
    height: 20px;
    border-right: 2px solid white;
    border-bottom: 2px solid white;
    transform: rotate(45deg);
    margin: 0 auto;
    animation: bounce 2s infinite;
}

/* 主要句子展示区域 */
.featured-quote {
    padding: 6rem 2rem;
    background: var(--bg-light);
    text-align: center;
}

.quote-container {
    max-width: 1000px;
    margin: 0 auto;
    position: relative;
}

.quote-mark {
    font-size: 8rem;
    color: var(--secondary-color);
    opacity: 0.3;
    position: absolute;
    font-family: Georgia, serif;
    line-height: 1;
}

.quote-mark-left {
    top: -2rem;
    left: -2rem;
}

.quote-mark-right {
    bottom: -4rem;
    right: -2rem;
}

.main-quote {
    position: relative;
    z-index: 2;
}

.quote-text {
    font-size: 1.8rem;
    line-height: 1.8;
    color: var(--text-color);
    font-weight: 400;
    margin: 0;
    padding: 2rem;
    background: white;
    border-radius: 20px;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
}

.quote-text:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-5px);
}

.quote-meta {
    margin-top: 2rem;
    display: flex;
    justify-content: center;
    gap: 2rem;
    font-family: var(--font-secondary);
}

.quote-category,
.quote-date {
    padding: 0.5rem 1rem;
    background: var(--secondary-color);
    color: white;
    border-radius: 20px;
    font-size: 0.9rem;
}

/* 句子网格 */
.quotes-grid {
    padding: 6rem 2rem;
    background: white;
}

.grid-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.quote-card {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    border-left: 4px solid var(--secondary-color);
}

.quote-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-hover);
}

.card-quote {
    font-size: 1.2rem;
    line-height: 1.6;
    margin-bottom: 1rem;
    color: var(--text-color);
}

.card-category {
    display: inline-block;
    padding: 0.3rem 0.8rem;
    background: var(--bg-light);
    color: var(--text-light);
    border-radius: 15px;
    font-size: 0.8rem;
    font-family: var(--font-secondary);
}

/* 关于区域 */
.about {
    padding: 6rem 2rem;
    background: var(--bg-light);
}

.about-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.about-title {
    font-size: 2.5rem;
    margin-bottom: 2rem;
    color: var(--primary-color);
}

.about-text {
    font-size: 1.2rem;
    line-height: 1.8;
    margin-bottom: 3rem;
    color: var(--text-light);
}

.about-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.feature {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
}

.feature:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.feature h4 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.feature p {
    color: var(--text-light);
    line-height: 1.6;
}

/* 页脚 */
.footer {
    background: var(--primary-color);
    color: white;
    padding: 2rem;
    text-align: center;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
}

.footer-links {
    margin-top: 1rem;
    display: flex;
    justify-content: center;
    gap: 2rem;
}

.footer-links a {
    color: white;
    text-decoration: none;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.footer-links a:hover {
    opacity: 1;
}

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

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0) rotate(45deg);
    }
    40% {
        transform: translateY(-10px) rotate(45deg);
    }
    60% {
        transform: translateY(-5px) rotate(45deg);
    }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .header {
        padding: 1rem;
        flex-direction: column;
        gap: 1rem;
    }
    
    .logo-img {
        height: 35px;
    }
    
    .nav {
        gap: 1rem;
    }
    
    .main {
        margin-top: 120px;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .quote-text {
        font-size: 1.3rem;
        padding: 1.5rem;
    }
    
    .quote-mark {
        font-size: 4rem;
    }
    
    .quote-mark-left {
        top: -1rem;
        left: -1rem;
    }
    
    .quote-mark-right {
        bottom: -2rem;
        right: -1rem;
    }
    
    .grid-container {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .quote-meta {
        flex-direction: column;
        gap: 1rem;
    }
    
    .about-features {
        grid-template-columns: 1fr;
    }
    
    .footer-links {
        flex-direction: column;
        gap: 1rem;
    }
}

@media (max-width: 480px) {
    .hero {
        min-height: 60vh;
    }
    
    .hero-content {
        padding: 0 1rem;
    }
    
    .featured-quote,
    .quotes-grid,
    .about {
        padding: 3rem 1rem;
    }
    
    .quote-text {
        font-size: 1.1rem;
        padding: 1rem;
    }
    
    .about-title {
        font-size: 2rem;
    }
}

/* 平滑滚动 */
html {
    scroll-behavior: smooth;
}

/* 选择文本样式 */
::selection {
    background: var(--secondary-color);
    color: white;
}

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 8px;
}

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

::-webkit-scrollbar-thumb {
    background: var(--secondary-color);
    border-radius: 4px;
}

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