/* AI百宝箱 - 增强样式 */
/* === 基础设置 === */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --secondary: #10b981;
    --accent: #f59e0b;
    --dark: #1e293b;
    --light: #f8fafc;
    --gray: #64748b;
    --white: #ffffff;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 25px -3px rgba(0, 0, 0, 0.1);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: var(--light);
    color: var(--dark);
    line-height: 1.6;
}

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

/* === 导航栏 === */
.navbar {
    background: var(--white);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 64px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: var(--dark);
    font-weight: 700;
    font-size: 1.5rem;
}

.logo:hover {
    color: var(--primary);
}

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

.nav-links {
    display: flex;
    gap: 24px;
}

.nav-links a {
    text-decoration: none;
    color: var(--gray);
    font-weight: 500;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: var(--primary);
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
        position: absolute;
        top: 64px;
        left: 0;
        right: 0;
        background: var(--white);
        flex-direction: column;
        padding: 20px;
        gap: 16px;
        box-shadow: var(--shadow);
    }
    .nav-links.show {
        display: flex;
    }
    .mobile-menu-btn {
        display: block;
    }
}

/* === 英雄区域 === */
.hero {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--white);
    padding: 80px 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.5;
}

.hero .container {
    position: relative;
    z-index: 1;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 16px;
    animation: fadeInUp 0.6s ease-out;
}

.hero-subtitle {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 12px;
}

.hero-desc {
    font-size: 1.125rem;
    opacity: 0.9;
    margin-bottom: 32px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 搜索框 */
.search-box {
    max-width: 600px;
    margin: 0 auto 40px;
    display: flex;
    gap: 12px;
}

.search-box input {
    flex: 1;
    padding: 16px 24px;
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    box-shadow: var(--shadow-lg);
    outline: none;
}

.search-box input:focus {
    box-shadow: var(--shadow-lg), 0 0 0 3px rgba(99, 102, 241, 0.3);
}

.search-box button {
    padding: 16px 32px;
    background: var(--secondary);
    color: var(--white);
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
}

.search-box button:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-lg);
}

/* 统计数据 */
.hero-stats {
    display: flex;
    justify-content: center;
    gap: 48px;
    margin-bottom: 32px;
}

.stat {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat strong {
    font-size: 2rem;
    display: block;
}

.stat span {
    font-size: 0.875rem;
    opacity: 0.8;
}

/* 今日推荐 */
.today-pick {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border-radius: 50px;
    padding: 12px 24px;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    margin-top: 16px;
}

.today-label {
    font-weight: 600;
    color: var(--accent);
}

.today-link {
    color: var(--white);
    text-decoration: none;
    transition: opacity 0.3s;
}

.today-link:hover {
    opacity: 0.8;
}

@media (max-width: 768px) {
    .hero h1 {
        font-size: 2rem;
    }
    .hero-stats {
        gap: 24px;
    }
    .search-box {
        flex-direction: column;
    }
}

/* === 分类区块 === */
.category {
    padding: 80px 0;
}

.category.alt-bg {
    background: var(--white);
}

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

.section-header h2 {
    font-size: 2rem;
    margin-bottom: 8px;
    color: var(--dark);
}

.section-header p {
    color: var(--gray);
    font-size: 1.125rem;
}

.highlight-text {
    color: var(--primary);
    font-weight: 600;
}

/* 工具卡片网格 */
.tool-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.tool-card {
    background: var(--light);
    border-radius: 16px;
    padding: 24px;
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    display: block;
    position: relative;
    border: 2px solid transparent;
}

.tool-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
}

.tool-card.featured {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border-color: #0ea5e9;
}

.tool-icon {
    font-size: 2.5rem;
    margin-bottom: 12px;
}

.tool-card h3 {
    font-size: 1.25rem;
    margin-bottom: 8px;
    color: var(--dark);
}

.tool-card p {
    color: var(--gray);
    font-size: 0.9rem;
    line-height: 1.5;
}

/* 标签 */
.tool-tags {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    flex-wrap: wrap;
}

.tag {
    background: var(--gray);
    color: var(--white);
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
}

.tag.hot {
    background: #ef4444;
}

.tag.free {
    background: var(--secondary);
}

/* 推荐徽章 */
.featured-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: var(--accent);
    color: var(--white);
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 700;
}

/* === 省钱表格 === */
.save-table {
    background: var(--white);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.save-row {
    display: grid;
    grid-template-columns: 1fr 1.5fr 1fr;
    padding: 16px 24px;
    border-bottom: 1px solid #e2e8f0;
    align-items: center;
}

.save-row:last-child {
    border-bottom: none;
}

.save-row.header {
    background: var(--primary);
    color: var(--white);
    font-weight: 600;
}

.save-pct {
    color: var(--secondary);
    font-weight: 700;
    font-size: 1.1rem;
}

@media (max-width: 768px) {
    .save-row {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 8px;
    }
}

/* === 订阅区 === */
.newsletter {
    padding: 80px 0;
    text-align: center;
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
}

.newsletter.highlight {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--white);
}

.newsletter h2 {
    font-size: 2rem;
    margin-bottom: 12px;
}

.newsletter p {
    font-size: 1.125rem;
    margin-bottom: 32px;
    opacity: 0.9;
}

.subscribe-box {
    max-width: 500px;
    margin: 0 auto;
    display: flex;
    gap: 12px;
}

.subscribe-box input {
    flex: 1;
    padding: 16px 24px;
    border: none;
    border-radius: 50px;
    font-size: 1rem;
}

.subscribe-box button {
    padding: 16px 32px;
    background: var(--secondary);
    color: var(--white);
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
}

.subscribe-btn {
    background: var(--accent) !important;
    color: var(--dark) !important;
}

.subscribe-benefits {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-bottom: 20px;
    font-size: 0.9rem;
}

.social-proof {
    margin-top: 16px;
    font-size: 0.9rem;
    opacity: 0.8;
}

.privacy-note {
    font-size: 0.8rem;
    opacity: 0.7;
    margin-top: 12px;
}

@media (max-width: 768px) {
    .subscribe-box {
        flex-direction: column;
    }
    .subscribe-benefits {
        flex-direction: column;
        gap: 8px;
    }
}

/* === 页脚 === */
footer {
    background: var(--dark);
    color: var(--white);
    padding: 60px 0 20px;
}

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

.footer-col h3 {
    font-size: 1.25rem;
    margin-bottom: 16px;
}

.footer-col p {
    color: #94a3b8;
    line-height: 1.6;
}

.footer-col a {
    display: block;
    color: #94a3b8;
    text-decoration: none;
    margin-bottom: 8px;
    transition: color 0.3s;
}

.footer-col a:hover {
    color: var(--white);
}

.footer-stats {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #334155;
}

.footer-stats div {
    color: #94a3b8;
    font-size: 0.9rem;
}

.footer-stats strong {
    color: var(--secondary);
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #334155;
    color: #64748b;
    font-size: 0.875rem;
}

.footer-bottom a {
    color: #64748b;
}

/* === 广告位占位 === */
.ad-container {
    padding: 20px;
    min-height: 100px;
    background: #f1f5f9;
    margin: 20px 0;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
}

/* === 动画 === */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

.featured-badge {
    animation: pulse 2s infinite;
}

/* 返回顶部 */
.back-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: var(--primary);
    color: var(--white);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    text-decoration: none;
    box-shadow: var(--shadow-lg);
    transition: transform 0.3s;
}

.back-to-top:hover {
    transform: translateY(-4px);
}

/* === 支持我们区域 === */
.support-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 60px 20px;
    text-align: center;
}

.support-section h2 {
    font-size: 2rem;
    margin-bottom: 16px;
}

.support-section p {
    font-size: 1.1rem;
    opacity: 0.95;
    margin-bottom: 30px;
}

.donate-qr {
    background: white;
    padding: 10px;
    border-radius: 16px;
    display: inline-block;
    max-width: 180px;
}

.donate-qr img {
    width: 100%;
    height: auto;
    border-radius: 12px;
}

.donate-qr p {
    color: var(--dark);
    margin-top: 12px;
}