/* ========================================
   宝盘工具箱 - 首页样式 (V2)
   基于 index2.html 原型设计
   ======================================== */

/* CSS Variables */
:root {
    --primary: #4f46e5;
    --primary-dark: #4338ca;
    --primary-light: #8b5cf6;
    --gradient: linear-gradient(135deg, #4f46e5, #8b5cf6);
    --dark: #0f1825;
    --dark-secondary: #1e293b;
    --text: #475569;
    --text-light: #64748b;
    --bg-light: #f9fafc;
    --card-bg: #f5f3ff;
    --white: #ffffff;
    --border: #e5e7eb;
    --radius: 32px;
    --radius-sm: 12px;
    --radius-pill: 60px;
    --shadow: 0 20px 60px rgba(79, 70, 229, 0.15);
    --shadow-sm: 0 4px 20px rgba(79, 70, 229, 0.08);
}

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: var(--text);
    background: var(--bg-light);
    line-height: 1.6;
}

a {
    color: inherit;
    text-decoration: none;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ========================================
   Header
   ======================================== */
.header {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 80px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 24px;
    font-weight: 700;
    color: var(--dark);
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: var(--gradient);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 20px;
}

.nav {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav a {
    padding: 10px 20px;
    font-size: 15px;
    font-weight: 500;
    color: var(--text);
    border-radius: var(--radius-sm);
    transition: all 0.2s;
}

.nav a:hover {
    color: var(--primary);
    background: var(--card-bg);
}

.nav a.active {
    color: var(--primary);
    background: var(--card-bg);
}

.nav .btn-primary {
    background: var(--gradient);
    color: white;
    padding: 12px 28px;
    border-radius: var(--radius-pill);
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(79, 70, 229, 0.3);
}

.nav .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(79, 70, 229, 0.4);
    color: white;
}

/* Mobile Menu */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
}

/* ========================================
   Hero Section
   ======================================== */
.hero {
    padding: 80px 0 100px;
    background: var(--bg-light);
    position: relative;
    overflow: hidden;
}

.hero .container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.hero-content {
    max-width: 560px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: var(--card-bg);
    border: 1px solid rgba(79, 70, 229, 0.2);
    border-radius: var(--radius-pill);
    font-size: 14px;
    font-weight: 500;
    color: var(--primary);
    margin-bottom: 24px;
}

.hero-badge::before {
    content: "✨";
}

.hero-title {
    font-size: 56px;
    font-weight: 800;
    color: var(--dark);
    line-height: 1.15;
    margin-bottom: 24px;
    background: linear-gradient(135deg, #0f1825 0%, #4f46e5 50%, #8b5cf6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 18px;
    color: var(--text);
    line-height: 1.8;
    margin-bottom: 40px;
}

.hero-actions {
    display: flex;
    gap: 16px;
}

.btn-hero {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 18px 36px;
    font-size: 16px;
    font-weight: 600;
    border-radius: var(--radius-pill);
    transition: all 0.3s;
    cursor: pointer;
    border: none;
}

.btn-hero-primary {
    background: var(--gradient);
    color: white;
    box-shadow: 0 8px 30px rgba(79, 70, 229, 0.35);
}

.btn-hero-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 40px rgba(79, 70, 229, 0.45);
}

.btn-hero-secondary {
    background: white;
    color: var(--dark);
    border: 2px solid var(--border);
}

.btn-hero-secondary:hover {
    border-color: var(--primary);
    color: var(--primary);
}

/* Hero Visual */
.hero-visual {
    position: relative;
}

.hero-card {
    background: white;
    border-radius: var(--radius);
    padding: 40px;
    box-shadow: var(--shadow);
    border: 1px solid rgba(79, 70, 229, 0.08);
}

.hero-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border);
}

.hero-card-icon {
    width: 56px;
    height: 56px;
    background: var(--gradient);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
}

.hero-card-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--dark);
}

.hero-card-subtitle {
    font-size: 14px;
    color: var(--text-light);
}

.hero-tools-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.hero-tool-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 20px 12px;
    background: var(--card-bg);
    border-radius: 16px;
    transition: all 0.3s;
}

.hero-tool-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-sm);
}

.hero-tool-icon {
    width: 48px;
    height: 48px;
    background: white;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.hero-tool-name {
    font-size: 12px;
    font-weight: 500;
    color: var(--dark);
    text-align: center;
}

/* Floating Elements */
.floating-badge {
    position: absolute;
    background: white;
    padding: 12px 20px;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    font-weight: 500;
    color: var(--dark);
    animation: float 3s ease-in-out infinite;
}

.floating-badge-1 {
    top: -20px;
    left: -30px;
}

.floating-badge-2 {
    bottom: 30px;
    right: -20px;
    animation-delay: 1.5s;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

/* ========================================
   Categories Section
   ======================================== */
.categories {
    padding: 80px 0;
    background: white;
}

.section-header {
    text-align: center;
    margin-bottom: 48px;
}

.section-title {
    font-size: 36px;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 16px;
}

.section-subtitle {
    font-size: 16px;
    color: var(--text-light);
    max-width: 500px;
    margin: 0 auto;
}

.categories-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
}

.category-pill {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 28px;
    background: var(--bg-light);
    border: 2px solid transparent;
    border-radius: var(--radius-pill);
    font-size: 15px;
    font-weight: 500;
    color: var(--text);
    transition: all 0.25s;
    cursor: pointer;
}

.category-pill:hover {
    background: var(--card-bg);
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-2px);
}

.category-pill.active {
    background: var(--gradient);
    color: white;
}

.category-pill .icon {
    font-size: 20px;
}

/* ========================================
   Tools Section
   ======================================== */
.tools {
    padding: 80px 0;
    background: var(--bg-light);
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}

.tool-card {
    background: white;
    border-radius: var(--radius);
    padding: 32px;
    border: 1px solid transparent;
    transition: all 0.3s;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.tool-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient);
    transform: scaleX(0);
    transition: transform 0.3s;
}

.tool-card:hover {
    border-color: rgba(79, 70, 229, 0.2);
    transform: translateY(-6px);
    box-shadow: var(--shadow);
}

.tool-card:hover::before {
    transform: scaleX(1);
}

.tool-icon-wrapper {
    width: 72px;
    height: 72px;
    background: var(--card-bg);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    margin-bottom: 20px;
    transition: all 0.3s;
}

.tool-card:hover .tool-icon-wrapper {
    background: var(--gradient);
    transform: scale(1.1);
}

.tool-card:hover .tool-icon-wrapper span {
    filter: grayscale(0);
    color: white;
}

.tool-name {
    font-size: 18px;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 8px;
}

.tool-desc {
    font-size: 14px;
    color: var(--text-light);
    line-height: 1.6;
    margin-bottom: 16px;
}

.tool-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tool-tag {
    padding: 4px 12px;
    background: var(--card-bg);
    border-radius: 20px;
    font-size: 12px;
    color: var(--primary);
    font-weight: 500;
}

/* ========================================
   Stats Section
   ======================================== */
.stats {
    padding: 80px 0;
    background: linear-gradient(135deg, #f5f3ff 0%, #ede9fe 100%);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 32px;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 56px;
    font-weight: 800;
    color: var(--primary);
    line-height: 1;
    margin-bottom: 12px;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    font-size: 16px;
    color: var(--text);
    font-weight: 500;
}

/* ========================================
   CTA Section
   ======================================== */
.cta {
    padding: 100px 0;
    background: var(--dark);
    position: relative;
    overflow: hidden;
}

.cta::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='%234f46e5' fill-opacity='0.1'%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;
}

.cta .container {
    position: relative;
    text-align: center;
}

.cta-title {
    font-size: 42px;
    font-weight: 700;
    color: white;
    margin-bottom: 20px;
}

.cta-subtitle {
    font-size: 18px;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 40px;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 20px 48px;
    background: white;
    color: var(--primary);
    font-size: 18px;
    font-weight: 700;
    border-radius: var(--radius-pill);
    transition: all 0.3s;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.cta-btn:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
}

/* ========================================
   Footer
   ======================================== */
.footer {
    padding: 60px 0 40px;
    background: var(--dark-secondary);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr repeat(3, 1fr);
    gap: 60px;
    margin-bottom: 40px;
}

.footer-brand {
    max-width: 280px;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 20px;
    font-weight: 700;
    color: white;
    margin-bottom: 16px;
}

.footer-desc {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.7;
}

.footer-column h4 {
    font-size: 16px;
    font-weight: 600;
    color: white;
    margin-bottom: 20px;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.6);
    transition: color 0.2s;
}

.footer-links a:hover {
    color: white;
}

.footer-bottom {
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-copyright {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.5);
}

.footer-social {
    display: flex;
    gap: 12px;
}

.footer-social a {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 18px;
    transition: all 0.2s;
}

.footer-social a:hover {
    background: var(--primary);
    transform: translateY(-2px);
}

/* ========================================
   Responsive
   ======================================== */
@media (max-width: 1024px) {
    .hero .container {
        grid-template-columns: 1fr;
        gap: 60px;
    }
    
    .hero-content {
        max-width: 100%;
        text-align: center;
    }
    
    .hero-actions {
        justify-content: center;
    }
    
    .hero-title {
        font-size: 42px;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 40px;
    }
    
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 40px;
    }
}

@media (max-width: 768px) {
    .header .nav {
        display: none;
    }
    
    .mobile-menu-btn {
        display: block;
    }
    
    .hero {
        padding: 60px 0 80px;
    }
    
    .hero-title {
        font-size: 32px;
    }
    
    .hero-actions {
        flex-direction: column;
    }
    
    .btn-hero {
        width: 100%;
        justify-content: center;
    }
    
    .hero-visual {
        order: -1;
    }
    
    .hero-card {
        padding: 24px;
    }
    
    .hero-tools-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
    }
    
    .hero-tool-item {
        padding: 14px 8px;
    }
    
    .floating-badge {
        display: none;
    }
    
    .section-title {
        font-size: 28px;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px;
    }
    
    .stat-number {
        font-size: 40px;
    }
    
    .cta-title {
        font-size: 28px;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .footer-bottom {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
}

/* ========================================
   Utilities
   ======================================== */
.text-primary { color: var(--primary); }
.bg-primary { background: var(--primary); }
