:root {
    --primary-color: #007bff;
    --secondary-color: #6c757d;
    --background-color: #f8f9fa;
    --text-color: #333;
    --card-bg: #fff;
    --shadow: 0 4px 6px rgba(0,0,0,0.1);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 14px;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    background-color: var(--background-color);
    color: var(--text-color);
}

h1, h2, h3, h4, h5, h6 {
    margin-top: 0;
    margin-bottom: 0.5rem;
    font-weight: 600;
    line-height: 1.2;
}

h1 { font-size: 1.8rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.1rem; }
h5 { font-size: 1rem; }
h6 { font-size: 0.875rem; }

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

header {
    background-color: #fff;
    border-bottom: 1px solid #eee;
    padding: 0;
    margin-bottom: 2rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.site-logo-icon {
    height: 36px;
    width: auto;
}

.site-title {
    font-size: 1.5rem;
    font-weight: bold;
    color: #333;
    margin: 0;
    line-height: 1;
}

/* Navigation Styles */
.main-nav {
    height: 100%;
}

.nav-list {
    display: flex;
    list-style: none;
    height: 100%;
    margin: 0;
    padding: 0;
    gap: 5px;
}

.nav-list > li {
    height: 100%;
    position: relative;
    display: flex;
    align-items: center;
}

.nav-list > li > a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    padding: 0 15px;
    height: 100%;
    display: flex;
    align-items: center;
    transition: color 0.2s;
}

.nav-list > li > a:hover {
    color: var(--primary-color);
    background-color: #f8f9fa;
}

/* Dropdown Menu */
.has-dropdown:hover .dropdown {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

.dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    min-width: 180px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    border-radius: 0 0 4px 4px;
    padding: 5px 0;
    list-style: none;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.2s;
    border-top: 2px solid var(--primary-color);
}

.dropdown li a {
    display: block;
    padding: 10px 20px;
    text-decoration: none;
    color: #333;
    transition: background 0.2s;
}

.dropdown li a:hover {
    background-color: #f8f9fa;
    color: var(--primary-color);
}

/* Mobile Menu Button */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 10px;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .mobile-menu-btn {
        display: block;
    }

    .main-nav {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: white;
        height: auto;
        box-shadow: 0 4px 6px rgba(0,0,0,0.1);
        display: none;
        border-top: 1px solid #eee;
    }

    .main-nav.active {
        display: block;
    }

    .nav-list {
        flex-direction: column;
        height: auto;
        gap: 0;
    }

    .nav-list > li {
        width: 100%;
        display: block;
        height: auto;
        border-bottom: 1px solid #f5f5f5;
    }

    .nav-list > li > a {
        padding: 15px 20px;
        height: auto;
        justify-content: space-between;
    }

    .dropdown {
        position: static;
        display: none; /* Hidden by default on mobile */
        box-shadow: none;
        border-top: none;
        background-color: #f9f9f9;
        padding-left: 20px;
        opacity: 1;
        transform: none;
    }
    
    /* Show dropdown on click/hover logic needs JS or simple CSS hover */
    .has-dropdown:hover .dropdown {
        display: block;
    }
    
    /* Mobile dropdown active state */
    .has-dropdown.active .dropdown {
        display: block;
    }
}

.tool-category {
    margin-bottom: 3rem;
}

.tool-category h2 {
    border-left: 5px solid var(--primary-color);
    padding-left: 15px;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}

.tool-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.tool-card {
    background: var(--card-bg);
    border-radius: 8px;
    padding: 20px;
    box-shadow: var(--shadow);
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.tool-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.15);
}

.tool-card.coming-soon {
    opacity: 0.7;
    cursor: default;
}

.tool-card.coming-soon:hover {
    transform: none;
}

.tool-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.tool-card h3 {
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

.tool-card p {
    font-size: 0.95rem;
    color: var(--secondary-color);
}

/* Global Button Styles */
.btn-primary {
    display: inline-block;
    padding: 12px 24px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.1s;
    text-decoration: none;
    text-align: center;
    line-height: 1.5;
}

.btn-primary:hover {
    background-color: #0056b3;
    transform: translateY(-1px);
}

.btn-primary:active {
    transform: translateY(0);
}

footer {
    text-align: center;
    padding: 2rem 0;
    margin-top: 3rem;
    background-color: #e9ecef;
    color: var(--secondary-color);
}

footer a:hover {
    text-decoration: underline !important;
    color: var(--primary-color) !important;
}

/* 404 Page Styles */
.error-page {
    text-align: center;
    padding: 4rem 0;
}

.error-icon {
    font-size: 5rem;
    margin-bottom: 1rem;
}

.error-page h1 {
    font-size: 4rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    line-height: 1;
}

.error-page h2 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: #333;
}

.error-page p {
    color: var(--secondary-color);
    margin-bottom: 2rem;
}

/* Mobile Responsiveness */
@media (max-width: 600px) {
    .container {
        padding: 0 15px;
    }

    header {
        padding: 1rem 0;
    }

    .site-title {
        font-size: 1.4rem;
    }
    
    .error-page h1 {
        font-size: 3rem;
    }
    
    .error-icon {
        font-size: 4rem;
    }

    .tool-grid {
        grid-template-columns: 1fr;
    }
}