:root {
    --primary: #4F46E5;
    --primary-light: #EEF2FF;
    --text-main: #1F2937;
    --text-muted: #6B7280;
    --bg-main: #F9FAFB;
    --bg-card: #FFFFFF;
    --border: #E5E7EB;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --radius: 12px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

body {
    background-color: var(--bg-main);
    color: var(--text-main);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

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

/* Hero Section */
header {
    padding: 4rem 0;
    text-align: center;
    background: linear-gradient(135deg, #fdfbfb 0%, #ebedee 100%);
    border-bottom: 1px solid var(--border);
}

h1 {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 1rem;
    background: linear-gradient(to right, var(--primary), #818CF8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

header p {
    font-size: 1.25rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto;
}

/* Filters/Subjects Navigation */
.subjects {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin: -1.5rem 0 3rem;
    flex-wrap: wrap;
    position: sticky;
    top: 1rem;
    z-index: 10;
}

.subject-btn {
    background: var(--bg-card);
    border: 1px solid var(--border);
    padding: 0.75rem 1.5rem;
    border-radius: 99px;
    font-weight: 600;
    color: var(--text-main);
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
    text-decoration: none;
}

.subject-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Category Sections */
.category-section {
    margin-bottom: 4rem;
}

.category-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.category-title::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--border);
}

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

.tool-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.tool-card:hover {
    border-color: var(--primary);
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.tool-icon {
    width: 40px;
    height: 40px;
    background: var(--primary-light);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}

.tool-icon svg {
    width: 20px;
    height: 20px;
    color: var(--primary);
}

.tool-name {
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.tool-desc {
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* Footer */
footer {
    padding: 4rem 0;
    border-top: 1px solid var(--border);
    margin-top: 4rem;
    text-align: center;
    background: #fff;
}

/* Responsive */
@media (max-width: 768px) {
    h1 { font-size: 2.25rem; }
    .container { padding: 0 1rem; }
}
