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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8fafc;
}

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

/* 头部样式 */
.header {
    background: #fff;
    border-bottom: 1px solid #e2e8f0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

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

.logo-icon {
    font-size: 2rem;
}

.logo h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1e293b;
}

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

.nav-link {
    text-decoration: none;
    color: #64748b;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
    color: #4f46e5;
    background-color: #f1f5f9;
}

/* 主要内容 */
.main {
    padding: 2rem 0;
}

.article {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    max-width: 900px;
    margin: 0 auto;
}

/* 文章头部 */
.article-header {
    padding: 3rem 3rem 2rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-align: center;
}

.article-category {
    display: inline-block;
    background: rgba(255, 255, 255, 0.2);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 1.5rem;
}

.article-title {
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1.5rem;
}

.article-meta {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
}

.meta-icon {
    font-size: 1rem;
}

.hero-section {
    background: rgba(255, 255, 255, 0.1);
    padding: 2rem;
    border-radius: 12px;
    backdrop-filter: blur(10px);
}

.hero-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.hero-text {
    font-size: 1.125rem;
    opacity: 0.95;
}

/* 文章内容 */
.article-content {
    padding: 3rem;
}

.content-section {
    margin-bottom: 3rem;
}

.content-section h2 {
    font-size: 1.875rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e2e8f0;
}

.content-section p {
    margin-bottom: 1.5rem;
    font-size: 1.125rem;
    line-height: 1.7;
    color: #475569;
}

/* 摘要框 */
.summary-box {
    background: linear-gradient(135deg, #dbeafe 0%, #e0e7ff 100%);
    border: 1px solid #3b82f6;
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
}

.summary-box h3 {
    color: #1e40af;
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

.summary-box p {
    color: #1e40af;
    margin-bottom: 0;
}

/* 睡眠阶段卡片 */
.sleep-phases {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.phase-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.phase-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.phase-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.phase-card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 0.5rem;
}

.phase-card p {
    color: #64748b;
    font-size: 0.875rem;
    margin-bottom: 0;
}

/* 前后对比框 */
.before-after-box {
    border-radius: 12px;
    padding: 2rem;
    margin: 1.5rem 0;
}

.before-after-box.before {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    border: 1px solid #ef4444;
}

.before-after-box.after {
    background: linear-gradient(135deg, #dcfce7 0%, #bbf7d0 100%);
    border: 1px solid #22c55e;
}

.before-after-box h3 {
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
}

.before h3 {
    color: #dc2626;
}

.after h3 {
    color: #16a34a;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

.stat-item {
    color: #374151;
    font-size: 0.875rem;
}

.schedule-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    text-align: center;
}

.schedule-item {
    background: rgba(255, 255, 255, 0.8);
    padding: 1.5rem;
    border-radius: 8px;
}

.schedule-time {
    font-size: 1.5rem;
    font-weight: 700;
    color: #16a34a;
    margin-bottom: 0.5rem;
}

.schedule-label {
    color: #374151;
    font-size: 0.875rem;
}

/* 表格样式 */
.table-container {
    overflow-x: auto;
    margin: 2rem 0;
}

.results-table,
.comparison-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.results-table th,
.comparison-table th {
    background: #4f46e5;
    color: white;
    padding: 1rem;
    text-align: left;
    font-weight: 600;
}

.results-table td,
.comparison-table td {
    padding: 1rem;
    border-bottom: 1px solid #e2e8f0;
}

.results-table tr:hover,
.comparison-table tr:hover {
    background: #f8fafc;
}

.improvement {
    color: #16a34a;
    font-weight: 600;
}

/* 好处网格 */
.benefits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.benefit-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 2rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.benefit-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.benefit-icon {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.benefit-card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 1rem;
}

.benefit-card p {
    color: #64748b;
    margin-bottom: 0;
    font-size: 0.875rem;
}

/* 挑战框 */
.challenges-box {
    background: #fef3c7;
    border: 1px solid #f59e0b;
    border-radius: 12px;
    padding: 2rem;
}

.challenges-list {
    list-style: none;
    padding: 0;
}

.challenges-list li {
    margin-bottom: 1rem;
    padding-left: 1.5rem;
    position: relative;
    color: #92400e;
}

.challenges-list li::before {
    content: "⚠️";
    position: absolute;
    left: 0;
    top: 0;
}

/* 结论框 */
.conclusion-box {
    background: linear-gradient(135deg, #e0e7ff 0%, #c7d2fe 100%);
    border: 1px solid #4f46e5;
    border-radius: 12px;
    padding: 2rem;
}

.conclusion-box p {
    color: #3730a3;
    font-size: 1.125rem;
    margin-bottom: 1.5rem;
}

.try-this-box {
    background: rgba(255, 255, 255, 0.8);
    border-radius: 8px;
    padding: 1.5rem;
}

.try-this-box h3 {
    color: #3730a3;
    margin-bottom: 1rem;
}

.try-this-box ul {
    list-style: none;
    padding: 0;
}

.try-this-box li {
    color: #3730a3;
    margin-bottom: 0.5rem;
}

/* 行动框 */
.action-box {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    color: white;
    border-radius: 12px;
    padding: 2rem;
    margin: 2rem 0;
}

.action-box h2 {
    color: white;
    border-bottom: 2px solid rgba(255, 255, 255, 0.3);
    margin-bottom: 2rem;
}

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

.action-column h3 {
    color: white;
    margin-bottom: 1rem;
}

.action-column ul {
    list-style: none;
    padding: 0;
}

.action-column li {
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 0.5rem;
}

/* 免责声明 */
.disclaimer {
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    padding: 1.5rem;
    margin-top: 3rem;
}

.disclaimer p {
    color: #64748b;
    font-size: 0.875rem;
    font-style: italic;
    margin-bottom: 0;
}

/* 页脚 */
.footer {
    background: #1e293b;
    color: white;
    margin-top: 4rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    padding: 3rem 0;
}

.footer-section h3,
.footer-section h4 {
    margin-bottom: 1rem;
    color: #f1f5f9;
}

.footer-section p {
    color: #94a3b8;
    margin-bottom: 0;
}

.footer-section ul {
    list-style: none;
    padding: 0;
}

.footer-section li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: #94a3b8;
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-section a:hover {
    color: #f1f5f9;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 1rem;
}

.footer-bottom {
    border-top: 1px solid #334155;
    padding: 2rem 0;
    text-align: center;
    color: #94a3b8;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 0 16px;
    }
    
    .header-content {
        flex-direction: column;
        gap: 1rem;
    }
    
    .nav {
        gap: 1rem;
    }
    
    .article-header {
        padding: 2rem 1.5rem;
    }
    
    .article-title {
        font-size: 1.875rem;
    }
    
    .article-meta {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .article-content {
        padding: 2rem 1.5rem;
    }
    
    .content-section h2 {
        font-size: 1.5rem;
    }
    
    .sleep-phases,
    .benefits-grid {
        grid-template-columns: 1fr;
    }
    
    .stats-grid,
    .schedule-grid,
    .action-grid {
        grid-template-columns: 1fr;
    }
    
    .table-container {
        font-size: 0.875rem;
    }
    
    .results-table th,
    .results-table td,
    .comparison-table th,
    .comparison-table td {
        padding: 0.75rem 0.5rem;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .article-title {
        font-size: 1.5rem;
    }
    
    .hero-section {
        padding: 1.5rem;
    }
    
    .article-content {
        padding: 1.5rem 1rem;
    }
    
    .phase-card,
    .benefit-card {
        padding: 1.5rem;
    }
    
    .before-after-box,
    .action-box {
        padding: 1.5rem;
    }
}