/* Google Font */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

/* Reset */
*{
    margin:0;
    padding:0;
    box-sizing:border-box;
}

body{
    font-family:'Poppins',sans-serif;
    background:#f8fafc;
}

/* Navbar */
nav{
    display:flex;
    justify-content:space-between;
    align-items:center;
    padding:18px 8%;
    background:#ffffff;
    box-shadow:0 2px 20px rgba(0,0,0,.08);

    position:sticky;
    top:0;
    z-index:1000;
}


.logo h1{
    color:#2563eb;
    font-size:30px;
    font-weight:700;
}
nav ul{
    display: flex;
    list-style: none;
    align-items: center;
    gap: 30px;
}


nav ul li a{
    text-decoration:none;
    color:#333;
    font-weight:500;
    transition:.3s;
    padding:8px 15px;
    border-radius:8px;
}

nav ul li a:hover{
    background:#2563eb;
    color:#fff;
}
/* Hero Section */

.hero{
    text-align:center;
    padding:90px 10%;
}

.hero h1{
    font-size:48px;
    color:#1e293b;
    margin-bottom:20px;
}

.hero p{
    font-size:18px;
    color:#64748b;
    max-width:700px;
    margin:0 auto 35px;
    line-height:1.8;
}

.search-box{
    display:flex;
    justify-content:center;
    gap:10px;
}

.search-box input{
    width:420px;
    padding:15px;
    border:1px solid #d1d5db;
    border-radius:10px;
    font-size:16px;
}

.search-box button{
    padding:15px 28px;
    border:none;
    border-radius:10px;
    background:#2563eb;
    color:#fff;
    font-size:16px;
    cursor:pointer;
}/* Popular Tools */

.popular-tools{
    padding:80px 8%;
    text-align:center;
}

.popular-tools h2{
    font-size:36px;
    color:#1e293b;
}

.popular-tools p{
    color:#64748b;
    margin:15px 0 50px;
}

.tools-grid{
    display:grid;
    grid-template-columns:repeat(3,1fr);
    gap:25px;
}

.tool-card{
    background:#fff;
    padding:35px 25px;
    border-radius:15px;
    box-shadow:0 5px 20px rgba(0,0,0,.08);
    transition:.3s;
    cursor:pointer;
}

.tool-card:hover{
    transform:translateY(-8px);
}

.icon{
    font-size:45px;
    margin-bottom:20px;
}

.tool-card h3{
    color:#1e293b;
    margin-bottom:10px;
}

.tool-card p{
    margin:0;
    color:#64748b;
    line-height:1.6;
}/* Categories */

.categories{
    padding:80px 8%;
    text-align:center;
}

.categories h2{
    font-size:36px;
    color:#1e293b;
    margin-bottom:10px;
}

.categories p{
    color:#64748b;
    margin-bottom:40px;
}

.category-grid{
    display:grid;
    grid-template-columns:repeat(3,1fr);
    gap:20px;
}

.category-card{
    background:#ffffff;
    padding:30px;
    border-radius:15px;
    box-shadow:0 5px 20px rgba(0,0,0,.08);
    transition:.3s;
    cursor:pointer;
}

.category-card:hover{
    background:#2563eb;
    color:#ffffff;
    transform:translateY(-6px);
}

.category-card h3{
    font-size:22px;
}/* Footer */

footer{
    background:#1e293b;
    color:#ffffff;
    text-align:center;
    padding:50px 20px;
    margin-top:80px;
}

.footer-content h2{
    font-size:32px;
    margin-bottom:15px;
}

.footer-content p{
    color:#cbd5e1;
    margin:10px 0;
}/* Image Compressor */

.tool-page{
    padding:80px 8%;
}

.compressor{
    max-width:700px;
    margin:auto;
    text-align:center;
}

.compressor h1{
    font-size:42px;
    color:#1e293b;
    margin-bottom:15px;
}

.compressor p{
    color:#64748b;
    margin-bottom:35px;
}

.upload-box{
    background:#ffffff;
    padding:40px;
    border-radius:15px;
    box-shadow:0 5px 20px rgba(0,0,0,.08);
}

.upload-box input{
    display:block;
    margin:20px auto;
}

.upload-box button{
    background:#2563eb;
    color:#fff;
    border:none;
    padding:14px 30px;
    border-radius:10px;
    cursor:pointer;
    font-size:16px;
}

.upload-box button:hover{
    background:#1d4ed8;
}

#result{
    margin-top:30px;
}/* Age Calculator */

.calculator-box{
    max-width:500px;
    margin:80px auto;
    background:#ffffff;
    padding:40px;
    border-radius:15px;
    text-align:center;
    box-shadow:0 5px 20px rgba(0,0,0,.08);
}

.calculator-box h1{
    color:#1e293b;
    margin-bottom:15px;
}

.calculator-box p{
    color:#64748b;
    margin-bottom:20px;
}

.calculator-box input{
    width:100%;
    padding:12px;
    font-size:16px;
    border:1px solid #ccc;
    border-radius:8px;
}

.calculator-box button{
    background:#2563eb;
    color:#fff;
    border:none;
    padding:12px 25px;
    border-radius:8px;
    cursor:pointer;
    font-size:16px;
}

.calculator-box button:hover{
    background:#1d4ed8;
}

#result{
    margin-top:25px;
    color:#1e293b;
}

.logo{
    display:flex;
    align-items:center;
}

.logo img{
    height:50px;
    width:auto;
    max-width:220px;
    object-fit:contain;
}
.trust-badges{
    display:flex;
    justify-content:center;
    gap:20px;
    flex-wrap:wrap;
    margin-top:30px;
}

.trust-badges span{
    background:#ffffff;
    padding:10px 18px;
    border-radius:30px;
    font-size:15px;
    font-weight:500;
    color:#334155;
    box-shadow:0 4px 15px rgba(0,0,0,0.08);
    transition:0.3s;
}

.trust-badges span:hover{
    transform:translateY(-4px);
}.search-suggestions{
    width:420px;
    margin:10px auto 0;
    background:#fff;
    border-radius:10px;
    box-shadow:0 5px 20px rgba(0,0,0,.08);
    display:none;
    overflow:hidden;
}

.search-item{
    padding:14px 18px;
    cursor:pointer;
    transition:.3s;
    border-bottom:1px solid #eee;
}

.search-item:last-child{
    border-bottom:none;
}

.search-item:hover{
    background:#2563eb;
    color:#fff;
}/* Featured Categories */

.featured-tools{
    padding:80px 8%;
    text-align:center;
}

.featured-tools h2{
    font-size:38px;
    color:#1e293b;
    margin-bottom:10px;
}

.featured-tools p{
    color:#64748b;
    margin-bottom:45px;
}

.featured-grid{
    display:grid;
    grid-template-columns:repeat(4,1fr);
    gap:25px;
}

.featured-card{
    background:#fff;
    padding:35px 25px;
    border-radius:18px;
    box-shadow:0 8px 25px rgba(0,0,0,.08);
    transition:.3s;
    cursor:pointer;
}

.featured-card:hover{
    transform:translateY(-8px);
    box-shadow:0 15px 35px rgba(37,99,235,.18);
}

.featured-icon{
    font-size:48px;
    margin-bottom:20px;
}

.featured-card h3{
    color:#1e293b;
    margin-bottom:12px;
}

.featured-card p{
    margin:0;
    line-height:1.7;
}/* Mobile Menu */

.menu-toggle{
    display:none;
    font-size:30px;
    cursor:pointer;
    color:#2563eb;
}

/* Responsive */

@media (max-width:768px){

    nav{
        padding:15px 20px;
        position:relative;
    }

    .menu-toggle{
        display:block;
    }

    #navMenu{
        display:none;
        flex-direction:column;
        position:absolute;
        top:80px;
        left:0;
        width:100%;
        background:#fff;
        box-shadow:0 8px 20px rgba(0,0,0,.1);
        padding:20px 0;
        gap:15px;
        text-align:center;
    }

    #navMenu.active{
        display:flex;
    }

    .tools-grid,
    .category-grid,
    .featured-grid{
        grid-template-columns:1fr;
    }

    .hero h1{
        font-size:34px;
    }

    .search-box{
        flex-direction:column;
        align-items:center;
    }

    .search-box input{
        width:100%;
        max-width:350px;
    }

    .search-box button{
        width:100%;
        max-width:350px;
    }

    .search-suggestions{
        width:100%;
        max-width:350px;
    }
}/* ===== Dark Mode Toggle ===== */

.theme-toggle{
    background:#2563eb;
    color:#fff;
    border:none;
    width:45px;
    height:45px;
    border-radius:50%;
    cursor:pointer;
    font-size:20px;
    margin-left:15px;
    transition:.3s;
}

.theme-toggle:hover{
    background:#1d4ed8;
    transform:rotate(20deg);
}

/* ===== Dark Theme ===== */

body.dark-mode{
    background:#0f172a;
    color:#ffffff;
}

body.dark-mode nav{
    background:#1e293b;
}

body.dark-mode .tool-card,
body.dark-mode .featured-card,
body.dark-mode .category-card,
body.dark-mode .calculator-box,
body.dark-mode .upload-box,
body.dark-mode .trust-badges span{
    background:#1e293b;
    color:#ffffff;
}

body.dark-mode h1,
body.dark-mode h2,
body.dark-mode h3{
    color:#ffffff;
}

body.dark-mode p{
    color:#cbd5e1;
}

body.dark-mode nav ul li a{
    color:#ffffff;
}

body.dark-mode .search-box input{
    background:#1e293b;
    color:#ffffff;
    border:1px solid #334155;
}

body.dark-mode footer{
    background:#020617;
    body.dark-mode #navMenu{
    background:#1e293b !important;
    z-index:9999;
}

body.dark-mode #navMenu li a{
    color:#ffffff !important;
}

body.dark-mode #navMenu li a:hover{
    color:#60a5fa !important;
}

body.dark-mode .menu-toggle{
    color:#ffffff !important;
}
}/* ===== About Page ===== */

.about-page{
    padding:70px 8%;
}

.about-hero{
    text-align:center;
    max-width:850px;
    margin:0 auto 60px;
}

.about-hero h1{
    font-size:48px;
    color:#1e293b;
    margin-bottom:20px;
}

.about-hero p{
    font-size:18px;
    color:#64748b;
    line-height:1.8;
}

.about-content{
    display:grid;
    grid-template-columns:repeat(3,1fr);
    gap:30px;
}

.about-card{
    background:#fff;
    padding:35px;
    border-radius:18px;
    box-shadow:0 8px 25px rgba(0,0,0,.08);
    transition:.3s;
}

.about-card:hover{
    transform:translateY(-8px);
}

.about-card h2{
    margin-bottom:18px;
    color:#2563eb;
}

.about-card p,
.about-card li{
    color:#64748b;
    line-height:1.8;
}

.about-card ul{
    padding-left:20px;
}

@media(max-width:768px){

    .about-content{
        grid-template-columns:1fr;
    }

    .about-hero h1{
        font-size:36px;
    }

}/* ===== Contact Page ===== */

.contact-page{
    max-width:700px;
    margin:80px auto;
    background:#fff;
    padding:40px;
    border-radius:18px;
    box-shadow:0 8px 25px rgba(0,0,0,.08);
    text-align:center;
}

.contact-page h1{
    font-size:42px;
    color:#1e293b;
    margin-bottom:15px;
}

.contact-page p{
    color:#64748b;
    margin-bottom:35px;
}

.contact-form{
    display:flex;
    flex-direction:column;
    gap:20px;
}

.contact-form input,
.contact-form textarea{
    width:100%;
    padding:15px;
    border:1px solid #d1d5db;
    border-radius:10px;
    font-size:16px;
    font-family:inherit;
}

.contact-form textarea{
    resize:vertical;
}

.contact-form button{
    background:#2563eb;
    color:#fff;
    border:none;
    padding:15px;
    border-radius:10px;
    font-size:17px;
    cursor:pointer;
    transition:.3s;
}

.contact-form button:hover{
    background:#1d4ed8;
}/* Privacy Policy */

.policy-page{

max-width:1000px;
margin:70px auto;
padding:0 20px;

}

.policy-page h1{

text-align:center;
font-size:46px;
color:#1e293b;
margin-bottom:15px;

}

.policy-page>p{

text-align:center;
color:#64748b;
margin-bottom:45px;

}

.policy-card{

background:#fff;
padding:30px;
border-radius:18px;
margin-bottom:25px;
box-shadow:0 8px 25px rgba(0,0,0,.08);

}

.policy-card h2{

color:#2563eb;
margin-bottom:15px;

}

.policy-card p{

line-height:1.8;
color:#64748b;

}

body.dark-mode .policy-card{

background:#1e293b;

}

body.dark-mode .policy-page h1{

color:#fff;

}

body.dark-mode .policy-card p{

color:#cbd5e1;

}/* Footer Links */

.footer-links{
    margin:20px 0;
}

.footer-links a{
    color:#cbd5e1;
    text-decoration:none;
    margin:0 12px;
    transition:.3s;
}

.footer-links a:hover{
    color:#ffffff;
}/* ===== 404 Page ===== */

.error-page{
    min-height:100vh;
    display:flex;
    flex-direction:column;
    justify-content:center;
    align-items:center;
    text-align:center;
    padding:20px;
}

.error-logo{
    width:120px;
    margin-bottom:20px;
}

.error-page h1{
    font-size:120px;
    color:#2563eb;
    margin-bottom:10px;
}

.error-page h2{
    font-size:38px;
    margin-bottom:15px;
    color:#1e293b;
}

.error-page p{
    color:#64748b;
    margin-bottom:30px;
    max-width:500px;
}

.home-btn{
    display:inline-block;
    padding:15px 30px;
    background:#2563eb;
    color:#fff;
    text-decoration:none;
    border-radius:10px;
    transition:.3s;
}

.home-btn:hover{
    background:#1d4ed8;
}

body.dark-mode .error-page h2{
    color:#ffffff;
}

body.dark-mode .error-page p{
    color:#cbd5e1;
}/* ===== Color Picker ===== */

#colorPicker{
    width:120px;
    height:60px;
    border:none;
    cursor:pointer;
    background:none;
}

#colorPreview{
    width:140px;
    height:140px;
    margin:20px auto;
    border-radius:15px;
    border:3px solid #ddd;
    background:#2563eb;
}

#hexValue,
#rgbValue{
    width:100%;
    padding:12px;
    border:1px solid #ccc;
    border-radius:8px;
    text-align:center;
    font-size:16px;
    margin-bottom:10px;
}

#copyHex,
#copyRgb{
    padding:12px 20px;
    margin:5px;
    border:none;
    border-radius:8px;
    background:#2563eb;
    color:#fff;
    cursor:pointer;
}

#copyHex:hover,
#copyRgb:hover{
    background:#1d4ed8;
}.tool-description{
    max-width:900px;
    margin:60px auto;
    padding:35px;
    background:#fff;
    border-radius:18px;
    box-shadow:0 8px 25px rgba(0,0,0,.08);
}

.tool-description h2{
    color:#2563eb;
    margin-bottom:20px;
}

.tool-description h3{
    margin-top:25px;
    margin-bottom:12px;
}

.tool-description p,
.tool-description li{
    line-height:1.8;
    color:#64748b;
}

.tool-description ul{
    padding-left:20px;
}

body.dark-mode .tool-description{
    background:#1e293b;
}

body.dark-mode .tool-description p,
body.dark-mode .tool-description li{
    color:#cbd5e1;
}

body.dark-mode .tool-description h2,
body.dark-mode .tool-description h3{
    color:#ffffff;
}.related-tools{
    max-width:900px;
    margin:40px auto 70px;
}

.related-tools h2{
    text-align:center;
    margin-bottom:25px;
}

.related-grid{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(220px,1fr));
    gap:20px;
}

.related-card{
    background:#fff;
    padding:20px;
    text-align:center;
    border-radius:12px;
    text-decoration:none;
    color:#1e293b;
    font-weight:600;
    box-shadow:0 5px 15px rgba(0,0,0,.08);
    transition:.3s;
}

.related-card:hover{
    transform:translateY(-5px);
    background:#2563eb;
    color:#fff;
}

body.dark-mode .related-card{
    background:#1e293b;
    color:#fff;
}.breadcrumb{
    max-width:900px;
    margin:20px auto;
    padding:0 20px;
    font-size:15px;
}

.breadcrumb a{
    color:#2563eb;
    text-decoration:none;
    font-weight:600;
}

.breadcrumb a:hover{
    text-decoration:underline;
}

.breadcrumb span{
    color:#666;
}