/* 1tool.top 公共样式 - 优化版 */
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, sans-serif; background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%); color: #1e293b; line-height: 1.6; min-height: 100vh; }
a { color: inherit; text-decoration: none; }
.container { max-width: 1280px; margin: 0 auto; padding: 0 24px; }

/* Header */
header { background: rgba(255,255,255,0.95); backdrop-filter: blur(10px); padding: 16px 0; box-shadow: 0 4px 20px rgba(0,0,0,0.08); position: sticky; top: 0; z-index: 1000; }
.header-inner { display: flex; justify-content: space-between; align-items: center; }
.logo { font-size: 24px; font-weight: 700; background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.nav-links { display: flex; gap: 24px; font-size: 14px; }
.nav-links a { color: #64748b; transition: color 0.2s; }
.nav-links a:hover { color: #667eea; }

/* Hero */
.hero { text-align: center; padding: 80px 0 60px; }
.hero h1 { font-size: 56px; font-weight: 700; margin-bottom: 20px; background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; letter-spacing: -1px; }
.hero p { font-size: 20px; color: #64748b; max-width: 600px; margin: 0 auto; }
.hero-stats { display: flex; justify-content: center; gap: 48px; margin-top: 40px; }
.stat-item { text-align: center; }
.stat-value { font-size: 36px; font-weight: 700; color: #667eea; }
.stat-label { font-size: 14px; color: #94a3b8; }

/* Section */
.section-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 32px; }
.section-title { font-size: 28px; font-weight: 700; color: #1e293b; display: flex; align-items: center; gap: 12px; }
.section-title .emoji { font-size: 32px; }
.view-all { font-size: 14px; color: #667eea; font-weight: 500; }
.view-all:hover { text-decoration: underline; }

/* Category Section */
.category-section { margin-bottom: 64px; }
.category-card { background: white; border-radius: 24px; padding: 32px; box-shadow: 0 4px 24px rgba(0,0,0,0.06); }
.category-header { display: flex; align-items: center; gap: 16px; margin-bottom: 24px; padding-bottom: 16px; border-bottom: 2px solid #f1f5f9; }
.category-icon { width: 56px; height: 56px; background: linear-gradient(135deg, #667eea20, #764ba220); border-radius: 16px; display: flex; align-items: center; justify-content: center; font-size: 28px; }
.category-info h2 { font-size: 22px; font-weight: 700; color: #1e293b; margin-bottom: 4px; }
.category-info span { font-size: 13px; color: #94a3b8; }

/* Tools Grid - 优化卡片布局 */
.tools-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px; }
.tool-card { background: #f8fafc; border-radius: 16px; padding: 24px; border: 1px solid #e2e8f0; transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); cursor: pointer; position: relative; overflow: hidden; }
.tool-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 4px; background: linear-gradient(90deg, #667eea, #764ba2); transform: scaleX(0); transition: transform 0.3s; }
.tool-card:hover { border-color: #667eea; transform: translateY(-6px); box-shadow: 0 12px 32px rgba(102,126,234,0.15); }
.tool-card:hover::before { transform: scaleX(1); }
.tool-icon { width: 56px; height: 56px; background: linear-gradient(135deg, #667eea, #764ba2); border-radius: 14px; display: flex; align-items: center; justify-content: center; font-size: 28px; margin-bottom: 16px; }
.tool-title { font-size: 17px; font-weight: 600; color: #1e293b; margin-bottom: 8px; }
.tool-desc { font-size: 14px; color: #64748b; line-height: 1.6; flex: 1; }
.tool-tag { display: inline-block; padding: 4px 10px; background: linear-gradient(135deg, #667eea, #764ba2); color: white; border-radius: 20px; font-size: 11px; font-weight: 500; margin-top: 12px; }

/* Calculator Page */
.breadcrumb { padding: 16px 0; font-size: 13px; color: #64748b; display: flex; align-items: center; gap: 8px; }
.breadcrumb a { color: #667eea; }
.breadcrumb span { color: #cbd5e1; }
.calc-section { background: white; border-radius: 24px; padding: 48px; margin-bottom: 40px; box-shadow: 0 4px 24px rgba(0,0,0,0.06); }
.calc-section h1 { font-size: 36px; font-weight: 700; margin-bottom: 8px; background: linear-gradient(135deg, #667eea, #764ba2); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.calc-section .subtitle { font-size: 18px; color: #64748b; margin-bottom: 40px; }

/* Form - 优化表单样式 */
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; margin-bottom: 32px; }
.form-group { display: flex; flex-direction: column; }
.form-group.full { grid-column: span 2; }
.form-group label { font-size: 14px; font-weight: 600; margin-bottom: 10px; color: #374151; display: flex; align-items: center; gap: 6px; }
.form-group label .required { color: #ef4444; }
.form-group input, .form-group select { padding: 14px 18px; border: 2px solid #e2e8f0; border-radius: 12px; font-size: 16px; transition: all 0.2s; background: #f8fafc; }
.form-group input:focus, .form-group select:focus { outline: none; border-color: #667eea; box-shadow: 0 0 0 4px rgba(102,126,234,0.1); background: white; }
.calc-btn { width: 100%; padding: 18px; background: linear-gradient(135deg, #667eea, #764ba2); color: white; border: none; border-radius: 14px; font-size: 18px; font-weight: 600; cursor: pointer; transition: all 0.3s; box-shadow: 0 4px 14px rgba(102,126,234,0.4); }
.calc-btn:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(102,126,234,0.5); }
.calc-btn:active { transform: translateY(0); }

/* Result - 优化结果展示 */
.result-box { display: none; margin-top: 40px; padding: 32px; background: linear-gradient(135deg, #667eea10, #764ba210); border-radius: 20px; border: 2px solid #667eea30; }
.result-box.show { display: block; animation: slideUp 0.3s ease-out; }
@keyframes slideUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
.result-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.result-item { background: white; padding: 28px; border-radius: 16px; text-align: center; box-shadow: 0 2px 8px rgba(0,0,0,0.04); }
.result-label { font-size: 14px; color: #64748b; margin-bottom: 12px; font-weight: 500; }
.result-value { font-size: 42px; font-weight: 700; color: #667eea; line-height: 1.2; }
.result-unit { font-size: 14px; color: #94a3b8; margin-top: 4px; }

/* Content Section */
.content-section { margin-bottom: 48px; }
.content-section h2 { font-size: 26px; font-weight: 700; margin-bottom: 20px; color: #1e293b; padding-left: 16px; border-left: 4px solid #667eea; }
.content-section h3 { font-size: 18px; font-weight: 600; margin: 32px 0 16px; color: #374151; }
.content-section p { font-size: 15px; color: #4b5563; margin-bottom: 16px; line-height: 1.8; }
.content-section ul { margin: 16px 0; padding-left: 24px; }
.content-section li { margin-bottom: 10px; color: #4b5563; }
.highlight-box { background: linear-gradient(135deg, #667eea08, #764ba208); border-left: 4px solid #667eea; padding: 24px; margin: 24px 0; border-radius: 0 16px 16px 0; }
.highlight-box p { margin-bottom: 0; }
.highlight-box strong { color: #667eea; }

/* Related Grid */
.related-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.related-card { background: #f8fafc; padding: 24px; border-radius: 16px; text-decoration: none; border: 1px solid #e2e8f0; transition: all 0.2s; display: flex; align-items: flex-start; gap: 16px; }
.related-card:hover { border-color: #667eea; transform: translateY(-4px); box-shadow: 0 8px 24px rgba(102,126,234,0.12); }
.related-card .icon { width: 44px; height: 44px; background: linear-gradient(135deg, #667eea, #764ba2); border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 20px; flex-shrink: 0; }
.related-card h4 { font-size: 15px; font-weight: 600; color: #1e293b; margin-bottom: 4px; }
.related-card p { font-size: 13px; color: #64748b; margin: 0; }

/* Footer */
footer { text-align: center; padding: 48px 0; color: #64748b; font-size: 14px; border-top: 1px solid #e2e8f0; margin-top: 80px; background: white; }
footer a { color: #667eea; }
footer a:hover { text-decoration: underline; }
.footer-links { display: flex; justify-content: center; gap: 24px; margin-top: 16px; }

/* CTA Section */
.cta-section { background: linear-gradient(135deg, #667eea, #764ba2); border-radius: 24px; padding: 48px; text-align: center; color: white; margin-bottom: 64px; }
.cta-section h2 { font-size: 28px; margin-bottom: 12px; }
.cta-section p { opacity: 0.9; margin-bottom: 24px; }

/* Search Box */
.search-box { max-width: 600px; margin: 0 auto 48px; position: relative; }
.search-box input { width: 100%; padding: 18px 24px; border: 2px solid #e2e8f0; border-radius: 50px; font-size: 16px; text-align: center; }
.search-box input:focus { outline: none; border-color: #667eea; }
.search-results { position: absolute; top: 100%; left: 0; right: 0; background: white; border-radius: 16px; box-shadow: 0 8px 32px rgba(0,0,0,0.12); margin-top: 8px; max-height: 400px; overflow-y: auto; display: none; z-index: 100; }
.search-results.show { display: block; }
.search-result-item { display: block; padding: 16px 20px; border-bottom: 1px solid #f1f5f9; text-decoration: none; color: #374151; transition: background 0.2s; }
.search-result-item:hover { background: #f8fafc; }
.search-result-item h4 { font-size: 15px; margin-bottom: 4px; }
.search-result-item p { font-size: 13px; color: #64748b; margin: 0; }

/* Share Buttons */
.share-buttons { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 24px; flex-wrap: wrap; }
.share-label { font-size: 14px; color: #64748b; }
.share-btn { width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 14px; text-decoration: none; transition: all 0.2s; border: none; cursor: pointer; }
.share-btn.twitter { background: #000; color: white; }
.share-btn.facebook { background: #1877f2; color: white; }
.share-btn.linkedin { background: #0a66c2; color: white; }
.share-btn.copy { background: #64748b; color: white; }
.share-btn:hover { transform: scale(1.1); }

/* Usage Tips */
.usage-tips { background: linear-gradient(135deg, #667eea10, #764ba210); border: 1px solid #667eea30; padding: 12px 20px; border-radius: 12px; margin-top: 20px; font-size: 13px; color: #64748b; text-align: center; }

/* Tool Share Buttons */
.tool-share { display: flex; align-items: center; justify-content: flex-end; gap: 8px; margin-bottom: 16px; font-size: 13px; color: #64748b; }
.share-icon { width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 12px; text-decoration: none; background: #f1f5f9; color: #64748b; border: none; cursor: pointer; transition: all 0.2s; }
.share-icon:hover { background: #667eea; color: white; }
.favorites-btn { background: linear-gradient(135deg, #667eea, #764ba2); color: white; border: none; padding: 8px 16px; border-radius: 20px; cursor: pointer; font-size: 14px; margin-left: auto; }
.favorites-btn:hover { transform: scale(1.05); }

/* Favorites Modal */
.modal-overlay { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.5); z-index: 1000; display: none; }
.modal-overlay.show { display: flex; align-items: center; justify-content: center; }
.modal-content { background: white; border-radius: 24px; padding: 32px; max-width: 600px; width: 90%; max-height: 80vh; overflow-y: auto; }
.modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; }
.modal-header h3 { font-size: 20px; margin: 0; }
.modal-close { background: none; border: none; font-size: 24px; cursor: pointer; color: #64748b; }
.favorite-item { display: flex; align-items: center; justify-content: space-between; padding: 16px; border-bottom: 1px solid #e2e8f0; }
.favorite-item a { color: #374151; text-decoration: none; flex: 1; }
.favorite-item a:hover { color: #667eea; }
.favorite-item button { background: #ef4444; color: white; border: none; padding: 6px 12px; border-radius: 8px; cursor: pointer; font-size: 12px; }

/* Responsive */
@media (max-width: 1024px) {
    .hero h1 { font-size: 44px; }
    .tools-grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
}
@media (max-width: 768px) {
    .hero { padding: 60px 0 40px; }
    .hero h1 { font-size: 32px; }
    .hero p { font-size: 16px; }
    .hero-stats { flex-wrap: wrap; gap: 24px; }
    .stat-value { font-size: 28px; }
    .section-title { font-size: 22px; }
    .form-grid { grid-template-columns: 1fr; }
    .form-group.full { grid-column: span 1; }
    .result-grid { grid-template-columns: 1fr; }
    .related-grid { grid-template-columns: 1fr; }
    .tools-grid { grid-template-columns: 1fr; }
    .calc-section { padding: 32px 24px; }
    .category-card { padding: 24px; }
    .nav-links { display: none; }
}
@media (max-width: 480px) {
    .container { padding: 0 16px; }
    .hero-stats { gap: 16px; }
    .stat-value { font-size: 24px; }
}
/* Breadcrumbs */
.breadcrumbs { padding: 16px 0; font-size: 13px; color: #64748b; display: flex; align-items: center; gap: 8px; margin-bottom: 16px; }
.breadcrumbs a { color: #667eea; text-decoration: none; }
.breadcrumbs a:hover { text-decoration: underline; }
.breadcrumbs span { color: #cbd5e1; }

/* Dark Mode */
[data-theme="dark"] {
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --border-color: #334155;
}
[data-theme="dark"] body { background: #0f172a; color: #f1f5f9; }
[data-theme="dark"] header { background: #1e293b; border-bottom-color: #334155; }
[data-theme="dark"] .logo { color: #f1f5f9; }
[data-theme="dark"] .nav-links a { color: #94a3b8; }
[data-theme="dark"] .nav-links a:hover { color: #667eea; }
[data-theme="dark"] .search-box { background: #1e293b; border-color: #334155; }
[data-theme="dark"] .search-input { background: transparent; color: #f1f5f9; }
[data-theme="dark"] .category-section { background: #1e293b; }
[data-theme="dark"] .category-title { color: #f1f5f9; }
[data-theme="dark"] .tool-card { background: #1e293b; border-color: #334155; }
[data-theme="dark"] .tool-card:hover { border-color: #667eea; }
[data-theme="dark"] .tool-name { color: #f1f5f9; }
[data-theme="dark"] .tool-desc { color: #94a3b8; }
[data-theme="dark"] .calc-section { background: #1e293b; }
[data-theme="dark"] .calc-section h1 { color: #f1f5f9; }
[data-theme="dark"] .subtitle { color: #94a3b8; }
[data-theme="dark"] .form-group label { color: #f1f5f9; }
[data-theme="dark"] input, [data-theme="dark"] select { background: #0f172a; color: #f1f5f9; border-color: #334155; }
[data-theme="dark"] .result-box { background: #0f172a; border-color: #334155; }
[data-theme="dark"] .result-value { color: #667eea; }
[data-theme="dark"] .faq-item { background: #0f172a; border-color: #334155; }
[data-theme="dark"] .faq-item h3 { color: #f1f5f9; }
[data-theme="dark"] footer { background: #1e293b; border-top-color: #334155; }
[data-theme="dark"] footer p { color: #94a3b8; }
[data-theme="dark"] .footer-links a { color: #94a3b8; }
[data-theme="dark"] .usage-tips { background: linear-gradient(135deg, #1e293b, #0f172a); border-color: #334155; color: #94a3b8; }
[data-theme="dark"] .tool-share { color: #94a3b8; }
[data-theme="dark"] .share-icon { background: #334155; color: #94a3b8; }
[data-theme="dark"] .share-icon:hover { background: #667eea; color: white; }
[data-theme="dark"] .breadcrumbs { color: #94a3b8; }
[data-theme="dark"] .breadcrumbs a { color: #667eea; }
[data-theme="dark"] .content-section { background: #1e293b; }
[data-theme="dark"] .content-section h2 { color: #f1f5f9; }
[data-theme="dark"] .content-section p, [data-theme="dark"] .content-section li { color: #94a3b8; }
[data-theme="dark"] .highlight-box { background: #0f172a; border-color: #334155; }
[data-theme="dark"] .modal-content { background: #1e293b; }
[data-theme="dark"] .modal-header { background: #0f172a; border-bottom-color: #334155; }
[data-theme="dark"] .modal-header h3 { color: #f1f5f9; }
[data-theme="dark"] .favorite-item { background: #0f172a; border-color: #334155; }
[data-theme="dark"] .favorite-item a { color: #667eea; }

.theme-toggle { background: none; border: 1px solid #667eea; color: #667eea; padding: 6px 12px; border-radius: 20px; cursor: pointer; font-size: 12px; margin-left: 12px; }
.theme-toggle:hover { background: #667eea; color: white; }

/* Related Tools */
.related-tools { margin: 40px 0; padding: 24px; background: linear-gradient(135deg, #667eea10, #764ba210); border-radius: 16px; }
.related-tools h3 { font-size: 18px; margin-bottom: 16px; color: #1e293b; }
[data-theme="dark"] .related-tools { background: linear-gradient(135deg, #1e293b, #0f172a); }
[data-theme="dark"] .related-tools h3 { color: #f1f5f9; }
.related-grid { display: flex; flex-wrap: wrap; gap: 12px; }
.related-card { display: inline-block; padding: 10px 20px; background: white; border: 1px solid #e2e8f0; border-radius: 25px; color: #667eea; text-decoration: none; font-size: 14px; transition: all 0.2s; }
.related-card:hover { background: #667eea; color: white; border-color: #667eea; }
[data-theme="dark"] .related-card { background: #1e293b; border-color: #334155; color: #94a3b8; }
[data-theme="dark"] .related-card:hover { background: #667eea; color: white; }

/* AdSense Container */
.ad-container { margin: 24px 0; text-align: center; min-height: 90px; background: #f8fafc; border-radius: 12px; padding: 16px; display: flex; align-items: center; justify-content: center; }
[data-theme="dark"] .ad-container { background: #1e293b; }

/* Popular Searches */
.popular-searches { margin: 16px 0; }
.popular-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.popular-tag { padding: 4px 12px; background: #f1f5f9; border-radius: 15px; font-size: 12px; color: #64748b; text-decoration: none; }
.popular-tag:hover { background: #667eea; color: white; }
[data-theme="dark"] .popular-tag { background: #334155; color: #94a3b8; }
[data-theme="dark"] .popular-tag:hover { background: #667eea; color: white; }

/* Tool Rating */
.tool-rating { margin: 16px 0; display: flex; align-items: center; gap: 8px; }
.star { font-size: 18px; cursor: pointer; color: #e2e8f0; }
.star.active { color: #fbbf24; }
.rating-count { font-size: 12px; color: #64748b; }
[data-theme="dark"] .rating-count { color: #94a3b8; }

/* ===== CSS Variables ===== */
:root {
    --primary: #667eea;
    --primary-dark: #5a67d8;
    --secondary: #764ba2;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --bg-primary: #f8fafc;
    --bg-secondary: #ffffff;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    --border-color: #e2e8f0;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --transition-fast: 0.15s ease;
    --transition-normal: 0.3s ease;
}

/* ===== Modern Reset ===== */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { 
    font-family: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* ===== Improved Container ===== */
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* ===== Better Header ===== */
header {
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    padding: 16px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
    background: rgba(255,255,255,0.95);
}
.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}
.logo {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
}
.nav-links {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
}
.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: color var(--transition-fast);
}
.nav-links a:hover { color: var(--primary); }

/* ===== Improved Hero ===== */
.hero {
    text-align: center;
    padding: 60px 0 40px;
    background: linear-gradient(135deg, #667eea10 0%, #764ba210 100%);
    border-radius: var(--radius-xl);
    margin: 24px 0;
}
.hero h1 {
    font-size: 48px;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 16px;
}
.hero .subtitle {
    font-size: 20px;
    color: var(--text-secondary);
    margin-bottom: 32px;
}

/* ===== Stats Cards ===== */
.hero-stats {
    display: flex;
    justify-content: center;
    gap: 48px;
    margin-bottom: 32px;
}
.stat-item { text-align: center; }
.stat-value {
    font-size: 36px;
    font-weight: 700;
    color: var(--primary);
}
.stat-label {
    font-size: 14px;
    color: var(--text-secondary);
}

/* ===== Improved Search Box ===== */
.search-box {
    max-width: 600px;
    margin: 0 auto 24px;
    position: relative;
}
.search-input {
    width: 100%;
    padding: 16px 24px;
    border: 2px solid var(--border-color);
    border-radius: 50px;
    font-size: 16px;
    transition: all var(--transition-fast);
    background: var(--bg-secondary);
}
.search-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(102,126,234,0.1);
}
.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    max-height: 400px;
    overflow-y: auto;
    display: none;
    z-index: 50;
}
.search-results.show { display: block; }
.search-result-item {
    display: block;
    padding: 16px;
    border-bottom: 1px solid var(--border-color);
    text-decoration: none;
    transition: background var(--transition-fast);
}
.search-result-item:hover { background: var(--bg-primary); }
.search-result-item h4 { color: var(--text-primary); margin-bottom: 4px; }
.search-result-item p { color: var(--text-secondary); font-size: 13px; margin: 0; }

/* ===== Better Popular Tags ===== */
.popular-tags {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-bottom: 16px;
}
.popular-tag {
    padding: 8px 16px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 50px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    transition: all var(--transition-fast);
}
.popular-tag:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    transform: translateY(-2px);
}

/* ===== Improved Category Section ===== */
.category-section {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    padding: 32px;
    margin-bottom: 24px;
    box-shadow: var(--shadow-sm);
}
.category-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ===== Better Tool Cards ===== */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 16px;
}
.tool-card {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 20px;
    text-decoration: none;
    transition: all var(--transition-normal);
    display: block;
}
.tool-card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-md);
    transform: translateY(-4px);
}
.tool-name {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}
.tool-desc {
    font-size: 13px;
    color: var(--text-secondary);
    margin: 0;
}

/* ===== Improved Buttons ===== */
.calc-btn {
    display: inline-block;
    padding: 14px 32px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    border: none;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: all var(--transition-fast);
}
.calc-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102,126,234,0.4);
}

/* ===== Improved Footer ===== */
footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    padding: 48px 0 24px;
    margin-top: 48px;
    text-align: center;
}
.footer-links {
    display: flex;
    justify-content: center;
    gap: 24px;
    flex-wrap: wrap;
    margin-top: 16px;
}
.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color var(--transition-fast);
}
.footer-links a:hover { color: var(--primary); }

/* ===== Animations ===== */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
.tool-card { animation: fadeInUp 0.4s ease forwards; }
.category-section { animation: fadeInUp 0.4s ease forwards; }

/* ===== Mobile Responsive ===== */
@media (max-width: 768px) {
    .hero h1 { font-size: 32px; }
    .hero-stats { flex-direction: column; gap: 16px; }
    .stat-value { font-size: 28px; }
    .nav-links { display: none; }
    .header-inner { flex-wrap: wrap; }
    .tools-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
    .hero h1 { font-size: 24px; }
    .tools-grid { grid-template-columns: 1fr; }
    .container { padding: 0 16px; }
}

/* ===== Tool Page Layout ===== */
.calc-section {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    padding: 40px;
    margin: 24px 0;
    box-shadow: var(--shadow-sm);
}
.calc-section h1 {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}
.calc-section .subtitle {
    font-size: 16px;
    color: var(--text-secondary);
    margin-bottom: 32px;
}

/* ===== Form Improvements ===== */
.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}
.form-group { margin-bottom: 0; }
.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}
.form-group input, .form-group select {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 16px;
    background: var(--bg-primary);
    transition: all var(--transition-fast);
}
.form-group input:focus, .form-group select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(102,126,234,0.1);
}

/* ===== Result Box ===== */
.result-box {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: var(--radius-lg);
    padding: 32px;
    text-align: center;
    color: white;
    margin-bottom: 24px;
}
.result-value {
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 8px;
}
.result-label {
    font-size: 16px;
    opacity: 0.9;
}
.result-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 16px;
    margin-top: 24px;
}
.result-item {
    background: rgba(255,255,255,0.15);
    border-radius: var(--radius-md);
    padding: 16px;
}
.result-item-value {
    font-size: 20px;
    font-weight: 600;
}
.result-item-label {
    font-size: 12px;
    opacity: 0.8;
}

/* ===== FAQ Improvements ===== */
.faq-section {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    padding: 32px;
    margin-top: 32px;
}
.faq-item {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 20px;
    margin-bottom: 12px;
    transition: all var(--transition-fast);
}
.faq-item:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-sm);
}
.faq-item h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}
.faq-item p {
    font-size: 14px;
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.7;
}

/* ===== Breadcrumbs ===== */
.breadcrumbs {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    padding: 16px 0;
    color: var(--text-muted);
}
.breadcrumbs a {
    color: var(--primary);
    text-decoration: none;
}
.breadcrumbs a:hover { text-decoration: underline; }

/* ===== Share Buttons ===== */
.tool-share {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}
.tool-share span { font-size: 14px; color: var(--text-secondary); }
.share-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    background: var(--bg-primary);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    cursor: pointer;
    transition: all var(--transition-fast);
    text-decoration: none;
}
.share-icon:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* ===== Related Tools ===== */
.related-tools {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-top: 32px;
}
.related-tools h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 16px;
}
.related-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.related-card {
    padding: 10px 20px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 50px;
    color: var(--primary);
    text-decoration: none;
    font-size: 14px;
    transition: all var(--transition-fast);
}
.related-card:hover {
    background: var(--primary);
    color: white;
}

/* ===== Cookie Banner ===== */
#cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    padding: 20px 24px;
    z-index: 9999;
    text-align: center;
    font-size: 14px;
    display: none;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.15);
}
#cookie-banner button {
    background: white;
    color: var(--primary);
    border: none;
    padding: 10px 20px;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    margin-left: 16px;
    transition: all var(--transition-fast);
}
#cookie-banner button:hover {
    transform: scale(1.05);
}

/* ===== Dark Mode Overrides ===== */
[data-theme="dark"] {
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --border-color: #334155;
}
[data-theme="dark"] header { background: rgba(30,41,59,0.95); }
[data-theme="dark"] .search-input { background: var(--bg-primary); color: var(--text-primary); }
[data-theme="dark"] .tool-card { background: var(--bg-secondary); }
[data-theme="dark"] .calc-section { background: var(--bg-secondary); }
[data-theme="dark"] .form-group input { background: var(--bg-primary); color: var(--text-primary); }
[data-theme="dark"] .faq-item { background: var(--bg-secondary); }
[data-theme="dark"] footer { background: var(--bg-secondary); }
