/*
Theme Name: AI SaaS Hub
Theme URI: https://example.com/aisaas-hub
Description: 专业的AI SaaS推广主题，融合G2工具卡片、Capterra目录筛选、NerdWallet评测可信度、TechRadar榜单结构和Product Hunt发现感
Version: 1.0.0
Author: Your Name
Author URI: https://example.com
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: aisaas-hub
Tags: saas, directory, reviews, ai-tools
*/

/* ==========================================================================
   基础样式
   ========================================================================== */

:root {
    --primary-color: #0066FF;
    --secondary-color: #6366F1;
    --success-color: #10B981;
    --warning-color: #F59E0B;
    --text-primary: #1F2937;
    --text-secondary: #6B7280;
    --border-color: #E5E7EB;
    --bg-light: #F9FAFB;
    --bg-white: #FFFFFF;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-light);
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ==========================================================================
   G2 风格工具卡片
   ========================================================================== */

.tool-card {
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.tool-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
    border-color: var(--primary-color);
}

.tool-card-header {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 16px;
}

.tool-logo {
    width: 64px;
    height: 64px;
    border-radius: var(--radius-md);
    object-fit: cover;
    border: 1px solid var(--border-color);
}

.tool-info {
    flex: 1;
}

.tool-name {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.tool-tagline {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.tool-rating {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.stars {
    display: flex;
    gap: 2px;
    color: #FFA500;
}

.rating-score {
    font-weight: 600;
    color: var(--text-primary);
}

.rating-count {
    font-size: 14px;
    color: var(--text-secondary);
}

.tool-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.badge-verified {
    background: #DBEAFE;
    color: #1E40AF;
}

.badge-trending {
    background: #FEF3C7;
    color: #92400E;
}

.badge-featured {
    background: #DCFCE7;
    color: #166534;
}

.tool-description {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 16px;
}

.tool-features {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 16px;
}

.feature-tag {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    color: var(--text-secondary);
}

.feature-tag::before {
    content: "✓";
    color: var(--success-color);
    font-weight: bold;
}

.tool-pricing {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--bg-light);
    border-radius: var(--radius-md);
    margin-bottom: 16px;
}

.price-label {
    font-size: 12px;
    color: var(--text-secondary);
    text-transform: uppercase;
}

.price-value {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
}

.tool-actions {
    display: flex;
    gap: 12px;
}

.btn {
    padding: 10px 20px;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: #0052CC;
}

.btn-secondary {
    background: white;
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

/* ==========================================================================
   Capterra 风格筛选侧边栏
   ========================================================================== */

.filter-sidebar {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    padding: 24px;
    border: 1px solid var(--border-color);
    position: sticky;
    top: 20px;
}

.filter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.filter-title {
    font-size: 18px;
    font-weight: 600;
}

.filter-clear {
    font-size: 14px;
    color: var(--primary-color);
    cursor: pointer;
    background: none;
    border: none;
}

.filter-section {
    margin-bottom: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border-color);
}

.filter-section:last-child {
    border-bottom: none;
}

.filter-section-title {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 12px;
    text-transform: uppercase;
    color: var(--text-secondary);
}

.filter-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 0;
    cursor: pointer;
}

.filter-checkbox {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.filter-label {
    flex: 1;
    font-size: 14px;
    color: var(--text-primary);
    cursor: pointer;
}

.filter-count {
    font-size: 13px;
    color: var(--text-secondary);
}

.filter-search {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 14px;
    margin-bottom: 12px;
}

.price-range-slider {
    margin: 16px 0;
}

.price-inputs {
    display: flex;
    gap: 12px;
    align-items: center;
}

.price-input {
    flex: 1;
    padding: 8px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 14px;
}

/* ==========================================================================
   NerdWallet 风格评测信用指标
   ========================================================================== */

.trust-indicators {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    padding: 32px;
    border: 1px solid var(--border-color);
    margin: 32px 0;
}

.trust-header {
    text-align: center;
    margin-bottom: 32px;
}

.trust-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 8px;
}

.trust-subtitle {
    color: var(--text-secondary);
    font-size: 14px;
}

.trust-scores {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}

.trust-score-item {
    text-align: center;
}

.score-circle {
    width: 100px;
    height: 100px;
    margin: 0 auto 16px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.score-value {
    font-size: 32px;
    font-weight: 700;
    color: var(--primary-color);
}

.score-label {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.score-description {
    font-size: 12px;
    color: var(--text-secondary);
}

.trust-methodology {
    background: var(--bg-light);
    padding: 24px;
    border-radius: var(--radius-md);
}

.methodology-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 12px;
}

.methodology-list {
    list-style: none;
}

.methodology-list li {
    padding: 8px 0;
    padding-left: 24px;
    position: relative;
    font-size: 14px;
    color: var(--text-secondary);
}

.methodology-list li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--success-color);
    font-weight: bold;
}

/* ==========================================================================
   TechRadar 风格榜单结构
   ========================================================================== */

.ranking-list {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.ranking-item {
    display: flex;
    gap: 24px;
    padding: 32px;
    border-bottom: 1px solid var(--border-color);
    transition: background 0.2s;
}

.ranking-item:last-child {
    border-bottom: none;
}

.ranking-item:hover {
    background: var(--bg-light);
}

.ranking-number {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 700;
    flex-shrink: 0;
}

.ranking-content {
    flex: 1;
}

.ranking-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
}

.ranking-tool-name {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 8px;
}

.ranking-award {
    background: #FEF3C7;
    color: #92400E;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    display: inline-block;
}

.ranking-summary {
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.ranking-pros-cons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 16px;
}

.pros-list, .cons-list {
    list-style: none;
}

.pros-title {
    font-weight: 600;
    color: var(--success-color);
    margin-bottom: 8px;
    font-size: 14px;
}

.cons-title {
    font-weight: 600;
    color: #EF4444;
    margin-bottom: 8px;
    font-size: 14px;
}

.pros-list li, .cons-list li {
    padding: 6px 0;
    padding-left: 20px;
    position: relative;
    font-size: 14px;
}

.pros-list li::before {
    content: "+";
    position: absolute;
    left: 0;
    color: var(--success-color);
    font-weight: bold;
}

.cons-list li::before {
    content: "−";
    position: absolute;
    left: 0;
    color: #EF4444;
    font-weight: bold;
}

.ranking-specs {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 16px;
}

.spec-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
}

.spec-label {
    color: var(--text-secondary);
}

.spec-value {
    font-weight: 600;
    color: var(--text-primary);
}

/* ==========================================================================
   Product Hunt 风格发现区域
   ========================================================================== */

.discovery-section {
    margin: 48px 0;
}

.discovery-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.discovery-title {
    font-size: 28px;
    font-weight: 700;
}

.discovery-filters {
    display: flex;
    gap: 12px;
}

.filter-pill {
    padding: 8px 16px;
    border-radius: 20px;
    background: white;
    border: 1px solid var(--border-color);
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}

.filter-pill.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.discovery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
}

.discovery-card {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    padding: 20px;
    border: 1px solid var(--border-color);
    transition: all 0.3s;
    cursor: pointer;
}

.discovery-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.discovery-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
}

.discovery-info {
    display: flex;
    gap: 12px;
}

.discovery-logo {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    object-fit: cover;
}

.discovery-meta h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 4px;
}

.discovery-meta p {
    font-size: 13px;
    color: var(--text-secondary);
}

.upvote-button {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: white;
    cursor: pointer;
    transition: all 0.2s;
}

.upvote-button:hover {
    border-color: var(--primary-color);
}

.upvote-icon {
    font-size: 16px;
}

.upvote-count {
    font-size: 14px;
    font-weight: 600;
    margin-top: 4px;
}

.discovery-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.tag {
    padding: 4px 10px;
    background: var(--bg-light);
    border-radius: 16px;
    font-size: 12px;
    color: var(--text-secondary);
}

.discovery-footer {
    display: flex;
    align-items: center;
    gap: 16px;
    padding-top: 12px;
    border-top: 1px solid var(--border-color);
    font-size: 13px;
    color: var(--text-secondary);
}

.maker-info {
    display: flex;
    align-items: center;
    gap: 6px;
}

.maker-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
}

/* ==========================================================================
   Hero区域
   ========================================================================== */

.hero-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 80px 0;
    color: white;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><rect fill="white" fill-opacity="0.05" width="100" height="100"/></svg>');
    opacity: 0.1;
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.hero-title {
    font-size: 48px;
    font-weight: 800;
    margin-bottom: 16px;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 20px;
    margin-bottom: 40px;
    opacity: 0.95;
}

.hero-search {
    max-width: 600px;
    margin: 0 auto 24px;
}

.hero-search-form {
    display: flex;
    gap: 12px;
    background: white;
    padding: 8px;
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.hero-search-input {
    flex: 1;
    padding: 14px 20px;
    border: none;
    font-size: 16px;
    border-radius: 8px;
    outline: none;
}

.hero-search-button {
    padding: 14px 32px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s;
}

.hero-search-button:hover {
    background: #0052CC;
    transform: translateY(-2px);
}

.popular-searches {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.popular-label {
    font-size: 14px;
    opacity: 0.8;
}

.popular-tag {
    padding: 6px 16px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    font-size: 14px;
    color: white;
    text-decoration: none;
    transition: all 0.2s;
}

.popular-tag:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

/* ==========================================================================
   热门分类
   ========================================================================== */

.categories-section {
    padding: 80px 0;
    background: var(--bg-light);
}

.section-title {
    font-size: 32px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 48px;
    color: var(--text-primary);
}

.section-header {
    text-align: center;
    margin-bottom: 48px;
}

.section-subtitle {
    font-size: 16px;
    color: var(--text-secondary);
    margin-top: 8px;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 24px;
}

.category-card {
    background: white;
    padding: 32px 24px;
    border-radius: var(--radius-lg);
    text-align: center;
    text-decoration: none;
    border: 1px solid var(--border-color);
    transition: all 0.3s;
}

.category-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.category-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.category-name {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.category-count {
    font-size: 14px;
    color: var(--text-secondary);
}

/* ==========================================================================
   编辑推荐工具
   ========================================================================== */

.featured-tools-section {
    padding: 80px 0;
    background: white;
}

.featured-tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
    gap: 24px;
}

/* ==========================================================================
   热门对比
   ========================================================================== */

.comparisons-section {
    padding: 80px 0;
    background: var(--bg-light);
}

.comparisons-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.comparison-card {
    background: white;
    padding: 24px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    text-decoration: none;
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.comparison-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
    border-color: var(--primary-color);
}

.comparison-tools {
    display: flex;
    align-items: center;
    gap: 12px;
    justify-content: center;
}

.comparison-tool {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
}

.comparison-vs {
    padding: 4px 12px;
    background: var(--primary-color);
    color: white;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
}

.comparison-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
}

.comparison-views {
    font-size: 14px;
    color: var(--text-secondary);
}

.comparison-arrow {
    font-size: 20px;
    color: var(--primary-color);
}

/* ==========================================================================
   最新优惠
   ========================================================================== */

.deals-section {
    padding: 80px 0;
    background: white;
}

.deals-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
}

.deal-card {
    background: white;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
    position: relative;
    transition: all 0.3s;
}

.deal-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
    border-color: var(--warning-color);
}

.deal-badge {
    position: absolute;
    top: -12px;
    right: 20px;
    background: linear-gradient(135deg, #f59e0b, #ef4444);
    color: white;
    padding: 6px 16px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 14px;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.4);
}

.deal-content {
    display: flex;
    gap: 16px;
    margin-bottom: 20px;
}

.deal-logo {
    width: 60px;
    height: 60px;
    border-radius: var(--radius-md);
    object-fit: cover;
    border: 1px solid var(--border-color);
}

.deal-info {
    flex: 1;
}

.deal-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.deal-description {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.deal-meta {
    display: flex;
    align-items: center;
    gap: 8px;
}

.deal-expires {
    font-size: 13px;
    color: var(--warning-color);
    font-weight: 500;
}

.deal-button {
    display: block;
    width: 100%;
    padding: 12px;
    background: var(--warning-color);
    color: white;
    text-align: center;
    border-radius: var(--radius-md);
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
}

.deal-button:hover {
    background: #D97706;
    transform: scale(1.02);
}

/* ==========================================================================
   可信度模块
   ========================================================================== */

.trust-section {
    padding: 80px 0;
    background: var(--bg-light);
}

/* ==========================================================================
   Newsletter订阅
   ========================================================================== */

.newsletter-section {
    padding: 80px 0;
    background: white;
}

.newsletter-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: var(--radius-lg);
    padding: 48px;
    color: white;
    text-align: center;
}

.newsletter-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    margin-bottom: 32px;
}

.newsletter-icon {
    font-size: 64px;
}

.newsletter-title {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 8px;
}

.newsletter-subtitle {
    font-size: 16px;
    opacity: 0.9;
}

.newsletter-form {
    max-width: 500px;
    margin: 0 auto;
}

.newsletter-input-group {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
}

.newsletter-input {
    flex: 1;
    padding: 14px 20px;
    border: none;
    border-radius: var(--radius-md);
    font-size: 16px;
}

.newsletter-button {
    padding: 14px 32px;
    background: #10B981;
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.newsletter-button:hover {
    background: #059669;
    transform: translateY(-2px);
}

.newsletter-privacy {
    font-size: 12px;
    opacity: 0.8;
}

.newsletter-privacy a {
    color: white;
    text-decoration: underline;
}

/* ==========================================================================
   响应式设计
   ========================================================================== */

@media (max-width: 1024px) {
    .hero-title {
        font-size: 36px;
    }
    
    .categories-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    }
    
    .featured-tools-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    }
}

@media (max-width: 768px) {
    .hero-section {
        padding: 60px 0;
    }
    
    .hero-title {
        font-size: 32px;
    }
    
    .hero-subtitle {
        font-size: 16px;
    }
    
    .hero-search-form {
        flex-direction: column;
    }
    
    .hero-search-button {
        width: 100%;
        justify-content: center;
    }
    
    .categories-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .featured-tools-grid,
    .comparisons-grid,
    .deals-grid {
        grid-template-columns: 1fr;
    }
    
    .newsletter-card {
        padding: 32px 24px;
    }
    
    .newsletter-title {
        font-size: 24px;
    }
    
    .newsletter-input-group {
        flex-direction: column;
    }
    
    .newsletter-button {
        width: 100%;
    }
    
    .tool-card-header {
        flex-direction: column;
    }
    
    .ranking-pros-cons {
        grid-template-columns: 1fr;
    }
    
    .discovery-grid {
        grid-template-columns: 1fr;
    }
    
    .filter-sidebar {
        position: static;
    }
    
    .main-layout {
        grid-template-columns: 1fr !important;
    }
}
