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

:root {
    --primary: #1a56db;
    --primary-light: #6366f1;
    --price: #ea580c;
    --price-alt: #f59e0b;
    --bg: #f5f5f5;
    --card-bg: #fff;
    --dark-bg: #1e293b;
    --text: #333;
    --text-muted: #666;
    --border: #eee;
    --radius: 8px;
    --shadow: 0 1px 3px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
}

body {
    font-family: "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
    color: var(--text);
    background: var(--bg);
}

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

/* ========== Header ========== */
.header {
    background: var(--card-bg);
    border-bottom: 1px solid var(--border);
    padding: 12px 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
}

.logo-area {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.logo {
    font-size: 22px;
    font-weight: bold;
    color: var(--primary);
}

.tagline {
    font-size: 12px;
    color: var(--text-muted);
}

.nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.nav a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 14px;
    padding: 4px 8px;
}

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

.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.search-wrap {
    display: flex;
    align-items: center;
}

.search-input {
    width: 140px;
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius) 0 0 var(--radius);
    font-size: 14px;
}

.btn-search {
    padding: 8px 16px;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 0 var(--radius) var(--radius) 0;
    font-size: 14px;
    cursor: pointer;
}

.role-select {
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 14px;
    background: var(--card-bg);
}

/* ========== Banner + API Hot ========== */
.banner-section {
    background: var(--bg);
    padding: 20px 0;
}

.banner-row {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 20px;
    align-items: stretch;
}

.banner-main {
    background: linear-gradient(135deg, #1e3a5f 0%, #2563eb 100%);
    border-radius: var(--radius);
    min-height: 220px;
    padding: 32px 24px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    position: relative;
}

.banner-content {
    color: #fff;
}

.banner-title {
    font-size: 28px;
    font-weight: bold;
    margin-bottom: 8px;
}

.banner-subtitle {
    font-size: 16px;
    opacity: 0.95;
    margin-bottom: 24px;
}

.banner-dots {
    display: flex;
    gap: 8px;
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255,255,255,0.4);
}

.dot.active {
    background: #fff;
}

.banner-deco {
    font-size: 24px;
    font-weight: bold;
    color: rgba(255,255,255,0.2);
    letter-spacing: 2px;
}

.deco-api {
    display: block;
    margin-top: 4px;
}

.api-hot {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow);
}

.api-hot-title {
    font-size: 16px;
    margin-bottom: 4px;
}

.api-hot-subtitle {
    font-size: 14px;
    color: var(--primary);
    font-weight: bold;
    margin-bottom: 16px;
}

.api-hot-list {
    list-style: none;
}

.api-hot-list li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    font-size: 14px;
    color: var(--text);
    border-bottom: 1px solid var(--border);
}

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

.rank {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: bold;
    color: #fff;
    flex-shrink: 0;
}

.rank-1 { background: #dc2626; }
.rank-2 { background: var(--primary); }
.rank-3 { background: #16a34a; }
.rank-4, .rank-5 { background: #94a3b8; }

/* ========== 四张服务卡片 ========== */
.service-cards-section {
    padding: 24px 0;
}

.four-cols {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.service-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 24px;
    text-align: center;
    box-shadow: var(--shadow);
}

.service-card-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 12px;
    color: var(--primary);
    font-size: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.service-card h4 {
    font-size: 16px;
    margin-bottom: 8px;
}

.service-card p {
    font-size: 13px;
    color: var(--text-muted);
}

/* ========== 热门板块 ========== */
.plates-section {
    padding: 32px 0;
}

.section-title {
    font-size: 20px;
    margin-bottom: 20px;
    text-align: center;
}

.plates-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.plate-card {
    border-radius: var(--radius);
    padding: 24px;
    min-height: 200px;
    background-size: cover;
    background-position: center;
    color: #fff;
    position: relative;
    overflow: hidden;
}

.plate-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0,0,0,0.3) 0%, rgba(0,0,0,0.6) 100%);
    z-index: 0;
}

.plate-card > * {
    position: relative;
    z-index: 1;
}

.plate-finance {
    background: linear-gradient(135deg, #1e3a5f 0%, #3b82f6 100%);
}

.plate-ai {
    background: linear-gradient(135deg, #312e81 0%, #6366f1 100%);
}

.plate-jd {
    background: linear-gradient(135deg, #0f172a 0%, #334155 100%);
}

.plate-icon {
    font-size: 36px;
    margin-bottom: 12px;
    opacity: 0.9;
}

.plate-card h4 {
    font-size: 18px;
    margin-bottom: 16px;
}

.plate-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.plate-tags a {
    display: inline-block;
    padding: 6px 12px;
    background: rgba(255,255,255,0.2);
    border-radius: 20px;
    color: #fff;
    text-decoration: none;
    font-size: 13px;
}

.plate-tags a:hover {
    background: rgba(255,255,255,0.35);
}

.plate-jd .plate-tags {
    margin-bottom: 16px;
}

.plate-mini-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.mini-card {
    background: rgba(255,255,255,0.15);
    border-radius: var(--radius);
    padding: 12px;
    display: flex;
    gap: 10px;
    align-items: flex-start;
}

.mini-card-icon {
    font-size: 24px;
    flex-shrink: 0;
}

.mini-card-info h5 {
    font-size: 13px;
    margin-bottom: 4px;
    font-weight: 600;
}

.mini-card-info .price {
    font-size: 12px;
    color: var(--price-alt);
    margin-bottom: 4px;
}

.mini-card-info .meta {
    font-size: 11px;
    opacity: 0.85;
}

.mini-card-info .meta i {
    margin-right: 2px;
}

/* ========== 服务网格 10 卡 ========== */
.service-grid-section {
    padding: 32px 0;
}

.ten-cols {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
}

.grid-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 20px;
    text-align: center;
    box-shadow: var(--shadow);
}

.grid-card-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 12px;
    color: var(--primary);
    font-size: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.grid-card h4 {
    font-size: 15px;
    margin-bottom: 8px;
}

.grid-price {
    color: var(--price);
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
}

.grid-meta {
    font-size: 12px;
    color: var(--text-muted);
}

.grid-meta i {
    margin-right: 4px;
}

/* ========== 特惠专区 ========== */
.tehui-section {
    background: var(--dark-bg);
    padding: 40px 0;
}

.section-title-light {
    color: #fff;
}

.tehui-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.tehui-card {
    background: linear-gradient(135deg, #334155 0%, #1e293b 100%);
    border-radius: var(--radius);
    padding: 24px;
    min-height: 140px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    position: relative;
    overflow: hidden;
}

.tehui-content h4 {
    font-size: 16px;
    color: #fff;
    margin-bottom: 8px;
}

.tehui-price {
    color: var(--price-alt);
    font-size: 14px;
    font-weight: 600;
}

.tehui-icon {
    font-size: 48px;
    color: rgba(255,255,255,0.15);
}

.tehui-card-chart::after,
.tehui-card-pie::after {
    content: "";
    position: absolute;
    right: 0;
    bottom: 0;
    width: 80px;
    height: 60px;
    background: radial-gradient(circle at 100% 100%, rgba(255,255,255,0.05) 0%, transparent 70%);
    border-radius: 50% 0 0 0;
}

/* ========== 新品推荐 ========== */
.new-products-section {
    padding: 32px 0;
}

.new-products {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.new-product-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 24px;
    text-align: center;
    box-shadow: var(--shadow);
    position: relative;
}

.api-tag {
    position: absolute;
    left: 12px;
    bottom: 12px;
    font-size: 11px;
    color: var(--primary);
    background: rgba(26, 86, 219, 0.1);
    padding: 2px 8px;
    border-radius: 4px;
}

.new-product-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 12px;
    color: var(--primary);
    font-size: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--primary);
    border-radius: var(--radius);
}

.new-product-card h4 {
    font-size: 15px;
    margin-bottom: 8px;
}

.new-product-price {
    color: var(--price);
    font-size: 14px;
    font-weight: 600;
}

/* ========== 服务商推荐专区 ========== */
.providers-section {
    padding: 32px 0;
}

.providers-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.provider-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 24px;
    text-align: center;
    box-shadow: var(--shadow);
}

.provider-logo {
    width: 64px;
    height: 64px;
    margin: 0 auto 16px;
    border-radius: 50%;
}

.provider-logo-1 { background: linear-gradient(135deg, #3b82f6, #93c5fd); }
.provider-logo-2 { background: linear-gradient(135deg, #1e40af, #60a5fa); }
.provider-logo-3 { background: linear-gradient(135deg, #16a34a, #4ade80); }
.provider-logo-4 { background: linear-gradient(135deg, #b45309, #fbbf24); }
.provider-logo-5 { background: linear-gradient(135deg, #6366f1, #a5b4fc); }
.provider-logo-6 { background: linear-gradient(135deg, #b91c1c, #f87171); }
.provider-logo-7 { background: linear-gradient(135deg, #ea580c, #fdba74); }
.provider-logo-8 { background: linear-gradient(135deg, #0ea5e9, #38bdf8); }

.provider-card h4 {
    font-size: 15px;
    margin-bottom: 8px;
}

.provider-card p {
    font-size: 13px;
    color: var(--text-muted);
}

/* ========== Footer ========== */
.footer {
    text-align: center;
    padding: 24px 0;
    font-size: 14px;
    color: var(--text-muted);
    background: var(--card-bg);
    border-top: 1px solid var(--border);
}

.footer p + p {
    margin-top: 8px;
}

/* ========== 响应式 ========== */
@media (max-width: 1024px) {
    .banner-row {
        grid-template-columns: 1fr;
    }

    .plates-grid {
        grid-template-columns: 1fr;
    }

    .plate-mini-cards {
        grid-template-columns: 1fr;
    }

    .ten-cols {
        grid-template-columns: repeat(3, 1fr);
    }

    .tehui-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .four-cols,
    .new-products {
        grid-template-columns: repeat(2, 1fr);
    }

    .providers-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .nav {
        display: none;
    }
}

@media (max-width: 768px) {
    .header-inner {
        flex-wrap: wrap;
    }

    .logo-area {
        width: 100%;
    }

    .header-actions {
        width: 100%;
        justify-content: flex-end;
    }

    .search-wrap {
        flex: 1;
        max-width: 180px;
    }

    .search-input {
        width: 100%;
    }

    .service-cards.four-cols,
    .new-products {
        grid-template-columns: 1fr;
    }

    .ten-cols {
        grid-template-columns: repeat(2, 1fr);
    }

    .tehui-grid {
        grid-template-columns: 1fr;
    }

    .providers-grid {
        grid-template-columns: 1fr;
    }

    .banner-main {
        flex-direction: column;
        min-height: 180px;
    }
}

@media (max-width: 480px) {
    .ten-cols {
        grid-template-columns: 1fr;
    }
}
