/* =========================================
   Global Variables & Reset
========================================= */
:root {
    --primary-color: #4361EE; /* Vibrant Blue */
    --secondary-color: #F72585; /* Bright Pink */
    --bg-color: #F4F7FE; /* Soft light blue/gray background */
    --card-bg: #FFFFFF;
    --text-main: #2B2D42;
    --text-muted: #8D99AE;
    --border-radius: 20px; /* Chunky rounded corners */
    --box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    --hover-shadow: 0 15px 35px rgba(67, 97, 238, 0.15);
}

/* Dark Mode Variables */
body.dark-mode {
    --bg-color: #0F172A; /* Modern Dark Navy Blue */
    --card-bg: #1E293B; /* Slightly lighter dark for cards */
    --text-main: #F8FAFC; /* White text */
    --text-muted: #94A3B8; /* Ash color text */
    --box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4); /* Dark shadow */
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.6;
    transition: background-color 0.3s ease, color 0.3s ease;
}

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

/* =========================================
   Navbar (Header)
========================================= */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 5%;
    background: var(--card-bg);
    box-shadow: var(--box-shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: background-color 0.3s ease;
}

.logo {
    font-size: 24px;
    font-weight: 800;
    color: var(--text-main);
}

.logo-icon {
    font-size: 28px;
    vertical-align: middle;
}

.highlight {
    color: var(--primary-color);
}

.nav-links {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 25px;
}

.nav-links li a {
    font-weight: 600;
    color: var(--text-muted);
    transition: color 0.3s;
}

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

/* Theme Toggle Button */
.theme-btn {
    background: transparent;
    border: none;
    font-size: 1.4rem;
    cursor: pointer;
    transition: transform 0.3s ease;
    padding: 0 5px;
}

.theme-btn:hover {
    transform: scale(1.2) rotate(15deg);
}

/* =========================================
   Hero Section
========================================= */
.hero {
    text-align: center;
    padding: 80px 5% 60px;
    position: relative;
    overflow: hidden;
}

.hero-content h1 {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 20px;
}

.highlight-text {
    color: var(--secondary-color);
}

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

/* Search Bar (Chunky Style) */
.search-container {
    display: flex;
    justify-content: center;
    gap: 10px;
    max-width: 600px;
    margin: 0 auto;
}

#tool-search {
    flex: 1;
    padding: 15px 25px;
    font-size: 1rem;
    background-color: var(--card-bg);
    color: var(--text-main);
    border: 2px solid transparent;
    border-radius: 30px;
    box-shadow: var(--box-shadow);
    outline: none;
    transition: 0.3s;
}

#tool-search:focus {
    border-color: var(--primary-color);
}

.search-btn {
    padding: 15px 30px;
    font-size: 1rem;
    font-weight: 800;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 30px;
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(67, 97, 238, 0.3);
    transition: transform 0.2s, background 0.3s;
}

.search-btn:hover {
    background-color: #324edb;
    transform: translateY(-2px);
}

/* 3D Floating Props Animation */
.hero-illustration {
    position: absolute;
    top: 50%;
    width: 100%;
    z-index: -1;
    pointer-events: none;
}

.floating-prop {
    font-size: 40px;
    position: absolute;
    animation: float 4s ease-in-out infinite;
    opacity: 0.2;
}

.prop-1 { left: 15%; top: -50px; animation-delay: 0s; }
.prop-2 { right: 15%; top: -80px; animation-delay: 1s; font-size: 50px; }
.prop-3 { right: 30%; top: 60px; animation-delay: 2s; }

@keyframes float {
    0% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(10deg); }
    100% { transform: translateY(0px) rotate(0deg); }
}

/* =========================================
   Tools Grid Section
========================================= */
.tools-section {
    padding: 60px 5%;
}

.section-title {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 40px;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

.category-card {
    background: var(--card-bg);
    padding: 30px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    transition: transform 0.3s, box-shadow 0.3s, background-color 0.3s;
}

.category-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--hover-shadow);
}

.card-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.cat-icon {
    font-size: 32px;
    background: var(--bg-color);
    padding: 10px;
    border-radius: 15px;
    transition: background-color 0.3s;
}

.tool-list {
    list-style: none;
}

.tool-list li {
    margin-bottom: 12px;
}

/* Live Tool Button Styling */
.live-tool {
    display: block;
    padding: 10px 15px;
    background: var(--bg-color);
    border-radius: 10px;
    font-weight: 600;
    color: var(--text-main);
    transition: 0.3s;
    border-left: 4px solid var(--primary-color);
}

.live-tool:hover {
    background: var(--primary-color);
    color: white;
    padding-left: 20px;
}

/* Dark Mode fixes for Icons & Buttons */
body.dark-mode .cat-icon {
    background: #0F172A;
}
body.dark-mode .live-tool {
    background: #0F172A;
}
body.dark-mode .live-tool:hover {
    background: var(--primary-color);
}

/* =========================================
   SEO & FAQ Sections (For AdSense)
========================================= */
.seo-content, .faq-section {
    max-width: 800px;
    margin: 0 auto 60px;
    padding: 0 5%;
}

.seo-content .text-box, .faq-item {
    background: var(--card-bg);
    padding: 30px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    margin-bottom: 20px;
    transition: background-color 0.3s;
}

.seo-content h2, .faq-section h2 {
    text-align: center;
    margin-bottom: 30px;
}

.faq-item h4 {
    color: var(--primary-color);
    margin-bottom: 10px;
}

/* =========================================
   Footer
========================================= */
footer {
    background: #1A1A2E;
    color: white;
    text-align: center;
    padding: 40px 5%;
    margin-top: 50px;
}

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

.footer-links a {
    color: #8D99AE;
    transition: color 0.3s;
}

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

/* =========================================
   Mobile Responsiveness
========================================= */
@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
        gap: 15px;
    }
    
    .nav-links {
        flex-wrap: wrap;
        justify-content: center;
    }

    .hero-content h1 {
        font-size: 2.2rem;
    }
    
    .search-container {
        flex-direction: column;
    }
    
    .search-btn {
        width: 100%;
    }
}