/* Import fonts */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700&family=Poppins:wght@400;500;600;700&display=swap');

:root {
    /* Color Variables */
    --primary-gradient: linear-gradient(135deg, #4f46e5, #7c3aed);
    --secondary-gradient: linear-gradient(135deg, #6366f1, #8b5cf6);
    --accent-gradient: linear-gradient(135deg, #06b6d4, #3b82f6);
    --hover-gradient: linear-gradient(135deg, #4338ca, #6d28d9);
    
    /* Neon Colors */
    --neon-blue: #00f3ff;
    --neon-purple: #b400ff;
    --neon-green: #00ff8c;
    
    /* Background Colors */
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-card: rgba(255, 255, 255, 0.9);
    
    /* Text Colors */
    --text-primary: #1e293b;
    --text-secondary: #475569;
    --text-muted: #64748b;
    
    /* Font Families */
    --font-heading: 'Montserrat', sans-serif;
    --font-body: 'Poppins', sans-serif;
    
    /* Animation Timings */
    --transition-fast: 0.2s;
    --transition-normal: 0.3s;
    --transition-slow: 0.5s;
}

/* Base Styles */
html, body {
    height: auto;
    min-height: 100%;
    overflow-x: hidden;
    overflow-y: auto;
    position: relative;
    -webkit-overflow-scrolling: touch;
}

body {
    font-family: var(--font-body);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    margin: 0;
    padding: 0;
    touch-action: manipulation;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
}

/* Header Styles */
.main-header {
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 1rem 0;
}

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

.logo {
    flex-shrink: 0;
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 700;
    text-decoration: none;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: titleGlow 2s ease-in-out infinite alternate;
    text-shadow: 0 0 20px rgba(0, 243, 255, 0.3);
}

.logo-text:hover {
    text-shadow: 0 0 40px rgba(0, 243, 255, 0.6);
}

.main-nav ul {
    display: flex;
    gap: 2rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.main-nav a {
    color: #4b5563;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.main-nav a:hover {
    color: #2563eb;
}

.search-container {
    display: flex;
    gap: 0.5rem;
    flex: 1;
    max-width: 400px;
}

#search-bar {
    flex: 1;
    padding: 0.5rem 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    transition: border-color 0.3s ease;
}

#search-bar:focus {
    border-color: #2563eb;
    outline: none;
}

#search-button {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: #2563eb;
    color: white;
    border: none;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

#search-button:hover {
    background: #1d4ed8;
}

/* Section Headers */
.section-header {
    text-align: center;
    margin: 4rem 0 2rem;
    position: relative;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.section-description {
    font-size: 1.2rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 2rem;
}

/* Grid Container */
.grid-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
    position: relative;
}

/* Categories Grid */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    padding: 1rem;
}

.category-card {
    background: var(--bg-card);
    border: 2px solid #e2e8f0;
    border-radius: 15px;
    padding: 1.5rem;
    transition: all var(--transition-normal);
    height: 100%;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.category-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--primary-gradient);
    transform: scaleX(0);
    transition: transform var(--transition-normal);
}

.category-card:hover::before {
    transform: scaleX(1);
}

.category-card:hover {
    transform: translateY(-10px);
    border-color: #3b82f6;
    box-shadow: 0 10px 20px rgba(59, 130, 246, 0.1);
}

.category-card h3 {
    margin-top: 0;
    font-size: 1.4rem;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.category-card p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    flex-grow: 1;
}

.tool-count {
    background: var(--primary-gradient);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 50px;
    font-size: 0.8rem;
    display: inline-block;
    font-weight: 500;
}

/* Tools Grid */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    padding: 1rem;
}

.tool-card {
    background: var(--bg-card);
    border: 2px solid #e2e8f0;
    border-radius: 15px;
    padding: 1.5rem;
    transition: all var(--transition-normal);
    height: 100%;
    display: flex;
    flex-direction: column;
    position: relative;
}

.tool-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--primary-gradient);
    transform: scaleX(0);
    transition: transform var(--transition-normal);
}

.tool-card:hover::before {
    transform: scaleX(1);
}

.tool-card:hover {
    transform: translateY(-10px);
    border-color: #3b82f6;
    box-shadow: 0 10px 20px rgba(59, 130, 246, 0.1);
}

.tool-icon {
    width: 50px;
    height: 50px;
    background: var(--primary-gradient);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    color: white;
    font-size: 1.5rem;
}

.tool-title {
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
}

.tool-description {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.tool-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
}

.tool-category {
    font-size: 0.9rem;
    color: var(--text-muted);
    background: rgba(99, 102, 241, 0.1);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
}

.tool-uses {
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* Category Page Specific */
.category-header {
    text-align: center;
    padding: 4rem 2rem;
    background: linear-gradient(135deg, var(--bg-primary), var(--bg-secondary));
    margin-bottom: 2rem;
}

.category-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.category-description {
    font-size: 1.2rem;
    color: var(--text-secondary);
    max-width: 800px;
    margin: 0 auto;
}

/* Tool Page Specific */
.tool-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

.tool-header {
    text-align: center;
    margin-bottom: 2rem;
}

.tool-header h1 {
    font-size: 2rem;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.tool-header .category {
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

.tool-header .description {
    color: var(--text-secondary);
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Gradient Tool Specific Styles */
.gradient-tool {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    background: var(--bg-card);
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.gradient-controls {
    background: var(--bg-card);
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

/* Animation Keyframes */
@keyframes spin {
    to { transform: rotate(360deg); }
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeOut {
    to { opacity: 0; }
}

@keyframes titleGlow {
    0% { text-shadow: 0 0 20px rgba(0, 243, 255, 0.3); }
    100% { text-shadow: 0 0 40px rgba(0, 243, 255, 0.6); }
}

@keyframes backgroundMove {
    0% { transform: translate(0, 0); }
    100% { transform: translate(50px, 50px); }
}

/* Interactive Elements */
.tooltip {
    position: fixed;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 14px;
    z-index: 1000;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s;
}

.tooltip.show {
    opacity: 1;
}

/* Loading States */
.loading {
    position: relative;
    pointer-events: none;
    opacity: 0.7;
}

.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
    margin-right: 10px;
    vertical-align: middle;
}

/* Scroll to Top */
.scroll-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    background: var(--primary-gradient);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.3s, transform 0.3s;
    transform: translateY(20px);
    z-index: 1000;
}

.scroll-to-top.visible {
    opacity: 1;
    transform: translateY(0);
}

.scroll-to-top:hover {
    transform: scale(1.1);
    box-shadow: 0 0 20px rgba(0, 243, 255, 0.3);
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
}

.toast {
    background: white;
    color: #333;
    padding: 12px 20px;
    border-radius: 4px;
    margin-bottom: 10px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    opacity: 0;
    transform: translateX(100%);
    transition: opacity 0.3s, transform 0.3s;
}

.toast.show {
    opacity: 1;
    transform: translateX(0);
}

.toast-success {
    background: #28a745;
    color: white;
}

.toast-error {
    background: #dc3545;
    color: white;
}

.toast-info {
    background: #17a2b8;
    color: white;
}

/* Form Elements */
.form-group {
    margin-bottom: 1.5rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-primary);
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    background: var(--bg-card);
    color: var(--text-primary);
    font-size: 1rem;
    transition: all var(--transition-normal);
}

.form-control:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 15px rgba(59, 130, 246, 0.2);
}

/* Buttons */
.btn {
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-normal);
    font-size: 1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
}

.btn-primary {
    background: var(--primary-gradient);
    color: white;
    border-radius: 25px;
}

.btn-primary:hover {
    background: var(--hover-gradient);
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(0, 243, 255, 0.3);
}

.btn-secondary {
    background: var(--secondary-gradient);
    color: white;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-container {
        flex-direction: column;
        padding: 1rem;
    }
    
    .logo {
        margin-bottom: 1rem;
    }
    
    .search-container {
        width: 100%;
        max-width: 100%;
        margin: 0 0 1rem 0;
    }
    
    #search-bar {
        font-size: 16px;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .section-description {
        font-size: 1.1rem;
        padding: 0 1rem;
    }
    
    .grid-container {
        padding: 1rem;
    }
    
    .categories-grid,
    .tools-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .category-card,
    .tool-card {
        padding: 1.5rem;
    }
    
    .category-title,
    .tool-page-title {
        font-size: 2.2rem;
    }
    
    .category-description,
    .tool-page-description {
        font-size: 1.1rem;
        padding: 0 1rem;
    }
    
    .tool-content {
        padding: 1.5rem;
    }
    
    .toast-container {
        left: 20px;
        right: 20px;
    }
    
    .toast {
        text-align: center;
    }
    
    .scroll-to-top {
        bottom: 10px;
        right: 10px;
    }
}

/* Statistics Section */
.statistics-section {
    padding: 4rem 2rem;
    background: linear-gradient(135deg, var(--bg-primary), var(--bg-secondary));
    margin: 2rem 0;
}

.statistics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.statistic-card {
    background: var(--bg-card);
    padding: 2rem;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    transition: all var(--transition-normal);
    border: 2px solid #e2e8f0;
}

.statistic-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(59, 130, 246, 0.1);
    border-color: #3b82f6;
}

.statistic-number {
    font-size: 3rem;
    font-weight: 700;
    color: transparent;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    margin-bottom: 0.5rem;
    font-family: var(--font-heading);
}

.statistic-label {
    color: var(--text-secondary);
    font-size: 1.1rem;
    font-weight: 500;
}

/* Testimonials Carousel */
.testimonials-section {
    padding: 4rem 2rem;
    background: var(--bg-secondary);
    position: relative;
    overflow: hidden;
}

.testimonials-container {
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
}

.testimonials-track {
    display: flex;
    transition: transform 0.5s ease;
    gap: 2rem;
    padding: 1rem 0;
}

.testimonial-card {
    min-width: 300px;
    flex: 1;
    background: var(--bg-card);
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    border: 2px solid #e2e8f0;
    transition: all var(--transition-normal);
}

.testimonial-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(59, 130, 246, 0.1);
    border-color: #3b82f6;
}

.testimonial-content {
    font-size: 1.1rem;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    line-height: 1.7;
    position: relative;
}

.testimonial-content::before {
    content: '"';
    font-size: 4rem;
    color: #e2e8f0;
    position: absolute;
    top: -1rem;
    left: -1rem;
    opacity: 0.5;
    font-family: serif;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.author-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
}

.author-info {
    flex: 1;
}

.author-name {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.author-title {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.testimonial-nav {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 2rem;
}

.testimonial-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #e2e8f0;
    cursor: pointer;
    transition: all var(--transition-normal);
}

.testimonial-dot.active {
    background: var(--primary-gradient);
    transform: scale(1.2);
}

.testimonial-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--bg-card);
    border: 2px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-normal);
    z-index: 1;
}

.testimonial-arrow:hover {
    background: var(--primary-gradient);
    border-color: transparent;
    color: white;
}

.testimonial-prev {
    left: 1rem;
}

.testimonial-next {
    right: 1rem;
}

@media (max-width: 768px) {
    .statistics-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .testimonial-card {
        min-width: calc(100vw - 4rem);
    }

    .testimonial-arrow {
        display: none;
    }
}

/* Animation Keyframes */
@keyframes countUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Welcome Section */
.welcome-section {
    padding: 6rem 2rem;
    text-align: center;
    background: linear-gradient(135deg, var(--bg-primary), var(--bg-secondary));
    position: relative;
    overflow: hidden;
}

.welcome-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: titleGlow 2s ease-in-out infinite alternate;
}

.welcome-subtitle {
    font-size: 1.5rem;
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.explore-button {
    display: inline-block;
    padding: 1rem 2.5rem;
    font-size: 1.2rem;
    font-weight: 600;
    color: white;
    background: var(--primary-gradient);
    border-radius: 50px;
    text-decoration: none;
    transition: all var(--transition-normal);
    border: none;
    cursor: pointer;
}

.explore-button:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 10px 20px rgba(79, 70, 229, 0.2);
}

@media (max-width: 768px) {
    .welcome-section {
        padding: 4rem 1rem;
    }
    
    .welcome-title {
        font-size: 2.5rem;
    }
    
    .welcome-subtitle {
        font-size: 1.2rem;
        padding: 0 1rem;
    }
}

/* Responsive Adjustments */
@media (max-width: 1200px) {
    .categories-grid,
    .tools-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 992px) {
    .categories-grid,
    .tools-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .categories-grid,
    .tools-grid {
        grid-template-columns: 1fr;
    }
    
    .grid-container {
        padding: 1rem;
    }
    
    .category-card,
    .tool-card {
        padding: 1.25rem;
    }
}

/* Footer Styles */
.main-footer {
    background: #f8fafc;
    border-top: 1px solid #e5e7eb;
    padding: 4rem 0 2rem;
    margin-top: 4rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4rem;
}

.footer-section h3 {
    color: #1f2937;
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.footer-section p {
    color: #4b5563;
    line-height: 1.6;
}

.footer-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: #4b5563;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section a:hover {
    color: #2563eb;
}

.footer-bottom {
    max-width: 1200px;
    margin: 2rem auto 0;
    padding: 2rem 1rem 0;
    border-top: 1px solid #e5e7eb;
    text-align: center;
    color: #6b7280;
}

#back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: #2563eb;
    color: white;
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 999;
}

#back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

#back-to-top:hover {
    background: #1d4ed8;
    transform: translateY(-2px);
}

/* Responsive Styles */
@media (max-width: 1024px) {
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
        gap: 3rem;
    }
}

@media (max-width: 768px) {
    .nav-container {
        flex-wrap: wrap;
    }

    .main-nav {
        order: 3;
        width: 100%;
        margin-top: 1rem;
    }

    .main-nav ul {
        justify-content: center;
    }

    .search-container {
        max-width: none;
        order: 2;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }
}

@media (max-width: 640px) {
    .search-container {
        flex-direction: column;
    }

    #search-button {
        width: 100%;
        justify-content: center;
    }

    .main-nav ul {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }
} 