:root {
    --primary: #6366f1; 
    --secondary: #8b5cf6;
    --bg: #0f172a; 
    --bg-card: #1e293b; 
    --bg-hover: #334155;
    --text: #f1f5f9; 
    --text-muted: #94a3b8; 
    --border: #334155;
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.4);
}

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

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

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

/* Hero */
.hero { 
    padding: 60px 0 40px; 
    text-align: center; 
}

.hero h1 { 
    font-size: 42px; 
    font-weight: 800; 
    margin-bottom: 16px; 
    background: linear-gradient(135deg, #f59e0b, #ddef44, #ddef44);
    /*background: linear-gradient(135deg, var(--primary), var(--secondary), #ec4899); */
    -webkit-background-clip: text; 
    -webkit-text-fill-color: transparent; 
}

.hero p { 
    font-size: 18px; 
    color: var(--text-muted); 
    max-width: 700px; 
    margin: 0 auto 40px; 
}

/* Search & Filter */
.search-section { 
    padding: 30px 0; 
}

.search-box { 
    display: flex; 
    gap: 12px; 
    margin-bottom: 20px; 
}

.search-input-wrapper { 
    flex: 1; 
    position: relative; 
}

.search-icon { 
    position: absolute; 
    left: 16px; 
    top: 50%; 
    transform: translateY(-50%); 
    color: var(--text-muted); 
}

.search-input { 
    width: 100%; 
    padding: 14px 16px 14px 44px; 
    background: var(--bg-card); 
    border: 1px solid var(--border); 
    border-radius: 12px; 
    color: var(--text); 
    font-size: 16px; 
    transition: 0.2s; 
}

.search-input:focus { 
    outline: none; 
    border-color: var(--primary); 
}

.sort-wrapper { 
    display: flex; 
    align-items: center; 
    gap: 8px; 
    padding: 0 12px; 
    background: var(--bg-card); 
    border: 1px solid var(--border); 
    border-radius: 12px; 
}

.sort-select { 
    background: transparent; 
    border: none; 
    color: var(--text); 
    padding: 12px 4px 12px 0; 
    cursor: pointer; 
}

.category-tabs { 
    display: flex; 
    gap: 8px; 
    flex-wrap: wrap; 
    justify-content: center; 
}

.category-tab { 
    padding: 8px 16px; 
    background: var(--bg-card); 
    border: 1px solid var(--border); 
    border-radius: 20px; 
    color: var(--text-muted); 
    cursor: pointer; 
    transition: 0.2s; 
}

.category-tab.active { 
    background: linear-gradient(135deg, #ddef44, var(--secondary)); 
    color: white; 
}

/* Tools Grid */
.tools-section { 
    padding: 30px 0 70px; 
}

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

.tool-card { 
    background: var(--bg-card); 
    border: 1px solid var(--border); 
    border-radius: 16px; 
    padding: 24px; 
    transition: 0.3s; 
    text-decoration: none; 
    color: inherit; 
    position: relative; 
}

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

.tool-header { 
    display: flex; 
    gap: 16px; 
    margin-bottom: 16px; 
}

.tool-icon { 
    width: 56px; 
    height: 56px; 
    border-radius: 12px; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    font-size: 24px; 
    flex-shrink: 0; 
}

.tool-title { 
    font-size: 18px; 
    font-weight: 600; 
    margin-bottom: 4px; 
    white-space: nowrap; 
    overflow: hidden; 
    text-overflow: ellipsis; 
}

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

.tool-description { 
    color: var(--text-muted); 
    font-size: 14px; 
    margin-bottom: 16px; 
    overflow: hidden; 
    display: -webkit-box; 
    -webkit-line-clamp: 2; 
    -webkit-box-orient: vertical; 
}

.tool-tags { 
    display: flex; 
    gap: 6px; 
    flex-wrap: wrap; 
}

.tool-tag { 
    font-size: 11px; 
    padding: 4px 8px; 
    background: var(--bg-hover); 
    border-radius: 4px; 
    color: var(--text-muted); 
}

.tool-arrow { 
    color: var(--primary); 
    opacity: 0; 
    transition: 0.2s; 
}

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

.featured-badge { 
    position: absolute; 
    top: 12px; 
    right: 12px; 
    background: linear-gradient(135deg, #f59e0b, #ef4444); 
    color: white; 
    font-size: 10px; 
    font-weight: 600; 
    padding: 4px 8px; 
    border-radius: 12px; 
}

/* States */
.empty-state, .loading { 
    text-align: center; 
    padding: 40px; 
    color: var(--text-muted); 
}

/* Responsive */
@media (max-width: 768px) {
    .hero h1 { 
        font-size: 32px; 
    }
    
    .tools-grid { 
        grid-template-columns: 1fr; 
    }
    
    .search-box { 
        flex-direction: column; 
    }
    
    .category-tabs { 
        justify-content: flex-start; 
    }
}