:root {
    --primary: #ff85a2;
    /* Soft Pink */
    --primary-light: #ffb3c1;
    --secondary: #70d6ff;
    /* Soft Blue */
    --accent: #ffd166;
    /* Soft Yellow */
    --bg-color: #fff9fb;
    /* Creamy White */
    --card-bg: #ffffff;
    --text-main: #4a4a4a;
    --text-muted: #888888;
    --border-radius: 20px;
    --shadow: 0 10px 30px rgba(255, 133, 162, 0.1);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', 'Inter', sans-serif;
}

body {
    background-color: var(--bg-color);
    background-image:
        radial-gradient(circle at 20% 20%, rgba(255, 133, 162, 0.05) 0%, transparent 25%),
        radial-gradient(circle at 80% 80%, rgba(112, 214, 255, 0.05) 0%, transparent 25%);
    background-size: 100% 100%;
    background-attachment: fixed;
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-color);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-light);
    border-radius: 10px;
    border: 3px solid var(--bg-color);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}


a {
    text-decoration: none;
    color: inherit;
}

/* Master Layout Styling */
.navbar {
    padding: 1rem 2rem;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 2px solid var(--primary-light);
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: var(--primary);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    box-shadow: 0 4px 15px rgba(255, 133, 162, 0.3);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

/* Navigation & Dropdown */
.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0;
}

.dropdown-btn {
    background: none;
    border: none;
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-main);
    cursor: pointer;
    padding: 0.5rem 1rem;
    border-radius: 10px;
    transition: var(--transition);
}

.dropdown-btn:hover {
    background: var(--bg-color);
    color: var(--primary);
}

.tools-dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-content {
    display: none;
    position: absolute;
    right: 0;
    background: white;
    min-width: 1000px;
    max-width: 95vw;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.1);
    border-radius: 20px;
    padding: 2.5rem;
    grid-template-columns: repeat(6, 1fr);
    gap: 20px;
    z-index: 1001;
    border: 1px solid var(--primary-light);
}

@media (max-width: 1100px) {
    .dropdown-content {
        min-width: 700px;
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .nav-content {
        flex-wrap: wrap;
        gap: 10px;
        padding-bottom: 15px;
        justify-content: space-between;
    }

    .logo {
        order: 1;
    }

    .nav-right {
        order: 2;
    }

    .search-container {
        margin-right: 0;
        max-width: none;
        width: 100%;
        order: 3;
    }

    .dropdown-content {
        position: fixed;
        top: 115px;
        left: 0;
        right: 0;
        min-width: 100%;
        height: calc(100vh - 115px);
        overflow-y: auto;
        grid-template-columns: 1fr;
        border-radius: 0;
        padding: 1.5rem;
    }

    .nav-label {
        display: none;
    }

    .logo span {
        font-size: 1.1rem;
    }
}

/* Search Bar */
.search-container {
    position: relative;
    margin-right: 20px;
    flex-grow: 1;
    max-width: 400px;
}

.search-input {
    width: 100%;
    padding: 0.6rem 1rem 0.6rem 2.8rem;
    border-radius: 12px;
    border: 2px solid var(--primary-light);
    background: var(--bg-color);
    font-size: 0.95rem;
    transition: var(--transition);
    outline: none;
}

.search-input:focus {
    border-color: var(--primary);
    background: white;
    box-shadow: 0 4px 12px rgba(255, 133, 162, 0.15);
}

.search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--primary);
    pointer-events: none;
}

.search-results {
    position: absolute;
    top: 110%;
    left: 0;
    right: 0;
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    z-index: 1100;
    max-height: 400px;
    overflow-y: auto;
    display: none;
    border: 1px solid var(--primary-light);
}

.search-results.active {
    display: block;
}

.search-item {
    padding: 1rem;
    display: block;
    border-bottom: 1px solid #f0f0f0;
    transition: var(--transition);
}

.search-item:last-child {
    border-bottom: none;
}

.search-item:hover {
    background: #fff0f5;
}

.search-item h4 {
    color: var(--primary);
    font-size: 0.95rem;
    margin-bottom: 3px;
}

.search-item p {
    font-size: 0.8rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Breadcrumbs */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 2rem;
    font-size: 0.9rem;
    color: var(--text-muted);
    background: white;
    padding: 0.6rem 1.2rem;
    border-radius: 12px;
    width: fit-content;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.02);
    border: 1px solid rgba(255, 133, 162, 0.05);
}

.breadcrumb a {
    color: var(--text-muted);
    font-weight: 600;
    transition: var(--transition);
}

.breadcrumb a:hover {
    color: var(--primary);
}

.breadcrumb .sep {
    color: var(--primary-light);
    font-size: 0.8rem;
    font-weight: 900;
}

.breadcrumb .current {
    color: var(--text-main);
    font-weight: 700;
}

.tools-dropdown:hover .dropdown-content {
    display: grid;
}

.menu-category {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.cat-title {
    font-weight: 800;
    color: var(--primary);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 5px;
    padding-bottom: 5px;
    border-bottom: 1px solid var(--bg-color);
}

.cat-links {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.cat-links a {
    font-size: 0.9rem;
    color: var(--text-main);
    padding: 3px 0;
    transition: var(--transition);
}

.cat-links a:hover {
    color: var(--primary);
    padding-left: 5px;
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 4rem 1rem;
    background: linear-gradient(135deg, #fff9fb 0%, #fff0f5 100%);
}

.hero h1 {
    font-size: 3rem;
    color: var(--primary);
    margin-bottom: 1rem;
    font-weight: 900;
}

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

/* Tool Grid */
.category-header {
    margin: 4rem 0 2rem;
    display: flex;
    align-items: center;
    gap: 15px;
    color: var(--text-main);
}

.category-header h2 {
    font-size: 1.8rem;
    font-weight: 900;
}

.view-all {
    font-weight: 700;
    color: var(--primary);
    font-size: 0.9rem;
    background: white;
    padding: 0.5rem 1rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.view-all:hover {
    transform: translateX(5px);
    background: var(--primary);
    color: white;
}

.category-header .line {
    flex-grow: 1;
    height: 3px;
    background: var(--primary-light);
    border-radius: 10px;
    opacity: 0.3;
}

.tool-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

@media (max-width: 1024px) {
    .tool-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .tool-grid {
        grid-template-columns: 1fr;
    }
}

.tool-card {
    background: var(--card-bg);
    padding: 2.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    text-align: center;
    transition: var(--transition);
    border: 2px solid transparent;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.tool-card:hover {
    transform: translateY(-10px);
    border-color: var(--primary-light);
    box-shadow: 0 15px 40px rgba(255, 133, 162, 0.2);
}

.tool-card .icon-box {
    width: 80px;
    height: 80px;
    background: var(--bg-color);
    border-radius: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 2.5rem;
    transition: var(--transition);
}

.tool-card:hover .icon-box {
    background: var(--primary-light);
    color: white;
    transform: rotate(10deg);
}

.tool-card h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-main);
}

.tool-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* Calculator Specific Styling */
.calc-container {
    background: var(--card-bg);
    padding: 3rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    margin-top: 2rem;
}

.input-group {
    margin-bottom: 1.5rem;
}

.input-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-main);
}

.calc-container input,
.calc-container select {
    width: 100%;
    padding: 1rem 1.5rem;
    border-radius: 15px;
    border: 2px solid #f0f0f0;
    font-size: 1rem;
    transition: var(--transition);
    outline: none;
    background: white;
}

.calc-container input:focus,
.calc-container select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(255, 133, 162, 0.1);
}

.btn-calc {
    width: 100%;
    padding: 1.2rem;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 15px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
}

.btn-calc:hover {
    background: #ff5e82;
    transform: scale(1.02);
}

.result-box {
    margin-top: 2rem;
    padding: 2rem;
    background: #fdf2f5;
    border-radius: 15px;
    text-align: center;
    display: none;
}

.result-box.active {
    display: block;
    animation: fadeIn 0.5s ease;
}

.result-value {
    font-size: 2.5rem;
    font-weight: 900;
    color: var(--primary);
    display: block;
}

/* Button & Related Layouts */
.btn-row {
    display: flex;
    gap: 15px;
    margin-top: 1rem;
}

.btn-reset {
    flex: 1;
    padding: 1.2rem;
    background: #f8f8f8;
    color: var(--text-muted);
    border: 2px solid #eee;
    border-radius: 15px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
}

.btn-reset:hover {
    background: #f0f0f0;
    color: var(--primary);
    border-color: var(--primary-light);
}

.btn-calc {
    flex: 2;
    /* Calculate button gets more prominence */
}

.related-section {
    margin-top: 5rem;
    padding: 3rem;
    background: white;
    border-radius: 20px;
    box-shadow: var(--shadow);
    border: 1px solid rgba(255, 133, 162, 0.05);
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

@media (max-width: 900px) {
    .related-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .related-grid {
        grid-template-columns: 1fr;
    }

    .btn-row {
        flex-direction: column;
    }
}

.related-item {
    padding: 1.2rem;
    background: var(--bg-color);
    border-radius: 15px;
    display: flex;
    align-items: center;
    gap: 15px;
    transition: var(--transition);
    border: 1px solid transparent;
}

.related-item:hover {
    background: #fff0f5;
    transform: translateY(-3px);
    border-color: var(--primary-light);
}

.related-item .icon {
    font-size: 1.5rem;
}

.related-item h4 {
    font-size: 0.95rem;
    color: var(--text-main);
    font-weight: 700;
}

/* Footer Styling */
.footer {
    background: white;
    padding: 4rem 1rem 2rem;
    margin-top: 5rem;
    border-top: 2px solid var(--bg-color);
    text-align: center;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.footer-links a {
    font-weight: 700;
    color: var(--text-main);
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--primary);
}

.footer-secondary {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 2rem;
    opacity: 0.6;
    font-size: 0.85rem;
}

.copyright {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .dropdown-content {
        position: fixed;
        top: 60px;
        left: 10px;
        right: 10px;
        min-width: unset;
        grid-template-columns: 1fr;
        max-height: 80vh;
        overflow-y: auto;
    }

    .hero h1 {
        font-size: 2.2rem;
    }

    .container {
        padding: 1rem;
    }
}