/* Custom styles for chatlist.fyi - Unique Design System */

:root {
    /* Light Mode Colors */
    --bg-primary: #ffffff;
    --bg-secondary: #f9fafb;
    --bg-tertiary: #f3f4f6;
    --text-primary: #111827;
    --text-secondary: #6b7280;
    --text-tertiary: #9ca3af;
    --border-color: #e5e7eb;
    --card-bg: rgba(255, 255, 255, 0.95);
    --card-border: rgba(255, 255, 255, 0.3);

    /* Gradients (same for both modes) */
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-accent: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --gradient-success: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    --gradient-premium: linear-gradient(135deg, #ffd89b 0%, #19547b 100%);

    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(102, 126, 234, 0.1);
    --shadow-md: 0 8px 24px rgba(102, 126, 234, 0.15);
    --shadow-lg: 0 16px 48px rgba(102, 126, 234, 0.2);
}

/* Dark Mode */
.dark {
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-tertiary: #334155;
    --text-primary: #f1f5f9;
    --text-secondary: #cbd5e1;
    --text-tertiary: #94a3b8;
    --border-color: #334155;
    --card-bg: rgba(30, 41, 59, 0.9);
    --card-border: rgba(51, 65, 85, 0.5);

    /* Softer shadows for dark mode */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.5);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.6);
    --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.7);
}

/* Custom Card Styles with Glassmorphism */
.card {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border-radius: 1rem;
    border: 1px solid var(--card-border);
    box-shadow: var(--shadow-sm);
    padding: 1.75rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-primary);
    opacity: 0;
    transition: opacity 0.3s;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(102, 126, 234, 0.3);
}

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

/* Featured Card with Glow Effect */
.featured-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.98) 0%, rgba(240, 242, 255, 0.98) 100%);
    border: 2px solid transparent;
    background-clip: padding-box;
    box-shadow: 0 0 0 1px rgba(102, 126, 234, 0.2), var(--shadow-md);
    position: relative;
}

.featured-card::after {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: var(--gradient-primary);
    border-radius: 1rem;
    z-index: -1;
    opacity: 0.5;
}

.featured-card:hover {
    transform: translateY(-6px) scale(1.02);
}

/* Premium Badge with Shimmer Effect */
.premium-badge {
    background: var(--gradient-premium);
    color: white;
    padding: 0.35rem 0.85rem;
    font-size: 0.7rem;
    font-weight: 800;
    border-radius: 9999px;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 12px rgba(255, 216, 155, 0.4);
    position: relative;
    overflow: hidden;
}

.premium-badge::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    100% {
        left: 100%;
    }
}

/* Custom Badges with Gradients */
.badge {
    padding: 0.35rem 0.85rem;
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: 0.5rem;
    letter-spacing: 0.3px;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.badge-free {
    background: linear-gradient(135deg, #d4fc79 0%, #96e6a1 100%);
    color: #1a5f3a;
}

.badge-freemium {
    background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
    color: #4a1d5c;
}

.badge-paid {
    background: linear-gradient(135deg, #fbc2eb 0%, #a6c1ee 100%);
    color: #4a1d5c;
}

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

/* Custom Button Styles */
.btn-primary {
    background: var(--gradient-primary);
    color: white;
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    border-radius: 0.75rem;
    transition: all 0.3s;
    box-shadow: 0 4px 14px rgba(102, 126, 234, 0.3);
    border: none;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
}

/* Category Cards with Hover Effects */
.category-card {
    background: white;
    border-radius: 1rem;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s;
    border: 2px solid transparent;
    cursor: pointer;
}

.category-card:hover {
    transform: translateY(-8px) scale(1.05);
    border-color: rgba(102, 126, 234, 0.3);
    box-shadow: var(--shadow-lg);
}

/* Floating Animation */
@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

.float-animation {
    animation: float 3s ease-in-out infinite;
}

/* Gradient Backgrounds */
.bg-gradient-primary {
    background: var(--gradient-primary);
}

.bg-gradient-hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
}

/* Logo/Avatar Styles */
.chatbot-avatar {
    position: relative;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: all 0.3s;
}

.chatbot-avatar::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--gradient-primary);
    opacity: 0;
    transition: opacity 0.3s;
}

.card:hover .chatbot-avatar::before {
    opacity: 0.1;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: var(--gradient-primary);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: #667eea;
}

/* Neon Glow Effect for CTAs */
.neon-glow {
    box-shadow: 0 0 10px rgba(102, 126, 234, 0.5),
                0 0 20px rgba(102, 126, 234, 0.3),
                0 0 30px rgba(102, 126, 234, 0.2);
}

/* Comparison Table Styling */
.comparison-row:hover {
    background: linear-gradient(90deg, rgba(102, 126, 234, 0.05) 0%, transparent 100%);
}

/* Pros/Cons Custom Styling */
.pro-item {
    display: flex;
    align-items: start;
    gap: 0.75rem;
    padding: 0.75rem;
    border-radius: 0.5rem;
    background: linear-gradient(135deg, rgba(212, 252, 121, 0.1) 0%, rgba(150, 230, 161, 0.1) 100%);
    border-left: 3px solid #96e6a1;
}

.con-item {
    display: flex;
    align-items: start;
    gap: 0.75rem;
    padding: 0.75rem;
    border-radius: 0.5rem;
    background: linear-gradient(135deg, rgba(255, 114, 94, 0.1) 0%, rgba(255, 103, 132, 0.1) 100%);
    border-left: 3px solid #ff7272;
}

/* Dark Mode Specific Styles */
.dark .category-card {
    background: var(--bg-secondary);
    border-color: var(--border-color);
}

.dark .category-card:hover {
    background: var(--bg-tertiary);
}

/* Theme Toggle Button */
.theme-toggle {
    position: relative;
    width: 60px;
    height: 30px;
    background: var(--bg-tertiary);
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s;
    border: 2px solid var(--border-color);
}

.theme-toggle:hover {
    border-color: rgba(102, 126, 234, 0.5);
}

.theme-toggle-slider {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 22px;
    height: 22px;
    background: white;
    border-radius: 50%;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.dark .theme-toggle {
    background: var(--gradient-primary);
    border-color: transparent;
}

.dark .theme-toggle-slider {
    left: 32px;
    background: #1f2937;
    color: white;
}

/* Smooth transition for theme change */
body {
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    transition: background-color 0.3s, color 0.3s;
}

/* Enhanced Dark Mode Styles */
.dark .featured-card {
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.98) 0%, rgba(51, 65, 85, 0.98) 100%);
    border-color: rgba(102, 126, 234, 0.4);
}

.dark .featured-card::after {
    opacity: 0.3;
}

/* Badge adjustments for dark mode */
.dark .badge-free {
    background: linear-gradient(135deg, #166534 0%, #15803d 100%);
    color: #bbf7d0;
}

.dark .badge-freemium {
    background: linear-gradient(135deg, #1e3a8a 0%, #6366f1 100%);
    color: #c7d2fe;
}

.dark .badge-paid {
    background: linear-gradient(135deg, #581c87 0%, #7c3aed 100%);
    color: #e9d5ff;
}

/* Pro/Con items in dark mode */
.dark .pro-item {
    background: linear-gradient(135deg, rgba(22, 101, 52, 0.2) 0%, rgba(21, 128, 61, 0.2) 100%);
    border-left-color: #4ade80;
}

.dark .con-item {
    background: linear-gradient(135deg, rgba(127, 29, 29, 0.2) 0%, rgba(185, 28, 28, 0.2) 100%);
    border-left-color: #f87171;
}

/* Search input and form elements */
.dark input[type="text"],
.dark input[type="search"],
.dark select,
.dark textarea {
    background-color: var(--bg-tertiary);
    border-color: var(--border-color);
    color: var(--text-primary);
}

.dark input::placeholder {
    color: var(--text-tertiary);
}

/* Better text contrast in dark mode */
.dark h1, .dark h2, .dark h3, .dark h4, .dark h5, .dark h6 {
    color: var(--text-primary);
}

.dark p {
    color: var(--text-secondary);
}

/* Links in dark mode */
.dark a:not(.btn-primary):not([class*="bg-"]) {
    color: #93c5fd;
}

.dark a:not(.btn-primary):not([class*="bg-"]):hover {
    color: #bfdbfe;
}
