:root {
    /* Light Theme (Consistent with layout.css) */
    --primary-color: #0F4BA5;
    --primary-gradient: linear-gradient(135deg, #0F4BA5, #1E7BFF);
    --bg-main: #FFFFFF;
    --bg-secondary: #F8FAFC;
    --text-main: #1E293B;
    --text-muted: #64748B;
    --border-color: #E2E8F0;
    --active-bg: #EDF5FF;
    --active-text: #0F4BA5;
    
    --font-heading: 'Manrope', sans-serif;
    --font-body: 'Source Sans 3', sans-serif;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1);
    --radius-md: 12px;
}

[data-theme="dark"] {
    /* Dark Theme */
    --bg-main: #0F172A;
    --bg-secondary: #1E293B;
    --text-main: #F8FAFC;
    --text-muted: #94A3B8;
    --border-color: #334155;
    --sidebar-bg: #0F172A;
    --header-bg: #0F172A;
    --footer-bg: #0F172A;
    --active-bg: rgba(15, 75, 165, 0.2);
    --active-text: #38BDF8;
}

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

body {
    background-color: var(--bg-main);
    color: var(--text-main);
    font-family: var(--font-body);
    line-height: 1.5;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.app-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.landing-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 60px 20px;
}

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

.hero-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.hero-icon {
    font-size: 48px;
    background: var(--active-bg);
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    margin: 0 auto 20px auto;
}

.hero h1 {
    font-family: var(--font-heading);
    font-size: 42px;
    font-weight: 800;
    margin-bottom: 16px;
    color: var(--text-main);
}

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

/* Theme Toggle Button */
.theme-toggle-btn {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    width: 40px;
    height: 40px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: all 0.2s;
}

.theme-toggle-btn:hover {
    background: var(--active-bg);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

/* Stats Section */
.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
    margin-bottom: 60px;
}

.stat-card {
    background: var(--bg-secondary);
    padding: 24px;
    border-radius: 12px;
    text-align: center;
    border: 1px solid var(--border-color);
}

.search-input-wrapper {
    max-width: 600px;
    margin: 40px auto 0 auto;
    position: relative;
    display: flex;
    align-items: center;
}

#search-input {
    width: 100%;
    padding: 14px 20px 14px 45px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    color: var(--text-main);
    font-size: 16px;
    outline: none;
    transition: all 0.2s;
}

#search-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px var(--active-bg);
}

.search-icon-hero {
    position: absolute;
    left: 16px;
    font-size: 18px;
    color: var(--text-muted);
}

.stat-number {
    font-size: 32px;
    font-weight: 800;
    color: var(--primary-color);
    font-family: var(--font-heading);
}

.stat-label {
    font-size: 14px;
    color: var(--text-muted);
    font-weight: 600;
}

/* Categories Grid */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
}

.category-card {
    background: var(--bg-main);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 30px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
}

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

.category-icon {
    font-size: 32px;
    margin-bottom: 20px;
    width: 50px;
    height: 50px;
    background: var(--active-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
}

.category-title {
    font-family: var(--font-heading);
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--text-main);
}

.category-tools {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
}

.category-tools li a {
    color: var(--text-main);
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 12px 10px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    min-height: 54px;
}

.category-tools li a:hover,
.tool-item a:hover {
    background: var(--active-bg);
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

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

.tool-item a {
    color: var(--text-main);
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 12px 10px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    min-height: 54px;
}

@media (max-width: 768px) {
    .hero h1 { font-size: 32px; }
    .categories-grid { grid-template-columns: 1fr; }
}

/* Features Section */
.features-section {
    padding: 100px 20px;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    margin-top: 80px;
}

.features-section .section-title {
    text-align: center;
    margin-bottom: 60px;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

.feature-item {
    background: var(--bg-main);
    padding: 40px;
    border-radius: 20px;
    text-align: center;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.feature-item:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-color);
}

.feature-icon {
    font-size: 40px;
    margin-bottom: 24px;
    display: inline-block;
}

.feature-item h3 {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 20px;
    margin-bottom: 12px;
    color: var(--text-main);
}

.feature-item p {
    color: var(--text-muted);
    font-size: 15px;
    line-height: 1.6;
}

@media (max-width: 768px) {
    .hero h1 { font-size: 32px; }
    .categories-grid { grid-template-columns: 1fr; }
    .features-section { padding: 60px 20px; }
}