:root {
    --primary-color: #000;
    --secondary-color: #00bfff;
    --background-color: #f4f4f9;
    --text-color: #333;
    --card-bg: #fff;
    --modal-bg: rgba(0, 0, 0, 0.8);
    --box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
    --hover-transform: scale(1.1) rotate(0deg);
    --transition-speed: 0.4s;
    --tertiary-color: #ffffff;
}

body {
    font-family: 'Roboto', sans-serif;
    margin: 0;
    padding: 0;
    background: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
    scroll-behavior: smooth;
}

.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--primary-color);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.spinner {
    width: 80px;
    height: 80px;
    border: 10px solid rgba(0, 0, 0, 0.1);
    border-top: 10px solid var(--card-bg);
    border-radius: 50%;
    position: relative;
    animation: spin var(--transition-speed) linear infinite, pulse 1.5s ease-in-out infinite alternate;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.1), 0 0 30px var(--secondary-color);
    transform-origin: center;
}

/* 3D Rotation Effect */
@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* Pulse Effect for Added Energy */
@keyframes pulse {
    0% {
        box-shadow: 0 0 20px rgba(0, 0, 0, 0.1), 0 0 30px var(--background-color);
    }
    100% {
        box-shadow: 0 0 30px rgba(0, 0, 0, 0.2), 0 0 40px var(--background-color);
    }
}

/* Header Styles */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    background: linear-gradient(135deg, var(--secondary-color), #2575fc);
    color: #fff;
}

/* Logo Styles */
.logo {
    font-size: 2.3rem;
    font-weight: bold;
    color: #fff;
}

.logo-link {
    text-decoration: none;
    color: inherit;
    font-family: 'Arial', sans-serif;
    letter-spacing: 2px;
    transition: color 0.3s ease;
}

.logo-link:hover {
    color: #FFD700; /* Gold color on hover */
}

/* Navigation Styles */
.nav-list {
    list-style: none;
    display: flex;
    gap: 1.5rem;
}

.nav-link {
    text-decoration: none;
    color: #fff;
    font-size: 1rem;
    letter-spacing: 1px;
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: #FFD700; /* Gold color on hover */
}

/* Active Link Style */
.nav-link.active {
    color: #FFD700; /* Highlight active link with gold color */
}

/* Header Navigation with Advanced Effects */
.header nav {
    padding: 1rem 2rem;
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: background 0.3s ease-in-out;
}

/* Navigation List with Centering and Spacing */
.nav-list {
    display: flex;
    justify-content: center;
    align-items: center;
    list-style: none;
    gap: 2rem;
}

/* Navigation Links Styling */
.nav-link {
    text-decoration: none;
    color: white;
    font-weight: bold;
    font-size: 1.3rem;
    position: relative;
    padding: 0.5rem 0;
    transition: color 0.3s ease, transform 0.3s ease, text-shadow 0.3s ease;
    display: inline-block;
}

/* Hover Effect with Color Change and Text Shadow */
.nav-link:hover,
.nav-link.active {
    color: var(--tertiary-color);
    transform: translateY(-5px); /* Slight Hover Lift */
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3); /* Soft Glow Effect on Hover */
}

/* Sliding Underline Animation on Hover */
.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: var(--tertiary-color);
    transition: width 0.3s ease-in-out;
}

/* Active or Hovered Link Shows Full Underline */
.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

/* Add Box Shadow to the Active Link for More Depth */
.nav-link.active {
    color: var(--secondary-color);
    font-weight: bold;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15);
}

/* Subtle Glow Effect on the Header when Scrolling */
.header nav.sticky-active {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3), 0 2px 10px rgba(0, 0, 0, 0.1); /* Enhanced glow when sticky */
}


.hero {
    text-align: center;
    padding: 6rem 2rem; /* More space for a grand feeling */
    background: linear-gradient(135deg, #00bfff, #2575fc, #6a11cb); /* Adding a more complex gradient */
    color: #fff;
    box-shadow: var(--box-shadow);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('path/to/your/hero-image.jpg') no-repeat center center/cover;
    opacity: 0.2;
    z-index: -1; /* Keeps the image in the background */
    filter: blur(10px); /* Soft blur effect */
}

.hero-title {
    font-size: 4rem; /* Larger for impact */
    font-family: 'Helvetica Neue', sans-serif;
    font-weight: bold;
    color: #fff;
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    animation: fadeIn 2s ease-in-out, moveUp 1s ease-out; /* Added secondary move-up animation */
}

@keyframes fadeIn {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes moveUp {
    0% {
        transform: translateY(20px);
        opacity: 0;
    }
    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

.search-container {
    margin-top: 2rem;
}

.search-bar {
    padding: 1rem;
    width: 60%;
    max-width: 500px;
    border: none;
    border-radius: 50px;
    font-size: 1.1rem;
    box-shadow: var(--box-shadow);
    transition: all var(--transition-speed);
    background-color: rgba(255, 255, 255, 0.8); /* Subtle background for better visibility */
    color: #333;
    text-align: center;
    outline: none;
}

.search-bar:focus {
    box-shadow: 0 8px 20px rgba(0, 191, 255, 0.6);
    transform: scale(1.05); /* Slight zoom-in effect */
}

.search-bar::placeholder {
    color: #333; /* Make placeholder text more readable */
    font-weight: 300;
}

.search-bar:hover {
    box-shadow: 0 8px 25px rgba(0, 191, 255, 0.7);
    transform: scale(1.02); /* Slight zoom effect on hover */
}

/* Micro Interactions for the Search Button */
.search-bar::after {
    content: '';
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    background: url('path/to/search-icon.svg') no-repeat center center;
    background-size: contain;
    transition: transform 0.3s ease-in-out;
}

.search-bar:focus::after {
    transform: translateY(-50%) scale(1.2); /* Grow the icon when focused */
}

.search-bar:hover::after {
    transform: translateY(-50%) scale(1.2);
}


.tool-library-container {
    padding: 2rem;
}

.sort-container {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 1rem;
}

.tool-library {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.tool-card {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    box-shadow: var(--box-shadow);
    transition: transform var(--transition-speed), box-shadow var(--transition-speed);
    cursor: pointer;
}

.tool-card:hover {
    transform: var(--hover-transform);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.3);
}

.tool-card img {
    width: 80px;
    height: 80px;
    margin-bottom: 1rem;
    border-radius: 50%;
    box-shadow: var(--box-shadow);
}

.tool-card h2 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

.tool-card p {
    margin-bottom: 1rem;
    font-size: 0.9rem;
    color: var(--text-color);
}

.tool-card a {
    text-decoration: none;
    padding: 0.7rem 1.5rem;
    background: var(--primary-color);
    color: white;
    border-radius: 50px;
    box-shadow: var(--box-shadow);
    transition: background var(--transition-speed), transform var(--transition-speed);
}

.tool-card a:hover {
    background: var(--secondary-color);
    transform: translateY(-3px);
}

/* Modal Background */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    justify-content: center;
    align-items: center;
    z-index: 1001;
    animation: fadeInModal 0.5s ease-in-out; /* Add fade-in effect */
}

/* Modal Animation */
@keyframes fadeInModal {
    0% {
        opacity: 0;
    }
    100% {
        opacity: 1;
    }
}

/* Modal Content */
.modal-content {
    background: var(--card-bg);
    padding: 3rem;
    border-radius: 15px;
    max-width: 600px;
    text-align: center;
    position: relative;
    box-shadow: var(--box-shadow);
    transform: scale(0.8); /* Initial scale for zoom-in effect */
    animation: zoomInModal 0.4s ease-in-out forwards; /* Add zoom-in effect */
}

/* Modal Zoom-In Animation */
@keyframes zoomInModal {
    0% {
        transform: scale(0.8);
        opacity: 0;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Close Button */
.close-btn {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 1.8rem;
    cursor: pointer;
    color: var(--primary-color);
    transition: transform 0.3s ease, color 0.3s ease;
    z-index: 1002;
}

/* Close Button Hover Effect */
.close-btn:hover {
    transform: rotate(90deg);
    color: var(--secondary-color);
}

/* Modal Content Header */
.modal-content h2 {
    font-size: 2rem;
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    animation: slideInHeader 0.5s ease-out; /* Add slide-in animation */
}

/* Modal Content Text */
.modal-content p {
    font-size: 1.1rem;
    color: var(--text-color);
    margin-bottom: 1.5rem;
    opacity: 0;
    animation: fadeInText 0.7s ease-out forwards; /* Fade-in text animation */
}

/* Modal Text Fade-in Animation */
@keyframes fadeInText {
    0% {
        opacity: 0;
    }
    100% {
        opacity: 1;
    }
}

/* Modal Header Animation */
@keyframes slideInHeader {
    0% {
        transform: translateY(-20px);
        opacity: 0;
    }
    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Button Style inside Modal */
.modal-content .btn {
    padding: 1rem 2rem;
    background: var(--secondary-color);
    color: #fff;
    border-radius: 50px;
    font-size: 1.1rem;
    border: none;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.3s ease;
}

.modal-content .btn:hover {
    background: var(--primary-color);
    transform: translateY(-3px);
}

/* Modal Background Fading */
.modal.show {
    display: flex;
    animation: fadeInModal 0.5s ease-in-out;
}

/* Closing Modal Effect */
.modal.hide {
    animation: fadeOutModal 0.5s ease-in-out forwards;
}

@keyframes fadeOutModal {
    0% {
        opacity: 1;
    }
    100% {
        opacity: 0;
    }
}


.footer {
    background: var(--primary-color);
    color: #fff;
    padding: 3rem 1rem;
    text-align: center;
    font-size: 1.1rem;
    position: relative;
    z-index: 10;
    box-shadow: var(--box-shadow);
    overflow: hidden;
}

.footer::before {
    content: '';
    position: absolute;
    top: -20px;
    left: 0;
    width: 100%;
    height: 50px;
    background: linear-gradient(135deg, #6a11cb, #2575fc); /* Cool gradient to separate content */
    z-index: -1;
}

.footer p {
    margin: 0;
    font-family: 'Helvetica Neue', sans-serif;
    font-weight: 300;
    letter-spacing: 1px;
    opacity: 0.9;
    transition: opacity 0.3s ease-in-out, transform 0.3s ease-in-out;
}

.footer p:hover {
    opacity: 1;
    transform: translateY(-5px); /* Subtle hover effect */
}

.footer .social-links {
    margin-top: 1.5rem;
    display: flex;
    justify-content: center;
    gap: 1.5rem;
}

.footer .social-links a {
    color: #fff;
    font-size: 1.5rem;
    text-decoration: none;
    transition: transform 0.3s ease-in-out, color 0.3s ease-in-out;
}

.footer .social-links a:hover {
    color: var(--secondary-color);
    transform: scale(1.2); /* Scale effect for social icons */
}

.footer .social-links a:active {
    transform: scale(0.95); /* Active state for click effect */
}

.footer .footer-links {
    margin-top: 2rem;
    display: flex;
    justify-content: center;
    gap: 2rem;
}

.footer .footer-links a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 400;
    transition: color 0.3s ease-in-out, transform 0.3s ease-in-out;
}

.footer .footer-links a:hover {
    color: var(--secondary-color);
    transform: translateY(-3px); /* Hover effect for links */
}

.footer .footer-links a:active {
    transform: translateY(1px); /* Slight movement on click */
}
