:root {
    /* Futurepedia-inspired "Clean Directory" Theme */
    --bg-body: #F3F4F6;        /* Light Grey background for contrast */
    --bg-card: #FFFFFF;        /* Pure white cards */
    --bg-nav: rgba(255, 255, 255, 0.9);
    
    /* Branding */
    --primary: #2563EB;        /* Royal Blue (Standard Tech Blue) */
    --primary-hover: #1D4ED8;
    --secondary: #4F46E5;      /* Indigo for accents */
    
    /* Text */
    --text-main: #111827;      /* Gray 900 - Soft Black */
    --text-muted: #6B7280;     /* Gray 500 */
    --text-light: #9CA3AF;     /* Gray 400 */
    
    /* Borders & UI */
    --border: #E5E7EB;         /* Gray 200 */
    --border-hover: #D1D5DB;   /* Gray 300 */
    --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);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

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

body {
    font-family: 'Outfit', sans-serif; /* Keep Outfit, it's modern */
    background-color: var(--bg-body);
    color: var(--text-main);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

a { text-decoration: none; color: inherit; }
ul { list-style: none; }

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Navbar - Clean & Sticky (Dark Header Variant) */
.navbar {
    background-color: #1e293b !important; /* Force Dark Slate */
    background: #1e293b !important;
    border-bottom: 1px solid #334155 !important;
    backdrop-filter: blur(12px);
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 16px 0;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap; /* Allow wrapping on tiny screens */
    gap: 12px;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: #f8fafc !important; /* White text */
    display: flex;
    align-items: center;
    gap: 8px;
    letter-spacing: -0.01em;
}

.logo i { color: #60a5fa !important; /* Lighter Blue */ }

.nav-links {
    display: flex;
    gap: 28px;
    align-items: center;
}

.nav-links a {
    color: #cbd5e1 !important; /* Light Slate */
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.2s;
}

.nav-links a:hover, .nav-links a.active {
    color: #60a5fa !important;
}

.btn-login {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 8px 20px;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.2s;
    color: white;
}

.btn-login:hover {
    border-color: #60a5fa;
    color: #60a5fa;
    background: rgba(255, 255, 255, 0.15);
}

/* Hero Section - Compact & Functional */
.hero {
    text-align: center;
    padding: 60px 0 60px; /* Increased padding */
    background-color: #1e293b !important;
    background: linear-gradient(to bottom, #1e293b 0%, #0f172a 100%) !important; /* Force Dark Gradient */
    border-bottom: 1px solid #334155 !important;
}

.pill-new {
    background: rgba(37, 99, 235, 0.2); /* Blue 50 */
    color: #93c5fd; /* Lighter Blue */
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    display: inline-block;
    margin-bottom: 20px;
    border: 1px solid rgba(37, 99, 235, 0.3);
}

.hero h1 {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 16px;
    color: #f8fafc !important; /* White */
    letter-spacing: -0.03em;
}

.gradient-text {
    background: linear-gradient(90deg, #60a5fa 0%, #a78bfa 100%); /* Brighter Gradient */
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero p {
    color: #cbd5e1 !important; /* Light Slate */
    font-size: 1.15rem;
    max-width: 800px; /* Increased from 600px */
    margin: 0 auto 32px;
    font-weight: 400;
}

/* Search Bar - High Contrast */
.search-bar {
    max-width: 560px;
    margin: 0 auto 24px;
    position: relative;
    display: flex;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3); /* Stronger shadow */
    border-radius: 12px;
    background: white;
}

.search-bar input {
    width: 100%;
    padding: 16px 20px 16px 52px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: white;
    color: var(--text-main);
    font-size: 1rem;
    font-family: inherit;
    outline: none;
    transition: all 0.2s;
}

.search-bar input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.search-bar i {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
    font-size: 1.1rem;
}

.search-bar button {
    position: absolute;
    right: 6px;
    top: 6px;
    bottom: 6px;
    background: var(--primary);
    color: white;
    border: none;
    padding: 0 20px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.search-bar button:hover {
    background: var(--primary-hover);
}

.tags {
    display: flex;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
    font-size: 0.9rem;
    color: #cbd5e1; /* Light Slate for dark header */
}

.tag {
    background: white;
    border: 1px solid var(--border);
    padding: 4px 12px;
    border-radius: 16px;
    color: var(--text-muted);
    font-weight: 500;
    transition: all 0.2s;
    box-shadow: var(--shadow-sm);
}

.tag:hover {
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-1px);
}

/* Layout Grid */
.layout-grid {
    display: grid;
    grid-template-columns: 240px 1fr; /* Slightly narrower sidebar */
    gap: 40px;
    padding-top: 40px;
    padding-bottom: 80px;
}

/* Sidebar */
.sidebar h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 24px;
    letter-spacing: -0.01em;
    text-transform: none; /* Removed uppercase */
}

.filter-group {
    margin-bottom: 32px;
}

.filter-group h4 {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-bottom: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.sidebar ul li {
    padding: 8px 0;
    margin-bottom: 0; /* Remove margin, keep list tight */
    border-radius: 0; /* Remove blocky hover */
    color: var(--text-muted);
    cursor: pointer;
    transition: color 0.2s;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.95rem;
    background: transparent !important; /* No background on hover */
}

.sidebar ul li:hover {
    color: var(--primary);
    transform: none; /* No movement */
}

.sidebar ul li.active {
    color: var(--primary);
    font-weight: 600;
    background: transparent;
}

/* Checkbox Style for Pricing */
.sidebar input[type="checkbox"] {
    accent-color: var(--primary);
    width: 16px;
    height: 16px;
    border-radius: 4px;
    cursor: pointer;
}

.ad-spot {
    margin-top: 32px;
    background: #eff6ff; /* Very light blue */
    border: 1px dashed #bfdbfe;
    border-radius: 12px;
    padding: 24px;
    text-align: center;
    color: var(--text-muted);
    display: block; /* Changed from flex */
}

.ad-spot h4 {
    color: var(--primary);
    margin-bottom: 8px;
    font-size: 1.1rem;
}

.ad-spot p {
    font-size: 0.9rem;
    margin-bottom: 16px;
    color: var(--text-muted);
}

.btn-ad-cta {
    display: inline-block;
    padding: 8px 16px;
    background: white;
    border: 1px solid var(--primary);
    color: var(--primary);
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.2s;
}

.btn-ad-cta:hover {
    background: var(--primary);
    color: white;
}

/* Tools Section */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.section-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-main);
}

.sort {
    color: var(--text-muted);
    font-size: 0.9rem;
    cursor: pointer;
    background: white;
    padding: 6px 12px;
    border-radius: 6px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}

/* Tool Cards - Futurepedia Style */
.tool-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
}

.tool-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
    transition: all 0.2s ease-in-out;
    position: relative;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
}

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

.card-top {
    display: flex;
    gap: 14px;
    margin-bottom: 14px;
}

.tool-icon {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.5rem;
    color: white;
    flex-shrink: 0;
}

.tool-info { flex-grow: 1; }

.tool-info h3 {
    font-size: 1.1rem;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text-main);
}

.verified {
    color: #3B82F6; /* Blue tick like Twitter/Futurepedia */
    font-size: 0.9rem;
}

.price-tag {
    font-size: 0.75rem;
    background: #F3F4F6;
    padding: 2px 8px;
    border-radius: 4px;
    color: var(--text-muted);
    font-weight: 500;
    border: 1px solid #E5E7EB;
}

.btn-save {
    background: transparent;
    border: none;
    color: var(--text-light);
    font-size: 1.1rem;
    cursor: pointer;
    transition: color 0.2s;
    height: fit-content;
    padding: 0;
}

.btn-save:hover { color: var(--text-main); }

.tool-desc {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 20px;
    display: -webkit-box;
    -webkit-line-clamp: 3; /* Show a bit more text */
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex-grow: 1;
}

.card-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid #F3F4F6;
    padding-top: 14px;
    margin-top: auto;
}

.rating {
    font-size: 0.9rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
    color: var(--text-main);
}

.rating i { color: #FBBF24; /* Amber 400 */ }

.btn-visit {
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
}

.btn-visit:hover {
    color: var(--primary);
}

/* Footer */
footer {
    border-top: 1px solid var(--border);
    padding: 60px 0;
    background: white;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 40px;
}

.footer-col h4 {
    margin-bottom: 16px;
    color: var(--text-main);
    font-size: 1rem;
    font-weight: 700;
}

.footer-col p { color: var(--text-muted); font-size: 0.95rem; }

.footer-col a {
    display: block;
    color: var(--text-muted);
    margin-bottom: 10px;
    font-size: 0.95rem;
    transition: color 0.2s;
}

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

/* Responsive */
@media (max-width: 1024px) {
    .container { padding: 0 20px; }
    .layout-grid {
        grid-template-columns: 200px 1fr;
        gap: 30px;
    }
}

@media (max-width: 768px) {
    /* Navbar stack */
    .navbar .container {
        flex-direction: column;
        gap: 16px;
    }
    
    .nav-links {
        width: 100%;
        justify-content: center;
        gap: 20px;
        flex-wrap: wrap;
        font-size: 0.9rem;
    }

    .layout-grid { grid-template-columns: 1fr; }
    .sidebar { display: none; }
    
    .hero h1 { font-size: 2rem; }
    .hero { padding: 40px 0; }
    
    .tool-grid { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
    .footer-content { grid-template-columns: 1fr; text-align: center; gap: 30px; }
    
    .search-bar { margin: 0 16px 24px; width: auto; }
}

@media (max-width: 480px) {
    .nav-links { gap: 14px; }
    .hero h1 { font-size: 1.75rem; }
    .tool-card { padding: 16px; }
    .tool-icon { width: 40px; height: 40px; font-size: 1.25rem; }
}