/* AI工具集 - 大气明亮风格 */
:root {
    --primary: #3b82f6;
    --primary-dark: #2563eb;
    --primary-light: #60a5fa;
    --accent: #8b5cf6;
    --accent-light: #a78bfa;
    --success: #10b981;
    --bg: #f8fafc;
    --bg-card: #ffffff;
    --bg-card-hover: #f1f5f9;
    --text: #1e293b;
    --text-secondary: #64748b;
    --border: #e2e8f0;
    --gradient: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    --shadow: 0 4px 20px rgba(59, 130, 246, 0.15);
    --shadow-lg: 0 10px 40px rgba(59, 130, 246, 0.2);
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
}

/* 背景装饰 */
body::before {
    content: '';
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: 
        radial-gradient(circle at 20% 20%, rgba(59, 130, 246, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(139, 92, 246, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 50% 50%, rgba(16, 185, 129, 0.05) 0%, transparent 50%);
    z-index: -1;
    pointer-events: none;
}

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

/* Header */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 0;
    margin-bottom: 2rem;
}

.logo h1 {
    font-size: 1.75rem;
    font-weight: 700;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.logo .tagline {
    font-size: 0.875rem;
    color: var(--text-secondary);
    display: block;
    margin-top: 0.25rem;
}

.header-actions .btn {
    padding: 0.75rem 1.5rem;
    font-size: 0.9rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 1.75rem;
    background: var(--gradient);
    color: white;
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    box-shadow: var(--shadow);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background: var(--bg-card);
    color: var(--text);
    border: 2px solid var(--border);
    box-shadow: none;
}

.btn-secondary:hover {
    border-color: var(--primary);
    color: var(--primary);
    box-shadow: var(--shadow);
}

/* AI Section */
.ai-section {
    background: var(--bg-card);
    border-radius: 24px;
    padding: 2.5rem;
    margin-bottom: 3rem;
    box-shadow: var(--shadow);
    border: 1px solid rgba(255, 255, 255, 0.8);
    position: relative;
    overflow: hidden;
}

.ai-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient);
}

.ai-header {
    text-align: center;
    margin-bottom: 2rem;
}

.ai-badge {
    display: inline-block;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(139, 92, 246, 0.1));
    color: var(--primary);
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.ai-header h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.ai-header p {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

/* Chat Container */
.chat-container {
    background: var(--bg);
    border-radius: 16px;
    overflow: hidden;
    border: 2px solid var(--border);
}

.chat-messages {
    min-height: 300px;
    max-height: 400px;
    overflow-y: auto;
    padding: 1.5rem;
}

.message {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.avatar {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.bot-message .avatar {
    background: var(--gradient);
}

.user-message .avatar {
    background: var(--text);
    color: white;
}

.message-content {
    flex: 1;
    background: var(--bg-card);
    padding: 1rem 1.25rem;
    border-radius: 16px;
    border-top-left-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.user-message .message-content {
    background: var(--primary);
    color: white;
    border-top-left-radius: 16px;
    border-top-right-radius: 4px;
}

.message-content p {
    margin-bottom: 0.5rem;
}

.message-content ul {
    margin: 0.5rem 0;
    padding-left: 1.5rem;
}

.message-content li {
    margin: 0.25rem 0;
}

.chat-input-container {
    display: flex;
    gap: 0.75rem;
    padding: 1rem;
    background: var(--bg-card);
    border-top: 2px solid var(--border);
}

.chat-input-container input {
    flex: 1;
    padding: 1rem 1.25rem;
    border: 2px solid var(--border);
    border-radius: 12px;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.3s ease;
}

.chat-input-container input:focus {
    border-color: var(--primary);
}

.chat-input-container .btn {
    padding: 1rem 1.5rem;
}

/* Section Titles */
.section-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Quick Tools */
.tools-section {
    margin-bottom: 3rem;
}

.quick-tools {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 1rem;
}

.quick-tool-card {
    background: var(--bg-card);
    border-radius: 16px;
    padding: 1.5rem 1rem;
    text-align: center;
    text-decoration: none;
    color: var(--text);
    box-shadow: var(--shadow);
    border: 1px solid rgba(255, 255, 255, 0.8);
    transition: all 0.3s ease;
}

.quick-tool-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-light);
}

.quick-tool-card .tool-icon {
    font-size: 2rem;
    display: block;
    margin-bottom: 0.5rem;
}

.quick-tool-card .tool-name {
    font-size: 0.9rem;
    font-weight: 600;
}

.view-more {
    text-align: center;
    margin-top: 1.5rem;
}

.view-more a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.view-more a:hover {
    color: var(--accent);
}

/* Navigation */
.nav-section {
    margin-bottom: 3rem;
}

.nav-search {
    margin-bottom: 2rem;
}

.nav-search input {
    width: 100%;
    padding: 1rem 1.5rem;
    border: 2px solid var(--border);
    border-radius: 16px;
    font-size: 1rem;
    background: var(--bg-card);
    box-shadow: var(--shadow);
    outline: none;
    transition: all 0.3s ease;
}

.nav-search input:focus {
    border-color: var(--primary);
    box-shadow: var(--shadow-lg);
}

.nav-categories {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.nav-category {
    background: var(--bg-card);
    border-radius: 20px;
    padding: 1.5rem 2rem;
    box-shadow: var(--shadow);
    border: 1px solid rgba(255, 255, 255, 0.8);
}

.nav-category h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--border);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-sites {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}

.nav-site {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: var(--bg);
    border-radius: 12px;
    text-decoration: none;
    color: var(--text);
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.nav-site:hover {
    background: var(--bg-card-hover);
    border-color: var(--primary-light);
    transform: translateX(4px);
}

.nav-site .site-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.nav-site .site-name {
    font-weight: 600;
    font-size: 0.95rem;
}

.nav-site .site-desc {
    font-size: 0.75rem;
    color: var(--text-secondary);
    display: block;
}

/* All Tools Grid */
.all-tools-section {
    margin-bottom: 3rem;
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.tool-card {
    background: var(--bg-card);
    border-radius: 20px;
    padding: 1.75rem;
    text-decoration: none;
    color: var(--text);
    box-shadow: var(--shadow);
    border: 1px solid rgba(255, 255, 255, 0.8);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.tool-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.tool-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
}

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

.tool-card .tool-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.tool-card h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.tool-card p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Footer */
.footer {
    background: var(--bg-card);
    border-radius: 24px 24px 0 0;
    padding: 3rem 0 1.5rem;
    margin-top: 3rem;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.05);
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h4 {
    font-size: 1rem;
    margin-bottom: 0.75rem;
    color: var(--primary);
}

.footer-section p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.3s ease;
}

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

.footer-bottom {
    text-align: center;
    padding-top: 1.5rem;
    border-top: 2px solid var(--border);
    color: var(--text-secondary);
    font-size: 0.85rem;
}

/* Responsive */
@media (max-width: 768px) {
    .header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .quick-tools {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .nav-sites {
        grid-template-columns: 1fr;
    }
    
    .tools-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .ai-section {
        padding: 1.5rem;
    }
    
    .ai-header h2 {
        font-size: 1.5rem;
    }
    
    .chat-messages {
        min-height: 200px;
    }
}

/* Loading Animation */
.loading {
    display: inline-flex;
    gap: 4px;
}

.loading span {
    width: 8px;
    height: 8px;
    background: var(--primary);
    border-radius: 50%;
    animation: bounce 1.4s infinite ease-in-out both;
}

.loading span:nth-child(1) { animation-delay: -0.32s; }
.loading span:nth-child(2) { animation-delay: -0.16s; }
.loading span:nth-child(3) { animation-delay: 0s; }

@keyframes bounce {
    0%, 80%, 100% { transform: scale(0); }
    40% { transform: scale(1); }
}

/* Hidden class */
.hidden {
    display: none !important;
}
