* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --secondary-gradient: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --tertiary-gradient: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    --success-gradient: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
    --warning-gradient: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
}

html,
body {
    overflow-x: hidden;
    max-width: 100vw;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

/* Animated background circles */
.bg-shapes {
    position: fixed;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 0;
    pointer-events: none;
}

.shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(40px);
    /* Reduced from 60px */
    opacity: 0.15;
    /* Reduced opacity */
    will-change: transform;
}

.shape1 {
    width: 400px;
    height: 400px;
    background: #667eea;
    top: -100px;
    left: -100px;
}

.shape2 {
    width: 300px;
    height: 300px;
    background: #f5576c;
    top: 50%;
    right: -100px;
}

.shape3 {
    width: 350px;
    height: 350px;
    background: #43e97b;
    bottom: -100px;
    left: 30%;
}

@keyframes float {

    0%,
    100% {
        transform: translate(0, 0) rotate(0deg);
    }

    25% {
        transform: translate(50px, 50px) rotate(90deg);
    }

    50% {
        transform: translate(0, 100px) rotate(180deg);
    }

    75% {
        transform: translate(-50px, 50px) rotate(270deg);
    }
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    z-index: 1;
}

/* Sticky Navbar */
.navbar {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: all 0.3s ease;
}

.navbar.scrolled {
    background: rgba(30, 60, 114, 0.95);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.4rem;
    font-weight: 700;
    color: white;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 5px;
    list-style: none;
}

.nav-item {
    position: relative;
}

.nav-link {
    color: white;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.15);
}

.nav-link.active {
    background: rgba(255, 255, 255, 0.2);
}

/* Dropdown Menu */
.dropdown {
    position: relative;
}

.dropdown-toggle::after {
    content: '▼';
    font-size: 0.7rem;
    margin-left: 5px;
    transition: transform 0.3s;
}

.dropdown.active .dropdown-toggle::after {
    transform: rotate(180deg);
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    min-width: 280px;
    max-width: 320px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1001;
    max-height: 400px;
    overflow-y: auto;
}

.dropdown.active .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-header {
    padding: 15px 20px;
    border-bottom: 1px solid #e0e0e0;
    font-weight: 700;
    color: #1e3c72;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.dropdown-item {
    padding: 12px 20px;
    color: #333;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.2s;
    border-left: 3px solid transparent;
}

.dropdown-item:hover {
    background: #f5f5f5;
    border-left-color: #667eea;
    padding-left: 25px;
}

.dropdown-item-icon {
    font-size: 1.2rem;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f0f0f0;
    border-radius: 8px;
}

.dropdown-item-content h4 {
    font-size: 0.9rem;
    font-weight: 600;
    color: #1e3c72;
    margin-bottom: 2px;
}

.dropdown-item-content p {
    font-size: 0.75rem;
    color: #666;
}

.dropdown-divider {
    height: 1px;
    background: #e0e0e0;
    margin: 8px 0;
}

.mega-dropdown {
    min-width: 300px;
    max-width: 500px;
}

.mega-dropdown-content {
    /*display: grid;*/
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    padding: 20px;
}

.mega-category {
    padding: 15px;
    background: #f9f9f9;
    border-radius: 8px;
}

.mega-category h3 {
    font-size: 0.95rem;
    color: #1e3c72;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.mega-category-list {
    list-style: none;
}

.mega-category-list li {
    margin-bottom: 8px;
}

.mega-category-list a {
    color: #666;
    text-decoration: none;
    font-size: 0.85rem;
    display: block;
    padding: 5px 10px;
    border-radius: 6px;
    transition: all 0.2s;
}

.mega-category-list a:hover {
    background: white;
    color: #667eea;
    padding-left: 15px;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    background: rgba(255, 255, 255, 0.15);
    border: none;
    color: white;
    font-size: 1.5rem;
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
}

/* Compact Header */
.header-hero {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    padding: 40px;
    margin: 20px 0;
    text-align: center;
}

.hero-content h1 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 15px;
    line-height: 1.2;
    color: white;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.gradient-text {
    background: linear-gradient(135deg, #f5576c, #f093fb, #4facfe);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-content p {
    font-size: 1.1rem;
    opacity: 0.9;
    margin-bottom: 25px;
    color: white;
}

/* Search bar */
.search-container {
    max-width: 600px;
    margin: 0 auto;
    position: relative;
}

.search-input {
    width: 100%;
    padding: 16px 50px 16px 20px;
    background: rgba(255, 255, 255, 0.95);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 14px;
    font-size: 1rem;
    outline: none;
    transition: all 0.3s;
}

.search-input:focus {
    background: rgba(255, 255, 255, 1);
    border-color: #667eea;
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.3);
}

.search-icon {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.2rem;
    color: #667eea;
}

/* Search Results Message */
.search-results-info {
    text-align: center;
    padding: 20px;
    color: white;
    font-size: 1.1rem;
    display: none;
}

.search-results-info.active {
    display: block;
}

.clear-search {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 8px 20px;
    border-radius: 8px;
    margin-left: 10px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s;
}

.clear-search:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Quick stats */
.quick-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 15px;
    margin: 30px 0;
}

.stat-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 14px;
    padding: 20px;
    text-align: center;
    color: white;
    transition: all 0.3s;
}

.stat-card:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.15);
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    display: block;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 0.85rem;
    opacity: 0.9;
}

/* Category Pills */
.category-filter {
    display: flex;
    gap: 10px;
    margin: 30px 0 25px;
    overflow-x: auto;
    padding-bottom: 10px;
}

.category-filter::-webkit-scrollbar {
    height: 4px;
}

.category-filter::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
}

.category-pill {
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    color: white;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.3s;
    font-weight: 500;
    font-size: 0.9rem;
}

.category-pill:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.category-pill.active {
    background: white;
    color: #1e3c72;
}

/* Tools Grid */
.tools-section {
    margin: 40px 0;
}

.section-title {
    color: white;
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 25px;
    text-align: center;
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 50px;
}

.tool-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 18px;
    padding: 25px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.tool-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--primary-gradient);
    transform: scaleX(0);
    transition: transform 0.3s;
}

.tool-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
}

.tool-card:hover::before {
    transform: scaleX(1);
}

.tool-card[data-gradient="primary"]::before {
    background: var(--primary-gradient);
}

.tool-card[data-gradient="secondary"]::before {
    background: var(--secondary-gradient);
}

.tool-card[data-gradient="tertiary"]::before {
    background: var(--tertiary-gradient);
}

.tool-card[data-gradient="success"]::before {
    background: var(--success-gradient);
}

.tool-card[data-gradient="warning"]::before {
    background: var(--warning-gradient);
}

.tool-icon-box {
    width: 55px;
    height: 55px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    margin-bottom: 18px;
    background: white;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.tool-card[data-gradient="primary"] .tool-icon-box {
    background: var(--primary-gradient);
}

.tool-card[data-gradient="secondary"] .tool-icon-box {
    background: var(--secondary-gradient);
}

.tool-card[data-gradient="tertiary"] .tool-icon-box {
    background: var(--tertiary-gradient);
}

.tool-card[data-gradient="success"] .tool-icon-box {
    background: var(--success-gradient);
}

.tool-card[data-gradient="warning"] .tool-icon-box {
    background: var(--warning-gradient);
}

.tool-card h3 {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: #1e3c72;
}

.tool-card p {
    font-size: 0.9rem;
    color: #666;
    line-height: 1.5;
}

.tool-meta {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    flex-wrap: wrap;
}

.tool-tag {
    padding: 4px 10px;
    background: #f0f0f0;
    border-radius: 6px;
    font-size: 0.7rem;
    color: #666;
    font-weight: 500;
}

/* No results message */
.no-results {
    text-align: center;
    padding: 60px 20px;
    color: white;
    display: none;
}

.no-results.active {
    display: block;
}

.no-results h3 {
    font-size: 2rem;
    margin-bottom: 15px;
}

.no-results p {
    font-size: 1.1rem;
    opacity: 0.8;
}

/* Floating action button */
.fab {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 55px;
    height: 55px;
    background: var(--primary-gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    color: white;
    cursor: pointer;
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
    transition: all 0.3s;
    z-index: 100;
    opacity: 0;
    pointer-events: none;
}

.fab.visible {
    opacity: 1;
    pointer-events: all;
}

.fab:hover {
    transform: scale(1.1) rotate(-90deg);
    box-shadow: 0 8px 30px rgba(102, 126, 234, 0.6);
}

/* Footer */
footer {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    padding: 40px;
    margin: 60px 0 30px;
    color: white;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 30px;
    margin-bottom: 25px;
}

.footer-section h3 {
    font-size: 1.1rem;
    margin-bottom: 15px;
    font-weight: 700;
}

.footer-section p {
    opacity: 0.8;
    line-height: 1.7;
    font-size: 0.9rem;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: white;
    text-decoration: none;
    opacity: 0.8;
    transition: opacity 0.3s;
    font-size: 0.9rem;
}

.footer-links a:hover {
    opacity: 1;
}

.footer-bottom {
    text-align: center;
    padding-top: 25px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    opacity: 0.8;
    font-size: 0.9rem;
}

/* Tablet Responsive */
@media (max-width: 1024px) {
    .mega-dropdown {
        min-width: 300px;
    }

    .mega-dropdown-content {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }

    .tools-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: block;
    }

    .nav-menu {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        background: rgba(30, 60, 114, 0.98);
        backdrop-filter: blur(10px);
        flex-direction: column;
        align-items: flex-start;
        padding: 20px;
        gap: 0;
        transition: left 0.3s ease;
        box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-item {
        width: 100%;
    }

    .nav-link {
        width: 100%;
        padding: 12px 15px;
        border-radius: 8px;
    }

    .dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        background: rgba(255, 255, 255, 0.1);
        margin-top: 10px;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
    }

    .dropdown.active .dropdown-menu {
        max-height: 500px;
    }

    .dropdown-item {
        color: white;
    }

    .dropdown-item-content h4 {
        color: white;
    }

    .dropdown-item-content p {
        color: rgba(255, 255, 255, 0.7);
    }

    .dropdown-header {
        color: white;
        border-bottom-color: rgba(255, 255, 255, 0.2);
    }

    .mega-dropdown {
        min-width: 100%;
    }

    .mega-category {
        background: rgba(255, 255, 255, 0.05);
    }

    .mega-category h3 {
        color: white;
    }

    .mega-category-list a {
        color: rgba(255, 255, 255, 0.8);
    }

    .mega-category-list a:hover {
        background: rgba(255, 255, 255, 0.1);
        color: white;
    }

    .hero-content h1 {
        font-size: 2rem;
    }

    .hero-content p {
        font-size: 1rem;
    }

    .header-hero {
        padding: 30px 20px;
    }

    .tools-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .footer-grid {
        grid-template-columns: 1fr;
    }

    .quick-stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .category-filter {
        gap: 8px;
    }

    .category-pill {
        padding: 8px 16px;
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .hero-content h1 {
        font-size: 1.6rem;
    }

    .stat-number {
        font-size: 1.6rem;
    }

    .quick-stats {
        grid-template-columns: 1fr;
    }

    .fab {
        width: 50px;
        height: 50px;
        bottom: 20px;
        right: 20px;
    }
}