/* 全局样式 */
:root {
    --primary-color: #ff6b81;
    --secondary-color: #5352ed;
    --accent-color: #ff9f43;
    --text-color: #333;
    --light-text: #666;
    --lighter-text: #999;
    --bg-color: #fff;
    --light-bg: #f8f9fa;
    --border-color: #e0e0e0;
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'PingFang SC', 'Microsoft YaHei', sans-serif;
    color: var(--text-color);
    line-height: 1.6;
    background-color: var(--bg-color);
}

a {
    text-decoration: none;
    color: var(--primary-color);
    transition: var(--transition);
}

a:hover {
    color: var(--secondary-color);
}

ul {
    list-style: none;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.btn {
    display: inline-block;
    padding: 8px 16px;
    background-color: var(--primary-color);
    color: white;
    border-radius: 4px;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    font-size: 14px;
    text-align: center;
}

.btn:hover {
    background-color: var(--secondary-color);
    color: white;
}

.btn-primary {
    background-color: var(--primary-color);
}

.btn-secondary {
    background-color: var(--secondary-color);
}

.section-header {
    text-align: center;
    margin-bottom: 40px;
}

.section-header h2 {
    font-size: 28px;
    margin-bottom: 10px;
    color: var(--primary-color);
}

.section-header p {
    color: var(--light-text);
    font-size: 16px;
}

/* 渐变盒子替代图片 */
.gradient-box {
    width: 100%;
    height: 200px;
    border-radius: 8px;
    margin-bottom: 15px;
}

.pink-gradient {
    background: linear-gradient(135deg, #ff6b81, #ff4757);
}

.blue-gradient {
    background: linear-gradient(135deg, #70a1ff, #1e90ff);
}

.purple-gradient {
    background: linear-gradient(135deg, #a29bfe, #6c5ce7);
}

.orange-gradient {
    background: linear-gradient(135deg, #ffa502, #ff7f50);
}

.green-gradient {
    background: linear-gradient(135deg, #2ed573, #7bed9f);
}

.red-gradient {
    background: linear-gradient(135deg, #ff6b6b, #ee5253);
}

.cyan-gradient {
    background: linear-gradient(135deg, #48dbfb, #0abde3);
}

.yellow-gradient {
    background: linear-gradient(135deg, #feca57, #ff9f43);
}

.mini-gradient {
    width: 50px;
    height: 50px;
    margin-right: 15px;
    margin-bottom: 0;
}

.category-gradient {
    height: 120px;
}

.cat1 {
    background: linear-gradient(135deg, #ff6b81, #ff4757);
}

.cat2 {
    background: linear-gradient(135deg, #70a1ff, #1e90ff);
}

.cat3 {
    background: linear-gradient(135deg, #a29bfe, #6c5ce7);
}

.cat4 {
    background: linear-gradient(135deg, #ffa502, #ff7f50);
}

.cat5 {
    background: linear-gradient(135deg, #2ed573, #7bed9f);
}

.cat6 {
    background: linear-gradient(135deg, #ff6b6b, #ee5253);
}

.cat7 {
    background: linear-gradient(135deg, #48dbfb, #0abde3);
}

.cat8 {
    background: linear-gradient(135deg, #feca57, #ff9f43);
}

.qrcode-gradient {
    height: 150px;
    width: 150px;
    margin: 0 auto 15px;
}

/* 图标样式 */
[class^="icon-"] {
    display: inline-block;
    width: 1em;
    height: 1em;
    vertical-align: middle;
    margin-right: 5px;
}

.icon-book:before {
    content: "📚";
}

.icon-check:before {
    content: "✓";
}

.icon-android:before {
    content: "🤖";
}

.icon-apple:before {
    content: "🍎";
}

.icon-email:before {
    content: "✉️";
}

.icon-phone:before {
    content: "📞";
}

.icon-weibo:before {
    content: "微";
}

.icon-wechat:before {
    content: "微";
}

.icon-qq:before {
    content: "Q";
}

/* 导航栏 */
header {
    background-color: white;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

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

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

.logo a {
    display: flex;
    align-items: center;
    font-size: 24px;
    font-weight: bold;
    color: var(--primary-color);
}

.logo i {
    font-size: 28px;
    margin-right: 10px;
}

nav ul {
    display: flex;
}

nav ul li {
    margin-left: 20px;
}

nav ul li a {
    color: var(--text-color);
    font-weight: 500;
}

nav ul li a:hover {
    color: var(--primary-color);
}

/* 横幅 */
.banner {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 80px 0;
    text-align: center;
}

.banner-content {
    max-width: 800px;
    margin: 0 auto;
}

.banner h1 {
    font-size: 36px;
    margin-bottom: 20px;
}

.banner p {
    font-size: 18px;
    margin-bottom: 30px;
}

.search-box {
    display: flex;
    max-width: 600px;
    margin: 0 auto;
}

.search-box input {
    flex: 1;
    padding: 12px 15px;
    border: none;
    border-radius: 4px 0 0 4px;
    font-size: 16px;
}

.search-box button {
    padding: 12px 20px;
    background-color: var(--accent-color);
    color: white;
    border: none;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
    font-size: 16px;
    transition: var(--transition);
}

.search-box button:hover {
    background-color: #f39c12;
}

/* 阅读平台 */
.platforms {
    padding: 60px 0;
    background-color: var(--light-bg);
}

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

.platform-card {
    background-color: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.platform-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.platform-card h3 {
    margin: 15px 0;
    font-size: 20px;
    color: var(--primary-color);
}

.platform-card p {
    margin-bottom: 20px;
    color: var(--light-text);
    min-height: 60px;
}

/* 精品推荐 */
.recommend {
    padding: 60px 0;
}

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

.article-card {
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.article-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.article-content {
    padding: 20px;
}

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

.article-content .meta {
    color: var(--lighter-text);
    font-size: 14px;
    margin-bottom: 15px;
}

.article-content .excerpt {
    color: var(--light-text);
    margin-bottom: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.read-more {
    display: inline-block;
    color: var(--primary-color);
    font-weight: 500;
}

/* 最新上架 */
.newest {
    padding: 60px 0;
    background-color: var(--light-bg);
}

.book-list {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.book-item {
    display: flex;
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.book-item .gradient-box {
    width: 200px;
    height: auto;
    margin-bottom: 0;
    border-radius: 0;
}

.book-info {
    padding: 20px;
    flex: 1;
}

.book-info h3 {
    margin-bottom: 10px;
    font-size: 20px;
    color: var(--primary-color);
}

.book-info .author {
    color: var(--lighter-text);
    margin-bottom: 15px;
}

.book-info .intro {
    color: var(--light-text);
    margin-bottom: 20px;
}

/* 热门排行 */
.ranking {
    padding: 60px 0;
}

.ranking-tabs {
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.tab-header {
    display: flex;
    background-color: var(--light-bg);
}

.tab-item {
    padding: 15px 20px;
    cursor: pointer;
    transition: var(--transition);
}

.tab-item.active {
    background-color: white;
    color: var(--primary-color);
    font-weight: 500;
}

.tab-content {
    padding: 20px;
}

.tab-pane {
    display: none;
}

.tab-pane.active {
    display: block;
}

.ranking-list li {
    display: flex;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid var(--border-color);
}

.ranking-list li:last-child {
    border-bottom: none;
}

.rank {
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--primary-color);
    color: white;
    border-radius: 50%;
    margin-right: 15px;
    font-weight: bold;
}

.book-brief {
    flex: 1;
}

.book-brief h4 {
    margin-bottom: 5px;
}

.book-brief p {
    color: var(--lighter-text);
    font-size: 14px;
}

/* 分类专区 */
.category {
    padding: 60px 0;
    background-color: var(--light-bg);
}

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

.category-item {
    background-color: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: var(--shadow);
    text-align: center;
    transition: var(--transition);
}

.category-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.category-item h3 {
    margin: 15px 0 10px;
    color: var(--primary-color);
}

.category-item p {
    color: var(--light-text);
    margin-bottom: 15px;
    min-height: 40px;
}

/* APP下载 */
.download {
    padding: 60px 0;
}

.download-content {
    display: flex;
    align-items: center;
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.app-info {
    flex: 1;
    padding: 30px;
}

.app-info h3 {
    font-size: 24px;
    margin-bottom: 20px;
    color: var(--primary-color);
}

.feature-list {
    margin-bottom: 30px;
}

.feature-list li {
    margin-bottom: 10px;
    display: flex;
    align-items: center;
}

.feature-list li i {
    color: var(--primary-color);
    margin-right: 10px;
}

.download-buttons {
    display: flex;
    gap: 15px;
}

.app-qrcode {
    width: 200px;
    padding: 30px;
    text-align: center;
}

.app-qrcode p {
    color: var(--light-text);
}

/* 关于我们 */
.about {
    padding: 60px 0;
    background-color: var(--light-bg);
}

.about-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
    background-color: white;
    border-radius: 8px;
    padding: 30px;
    box-shadow: var(--shadow);
}

.about-text p {
    margin-bottom: 15px;
}

.contact-info h3 {
    margin-bottom: 20px;
    color: var(--primary-color);
}

.contact-info p {
    margin-bottom: 10px;
    display: flex;
    align-items: center;
}

.social-links {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.social-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--light-bg);
    border-radius: 50%;
    color: var(--primary-color);
    transition: var(--transition);
}

.social-icon:hover {
    background-color: var(--primary-color);
    color: white;
}

/* 文章列表 */
.articles {
    padding: 60px 0;
}

.article-list {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.article-item {
    background-color: white;
    border-radius: 8px;
    padding: 30px;
    box-shadow: var(--shadow);
}

.article-item h3 {
    font-size: 22px;
    margin-bottom: 10px;
    color: var(--primary-color);
}

.article-item .meta {
    color: var(--lighter-text);
    margin-bottom: 15px;
}

.article-item p {
    color: var(--light-text);
    margin-bottom: 20px;
}

/* 页脚 */
footer {
    background-color: #2c3e50;
    color: white;
    padding: 60px 0 30px;
}

.footer-content {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    margin-bottom: 40px;
}

.footer-logo {
    flex: 1;
    min-width: 200px;
}

.footer-logo i {
    font-size: 28px;
    margin-right: 10px;
}

.footer-logo span {
    font-size: 24px;
    font-weight: bold;
}

.footer-logo p {
    margin-top: 10px;
    color: rgba(255, 255, 255, 0.7);
}

.footer-links {
    flex: 3;
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
}

.footer-column {
    flex: 1;
    min-width: 150px;
}

.footer-column h4 {
    margin-bottom: 20px;
    color: var(--primary-color);
}

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

.footer-column ul li a {
    color: rgba(255, 255, 255, 0.7);
}

.footer-column ul li a:hover {
    color: white;
}

.footer-bottom {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.copyright {
    color: rgba(255, 255, 255, 0.5);
}

.copyright p {
    margin-bottom: 5px;
}

.friend-links {
    margin-top: 20px;
}

.friend-links h4 {
    margin-bottom: 15px;
    color: var(--primary-color);
}

.friend-links ul {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.friend-links ul li a {
    color: rgba(255, 255, 255, 0.5);
}

.friend-links ul li a:hover {
    color: white;
}

/* 响应式设计 */
@media (max-width: 768px) {
    nav {
        display: none;
    }
    
    .book-item {
        flex-direction: column;
    }
    
    .book-item .gradient-box {
        width: 100%;
        height: 200px;
    }
    
    .download-content {
        flex-direction: column;
    }
    
    .app-qrcode {
        width: 100%;
    }
    
    .about-content {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        flex-direction: column;
    }
    
    .footer-bottom {
        flex-direction: column;
    }
}
