:root {
    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --radius: 0.5rem;
    --transition: all 0.2s ease-in-out;
    overflow-x: hidden;

}

[data-theme='dark'] {
    --background: #111827;
    --surface: #1f2937;
    --text: #f9fafb;
    --text-light: #9ca3af;
    --border: #374151;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.4), 0 2px 4px -1px rgba(0, 0, 0, 0.3);
}

[data-theme='light'] {
    --background: #f9fafb;
    --surface: #ffffff;
    --text: #111827;
    --text-light: #6b7280;
    --border: #e5e7eb;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;

}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: var(--text);
    background-color: var(--background);
    transition: var(--transition);
    overflow-x: hidden;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--background);
}

::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: var(--radius);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-hover);
}

.container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Header */
header {
    background-color: var(--surface);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid var(--border);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    height: 70px;
}

.logo {

    font-weight: 700;
    color: var(--primary);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo-icon {
    width: 40px;
    height: 40px;
    transition: var(--transition);
}

.logo:hover .logo-icon {
    transform: rotate(-10deg);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text);
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 1001;
    position: relative;
    width: 40px;
    height: 40px;
}

.mobile-menu-toggle .fa-times {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: none;
}

.mobile-menu-toggle .fa-bars {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.mobile-menu-toggle.is-active .fa-bars {
    display: none;
}

.mobile-menu-toggle.is-active .fa-times {
    display: block;
}

.nav-links a {
    color: var(--text);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}

.nav-links a:hover {
    color: var(--primary);
}

.theme-toggle-btn {
    background: none;
    border: 1px solid var(--border);
    color: var(--text-light);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.2rem;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.theme-toggle-btn:hover {
    color: var(--primary);
    border-color: var(--primary);
}

.theme-toggle-btn .fa-sun,
.theme-toggle-btn .fa-moon {
    position: absolute;
    transition: transform 0.3s ease-out, opacity 0.3s ease-out;
}

[data-theme='dark'] .fa-sun {
    transform: translateY(100%);
    opacity: 0;
}

[data-theme='dark'] .fa-moon {
    transform: translateY(0);
    opacity: 1;
}

[data-theme='light'] .fa-sun {
    transform: translateY(0);
    opacity: 1;
}

[data-theme='light'] .fa-moon {
    transform: translateY(-100%);
    opacity: 0;
}

/* Hero Section */
.hero {
    padding: 6rem 0;
    text-align: center;
    background-color: var(--surface);
    border-bottom: 1px solid var(--border);
    margin-bottom: 3rem;
    position: relative;

}

.hero::before {
    content: '';
    position: absolute;
    top: -100px;
    left: 50%;
    transform: translateX(-50%);
    width: 800px;
    height: 400px;
    background: radial-gradient(circle, var(--primary) 0%, transparent 60%);
    opacity: 0.1;
    pointer-events: none;
    z-index: 0;
}

.hero .container {
    position: relative;
    z-index: 1;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.hero p {
    font-size: 1.25rem;
    color: var(--text-light);
    max-width: 700px;
    margin: 0 auto 2.5rem;
}

.search-bar {
    max-width: 600px;
    margin: 0 auto;
    position: relative;
}

.search-bar input {
    width: 100%;
    padding: 1rem 1.5rem;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    font-size: 1rem;
    transition: var(--transition);
    background-color: var(--background);
    color: var(--text);
}

.search-bar input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.search-bar button {
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: calc(var(--radius) - 0.2rem);
    cursor: pointer;
    background-image: linear-gradient(to right, var(--primary) 0%, var(--primary-hover) 50%, var(--primary) 100%);
    background-size: 200% auto;
    transition: all 0.4s ease-in-out;
}

.search-bar button:hover {
    background-position: right center;
}

/* Categories */
.categories {
    margin: 4rem 0;
}

.section-title {
    text-align: center;
    margin-bottom: 2.5rem;
}

.section-title h2 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.section-title p {
    color: var(--text-light);
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
}

.category-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    text-align: center;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
}

.category-card:hover {
    transform: translateY(-8px);
    border-color: var(--primary);
}

[data-theme='light'] .category-card:hover {
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

[data-theme='dark'] .category-card:hover {
    box-shadow: 0 0 35px -5px rgba(99, 102, 241, 0.25);
}

.category-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--primary);
}

.category-card h3 {
    margin-bottom: 0.5rem;
}

.category-card p {
    color: var(--text-light);
    font-size: 0.9rem;
}

/* Popular Tools */
.popular-tools {
    margin: 5rem 0;
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.tool-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.tool-card:hover {
    transform: translateY(-8px);
    border-color: var(--primary);
}

[data-theme='light'] .tool-card:hover {
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

[data-theme='dark'] .tool-card:hover {
    box-shadow: 0 0 35px -5px rgba(99, 102, 241, 0.25);
}

.tool-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border);
}

.tool-header h3 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.tool-icon {
    color: var(--primary);
    font-size: 1.25rem;
}

.tool-category {
    display: inline-block;
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary);
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    border-radius: 9999px;
    font-weight: 500;
}


.tool-description {
    padding: 1.5rem;
    color: var(--text-light);
    font-size: 0.9rem;
}

.tool-footer {
    padding: 1rem 1.5rem;
    background: var(--background);
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.tool-link {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: var(--transition);
}

.tool-link:hover {
    color: var(--primary-hover);
}

/* Features */
.features {
    margin: 5rem 0;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 2rem;
}

.feature-card {
    background: var(--surface);
    padding: 2rem;
    border-radius: var(--radius);
    text-align: center;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.feature-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
}

.feature-icon {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 1rem;
    display: inline-block;
    background: rgba(99, 102, 241, 0.1);
    width: 60px;
    height: 60px;
    line-height: 60px;
    border-radius: 50%;
}

.feature-card h3 {
    margin-bottom: 0.5rem;
}

.feature-card p {
    color: var(--text-light);
    font-size: 0.9rem;
}

/* About Section */
.about-section {
    margin: 5rem 0;
    padding: 4rem 0;
    background: var(--surface);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.about-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.about-content p {
    color: var(--text-light);
    font-size: 1.1rem;
    line-height: 1.8;
}

.about-content p:not(:last-child) {
    margin-bottom: 1.5rem;
}

/* Testimonials Section */
.testimonials {
    margin: 5rem 0;
}

.testimonials-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    max-width: 800px;
    margin: 0 auto;
}

.testimonial-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2rem;
    box-shadow: var(--shadow);
}

.testimonial-card p {
    font-style: italic;
    color: var(--text-light);
    margin-bottom: 1.5rem;
    position: relative;
    padding-left: 1.5rem;
}

.testimonial-card p::before {
    content: '“';
    position: absolute;
    left: 0;
    top: -0.5rem;
    font-size: 3rem;
    color: var(--primary);
    opacity: 0.5;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.testimonial-author img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 2px solid var(--primary);
}

.testimonial-author span {
    font-size: 0.9rem;
    line-height: 1.4;
    color: var(--text);
}

.testimonial-author span strong {
    display: block;
    font-weight: 600;
}

/* Responsive Styles */
@media (max-width: 768px) {
    .nav-links {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background-color: rgba(17, 24, 39, 0.9);
        backdrop-filter: blur(10px);
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 2.5rem;
        transform: translateY(-100%);
        transition: transform 0.3s ease-in-out;
        z-index: 999;
    }

    .nav-links.nav-active {
        transform: translateY(0);
    }

    .nav-links a {
        font-size: 1.5rem;
    }

    .mobile-menu-toggle {
        display: block;
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .section-title h2 {
        font-size: 1.8rem;
    }

    .tools-grid,
    .category-grid,
    .features-grid {
        grid-template-columns: 1fr;
    }

    .testimonials-grid {
        grid-template-columns: 1fr;
    }

    .container {
        padding: 0.5rem;
    }
}

@media (min-width: 769px) {
    .testimonials-grid {
        grid-template-columns: 1fr 1fr;
    }
}


/* Animation Delays */
.delay-1 {
    transition-delay: 0.1s;
}

.delay-2 {
    transition-delay: 0.2s;
}

.delay-3 {
    transition-delay: 0.3s;
}

.delay-4 {
    transition-delay: 0.4s;
}

/* Footer */
footer {
    background: var(--surface);
    color: var(--text-light);
    padding: 4rem 0 2rem;
    margin-top: 5rem;
    border-top: 1px solid var(--border);
    position: relative;
}

footer::before {
    content: '';
    position: absolute;
    top: -1px;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(to right, transparent, var(--primary), transparent);
    opacity: 0.4;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 2.5rem;
    padding-bottom: 3rem;
}

.footer-about .footer-logo {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 1rem;
    display: inline-block;
    text-decoration: none;
}

.footer-about p {
    margin-bottom: 1.5rem;
}

.social-links {
    display: flex;
    justify-content: center;
    /* centers them horizontally */
    align-items: center;
    /* aligns icons vertically */
    gap: 0.5rem;
    /* smaller gap */
    flex-wrap: wrap;
    /* allows wrapping on smaller screens */
}

.social-link {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 36px;
    /* smaller icon button size */
    height: 36px;
    border-radius: 50%;
    /* circle background */
    background: #f5f5f5;
    /* light background (optional) */
    color: #333;
    /* icon color */
    font-size: 16px;
    /* icon size */
    transition: all 0.3s ease;
    text-decoration: none;
}

.social-link:hover {
    background: #333;
    color: #fff;
    /* invert on hover */
}


.footer-links h3 {
    font-size: 1.1rem;
    color: var(--text);
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.footer-links ul {
    list-style: none;
    max-height: 150px;
    overflow-y: auto;
}

.footer-links ul li {
    margin-bottom: 0.75rem;
}

.footer-links ul a {
    color: var(--text-light);
    text-decoration: none;
    transition: var(--transition);
}

.footer-links ul a:hover {
    color: var(--primary);
    padding-left: 5px;
}

.footer-logo i {
    margin-right: 0.5rem;
}

.footer-newsletter h3 {
    font-size: 1.1rem;
    color: var(--text);
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.footer-newsletter p {
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.newsletter-form {
    position: relative;
    display: flex;
}

.newsletter-form input {
    width: 100%;
    padding: 0.75rem 6rem 0.75rem 1rem;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: var(--background);
    color: var(--text);
    transition: var(--transition);
}

.newsletter-form input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.newsletter-form button {
    position: absolute;
    right: 0.25rem;
    top: 50%;
    transform: translateY(-50%);
    height: calc(100% - 0.5rem);
    border: none;
    background: var(--primary);
    color: white;
    padding: 0 1rem;
    border-radius: var(--radius);
    cursor: pointer;
    transition: var(--transition);
}

.newsletter-form button:hover {
    background: var(--primary-hover);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
    font-size: 0.9rem;
}

/* --- Apple-Inspired Search Suggestions --- */
.search-results {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background-color: rgba(255, 255, 255, 0.7);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    z-index: 1001;
    max-height: 400px;
    overflow-y: auto;
    opacity: 0;
    transform: translateY(0) scale(0.95);
    transition: opacity 0.2s ease, transform 0.2s ease;
    display: none;
}

[data-theme='dark'] .search-results {
    background-color: rgba(29, 29, 31, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.search-results.visible {
    display: block;
    opacity: 1;
    transform: translateY(0) scale(1);
}

.search-results ul {
    list-style: none;
    margin: 0;
    padding: 8px;
}

.search-results li a {
    display: flex;
    flex-direction: column;
    padding: 12px;
    text-decoration: none;
    color: var(--text);
    border-radius: 8px;
    transition: background-color 0.2s ease;
}

.search-results li a:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

[data-theme='dark'] .search-results li a:hover {
    background-color: rgba(255, 255, 255, 0.08);
}

.search-results .search-result-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 4px;
}

.search-results .search-result-category {
    font-size: 0.8rem;
    color: var(--text-light);
    margin-bottom: 6px;
}

.search-results .search-result-description {
    font-size: 0.85rem;
    color: var(--text-light);
    line-height: 1.4;
}

/* --- Apple-Inspired Search Results Page --- */
.search-summary {
    font-size: 1.5rem;
    margin-bottom: 2.5rem;
    color: var(--text);
    font-weight: 600;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}

#search-results-container .results-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

#search-results-container .result-item {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 1.5rem 2rem;
    transition: all 0.3s ease;
}

#search-results-container .result-item:hover {
    transform: scale(1.02);
    box-shadow: var(--shadow);
    border-color: rgba(0, 0, 0, 0.05);
}

[data-theme='dark'] #search-results-container .result-item:hover {
    border-color: rgba(255, 255, 255, 0.15);
}

#search-results-container .result-title a {
    text-decoration: none;
    color: var(--text);
    font-size: 1.2rem;
    font-weight: 600;
    transition: color 0.2s ease;
}

#search-results-container .result-title a:hover {
    color: var(--primary);
}

#search-results-container .result-description {
    color: var(--text-light);
    font-size: 0.95rem;
    line-height: 1.6;
    margin: 0.75rem 0 1.5rem 0;
}

#search-results-container .result-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

#search-results-container .result-category {
    display: inline-block;
    background: var(--background);
    color: var(--text-light);
    font-size: 0.8rem;
    padding: 0.4rem 0.8rem;
    border-radius: 9999px;
    font-weight: 500;
    border: 1px solid var(--border);
}

#search-results-container .result-url {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--primary);
    text-decoration: none;
    transition: color 0.2s ease;
}

#search-results-container .result-url:hover {
    color: var(--primary-hover);
}


/* Tool Page Specifics */
.tool-section {
    margin-bottom: 3rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.tool-section .tool-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.tool-section .tool-header h2 {
    font-size: 1.5rem;
    margin: 0;
}

.report-btn {
    background: none;
    border: 1px solid var(--border);
    color: var(--text-light);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.1rem;
    transition: var(--transition);
}

.report-btn:hover {
    color: var(--primary);
    border-color: var(--primary);
}

.tool-container {
    /* padding: 1.5rem; */
}

.tool-iframe {

    width: 100%;
    min-height: 100vh;
    /* Fallback height */
    border: none;
    border-radius: var(--radius);
    display: block;
    /* Prevents extra space below iframe */
    transition: height 0.3s ease-in-out;
    /* Smooth height transition */
}

/* Content Section Styling */
.content-section {
    margin-bottom: 3rem;
}

.main-content {
    margin: 0 auto;
    background: var(--surface);
    padding: 2.5rem;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
}

.main-content article h2,
.main-content article h3,
.main-content article h4 {
    color: var(--text);
    margin-bottom: 1rem;
    line-height: 1.3;
}

.main-content article h2 {
    font-size: 1.8rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--primary);
    margin-bottom: 1.5rem;
}

.main-content article h3 {
    font-size: 1.5rem;
    margin-top: 2rem;
}

.main-content article h4 {
    font-size: 1.2rem;
    margin-top: 1.5rem;
}

.main-content article p {
    margin-bottom: 1.25rem;
    line-height: 1.7;
    color: var(--text-light);
}

.main-content article ol {
    list-style-position: inside;
    padding-left: 1rem;
    margin-bottom: 1.25rem;
}

.main-content article ol li {
    margin-bottom: 0.75rem;
    color: var(--text-light);
}

.main-content article ol li::marker {
    color: var(--primary);
    font-weight: bold;
}

.main-content article a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
}

.main-content article a:hover {
    text-decoration: underline;
}

.related-tools {
    margin-top: 4rem;
}

/* Fullscreen Button */
.fullscreen-btn {
    background: none;
    border: 1px solid var(--border);
    color: var(--text-light);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.1rem;
    transition: var(--transition);
}

.fullscreen-btn:hover {
    color: var(--primary);
    border-color: var(--primary);
}

/* Fullscreen State */
.tool-container:fullscreen {
    background-color: var(--background);
    padding: 0;
    border: none;
    border-radius: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tool-container:fullscreen .tool-iframe {
    height: 100% !important;
    /* Override inline style from JS */
    width: 100%;
    min-height: 100%;
    border-radius: 0;
}

.exit-fullscreen-btn {
    display: none;
    /* Hidden by default */
    position: absolute;
    top: 1px !important;
    right: 1px !important;
    z-index: 10;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 10%;
    cursor: pointer;
    font-size: 1.2rem;
    transition: all 0.2s ease-in-out;
    opacity: 0.4;
}

.exit-fullscreen-btn:hover {
    background: rgba(0, 0, 0, 0.5);
    transform: scale(1.1);
    opacity: 1;
}

.tool-container:fullscreen .exit-fullscreen-btn,
.popup-view .exit-fullscreen-btn {
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Search Results */
.search-results {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    z-index: 101;
    max-height: 400px;
    overflow-y: auto;
}

.search-results ul {
    list-style: none;
    margin: 0;
    padding: 0.5rem 0;
}

.search-results li a {
    display: flex;
    flex-direction: column;
    padding: 0.75rem 1.5rem;
    color: var(--text);
    text-decoration: none;
    transition: background-color 0.2s ease-in-out;
}

.search-results li:not(:last-child) a {
    border-bottom: 1px solid var(--border);
}

.search-results li a:hover {
    background-color: var(--background);
}

.search-result-title {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.search-result-category {
    font-size: 0.75rem;
    color: var(--primary);
    margin-bottom: 0.5rem;
    display: inline-block;
    background: rgba(99, 102, 241, 0.1);
    padding: 0.2rem 0.5rem;
    border-radius: 9999px;
    font-weight: 500;
    align-self: flex-start;
}

.search-result-description {
    font-size: 0.85rem;
    color: var(--text-light);
    line-height: 1.5;
}

.tool-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.tool-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.tool-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.tool-card h3 {
    color: var(--primary-color);
    margin-bottom: 0.75rem;
    font-size: 1.25rem;
}

.tool-card p {
    flex-grow: 1;
    margin-bottom: 1.5rem;
    color: var(--text-secondary);
}

.tool-card a {
    display: inline-block;
    background: rgb(52, 73, 141);
    color: rgb(250, 246, 246);
    padding: 0.75rem 1.5rem;
    border-radius: 5px;
    text-decoration: none;
    text-align: center;
    font-weight: bold;
    transition: background-color 0.3s ease;
}