/* ============================================
   瓜子侠 AI购物比价网 - 样式表
   ============================================ */

:root {
    --primary: #00d4ff;
    --primary-dark: #0099cc;
    --secondary: #7b2ff7;
    --accent: #f107a3;
    --bg-dark: #0a0e27;
    --bg-card: #131a3a;
    --bg-card-hover: #1a2450;
    --text-main: #ffffff;
    --text-secondary: #a0aec0;
    --text-muted: #6b7280;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --gradient-ai: linear-gradient(135deg, #00d4ff 0%, #7b2ff7 50%, #f107a3 100%);
    --gradient-card: linear-gradient(145deg, #1a1f3d 0%, #0f1533 100%);
    --shadow-glow: 0 0 30px rgba(0, 212, 255, 0.15);
    --shadow-card: 0 8px 32px rgba(0, 0, 0, 0.3);
    --radius: 16px;
    --radius-sm: 10px;
}

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    background: var(--bg-dark);
    color: var(--text-main);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* 背景动画 */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(ellipse at 20% 20%, rgba(0, 212, 255, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 80%, rgba(123, 47, 247, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 50%, rgba(241, 7, 163, 0.05) 0%, transparent 60%);
    z-index: 0;
    pointer-events: none;
}

/* 网格背景 */
.grid-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        linear-gradient(rgba(0, 212, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 212, 255, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    z-index: 0;
    pointer-events: none;
}

.container {
    position: relative;
    z-index: 1;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ============================================
   导航栏
   ============================================ */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 16px 0;
    background: rgba(10, 14, 39, 0.8);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.navbar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

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

.logo-icon {
    width: 40px;
    height: 40px;
    background: var(--gradient-ai);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.3);
}

.logo span {
    background: var(--gradient-ai);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-links {
    display: flex;
    gap: 32px;
    list-style: none;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.3s;
}

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

.nav-badge {
    padding: 6px 14px;
    background: rgba(0, 212, 255, 0.1);
    border: 1px solid rgba(0, 212, 255, 0.3);
    border-radius: 20px;
    font-size: 0.8rem;
    color: var(--primary);
}

/* ============================================
   Hero 搜索区
   ============================================ */
.hero {
    padding: 160px 0 80px;
    text-align: center;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 20px;
    background: rgba(123, 47, 247, 0.12);
    border: 1px solid rgba(123, 47, 247, 0.3);
    border-radius: 30px;
    font-size: 0.85rem;
    color: #c4b5fd;
    margin-bottom: 28px;
    animation: fadeInUp 0.8s ease;
}

.hero-badge .dot {
    width: 8px;
    height: 8px;
    background: var(--primary);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 20px;
    animation: fadeInUp 0.8s ease 0.1s both;
}

.hero h1 .gradient-text {
    background: var(--gradient-ai);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero p {
    font-size: 1.2rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 48px;
    animation: fadeInUp 0.8s ease 0.2s both;
}

/* 搜索框 */
.search-box {
    max-width: 720px;
    margin: 0 auto;
    animation: fadeInUp 0.8s ease 0.3s both;
}

.search-form {
    display: flex;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 60px;
    padding: 8px;
    backdrop-filter: blur(20px);
    transition: all 0.3s;
    box-shadow: var(--shadow-glow);
}

.search-form:focus-within {
    border-color: rgba(0, 212, 255, 0.5);
    box-shadow: 0 0 40px rgba(0, 212, 255, 0.25);
}

.search-input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    padding: 16px 28px;
    font-size: 1.1rem;
    color: var(--text-main);
}

.search-input::placeholder {
    color: var(--text-muted);
}

.search-btn {
    padding: 16px 36px;
    background: var(--gradient-ai);
    border: none;
    border-radius: 50px;
    color: #fff;
    font-size: 1.05rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.search-btn:hover {
    transform: scale(1.03);
    box-shadow: 0 0 30px rgba(123, 47, 247, 0.5);
}

/* AI 思考动画 */
.ai-thinking {
    display: none;
    margin-top: 20px;
    align-items: center;
    justify-content: center;
    gap: 6px;
    color: var(--primary);
    font-size: 0.95rem;
}

.ai-thinking.show {
    display: flex;
}

.ai-thinking .dots span {
    display: inline-block;
    width: 8px;
    height: 8px;
    background: var(--primary);
    border-radius: 50%;
    margin: 0 3px;
    animation: bounce 1.4s infinite;
}

.ai-thinking .dots span:nth-child(2) { animation-delay: 0.2s; }
.ai-thinking .dots span:nth-child(3) { animation-delay: 0.4s; }

/* 热搜 */
.hot-search {
    margin-top: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
    animation: fadeInUp 0.8s ease 0.4s both;
}

.hot-search .label {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.hot-tag {
    padding: 6px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    color: var(--text-secondary);
    font-size: 0.88rem;
    text-decoration: none;
    transition: all 0.3s;
}

.hot-tag:hover {
    background: rgba(0, 212, 255, 0.12);
    border-color: rgba(0, 212, 255, 0.4);
    color: var(--primary);
}

/* ============================================
   平台展示
   ============================================ */
.platforms {
    padding: 40px 0 80px;
}

.platforms-title {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 32px;
    letter-spacing: 2px;
}

.platform-grid {
    display: flex;
    justify-content: center;
    gap: 24px;
    flex-wrap: wrap;
}

.platform-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 28px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-sm);
    transition: all 0.3s;
}

.platform-item:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-3px);
}

.platform-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

/* ============================================
   AI 特性区
   ============================================ */
.features {
    padding: 80px 0;
}

.section-title {
    text-align: center;
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 16px;
}

.section-subtitle {
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 56px;
    font-size: 1.05rem;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px;
}

.feature-card {
    background: var(--gradient-card);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: var(--radius);
    padding: 36px 28px;
    transition: all 0.4s;
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--gradient-ai);
    opacity: 0;
    transition: opacity 0.4s;
}

.feature-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-card);
    border-color: rgba(0, 212, 255, 0.2);
}

.feature-card:hover::before {
    opacity: 1;
}

.feature-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    background: rgba(0, 212, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.7rem;
    margin-bottom: 20px;
}

.feature-card h3 {
    font-size: 1.25rem;
    margin-bottom: 12px;
}

.feature-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.7;
}

/* ============================================
   搜索结果页
   ============================================ */
.search-header {
    padding: 120px 0 40px;
}

.search-header .search-box {
    max-width: 640px;
    margin: 0;
}

.result-info {
    padding: 24px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.result-info h2 {
    font-size: 1.5rem;
    margin-bottom: 8px;
}

.result-info .keyword {
    color: var(--primary);
}

.ai-summary {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 12px;
    padding: 14px 20px;
    background: rgba(123, 47, 247, 0.1);
    border: 1px solid rgba(123, 47, 247, 0.25);
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    color: #d8b4fe;
}

.ai-summary .ai-icon {
    font-size: 1.2rem;
}

/* 比价卡片 */
.compare-list {
    padding: 40px 0 80px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.compare-card {
    display: grid;
    grid-template-columns: 160px 1fr auto auto;
    gap: 24px;
    align-items: center;
    background: var(--gradient-card);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: var(--radius);
    padding: 24px 28px;
    transition: all 0.3s;
    position: relative;
    animation: fadeInUp 0.5s ease both;
}

.compare-card.best-price {
    border-color: rgba(16, 185, 129, 0.4);
    box-shadow: 0 0 30px rgba(16, 185, 129, 0.1);
}

.best-price-badge {
    position: absolute;
    top: -10px;
    left: 24px;
    padding: 4px 14px;
    background: linear-gradient(135deg, #10b981, #059669);
    border-radius: 12px;
    font-size: 0.78rem;
    font-weight: 600;
    color: #fff;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
}

.compare-card:hover {
    background: var(--bg-card-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-card);
}

.platform-badge {
    display: flex;
    align-items: center;
    gap: 12px;
}

.platform-logo {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    font-weight: 700;
    color: #fff;
}

.platform-badge .name {
    font-weight: 600;
    font-size: 1.1rem;
}

.platform-badge .shop {
    font-size: 0.82rem;
    color: var(--text-muted);
}

.product-info .title {
    font-size: 1.05rem;
    margin-bottom: 8px;
    line-height: 1.4;
}

.product-info .meta {
    display: flex;
    gap: 16px;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.product-info .meta .rating {
    color: var(--warning);
}

.ai-tag {
    display: inline-block;
    padding: 2px 10px;
    background: rgba(0, 212, 255, 0.12);
    border: 1px solid rgba(0, 212, 255, 0.3);
    border-radius: 8px;
    font-size: 0.75rem;
    color: var(--primary);
    margin-left: 8px;
}

.price-block {
    text-align: right;
}

.price-block .price {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--danger);
}

.price-block .price small {
    font-size: 0.9rem;
    font-weight: 600;
}

.price-block .original {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-decoration: line-through;
}

.price-block .save {
    font-size: 0.82rem;
    color: var(--success);
    font-weight: 600;
}

.go-btn {
    padding: 14px 32px;
    background: var(--gradient-ai);
    border: none;
    border-radius: 30px;
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s;
    display: inline-block;
    white-space: nowrap;
}

.go-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 0 24px rgba(123, 47, 247, 0.5);
}

/* 价格走势图占位 */
.price-trend {
    margin-top: 8px;
    display: flex;
    align-items: flex-end;
    gap: 3px;
    height: 30px;
}

.price-trend .bar {
    width: 8px;
    background: rgba(0, 212, 255, 0.3);
    border-radius: 2px;
}

/* 无结果 */
.no-result {
    text-align: center;
    padding: 100px 0;
}

.no-result .icon {
    font-size: 4rem;
    margin-bottom: 20px;
}

.no-result h3 {
    font-size: 1.4rem;
    margin-bottom: 12px;
}

.no-result p {
    color: var(--text-secondary);
}

/* ============================================
   页脚
   ============================================ */
.footer {
    padding: 48px 0 32px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    text-align: center;
    color: var(--text-muted);
    font-size: 0.88rem;
}

.footer .footer-logo {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 12px;
    background: var(--gradient-ai);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.footer p {
    margin-bottom: 6px;
}

/* ============================================
   动画
   ============================================ */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(24px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(0.85); }
}

@keyframes bounce {
    0%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-8px); }
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-12px); }
}

/* ============================================
   响应式
   ============================================ */
@media (max-width: 768px) {
    .hero h1 { font-size: 2.2rem; }
    .hero p { font-size: 1rem; }
    .nav-links { display: none; }
    .search-form { flex-direction: column; border-radius: 24px; }
    .search-btn { justify-content: center; border-radius: 18px; }
    .compare-card {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 16px;
    }
    .platform-badge { justify-content: center; }
    .price-block { text-align: center; }
    .section-title { font-size: 1.7rem; }
}
