/* ================================
   AI TOOL KIT - PREMIUM STYLES
   Cyber/Matrix Theme with Neon Accents
   ================================ */

/* ========== ROOT VARIABLES ========== */
:root {
    --primary-cyan: #00ffff;
    --primary-magenta: #ff00ff;
    --primary-yellow: #ffff00;
    --dark-1: #0d0d0d;
    --dark-2: #1a1a1a;
    --dark-3: #262626;
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glow-cyan: rgba(0, 255, 255, 0.6);
    --glow-magenta: rgba(255, 0, 255, 0.6);
}

/* ========== RESET & BASE ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Space Grotesk', 'Inter', -apple-system, sans-serif;
    background: var(--dark-1);
    color: #ffffff;
    overflow-x: hidden;
    line-height: 1.6;
}

/* ========== CUSTOM SCROLLBAR ========== */
::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: var(--dark-1);
    border-left: 1px solid var(--glass-border);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--primary-cyan), var(--primary-magenta));
    border-radius: 10px;
    border: 2px solid var(--dark-1);
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, var(--primary-magenta), var(--primary-yellow));
}

/* ========== ANIMATED BACKGROUND ========== */
.bg-animated {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: 
        radial-gradient(circle at 20% 50%, rgba(0, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(255, 0, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 20%, rgba(255, 255, 0, 0.05) 0%, transparent 50%),
        linear-gradient(180deg, var(--dark-1) 0%, var(--dark-2) 100%);
    animation: bgPulse 20s ease-in-out infinite;
}

@keyframes bgPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.8; }
}

/* ========== NAVIGATION ========== */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    backdrop-filter: blur(20px);
    background: var(--glass-bg);
    border-bottom: 1px solid var(--glass-border);
    padding: 1.2rem 0;
    transition: all 0.3s ease;
}

.navbar.scrolled {
    background: rgba(13, 13, 13, 0.95);
    box-shadow: 0 10px 40px rgba(0, 255, 255, 0.1);
}

.navbar .container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.8rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary-cyan), var(--primary-magenta));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -1px;
    position: relative;
}

.logo::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 40px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-cyan), transparent);
    border-radius: 2px;
}

.nav-links {
    display: flex;
    gap: 3rem;
    list-style: none;
}

.nav-links a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    position: relative;
    transition: color 0.3s ease;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-cyan), var(--primary-magenta));
    transition: width 0.3s ease;
}

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

.nav-links a:hover::after {
    width: 100%;
}

/* ========== HERO SECTION ========== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 8rem 2rem 4rem;
    position: relative;
    overflow: hidden;
}

.hero-content {
    max-width: 900px;
    z-index: 10;
}

.hero h1 {
    font-size: clamp(3rem, 10vw, 7rem);
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, 
        var(--primary-cyan) 0%, 
        var(--primary-magenta) 50%, 
        var(--primary-yellow) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    background-size: 200% 200%;
    animation: gradientShift 8s ease infinite;
    text-shadow: 0 0 80px rgba(0, 255, 255, 0.3);
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.hero p {
    font-size: clamp(1.1rem, 3vw, 1.5rem);
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 3rem;
    font-weight: 300;
}

.cta-button {
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    padding: 1.2rem 3rem;
    font-size: 1.1rem;
    font-weight: 600;
    color: #000;
    background: linear-gradient(135deg, var(--primary-cyan), var(--primary-magenta));
    border: none;
    border-radius: 50px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.4s ease;
    box-shadow: 0 10px 40px rgba(0, 255, 255, 0.3);
}

.cta-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

.cta-button:hover::before {
    left: 100%;
}

.cta-button:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 20px 60px rgba(0, 255, 255, 0.5);
}

/* ========== SECTION TITLE ========== */
.section {
    padding: 6rem 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

.section-title {
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 800;
    text-align: center;
    margin-bottom: 4rem;
    background: linear-gradient(135deg, var(--primary-cyan), var(--primary-magenta));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ========== CATEGORY GRID ========== */
.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

/* ========== TOOLS GRID ========== */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.category-card {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 2.5rem;
    cursor: pointer;
    position: relative;
    overflow: visible;
    transition: all 0.3s ease;
}

.category-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, 
        rgba(0, 255, 255, 0.05) 0%, 
        rgba(255, 0, 255, 0.05) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.category-card:hover::before {
    opacity: 1;
}

.category-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary-cyan);
    box-shadow: 
        0 10px 30px rgba(0, 255, 255, 0.15),
        0 0 20px rgba(0, 255, 255, 0.08);
}

.category-icon {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    display: block;
    filter: drop-shadow(0 0 20px rgba(0, 255, 255, 0.4));
    transition: transform 0.4s ease;
}

.category-card:hover .category-icon {
    transform: scale(1.05);
}

.category-card h3 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 0.8rem;
    color: #fff;
}

.category-card p {
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 1.5rem;
    font-size: 1rem;
}

.tool-count {
    display: inline-block;
    padding: 0.5rem 1.2rem;
    background: rgba(0, 255, 255, 0.1);
    border: 1px solid rgba(0, 255, 255, 0.3);
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--primary-cyan);
}

/* ========== TOOL CARDS (Expandable Content) ========== */
.tools-container {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    margin-top: 1.5rem;
}

.tools-container.expanded {
    max-height: 800px;
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 0.5rem;
}

/* Custom scrollbar for tools container */
.tools-container.expanded::-webkit-scrollbar {
    width: 8px;
}

.tools-container.expanded::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
}

.tools-container.expanded::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--primary-cyan), var(--primary-magenta));
    border-radius: 10px;
}

.tools-container.expanded::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, var(--primary-magenta), var(--primary-cyan));
}

.tool-card {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 2rem;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.tool-card:hover {
    background: var(--glass-bg);
    border-color: var(--primary-cyan);
    transform: translateY(-5px);
    box-shadow: 
        0 10px 30px rgba(0, 255, 255, 0.15),
        0 0 20px rgba(0, 255, 255, 0.08);
}

.tool-card h4 {
    font-size: 1.3rem;
    margin-bottom: 0.8rem;
    color: var(--primary-cyan);
    font-weight: 700;
}

.tool-card h3 {
    font-size: 1.3rem;
    margin-bottom: 0.8rem;
    color: var(--primary-cyan);
    font-weight: 700;
}

.tool-card p {
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
    color: rgba(255, 255, 255, 0.6);
    flex-grow: 1;
}

.tool-link {
    display: inline-block;
    padding: 0.6rem 1.8rem;
    background: linear-gradient(135deg, var(--primary-cyan), var(--primary-magenta));
    color: #000;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    align-self: flex-start;
}

.tool-link:hover {
    transform: scale(1.08);
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.5);
}

/* ========== FOOTER ========== */
.footer {
    text-align: center;
    padding: 3rem 2rem;
    background: var(--glass-bg);
    border-top: 1px solid var(--glass-border);
    margin-top: 4rem;
}

.footer p {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.95rem;
}

/* ========== CONTACT CARD ========== */
.contact-card {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 3rem;
    cursor: pointer;
    position: relative;
    overflow: visible;
    transition: all 0.3s ease;
}

.contact-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary-cyan);
    box-shadow: 
        0 10px 30px rgba(0, 255, 255, 0.15),
        0 0 20px rgba(0, 255, 255, 0.08);
}

.contact-card a:hover {
    color: var(--primary-cyan) !important;
    text-shadow: 0 0 10px rgba(0, 255, 255, 0.5);
}

.footer {
    text-align: center;
    padding: 3rem 2rem;
    background: var(--glass-bg);
    border-top: 1px solid var(--glass-border);
    margin-top: 4rem;
}

.footer p {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.95rem;
}

/* ========== HERO BUTTONS ========== */
.hero-buttons {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 2rem;
}

.search-btn {
    background: linear-gradient(135deg, rgba(255, 0, 255, 0.3), rgba(0, 255, 255, 0.3));
    border: 2px solid var(--primary-magenta);
    color: #ffffff;
    padding: 0.8rem 1.5rem;
    font-size: 1rem;
    border-radius: 30px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    font-weight: 500;
    position: relative;
    overflow: hidden;
}

.search-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255, 0, 255, 0.5), rgba(0, 255, 255, 0.5));
    transition: left 0.3s ease;
    z-index: -1;
}

.search-btn:hover::before {
    left: 0;
}

.search-btn:hover {
    box-shadow: 0 0 20px rgba(255, 0, 255, 0.6);
    transform: translateY(-2px);
}

/* ========== SEARCH OVERLAY ========== */
.search-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    z-index: 2000;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 5rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.search-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.search-modal {
    background: linear-gradient(135deg, rgba(26, 26, 26, 0.95), rgba(38, 38, 38, 0.95));
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    width: 90%;
    max-width: 700px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 255, 255, 0.2);
    position: relative;
}

.close-search {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: none;
    border: none;
    color: #ffffff;
    font-size: 2rem;
    cursor: pointer;
    transition: color 0.3s ease;
    z-index: 10;
}

.close-search:hover {
    color: var(--primary-magenta);
}

.search-modal-header {
    padding: 2rem;
    border-bottom: 1px solid var(--glass-border);
    position: sticky;
    top: 0;
    background: rgba(26, 26, 26, 0.95);
}

.search-input {
    width: 100%;
    padding: 1rem 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid var(--glass-border);
    border-radius: 10px;
    color: #ffffff;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    font-family: 'Space Grotesk', sans-serif;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-cyan);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.3);
}

.search-input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.search-results {
    padding: 1.5rem;
    max-height: calc(80vh - 150px);
    overflow-y: auto;
}

.search-result-item {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    transition: all 0.3s ease;
    cursor: pointer;
}

.search-result-item:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--primary-cyan);
    transform: translateX(5px);
    box-shadow: 0 5px 20px rgba(0, 255, 255, 0.2);
}

.result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.8rem;
}

.result-header h4 {
    margin: 0;
    color: var(--primary-cyan);
    font-size: 1.1rem;
}

.result-category {
    background: rgba(255, 0, 255, 0.3);
    color: var(--primary-magenta);
    padding: 0.3rem 0.8rem;
    border-radius: 5px;
    font-size: 0.8rem;
    font-weight: 600;
}

.search-result-item p {
    color: rgba(255, 255, 255, 0.6);
    margin: 0.5rem 0;
    font-size: 0.95rem;
}

.result-link {
    color: var(--primary-cyan);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.3s ease;
    display: inline-block;
    margin-top: 0.8rem;
}

.result-link:hover {
    color: var(--primary-magenta);
}

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
    
    .category-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .hero {
        padding: 6rem 1.5rem 3rem;
    }

    .hero-buttons {
        flex-direction: column;
        gap: 1rem;
    }

    .cta-button, .search-btn {
        width: 100%;
    }

    .search-modal {
        width: 95%;
        max-height: 90vh;
    }
}

/* ========== UTILITY CLASSES ========== */
.fade-in {
    opacity: 0;
    animation: fadeIn 1s forwards;
}

@keyframes fadeIn {
    to { opacity: 1; }
}

.slide-up {
    opacity: 0;
    transform: translateY(30px);
}

.slide-up.active {
    opacity: 1;
    transform: translateY(0);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}
