/* ============================================
   AIToolsMarket - Public Website Enhanced Styles
   Modern SaaS / AI Marketplace Design
   ============================================ */

/* ===== CSS Variables for Dark Theme ===== */
:root {
    --primary-color: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #818cf8;
    --secondary-color: #8b5cf6;
    --accent-color: #06b6d4;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --dark-color: #0f172a;
    --light-color: #1e293b;
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --border-color: #334155;
    --bg-base: #0f172a;
    --bg-surface: #1e293b;
    --bg-elevated: #334155;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4), 0 2px 4px -1px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.4), 0 4px 6px -2px rgba(0, 0, 0, 0.3);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.5), 0 10px 10px -5px rgba(0, 0, 0, 0.3);
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-secondary: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --gradient-success: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    --gradient-hero: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
}

/* ===== Global Typography and Dark Background ===== */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: var(--text-primary);
    background-color: var(--bg-base);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

.display-1, .display-2, .display-3, .display-4, .display-5, .display-6 {
    font-weight: 800;
    letter-spacing: -0.03em;
}

.lead {
    font-size: 1.25rem;
    font-weight: 400;
    color: var(--text-secondary);
    line-height: 1.7;
}

/* ===== Sticky Navbar with Dark Theme ===== */
.navbar {
    background: rgba(15, 23, 42, 0.95) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-color);
}

.navbar.scrolled {
    box-shadow: var(--shadow-md);
    padding: 0.75rem 0;
}

.navbar-dark,
.navbar.navbar-dark {
    background: rgba(15, 23, 42, 0.95) !important;
    border-bottom: 1px solid var(--border-color);
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-light) !important;
    transition: transform 0.2s ease;
}

.navbar-brand:hover {
    transform: scale(1.05);
}

.navbar-dark .navbar-brand,
.navbar.navbar-dark .navbar-brand {
    color: #fff !important;
}

.nav-link {
    font-weight: 500;
    padding: 0.5rem 1rem !important;
    border-radius: 0.5rem;
    transition: all 0.2s ease;
    position: relative;
    color: rgba(241, 245, 249, 0.9) !important;
}

.nav-link:hover {
    background-color: rgba(99, 102, 241, 0.2);
    color: var(--primary-light) !important;
}

.nav-link.active {
    color: var(--primary-light) !important;
    background-color: rgba(99, 102, 241, 0.2);
}

.navbar-dark .nav-link,
.navbar.navbar-dark .nav-link {
    color: rgba(241, 245, 249, 0.9) !important;
}

.navbar-dark .nav-link:hover,
.navbar-dark .nav-link.active,
.navbar.navbar-dark .nav-link:hover,
.navbar.navbar-dark .nav-link.active {
    color: #fff !important;
    background-color: rgba(99, 102, 241, 0.25);
}

/* ===== Modern Hero Section ===== */
.hero-section {
    background: var(--gradient-hero);
    position: relative;
    overflow: hidden;
    padding: 6rem 0;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><defs><pattern id="grid" width="100" height="100" patternUnits="userSpaceOnUse"><path d="M 100 0 L 0 0 0 100" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="1"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    opacity: 0.3;
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    color: #fff;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

.hero-subtitle {
    font-size: 1.5rem;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.95);
    margin-bottom: 2rem;
    line-height: 1.6;
}

.hero-cta {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

/* ===== Modern Button Styles ===== */
.btn {
    border-radius: 0.75rem;
    font-weight: 600;
    padding: 0.75rem 2rem;
    transition: all 0.3s ease;
    border: none;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn-primary {
    background: var(--gradient-primary);
    color: #fff;
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    color: #fff;
}

.btn-outline-primary {
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    background: transparent;
}

.btn-outline-primary:hover {
    background: var(--primary-color);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-light {
    background: var(--bg-elevated);
    color: var(--primary-light);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-md);
}

.btn-light:hover {
    background: var(--bg-surface);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    color: var(--primary-light);
    border-color: var(--primary-color);
}

.btn-lg {
    padding: 1rem 2.5rem;
    font-size: 1.125rem;
}

/* ===== Enhanced Card Styles (Dark) ===== */
.card {
    border: 1px solid var(--border-color);
    border-radius: 1rem;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
    overflow: hidden;
    background: var(--bg-surface);
    color: var(--text-primary);
}

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

.card-img-top {
    border-radius: 1rem 1rem 0 0;
    transition: transform 0.3s ease;
}

.card:hover .card-img-top {
    transform: scale(1.05);
}

/* ===== Pricing Cards Enhancement ===== */
.pricing-card {
    position: relative;
    border-radius: 1.5rem;
    overflow: visible;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.pricing-card:hover {
    transform: translateY(-12px) scale(1.02);
}

.pricing-card.popular {
    border: 3px solid var(--primary-color);
    box-shadow: 0 20px 40px rgba(99, 102, 241, 0.3);
    transform: scale(1.05);
}

.pricing-card.popular::before {
    content: '';
    position: absolute;
    top: -3px;
    left: -3px;
    right: -3px;
    bottom: -3px;
    background: var(--gradient-primary);
    border-radius: 1.5rem;
    z-index: -1;
    opacity: 0.1;
}

.pricing-badge {
    position: absolute;
    top: -12px;
    right: 20px;
    background: var(--gradient-primary);
    color: #fff;
    padding: 0.5rem 1.5rem;
    border-radius: 2rem;
    font-weight: 700;
    font-size: 0.875rem;
    box-shadow: var(--shadow-lg);
    z-index: 10;
}

.pricing-price {
    font-size: 3.5rem;
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
}

.pricing-features {
    list-style: none;
    padding: 0;
}

.pricing-features li {
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.pricing-features li:last-child {
    border-bottom: none;
}

.pricing-features li i {
    color: var(--success-color);
    font-size: 1.25rem;
    flex-shrink: 0;
}

/* ===== Tools Listing Cards ===== */
.tool-card {
    transition: all 0.3s ease;
}

.tool-card .card {
    border-radius: 1.25rem;
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.tool-card .card-img-top {
    height: 220px;
    object-fit: cover;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.tool-card .card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 1.5rem;
}

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

.tool-card .card-text {
    color: var(--text-secondary);
    flex-grow: 1;
    margin-bottom: 1rem;
    line-height: 1.6;
}

.tool-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary-color);
    padding: 0.25rem 0.75rem;
    border-radius: 2rem;
    font-size: 0.875rem;
    font-weight: 600;
}

.tool-price {
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary-color);
    line-height: 1;
}

/* ===== Features Section (Dark) ===== */
.feature-card {
    text-align: center;
    padding: 2rem;
    border-radius: 1.25rem;
    height: 100%;
    transition: all 0.3s ease;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
}

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

.feature-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-primary);
    border-radius: 1.5rem;
    color: #fff;
    font-size: 2.5rem;
    box-shadow: var(--shadow-lg);
}

.feature-card h4 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.feature-card p {
    color: var(--text-secondary);
    line-height: 1.7;
}

/* ===== CTA Section (Dark) ===== */
.cta-section {
    background: linear-gradient(135deg, var(--bg-surface) 0%, var(--bg-elevated) 100%);
    border: 1px solid var(--border-color);
    border-radius: 2rem;
    padding: 4rem 2rem;
    margin: 4rem 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.cta-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.1) 0%, transparent 70%);
    animation: pulse 4s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.1); opacity: 0.8; }
}

.cta-content {
    position: relative;
    z-index: 1;
}

/* ===== Enhanced Footer ===== */
footer {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    color: #fff;
    padding: 4rem 0 2rem;
    margin-top: 5rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-section h5 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: #fff;
}

.footer-section p,
.footer-section a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: color 0.2s ease;
    line-height: 2;
}

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

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

.footer-links li {
    margin-bottom: 0.75rem;
}

.footer-links a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 2rem;
    text-align: center;
    color: rgba(255, 255, 255, 0.6);
}

.footer-brand {
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 1rem;
    display: inline-block;
}

/* ===== Search Section (Dark) ===== */
.search-section {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: var(--shadow-md);
    margin-bottom: 2rem;
}

.search-input-group {
    position: relative;
}

.search-input-group .form-control {
    border-radius: 0.75rem;
    border: 2px solid var(--border-color);
    padding: 0.875rem 1.25rem 0.875rem 3.5rem;
    font-size: 1rem;
    transition: all 0.2s ease;
    background-color: var(--bg-base);
    color: var(--text-primary);
}

.search-input-group .form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.search-input-group .input-group-text {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    z-index: 5;
    background: transparent;
    border: none;
    color: var(--text-secondary);
}

[data-bs-theme="dark"] .dropdown-menu {
    background-color: var(--bg-surface);
    border-color: var(--border-color);
}

[data-bs-theme="dark"] .dropdown-item {
    color: var(--text-primary);
}

[data-bs-theme="dark"] .dropdown-item:hover,
[data-bs-theme="dark"] .dropdown-item:focus {
    background-color: var(--bg-elevated);
    color: var(--text-primary);
}

[data-bs-theme="dark"] .dropdown-divider {
    border-color: var(--border-color);
}

/* ===== Section Spacing ===== */
.section {
    padding: 5rem 0;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 800;
    text-align: center;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.section-subtitle {
    font-size: 1.25rem;
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 3rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* ===== Responsive Design ===== */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.25rem;
    }
    
    .hero-section {
        padding: 4rem 0;
    }
    
    .section {
        padding: 3rem 0;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .pricing-card.popular {
        transform: scale(1);
        margin-top: 2rem;
    }
    
    .pricing-price {
        font-size: 2.5rem;
    }
    
    .btn-lg {
        padding: 0.875rem 2rem;
        font-size: 1rem;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

@media (max-width: 576px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1.125rem;
    }
    
    .hero-cta {
        flex-direction: column;
    }
    
    .hero-cta .btn {
        width: 100%;
    }
}

/* ===== Smooth Scrolling ===== */
html {
    scroll-behavior: smooth;
}

/* ===== Loading Animation ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

/* ===== Utility Classes ===== */
.text-gradient {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.bg-gradient-primary {
    background: var(--gradient-primary);
}

.bg-gradient-secondary {
    background: var(--gradient-secondary);
}

.shadow-soft {
    box-shadow: var(--shadow-md);
}

.rounded-xl {
    border-radius: 1.5rem;
}

.rounded-2xl {
    border-radius: 2rem;
}
