/*
Theme Name: AI Free Models
Theme URI: https://example.com
Author: AI Free Models
Description: 全网免费AI大模型API导航主题
Version: 2.0.0
Requires at least: 5.8
Tested up to: 6.4
Requires PHP: 7.4
License: GPL-2.0+
*/

:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #a5b4fc;
    --secondary: #0ea5e9;
    --accent: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --bg: #0f172a;
    --bg-card: #1e293b;
    --bg-card-hover: #334155;
    --text: #f1f5f9;
    --text-muted: #94a3b8;
    --border: #334155;
    --shadow: 0 4px 6px -1px rgba(0,0,0,0.3);
    --radius: 12px;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
}

a { color: var(--primary-light); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--primary); }

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

.site-header {
    background: linear-gradient(135deg, var(--bg) 0%, #1a1a2e 100%);
    border-bottom: 1px solid var(--border);
    padding: 20px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
}
.site-header .container { display: flex; align-items: center; justify-content: space-between; }
.site-logo { font-size: 24px; font-weight: 700; color: var(--text); }
.site-logo span { color: var(--primary); }
.site-nav { display: flex; gap: 24px; align-items: center; }
.site-nav a { color: var(--text-muted); font-size: 15px; }
.site-nav a:hover { color: var(--text); }

.hero {
    text-align: center;
    padding: 80px 20px 60px;
    background: linear-gradient(180deg, #1a1a2e 0%, var(--bg) 100%);
}
.hero h1 { font-size: 42px; margin-bottom: 16px; background: linear-gradient(135deg, var(--primary-light), var(--secondary)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.hero p { font-size: 18px; color: var(--text-muted); max-width: 600px; margin: 0 auto 32px; }

.search-box { max-width: 560px; margin: 0 auto; position: relative; }
.search-box input {
    width: 100%;
    padding: 16px 24px 16px 48px;
    border: 2px solid var(--border);
    border-radius: 50px;
    background: var(--bg-card);
    color: var(--text);
    font-size: 16px;
    outline: none;
    transition: border-color 0.2s;
}
.search-box input:focus { border-color: var(--primary); }
.search-box .search-icon {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 18px;
}

.stats-bar {
    display: flex;
    justify-content: center;
    gap: 48px;
    padding: 32px 20px;
    border-bottom: 1px solid var(--border);
}
.stat-item { text-align: center; }
.stat-number { font-size: 32px; font-weight: 700; color: var(--primary-light); }
.stat-label { font-size: 14px; color: var(--text-muted); }

.filter-section { padding: 24px 0; border-bottom: 1px solid var(--border); }
.filter-tabs { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }
.filter-tab {
    padding: 8px 20px;
    border-radius: 50px;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
    text-decoration: none;
    display: inline-block;
}
.filter-tab:hover, .filter-tab.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.platforms-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
    gap: 24px;
    padding: 40px 0;
}

.platform-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
    position: relative;
}
.platform-card:hover {
    background: var(--bg-card-hover);
    transform: translateY(-4px);
    box-shadow: var(--shadow);
    border-color: var(--primary);
}
.platform-card.expiring { border-color: var(--warning); }
.platform-card.expiring::before {
    content: '即将到期';
    position: absolute;
    top: 12px;
    right: 12px;
    background: var(--warning);
    color: white;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
}

.card-header { display: flex; align-items: flex-start; gap: 16px; margin-bottom: 16px; }
.card-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: white;
    flex-shrink: 0;
}
.card-title { font-size: 18px; font-weight: 600; margin-bottom: 4px; }
.card-title a { color: var(--text); }
.card-title a:hover { color: var(--primary-light); }
.card-subtitle { font-size: 13px; color: var(--text-muted); }
.card-desc { font-size: 14px; color: var(--text-muted); margin-bottom: 16px; flex: 1; }

.card-meta { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.meta-item { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.meta-label { color: var(--text-muted); min-width: 70px; }
.meta-value { color: var(--text); }

.card-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.tag {
    padding: 3px 10px;
    border-radius: 50px;
    background: rgba(99,102,241,0.15);
    color: var(--primary-light);
    font-size: 12px;
}
.tag-free { background: rgba(16,185,129,0.15); color: var(--accent); }
.tag-limited { background: rgba(245,158,11,0.15); color: var(--warning); }
.tag-new-user { background: rgba(14,165,233,0.15); color: #7dd3fc; }
.tag-trial { background: rgba(239,68,68,0.15); color: #fca5a5; }
.tag-domestic { background: rgba(239,68,68,0.15); color: #fca5a5; }
.tag-intl { background: rgba(14,165,233,0.15); color: #7dd3fc; }

.card-actions { display: flex; gap: 12px; }
.btn {
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
}
.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: var(--primary-dark); color: white; }
.btn-outline { background: transparent; border: 1px solid var(--border); color: var(--text-muted); }
.btn-outline:hover { border-color: var(--primary); color: var(--primary-light); }

.site-footer {
    border-top: 1px solid var(--border);
    padding: 40px 0;
    text-align: center;
    color: var(--text-muted);
    font-size: 14px;
}

/* Single page */
.single-platform { padding: 40px 0; }
.platform-detail { max-width: 900px; margin: 0 auto; }
.platform-detail h1 { font-size: 32px; margin-bottom: 8px; }
.subtitle { color: var(--text-muted); font-size: 15px; }

.detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    padding: 24px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 32px;
}
.detail-item .label { font-size: 13px; color: var(--text-muted); margin-bottom: 4px; }
.detail-item .value { font-size: 15px; font-weight: 500; }

/* Pagination */
.pagination { display: flex; justify-content: center; gap: 8px; padding: 40px 0; }
.pagination a, .pagination span {
    padding: 8px 16px;
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-muted);
}
.pagination a:hover { border-color: var(--primary); color: var(--primary-light); }
.pagination .current { background: var(--primary); color: white; border-color: var(--primary); }

@media (max-width: 768px) {
    .hero h1 { font-size: 28px; }
    .platforms-grid { grid-template-columns: 1fr; }
    .stats-bar { gap: 24px; flex-wrap: wrap; }
    .site-nav { gap: 12px; }
    .filter-tabs { justify-content: flex-start; overflow-x: auto; flex-wrap: nowrap; }
    .detail-grid { grid-template-columns: 1fr 1fr; }
}
