/* css/style.css */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background: #f5f5f5;
}

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

/* 导航栏 */
.navbar {
    background: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
}

.logo a {
    color: #ff6b6b;
    text-decoration: none;
    font-size: 24px;
    font-weight: bold;
}

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

.nav-menu li {
    margin-left: 30px;
}

.nav-menu a {
    color: #333;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.nav-menu a:hover {
    color: #ff6b6b;
}

/* 头部横幅 */
.hero {
    background: linear-gradient(135deg, #ff6b6b, #ff8e8e);
    color: #fff;
    padding: 60px 0;
    text-align: center;
}

.hero h1 {
    font-size: 36px;
    margin-bottom: 15px;
}

.hero p {
    font-size: 18px;
    opacity: 0.9;
}

/* 通用章节标题 */
.section-title {
    text-align: center;
    font-size: 32px;
    margin: 40px 0;
    color: #333;
    position: relative;
}

.section-title:after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: #ff6b6b;
    margin: 15px auto 0;
}

/* 优惠券网格 */
.coupons-section {
    padding: 40px 0;
}

.coupons-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
}

.coupon-card {
    background: #fff;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    transition: transform 0.3s, box-shadow 0.3s;
    position: relative;
    overflow: hidden;
    border: 1px solid #eee;
}

.coupon-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.coupon-card:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #ff6b6b, #ffd93d);
}

.coupon-icon {
    font-size: 40px;
    color: #ff6b6b;
    margin-bottom: 15px;
}

.coupon-card h3 {
    font-size: 20px;
    margin-bottom: 10px;
    color: #333;
}

.coupon-card p {
    color: #666;
    margin-bottom: 20px;
    font-size: 14px;
}

.coupon-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.platform-tag {
    background: #f0f0f0;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    color: #666;
}

.btn-claim {
    background: #ff6b6b;
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.3s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-claim:hover {
    background: #ff5252;
}

/* 文章网格 */
.articles-section {
    padding: 40px 0;
    background: #fff;
}

.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
}

.article-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    transition: transform 0.3s;
    border: 1px solid #eee;
}

.article-card:hover {
    transform: translateY(-5px);
}

.article-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
}

.article-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.article-card:hover .article-image img {
    transform: scale(1.05);
}

.article-content {
    padding: 20px;
}

.article-content h3 {
    font-size: 20px;
    margin-bottom: 10px;
}

.article-content h3 a {
    color: #333;
    text-decoration: none;
}

.article-content h3 a:hover {
    color: #ff6b6b;
}

.article-excerpt {
    color: #666;
    font-size: 14px;
    margin-bottom: 15px;
    line-height: 1.6;
}

.article-meta {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
    font-size: 13px;
    color: #999;
}

.article-meta i {
    margin-right: 5px;
}

.read-more {
    color: #ff6b6b;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.read-more:hover {
    gap: 8px;
}

/* 底部 */
.footer {
    background: #333;
    color: #fff;
    padding: 50px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

.footer-section h3 {
    font-size: 18px;
    margin-bottom: 15px;
    color: #ff6b6b;
}

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

.footer-section ul li {
    margin-bottom: 10px;
}

.footer-section ul li a {
    color: #ccc;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-section ul li a:hover {
    color: #ff6b6b;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #444;
    color: #999;
    font-size: 14px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .nav-menu {
        display: none;
    }
    
    .hero h1 {
        font-size: 28px;
    }
    
    .section-title {
        font-size: 28px;
    }
    
    .coupons-grid,
    .articles-grid {
        grid-template-columns: 1fr;
    }
}



/* post.php 专用样式 */
.post-detail-page {
    padding: 40px 0;
    background: #f8f9fa;
}

.post-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 30px;
}

/* 文章主体 */
.single-post {
    background: #fff;
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.post-header {
    margin-bottom: 30px;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 20px;
}

.post-title {
    font-size: 32px;
    color: #333;
    margin-bottom: 15px;
    line-height: 1.3;
}

.post-meta {
    display: flex;
    gap: 20px;
    color: #999;
    font-size: 14px;
}

.post-meta i {
    margin-right: 5px;
    color: #ff6b6b;
}

.post-content {
    line-height: 1.8;
    color: #444;
}

.post-content h2 {
    font-size: 24px;
    margin: 30px 0 15px;
    color: #333;
}

.post-content h3 {
    font-size: 20px;
    margin: 25px 0 12px;
    color: #333;
}

.post-content p {
    margin-bottom: 15px;
}

.post-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 20px 0;
}

.post-content ul,
.post-content ol {
    margin: 15px 0 15px 20px;
}

.post-content li {
    margin-bottom: 5px;
}

.post-content a {
    color: #ff6b6b;
    text-decoration: none;
}

.post-content a:hover {
    text-decoration: underline;
}

.post-content blockquote {
    border-left: 4px solid #ff6b6b;
    background: #f9f9f9;
    padding: 15px 20px;
    margin: 20px 0;
    font-style: italic;
    color: #666;
}

.post-footer {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 2px solid #f0f0f0;
}

.post-share {
    display: flex;
    align-items: center;
    gap: 15px;
}

.post-share span {
    color: #666;
    font-weight: 500;
}

.post-share a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: #f0f0f0;
    border-radius: 50%;
    color: #666;
    transition: all 0.3s;
}

.post-share a:hover {
    background: #ff6b6b;
    color: #fff;
    transform: translateY(-2px);
}

/* 侧边栏 */
.post-sidebar {
    position: sticky;
    top: 90px;
    align-self: start;
}

.sidebar-widget {
    background: #fff;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.sidebar-widget h3 {
    font-size: 18px;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f0f0f0;
    color: #333;
    position: relative;
}

.sidebar-widget h3:after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 40px;
    height: 2px;
    background: #ff6b6b;
}

/* 热门优惠券列表 */
.hot-coupons-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.hot-coupon-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 8px;
    transition: transform 0.3s;
}

.hot-coupon-item:hover {
    transform: translateX(5px);
    background: #fff;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
}

.coupon-info {
    flex: 1;
}

.coupon-info h4 {
    font-size: 14px;
    margin-bottom: 5px;
    color: #333;
}

.coupon-info p {
    font-size: 12px;
    color: #999;
}

.btn-small {
    background: #ff6b6b;
    color: #fff;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    text-decoration: none;
    white-space: nowrap;
    margin-left: 10px;
}

.btn-small:hover {
    background: #ff5252;
}

/* 相关文章列表 */
.related-posts-list {
    list-style: none;
}

.related-posts-list li {
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #f0f0f0;
}

.related-posts-list li:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.related-posts-list a {
    text-decoration: none;
    display: block;
}

.related-posts-list h4 {
    font-size: 15px;
    color: #333;
    margin-bottom: 8px;
    line-height: 1.4;
    transition: color 0.3s;
}

.related-posts-list a:hover h4 {
    color: #ff6b6b;
}

.related-posts-list .post-date {
    font-size: 12px;
    color: #999;
}

/* 广告位 */
.ad-widget {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
}

.ad-widget h3 {
    color: #fff;
    border-bottom-color: rgba(255,255,255,0.2);
}

.ad-widget h3:after {
    background: #fff;
}

.ad-content {
    text-align: center;
}

.ad-content p {
    margin-bottom: 10px;
    font-size: 14px;
    opacity: 0.9;
}

.btn-ad {
    display: inline-block;
    background: #fff;
    color: #764ba2;
    padding: 10px 25px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    margin-top: 15px;
    transition: transform 0.3s;
}

.btn-ad:hover {
    transform: scale(1.05);
    background: #fff;
    color: #667eea;
}

/* 404错误页面 */
.error-page {
    text-align: center;
    padding: 100px 20px;
    min-height: 60vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.error-page h1 {
    font-size: 48px;
    color: #333;
    margin-bottom: 20px;
}

.error-page p {
    font-size: 18px;
    color: #666;
    margin-bottom: 30px;
}

.btn-home {
    display: inline-block;
    background: #ff6b6b;
    color: #fff;
    padding: 12px 30px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    transition: background 0.3s;
}

.btn-home:hover {
    background: #ff5252;
}

/* 响应式设计 */
@media (max-width: 992px) {
    .post-layout {
        grid-template-columns: 1fr;
    }
    
    .post-sidebar {
        position: static;
        margin-top: 30px;
    }
}

@media (max-width: 768px) {
    .single-post {
        padding: 25px;
    }
    
    .post-title {
        font-size: 24px;
    }
    
    .post-meta {
        flex-wrap: wrap;
        gap: 10px;
    }
    
    .sidebar-widget {
        padding: 20px;
    }
}