:root {
    /* Design Tokens */
    --primary-color: #2563eb;
    --primary-hover: #1d4ed8;
    --bg-color: #f8fafc;
    --text-color: #1e293b;
    --nav-bg: #ffffff;
    --nav-border: #e2e8f0;
    --font-main: 'Inter', system-ui, -apple-system, sans-serif;
    --radius-md: 0.5rem;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1);
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-color);
    color: var(--text-color);
    margin: 0;
    padding-top: 80px;
    /* Space for fixed nav */
    line-height: 1.5;
}

/* Navigation Component Styles */
.nav-container {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: var(--nav-bg);
    border-bottom: 1px solid var(--nav-border);
    padding: 0 2rem;
    height: 64px;
    display: flex;
    align-items: center;
    box-shadow: var(--shadow-sm);
    z-index: 1000;
}

.nav-content {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand {
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--primary-color);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-menu {
    display: flex;
    gap: 1.5rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-item {
    position: relative;
}

.nav-link {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius-md);
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    white-space: nowrap;
}

.nav-link:hover,
.nav-link.active {
    background-color: #eff6ff;
    color: var(--primary-color);
}

/* Dropdown Styles */
.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--nav-bg);
    border: 1px solid var(--nav-border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    padding: 0.5rem;
    min-width: 200px;
    z-index: 1001;
    list-style: none;
    flex-direction: column;
    gap: 0.25rem;
}

.dropdown-arrow {
    font-size: 0.8em;
    transition: transform 0.2s;
}

/* Show dropdown on hover for desktop */
@media (min-width: 769px) {
    .nav-item:hover .dropdown-menu {
        display: flex;
        animation: fadeIn 0.1s ease-out;
    }

    .nav-item:hover .dropdown-arrow {
        transform: rotate(180deg);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Hamburger Button (Hidden by default) */
.hamburger-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.5rem;
    color: var(--text-color);
    padding: 0.5rem;
}

/* Mobile Responsive Styles */
@media (max-width: 768px) {
    .nav-container {
        padding: 0 1rem;
    }

    /* Show Hamburger */
    .hamburger-btn {
        display: block;
        z-index: 1002;
    }

    /* Hide Desktop Menu */
    .nav-menu {
        display: none;
        /* When active class added via JS, show it as mobile menu */
    }

    /* Mobile Menu Container */
    .nav-menu.mobile-active {
        display: flex;
        flex-direction: column;
        position: fixed;
        top: 64px;
        /* Below navbar */
        left: 0;
        right: 0;
        background: var(--nav-bg);
        border-bottom: 1px solid var(--nav-border);
        padding: 1rem;
        box-shadow: var(--shadow-sm);
        gap: 0.5rem;
        max-height: calc(100vh - 64px);
        overflow-y: auto;
    }

    .nav-item {
        width: 100%;
    }

    .nav-link {
        width: 100%;
        box-sizing: border-box;
        padding: 1rem;
        justify-content: space-between;
    }

    /* Mobile Dropdown */
    .dropdown-menu {
        position: static;
        /* Relative flow in mobile */
        box-shadow: none;
        border: none;
        padding-left: 1.5rem;
        /* Indent */
        background: #f8fafc;
        width: 100%;
        box-sizing: border-box;
        display: none;
        /* Controlled by JS class */
    }

    .dropdown-menu.open {
        display: flex;
    }

    .nav-item.open .dropdown-arrow {
        transform: rotate(180deg);
    }
}

/* Main Content Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

.tool-header {
    margin-bottom: 2rem;
    text-align: center;
}

.tool-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 0.5rem;
}