/* ============================================
   BEST AI ONLINE - LIGHT THEME DESIGN SYSTEM
   ============================================ */

/* === IMPORTS === */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;600;700;800&display=swap');

/* === CSS VARIABLES === */
:root {
    /* Colors - Light Theme */
    --primary-gradient: linear-gradient(135deg, #6366f1 0%, #3b82f6 100%);
    --accent-gradient: linear-gradient(135deg, #06b6d4 0%, #14b8a6 100%);
    --purple-gradient: linear-gradient(135deg, #a855f7 0%, #ec4899 100%);
    --orange-gradient: linear-gradient(135deg, #f59e0b 0%, #ef4444 100%);
    --green-gradient: linear-gradient(135deg, #10b981 0%, #059669 100%);

    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-tertiary: #f1f5f9;
    --bg-card: #ffffff;
    --bg-card-hover: #f8fafc;

    --text-primary: #1e293b;
    --text-secondary: #334155;
    --text-muted: #64748b;

    --border-color: #e2e8f0;
    --border-hover: #cbd5e1;

    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;
    --spacing-2xl: 4rem;

    /* Border Radius */
    --radius-sm: 0.5rem;
    --radius-md: 1rem;
    --radius-lg: 1.5rem;
    --radius-xl: 2rem;

    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;

    /* Shadows - Light Theme */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-card: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-card-hover: 0 10px 20px -5px rgba(0, 0, 0, 0.1), 0 6px 8px -3px rgba(0, 0, 0, 0.06);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 18px;
    line-height: 1.75;
    letter-spacing: 0.01em;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Subtle background gradient */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(circle at 20% 30%, rgba(99, 102, 241, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(6, 182, 212, 0.02) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

/* === TYPOGRAPHY === */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: var(--spacing-md);
    color: var(--text-primary);
}

h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
}

h2 {
    font-size: clamp(2rem, 4vw, 3rem);
}

h3 {
    font-size: clamp(1.5rem, 3vw, 2rem);
}

p {
    margin-bottom: 1.25rem;
    color: var(--text-primary);
    line-height: 1.75;
}

a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition-fast);
}

/* Inline text links in content areas */
p a,
.tool-description a,
.page-subtitle a {
    color: #2563eb;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 2px;
    transition: all var(--transition-fast);
}

p a:hover,
.tool-description a:hover,
.page-subtitle a:hover {
    color: #1d4ed8;
    text-decoration-thickness: 2px;
}

/* === LAYOUT === */
.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 var(--spacing-lg);
    position: relative;
    z-index: 1;
}

/* === HEADER & NAVIGATION === */
header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    padding: var(--spacing-md) 0;
    box-shadow: var(--shadow-sm);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--spacing-lg);
}

.logo {
    font-family: 'Outfit', sans-serif;
    font-size: 1.5rem;
    font-weight: 800;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    white-space: nowrap;
}

nav ul {
    display: flex;
    list-style: none;
    gap: var(--spacing-lg);
    align-items: center;
}

nav a {
    color: var(--text-secondary);
    font-weight: 500;
    position: relative;
    transition: color var(--transition-fast);
}

nav a:hover {
    color: var(--text-primary);
}

nav a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-gradient);
    transition: width var(--transition-normal);
}

nav a:hover::after {
    width: 100%;
}

/* === HERO SECTION === */
.hero {
    padding: var(--spacing-2xl) 0;
    text-align: center;
    background: var(--bg-primary);
}

.hero h1 {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: var(--spacing-md);
    animation: fadeInUp 0.8s ease;
}

.hero p {
    font-size: 1.25rem;
    color: var(--text-muted);
    max-width: 800px;
    margin: 0 auto var(--spacing-xl);
    animation: fadeInUp 0.8s ease 0.2s backwards;
}

/* === CATEGORY GRID === */
.categories-section {
    padding: var(--spacing-xl) 0 var(--spacing-2xl);
}

.section-title {
    text-align: center;
    margin-bottom: var(--spacing-xl);
    animation: fadeInUp 0.8s ease;
    color: var(--text-primary);
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-xl);
}

.category-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    position: relative;
    overflow: hidden;
    transition: all var(--transition-normal);
    cursor: pointer;
    animation: fadeInUp 0.6s ease backwards;
    box-shadow: var(--shadow-card);
}

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

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

.category-card:hover {
    transform: translateY(-8px);
    background: var(--bg-card-hover);
    box-shadow: var(--shadow-card-hover);
    border-color: var(--border-hover);
}

.category-card h3 {
    font-size: 1.5rem;
    margin-bottom: var(--spacing-sm);
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.category-card p {
    color: var(--text-secondary);
    margin-bottom: var(--spacing-md);
    font-size: 0.95rem;
}

.category-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #3b82f6;
    font-weight: 600;
    font-size: 0.9rem;
    transition: gap var(--transition-fast);
}

.category-card:hover .category-link {
    gap: 0.75rem;
}

/* Stagger animation delay for cards */
.category-card:nth-child(1) {
    animation-delay: 0.1s;
}

.category-card:nth-child(2) {
    animation-delay: 0.15s;
}

.category-card:nth-child(3) {
    animation-delay: 0.2s;
}

.category-card:nth-child(4) {
    animation-delay: 0.25s;
}

.category-card:nth-child(5) {
    animation-delay: 0.3s;
}

.category-card:nth-child(6) {
    animation-delay: 0.35s;
}

.category-card:nth-child(7) {
    animation-delay: 0.4s;
}

.category-card:nth-child(8) {
    animation-delay: 0.45s;
}

.category-card:nth-child(9) {
    animation-delay: 0.5s;
}

.category-card:nth-child(10) {
    animation-delay: 0.55s;
}

.category-card:nth-child(11) {
    animation-delay: 0.6s;
}

.category-card:nth-child(12) {
    animation-delay: 0.65s;
}

/* === CATEGORY PAGE STYLES === */
.page-header {
    padding: var(--spacing-2xl) 0 var(--spacing-xl);
    text-align: center;
    position: relative;
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
}

.page-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    height: 100%;
    background: var(--primary-gradient);
    opacity: 0.03;
    border-radius: var(--radius-xl);
    filter: blur(60px);
}

.page-header h1 {
    position: relative;
    z-index: 1;
}

.page-subtitle {
    font-size: clamp(1rem, 2vw, 1.25rem);
    color: var(--text-muted);
    margin-top: var(--spacing-md);
    line-height: 1.75;
}

/* === INTRO SECTION === */
.intro-section {
    padding: var(--spacing-2xl) 0;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-bottom: 1px solid var(--border-color);
}

.intro-section p {
    max-width: 900px;
    margin: 0 auto var(--spacing-lg);
    line-height: 1.75;
    color: var(--text-primary);
}

.intro-section p:last-child {
    margin-bottom: 0;
}

.intro-section strong {
    color: var(--text-primary);
    font-weight: 600;
}

.small-text {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.tools-section {
    padding: var(--spacing-xl) 0;
}

.tool-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: var(--spacing-xl);
    margin-bottom: var(--spacing-xl);
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-card);
}

.tool-card::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 200px;
    height: 200px;
    background: var(--primary-gradient);
    opacity: 0.02;
    border-radius: 50%;
    transform: translate(50%, -50%);
    transition: all var(--transition-slow);
}

.tool-card:hover::after {
    transform: translate(30%, -30%) scale(1.5);
    opacity: 0.04;
}

.tool-card:hover {
    transform: translateX(8px);
    border-color: var(--border-hover);
    box-shadow: var(--shadow-lg);
}

.tool-header {
    margin-bottom: var(--spacing-md);
}

.tool-number {
    position: absolute;
    top: 24px;
    right: 24px;
    width: 80px;
    height: 80px;
    background: var(--primary-gradient);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    font-weight: 800;
    color: white;
    box-shadow: var(--shadow-lg);
    opacity: 0.95;
    z-index: 5;
}

.tool-card h3 {
    font-size: 2rem;
    margin-bottom: var(--spacing-xs);
    color: var(--text-primary);
}

.tool-tagline {
    color: var(--text-muted);
    font-style: italic;
    margin-bottom: var(--spacing-md);
}

.tool-description {
    color: var(--text-primary);
    line-height: 1.75;
    letter-spacing: 0.01em;
    margin-bottom: var(--spacing-lg);
}

.tool-description p {
    margin-bottom: 1.25rem;
}

.tool-features {
    background: rgba(99, 102, 241, 0.04);
    border-left: 3px solid #6366f1;
    padding: var(--spacing-md);
    border-radius: var(--radius-sm);
    margin-bottom: var(--spacing-lg);
}

.tool-features h4 {
    font-size: 1rem;
    margin-bottom: var(--spacing-sm);
    color: var(--text-primary);
}

.tool-features ul {
    list-style: none;
    padding-left: 0;
}

.tool-features li {
    padding: 0.5rem 0;
    color: var(--text-secondary);
    position: relative;
    padding-left: 1.5rem;
}

.tool-features li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #10b981;
    font-weight: bold;
}

/* === TOOL IMAGE === */
.tool-image {
    width: 100%;
    max-width: 600px;
    margin: var(--spacing-xl) auto;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    background: var(--bg-tertiary);
}

.tool-image img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

/* === IMAGE CAROUSEL === */
.tool-carousel {
    position: relative;
    width: 100%;
    max-width: 600px;
    margin: var(--spacing-xl) auto;
    border-radius: var(--radius-md);
    overflow: hidden;
    background: var(--bg-tertiary);
    box-shadow: var(--shadow-md);
}

.carousel-container {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    /* 16:9 aspect ratio */
    overflow: hidden;
}

.carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
    display: flex;
    align-items: center;
    justify-content: center;
}

.carousel-slide.active {
    opacity: 1;
}

.carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.carousel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: white;
    border: none;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 10;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(10px);
}

.carousel-nav::before {
    content: '';
    width: 24px;
    height: 24px;
    display: block;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

.carousel-nav.prev::before {
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2.5' d='M15 19l-7-7 7-7' fill='none' stroke='%236366f1'/%3E%3C/svg%3E");
}

.carousel-nav.next::before {
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2.5' d='M9 19l7-7-7-7' fill='none' stroke='%236366f1'/%3E%3C/svg%3E");
}

.carousel-nav:hover {
    background: linear-gradient(135deg, #6366f1 0%, #3b82f6 100%);
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.4);
    transform: translateY(-50%) scale(1.15);
}

.carousel-nav.prev:hover::before {
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2.5' d='M15 19l-7-7 7-7' fill='none' stroke='white'/%3E%3C/svg%3E");
}

.carousel-nav.next:hover::before {
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2.5' d='M9 19l7-7-7-7' fill='none' stroke='white'/%3E%3C/svg%3E");
}

.carousel-nav:hover svg {
    color: white;
}

.carousel-nav.prev {
    left: 15px;
}

.carousel-nav.next {
    right: 15px;
}

.carousel-nav svg {
    width: 24px;
    height: 24px;
    color: #6366f1;
    transition: all 0.3s ease;
}

.carousel-nav:hover svg {
    color: white;
}

.carousel-dots {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
}

.carousel-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(99, 102, 241, 0.3);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.carousel-dot.active {
    background: #6366f1;
    width: 24px;
    border-radius: 4px;
}

.carousel-dot:hover {
    background: rgba(99, 102, 241, 0.7);
}


/* === BUTTONS === */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all var(--transition-fast);
    border: none;
    text-decoration: none;
}

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

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

.btn-secondary {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-hover);
}

/* === FOOTER === */
footer {
    background: var(--bg-primary);
    border-top: 1px solid var(--border-color);
    padding: var(--spacing-xl) 0;
    margin-top: var(--spacing-2xl);
    text-align: center;
}

.footer-content {
    color: var(--text-muted);
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: var(--spacing-lg);
    list-style: none;
    margin-top: var(--spacing-md);
    flex-wrap: wrap;
}

.footer-links a {
    color: var(--text-secondary);
}

.footer-links a:hover {
    color: var(--text-primary);
}

/* === ANIMATIONS === */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

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

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* === RESPONSIVE === */
@media (max-width: 1024px) {
    .categories-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }
}

@media (max-width: 768px) {
    :root {
        --spacing-xl: 2rem;
        --spacing-2xl: 3rem;
    }

    .nav-container {
        flex-direction: column;
        gap: var(--spacing-sm);
    }

    nav ul {
        flex-wrap: wrap;
        justify-content: center;
        gap: var(--spacing-sm);
    }

    .categories-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .tool-card {
        padding: var(--spacing-lg);
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 var(--spacing-sm);
    }

    .category-card {
        padding: var(--spacing-md);
    }
}

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

.text-center {
    text-align: center;
}

.mb-sm {
    margin-bottom: var(--spacing-sm);
}

.mb-md {
    margin-bottom: var(--spacing-md);
}

.mb-lg {
    margin-bottom: var(--spacing-lg);
}

.mb-xl {
    margin-bottom: var(--spacing-xl);
}

.mt-sm {
    margin-top: var(--spacing-sm);
}

.mt-md {
    margin-top: var(--spacing-md);
}

.mt-lg {
    margin-top: var(--spacing-lg);
}

.mt-xl {
    margin-top: var(--spacing-xl);
}

/* Quick Navigation */
.quick-nav-section {
    background: var(--bg-secondary);
    padding: var(--spacing-xl) 0;
    border-bottom: 1px solid var(--border-color);
}

.quick-nav-section h3 {
    margin-bottom: var(--spacing-md);
    color: var(--text-primary);
    font-size: 1.1rem;
    font-weight: 600;
}

.quick-nav-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-sm);
}

.quick-nav-link {
    padding: 0.5rem 1rem;
    background: linear-gradient(135deg, #6366f1 0%, #3b82f6 100%);
    color: white;
    border-radius: 8px;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.2);
    border: 1px solid rgba(99, 102, 241, 0.3);
}

.quick-nav-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
    background: linear-gradient(135deg, #5558e3 0%, #2563eb 100%);
}

.quick-nav-link:active {
    transform: translateY(0);
}
/* Others Section */
.others-section {
    margin-top: var(--spacing-2xl);
    padding-top: var(--spacing-xl);
    border-top: 2px solid var(--border-color);
}

.others-section h2 {
    font-size: 2rem;
    margin-bottom: var(--spacing-lg);
    text-align: center;
    color: var(--text-primary);
}

.others-grid {
    display: grid;
    gap: var(--spacing-lg);
    max-width: 900px;
    margin: 0 auto;
}

.other-chatbot h3 {
    font-size: 1.25rem;
    margin-bottom: var(--spacing-sm);
    color: var(--text-primary);
}

.other-chatbot p {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* References Section */
.references-section {
    background: var(--bg-secondary);
    padding: var(--spacing-2xl) 0;
}

.references-section h2,
.references-section h3 {
    margin-bottom: var(--spacing-lg);
    color: var(--text-primary);
}

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

.references-section li {
    margin-bottom: var(--spacing-sm);
}

.references-section a {
    color: #2563eb;
    text-decoration: none;
}

.references-section a:hover {
    text-decoration: underline;
}
