:root {
    /* Default (Dark Mode) Palette */
    --primary: #818cf8;
    /* Indigo 400 - lighter for dark mode */
    --primary-hover: #6366f1;
    --secondary: #ec4899;
    --accent: #a78bfa;

    --bg-body: #0f172a;
    /* Slate 900 */
    --bg-card: #1e293b;
    /* Slate 800 */
    --text-main: #f1f5f9;
    /* Slate 100 */
    --text-muted: #94a3b8;
    /* Slate 400 */
    --border: #334155;
    /* Slate 700 */

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.3);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.3), 0 2px 4px -2px rgb(0 0 0 / 0.3);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.3), 0 4px 6px -4px rgb(0 0 0 / 0.3);
    --shadow-hover: 0 20px 25px -5px rgb(0 0 0 / 0.3), 0 8px 10px -6px rgb(0 0 0 / 0.3);

    /* Spacing & Layout */
    --container-width: 1200px;
    --header-height: 70px;
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 1rem;
    --radius-xl: 1.5rem;
}

[data-theme="light"] {
    --primary: #6366f1;
    /* Indigo 500 */
    --primary-hover: #4f46e5;

    --bg-body: #f8fafc;
    /* Slate 50 */
    --bg-card: #ffffff;
    --text-main: #1e293b;
    /* Slate 800 */
    --text-muted: #64748b;
    /* Slate 500 */
    --border: #e2e8f0;
    /* Slate 200 */

    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-hover: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
}

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    color: var(--text-main);
    background-color: var(--bg-body);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.2s;
}

ul {
    list-style: none;
}

button,
input {
    font-family: inherit;
    border: none;
    outline: none;
}

.container {
    width: 100%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Typography */
h1,
h2,
h3,
h4 {
    font-weight: 700;
    line-height: 1.2;
    color: var(--text-main);
}

.gradient-text {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.625rem 1.25rem;
    border-radius: var(--radius-md);
    font-weight: 500;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-primary {
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 14px 0 rgba(99, 102, 241, 0.39);
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.23);
}

.btn-secondary {
    background: transparent;
    color: var(--text-main);
    border: 1px solid transparent;
}

.btn-secondary:hover {
    color: var(--primary);
    background: rgba(99, 102, 241, 0.05);
}

.btn-lg {
    padding: 0.875rem 2rem;
    font-size: 1.05rem;
    border-radius: var(--radius-md);
}

/* Header */
.header {
    height: var(--header-height);
    background: var(--bg-body);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--text-main);
    letter-spacing: -0.5px;
    line-height: 1;
}

.logo img {
    height: 40px;
    width: auto;
    border-radius: 8px;
}

.nav-list {
    display: flex;
    gap: 2rem;
}

.nav-link {
    font-size: 0.95rem;
    color: var(--text-muted);
    font-weight: 500;
}

.nav-link:hover {
    color: var(--primary);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: transparent;
    cursor: pointer;
}

.mobile-menu-btn span {
    width: 25px;
    height: 2px;
    background-color: var(--text-main);
}

/* Hero Section */
.hero {
    position: relative;
    padding: 6rem 0;
    overflow: hidden;
    text-align: center;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 10;
}

.hero-title {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    letter-spacing: -1px;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

/* Search Bar */
.search-container {
    position: relative;
    width: 100%;
    max-width: 400px;
    margin-top: 1rem;
}

#tool-search {
    width: 100%;
    padding: 1rem 3rem 1rem 1.5rem;
    border-radius: 50px;
    border: 2px solid var(--border);
    background: var(--bg-card);
    font-size: 1rem;
    transition: all 0.3s;
    box-shadow: var(--shadow-sm);
    color: var(--text-main);
}

#tool-search:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

.search-btn {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    cursor: pointer;
    color: var(--text-muted);
}

.search-btn:hover {
    color: var(--primary);
}

/* Abstract Background Shapes */
.hero-bg-shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    z-index: 1;
    opacity: 0.5;
}

.shape-1 {
    width: 400px;
    height: 400px;
    background: var(--primary);
    top: -100px;
    left: -100px;
    opacity: 0.2;
}

.shape-2 {
    width: 300px;
    height: 300px;
    background: var(--secondary);
    bottom: 50px;
    right: -50px;
    opacity: 0.15;
}

/* Tools Section */
.tools-section {
    padding: 4rem 0 6rem;
    background: var(--bg-body);
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-header h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.section-header p {
    color: var(--text-muted);
    font-size: 1.125rem;
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
}

.tool-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2rem;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.tool-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
    border-color: transparent;
}

.tool-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.25rem;
    color: white;
}

.icon-blue {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    box-shadow: 0 4px 10px rgba(59, 130, 246, 0.4);
}

.icon-red {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.icon-teal {
    background: rgba(20, 184, 166, 0.1);
    color: #14b8a6;
}

.icon-purple {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
    box-shadow: 0 4px 10px rgba(139, 92, 246, 0.4);
}

.icon-green {
    background: linear-gradient(135deg, #10b981, #059669);
    box-shadow: 0 4px 10px rgba(16, 185, 129, 0.4);
}

.icon-orange {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    box-shadow: 0 4px 10px rgba(245, 158, 11, 0.4);
}

.icon-red {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    box-shadow: 0 4px 10px rgba(239, 68, 68, 0.4);
}

.icon-teal {
    background: linear-gradient(135deg, #14b8a6, #0d9488);
    box-shadow: 0 4px 10px rgba(20, 184, 166, 0.4);
}

.tool-title {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: var(--text-main);
}

.tool-desc {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.5;
}

/* Footer */
.footer {
    background: var(--bg-body);
    padding: 5rem 0 2rem;
    border-top: 1px solid var(--border);
}

.footer-container {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 4rem;
    margin-bottom: 4rem;
}

.footer-logo {
    display: inline-flex;
    margin-bottom: 1rem;
}

.footer-col p {
    color: var(--text-muted);
    font-size: 0.95rem;
    max-width: 250px;
}

.footer-col h4 {
    margin-bottom: 1.25rem;
    font-size: 1rem;
}

.footer-col ul li {
    margin-bottom: 0.75rem;
}

.footer-col ul li a {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.footer-col ul li a:hover {
    color: var(--primary);
}

.copyright {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
}

/* Responsive */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }

    .nav,
    .header-actions {
        display: none;
    }

    .mobile-menu-btn {
        display: flex;
        position: relative;
        z-index: 110;
    }

    .footer-container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .hero-bg-shape {
        filter: blur(60px);
        opacity: 0.3;
    }
}