/* Reset and Base Styles - Mobile First */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Prevent horizontal overflow issues */
img, video, iframe, svg {
    max-width: 100%;
    height: auto;
}

/* Ensure text doesn't overflow */
p, h1, h2, h3, h4, h5, h6, span, div {
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* Loading Indicator */
.loading-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 2.5rem 0;
    color: #4b5563;
}

.loading-indicator.hidden {
    display: none !important;
}

.spinner {
    width: 2.5rem;
    height: 2.5rem;
    border: 3px solid #f3f4f6;
    border-top: 3px solid #1f2937;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-indicator p {
    margin: 0;
    font-size: 1.05rem;
}

/* Icon loader: hide fallback once image is loaded */
.tool-icon .favicon-icon.icon-loaded + .fallback-icon,
.tool-icon-large .favicon-icon.icon-loaded + .fallback-icon {
    display: none !important;
}

/* Ensure favicon images are visible by default */
.tool-icon .favicon-icon,
.tool-icon-large .favicon-icon {
    display: block;
}

/* Desktop scrolling architecture */
html {
    height: 100%;
    overflow-x: hidden;
    /* Allow vertical scrolling on mobile, prevent on desktop */
    overflow-y: auto;
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-weight: 400; /* Ensure default text weight is normal */
    background-color: #f8f9fa;
    color: #333;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh; /* Changed from height to min-height */
    /* Mobile-first responsive font size */
    overflow-x: hidden;
    /* Allow natural scrolling on mobile */
    overflow-y: auto;
    font-size: clamp(16px, 4vw, 18px);
    width: 100%;
    box-sizing: border-box;
}

/* Typography Hierarchy */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: -0.025em;
    margin: 0;
    color: #1a202c;
}

h1 {
    font-size: clamp(1.75rem, 4vw, 3.5rem);
    font-weight: 700;
    letter-spacing: -0.05em;
    line-height: 1.1;
}

h2 {
    font-size: clamp(1.5rem, 3.5vw, 2.5rem);
    font-weight: 600;
    letter-spacing: -0.03em;
    margin-bottom: 1.5rem;
}

h3 {
    font-size: clamp(1.25rem, 3vw, 1.875rem);
    font-weight: 600;
    margin-bottom: 1rem;
}

h4 {
    font-size: clamp(1.125rem, 2.5vw, 1.5rem);
    font-weight: 600;
    margin-bottom: 0.75rem;
}

h5 {
    font-size: 1.25rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

h6 {
    font-size: 1.125rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

/* Text Elements */
p {
    font-size: 1rem;
    line-height: 1.7;
    margin-bottom: 1rem;
    color: #4a5568;
}

.text-large {
    font-size: 1.125rem;
    line-height: 1.6;
}

.text-small {
    font-size: 0.875rem;
    line-height: 1.5;
}

.text-xs {
    font-size: 0.75rem;
    line-height: 1.4;
}

.font-bold {
    font-weight: 700;
}

.font-semibold {
    font-weight: 600;
}

.font-medium {
    font-weight: 500;
}

.text-muted {
    color: #6b7280;
}

/* Spacing Utilities */
.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-5 { margin-bottom: 1.25rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }
.mb-10 { margin-bottom: 2.5rem; }
.mb-12 { margin-bottom: 3rem; }

.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 0.75rem; }
.mt-4 { margin-top: 1rem; }
.mt-5 { margin-top: 1.25rem; }
.mt-6 { margin-top: 1.5rem; }
.mt-8 { margin-top: 2rem; }
.mt-10 { margin-top: 2.5rem; }
.mt-12 { margin-top: 3rem; }

.py-1 { padding-top: 0.25rem; padding-bottom: 0.25rem; }
.py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.py-3 { padding-top: 0.75rem; padding-bottom: 0.75rem; }
.py-4 { padding-top: 1rem; padding-bottom: 1rem; }
.py-6 { padding-top: 1.5rem; padding-bottom: 1.5rem; }
.py-8 { padding-top: 2rem; padding-bottom: 2rem; }

.px-1 { padding-left: 0.25rem; padding-right: 0.25rem; }
.px-2 { padding-left: 0.5rem; padding-right: 0.5rem; }
.px-3 { padding-left: 0.75rem; padding-right: 0.75rem; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }
.px-8 { padding-left: 2rem; padding-right: 2rem; }

/* Header Styles */
.header {
    background: white;
    color: #1f2937;
    padding: 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    position: sticky;
    top: 0;
    z-index: 9999;
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.header-content {
    width: 100%;
    margin: 0;
    padding: 0 24px 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    height: 88px;
    position: relative;
    z-index: 1;
}

/* Search Box Styles */
.search-container {
    flex: 1;
    max-width: 400px;
}

.search-box {
    display: flex;
    align-items: center;
    background: #ffffff;
    border-radius: 12px;
    padding: 12px 16px;
    border: 1px solid #e5e7eb;
    transition: all 0.2s ease;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.search-box:focus-within {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.search-box i {
    color: #6b7280;
    margin-right: 12px;
    font-size: 16px;
}

.search-box input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: #1f2937;
    font-size: 14px;
    font-family: 'Inter', sans-serif;
    font-weight: 400;
}

.search-box input::placeholder {
    color: #9ca3af;
    font-weight: 400;
}

.search-btn, .clear-btn {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-left: 8px;
}

.search-btn:hover {
    background: #3b82f6;
    border-color: #3b82f6;
}

.search-btn:hover i {
    color: white;
}

.search-btn i {
    color: #6b7280;
    font-size: 14px;
}

.clear-btn {
    margin-left: 4px;
}

.clear-btn:hover {
    background: #ef4444;
    border-color: #ef4444;
}

.clear-btn:hover i {
    color: white;
}

.clear-btn i {
    color: #6b7280;
    font-size: 12px;
}

.logo {
    display: flex;
    align-items: center;
    color: #1f2937;
    transition: transform 0.2s ease;
    margin-right: auto;
}

.logo a {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: inherit;
}

.logo:hover {
    transform: translateY(-1px);
}

.logo-image {
    max-width: 100%; /* Responsive on smaller screens */
    object-fit: contain;
    border-radius: 20px;
    transition: all 0.3s ease;
    filter: drop-shadow(0 4px 16px rgba(0, 0, 0, 0.2));
    /* Optimize loading performance */
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

.logo:hover .logo-image {
    filter: drop-shadow(0 6px 20px rgba(0, 0, 0, 0.25));
    transform: scale(1.05);
}

.logo-placeholder {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-placeholder i {
    color: white;
    font-size: 20px;
}

/* Search Results Styles */
.search-results .section-header h2 {
    color: #2563eb;
}

.no-results .section-header {
    text-align: center;
    padding: 3rem 0;
}

.no-results .section-header h2 {
    color: #6b7280;
    margin-bottom: 1rem;
}

.no-results .section-header p {
    color: #9ca3af;
    font-size: 1.1rem;
}

.logo h1 {
    font-size: 30px;
    font-weight: 700;
    letter-spacing: -0.025em;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0;
}

/* Logo styles now handled by .logo-image class above */

.main-nav {
    display: flex;
    align-items: center;
    gap: 30px;
    position: relative;
}

/* Mobile Menu Toggle Button */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 2.5rem;
    height: 2.5rem;
    background: #f8f9fa;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 10;
    position: relative;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.mobile-menu-toggle:hover {
    background: #f1f3f4;
    border-color: #d1d5db;
    transform: scale(1.05);
}

.mobile-menu-toggle span {
    width: 1.5rem;
    height: 0.3rem;
    background: #374151;
    border-radius: 2px;
    transition: all 0.3s linear;
    position: relative;
    transform-origin: 1px;
    margin: 0 auto;
}

.mobile-menu-toggle.open span:first-child {
    transform: rotate(45deg);
}

.mobile-menu-toggle.open span:nth-child(2) {
    opacity: 0;
    transform: translateX(20px);
}

.mobile-menu-toggle.open span:nth-child(3) {
    transform: rotate(-45deg);
}

/* Mobile Overlay */
.mobile-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 998;
    opacity: 0;
    transition: opacity 0.3s ease;
    backdrop-filter: blur(2px);
    pointer-events: none; /* Prevent interference with touch events when not active */
}

.mobile-overlay.active {
    opacity: 1;
    pointer-events: auto; /* Enable pointer events when active */
}

/* Mobile Close Button */
.mobile-close-btn {
    display: none;
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    background: #f8f9fa;
    border: 2px solid #e5e7eb;
    border-radius: 50%;
    cursor: pointer;
    z-index: 1000;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: #374151;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.mobile-close-btn:hover {
    background: #f1f3f4;
    transform: scale(1.1);
}

/* Enhanced touch targets for mobile */
@media (max-width: 1024px) {
    button, .btn, .tool-card, .nav-item, .submit-btn, a[role="button"] {
        min-height: 44px;
        touch-action: manipulation;
        padding: clamp(12px, 3vw, 16px);
    }
    
    /* Ensure text is readable on mobile */
    button, .btn, .submit-btn, .nav-item {
        font-size: clamp(14px, 3.5vw, 16px);
        line-height: 1.4;
    }
    
    input, select, textarea {
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    .tool-card {
        cursor: pointer;
    }
    
    /* Improved scrolling on mobile */
    .sidebar {
        -webkit-overflow-scrolling: touch;
    }
    
    .main-content {
        -webkit-overflow-scrolling: touch;
        touch-action: pan-y; /* Allow vertical scrolling */
    }
    
    /* Better focus states for keyboard navigation */
    .mobile-menu-toggle:focus {
        outline: 2px solid #2563eb;
        outline-offset: 2px;
    }
}

/* Navigation Dropdown and Mega Menu */
.nav-dropdown {
    position: relative;
}

.mega-menu {
    position: absolute;
    top: 100%;
    left: -50px;
    background: white;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    padding: 2rem;
    min-width: 800px;
    z-index: 9999;
    opacity: 0 !important;
    visibility: hidden !important;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    display: none;
}

.nav-dropdown:hover .mega-menu {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateY(0);
    display: block;
}

.mega-menu-content {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
}

.mega-menu-column h4 {
    font-size: 14px;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e5e7eb;
}

.mega-menu-column a {
    display: block;
    padding: 0.5rem 0;
    color: #6b7280;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s ease;
}

.mega-menu-column a:hover {
    color: #2563eb;
}

.mega-menu-column .featured-link {
    font-weight: 500;
    color: #dc2626;
}

.nav-user-section {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-left: auto;
}

.user-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 14px;
}

.nav-link {
    color: #ecf0f1;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-link.active {
    color: #60a5fa;
    font-weight: 600;
}

.nav-link:hover {
    color: #3498db;
}

.submit-btn {
    background: #ffffff;
    color: #374151 !important;
    padding: 12px 16px !important;
    border-radius: 12px;
    font-weight: 500;
    transition: all 0.2s ease;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    border: 1px solid #e5e7eb;
    font-size: 14px;
}

.submit-btn:hover {
    background: #f9fafb;
    border-color: #d1d5db;
    color: #111827 !important;
}





/* Container Layout */
.container {
    display: flex;
    width: 100%; /* Use full width of parent */
    margin: 0;
    flex: 1;
    height: calc(100vh - 88px);
    align-items: flex-start;
    position: relative;
    overflow: visible; /* Allow dropdowns to extend outside */
}

/* Sidebar Styles */
.sidebar {
    width: 280px;
    background: white;
    border-right: 1px solid #e9ecef;
    padding: 20px 0;
    height: calc(100vh - 88px);
    overflow-y: auto;
    flex-shrink: 0;
    scrollbar-width: thin;
    scrollbar-color: #cbd5e0 #f8f9fa;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.nav-category {
    margin-bottom: 4px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 0 8px 8px 0;
    margin-right: 10px;
}

.nav-item:hover {
    background: #f8f9fa;
}

.nav-item.active {
    background: #e3f2fd;
    color: #1976d2;
    border-left: 3px solid #1976d2;
}

.nav-item i:first-child {
    width: 20px;
    color: #6c757d;
}

.nav-item span {
    flex: 1;
    font-weight: 500;
    cursor: pointer;
    padding: 2px 0;
    transition: color 0.3s ease;
}

.nav-item span:hover {
    color: #1976d2;
}

.nav-item i:last-child {
    font-size: 12px;
    color: #adb5bd;
    transition: transform 0.3s ease, color 0.3s ease;
    cursor: pointer;
    padding: 5px;
    border-radius: 4px;
    margin: -5px;
}

.nav-item i:last-child:hover {
    color: #495057;
    background: rgba(108, 117, 125, 0.1);
}

.nav-category.active .nav-item {
    background: #e3f2fd;
    color: #1976d2;
}

.nav-category.active .nav-item i:first-child {
    color: #1976d2;
}

.sub-categories {
    margin-left: 32px;
    margin-top: 4px;
    display: none;
    overflow: hidden;
    transition: all 0.3s ease;
}

.nav-category.expanded .sub-categories {
    display: block;
}

.nav-category.expanded .nav-item i:last-child,
.nav-item i:last-child.rotated {
    transform: rotate(90deg);
}

.sub-item {
    padding: 8px 20px;
    cursor: pointer;
    font-size: 14px;
    color: #6c757d;
    transition: all 0.3s ease;
    border-radius: 0 6px 6px 0;
    margin-right: 10px;
}

.sub-item:hover {
    background: #f8f9fa;
    color: #495057;
}

.sub-item.active {
    background: #ffebee;
    color: #d32f2f;
    font-weight: 500;
}




.content-title h2 {
    color: #1a202c;
    font-size: 32px;
    margin: 0 0 0.75rem 0;
    font-weight: 700;
    letter-spacing: -0.04em;
    line-height: 1.2;
}

.content-title p {
    color: #6b7280;
    font-size: 16px;
    margin: 0;
    line-height: 1.6;
}

.sorting-tabs {
    display: flex;
    gap: 0.5rem;
}

.sort-tab {
    background: #f3f4f6;
    border: none;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: #6b7280;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
}

.sort-tab:hover {
    background: #e5e7eb;
    color: #374151;
}

.sort-tab.active {
    background: #2563eb;
    color: white;
}

/* Filter Bar */

/* Main Content */
.main-content {
    flex: 1;
    padding: 16px clamp(8px, 2vw, 24px);
    background: #f8f9fa;
    display: flex;
    flex-direction: column;
    /* Use natural document scroll on mobile, container scroll on desktop */
    height: auto;
    min-height: calc(100vh - 88px);
    overflow-y: visible;
    /* Enable smooth scrolling for iOS */
    -webkit-overflow-scrolling: touch;
    overflow-x: visible; /* Allow dropdowns to extend horizontally */
    scroll-behavior: smooth;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
}

/* Hide main content scrollbar for cleaner appearance */
.main-content::-webkit-scrollbar {
    display: none;
}

/* Removed duplicate WebKit scrollbar rules to avoid conflicting styles */

/* Category Tabs */
.category-tabs {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.tab {
    padding: 8px 16px;
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    color: #6c757d;
}

.tab:hover {
    border-color: #3498db;
    color: #3498db;
}

.tab.active {
    background: #3498db;
    color: white;
    border-color: #3498db;
}

.more-btn {
    padding: 8px 16px;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: #6c757d;
    transition: all 0.3s ease;
}

.more-btn:hover {
    background: #e9ecef;
}

/* Category Sections */
.category-section {
    margin-bottom: 3rem;
    scroll-margin-top: 2rem;
}

.category-section .section-header {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #e5e7eb;
}

.category-section .section-header h2 {
    font-size: 2rem;
    font-weight: 600;
    color: #1a202c;
    margin-bottom: 0.5rem;
}

.category-section .section-header p {
    color: #6b7280;
    font-size: 1rem;
    margin: 0;
}

.category-tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
    overflow: visible; /* Allow dropdowns to extend outside grid */
}

/* Section Header and Tabs */
.section-header {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
    padding: 0;
}

.section-header h2 {
    font-size: 1.75rem;
    font-weight: 600;
    color: #1a202c;
    margin: 0;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e5e7eb;
}

.section-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
}

.section-tabs .tab {
    padding: 0.5rem 1rem;
    background: #f8f9fa;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    user-select: none;
}

.section-tabs .tab:hover {
    background: #e5e7eb;
    border-color: #d1d5db;
    color: #374151;
}

.section-tabs .tab.active {
    background: #2563eb;
    border-color: #2563eb;
    color: white;
}

.section-tabs .tab.active:hover {
    background: #1d4ed8;
    border-color: #1d4ed8;
}

@media (max-width: 768px) {
    .section-header {
        gap: 0.75rem;
        margin-bottom: 1.5rem;
    }
    
    .section-header h2 {
        font-size: 1.5rem;
    }
    
    .section-tabs {
        gap: 0.5rem;
    }
    
    .section-tabs .tab {
        padding: 0.375rem 0.75rem;
        font-size: 0.8125rem;
    }
}

/* Tools Grid */
.tools-grid {
    display: grid;
    /* Mobile First: Single column for mobile screens */
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 12px;
    margin-bottom: 24px;
    width: 100%;
    box-sizing: border-box;
}

/* Wider screens get more columns */
/* Tablet and above: 2 columns for wider video preview cards */
@media (min-width: 768px) {
    .tools-grid {
        grid-template-columns: 1fr 1fr;
        gap: 24px;
        padding: 16px;
    }
}


/* Large screens: Keep 2 columns with more spacing */
@media (min-width: 1024px) {
    .tools-grid {
        gap: 32px;
        padding: 20px;
        margin-bottom: 48px;
    }
}


.tool-card {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 16px;
    padding: 24px;
    display: block;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    text-align: left;
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
    height: auto;
    min-height: 500px;
}

.tool-card:hover {
    background: #f8f9fa;
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
    transform: translateY(-3px);
}

/* New tool card layout styles */
.tool-card-content {
    display: flex;
    flex-direction: column;
    gap: 16px;
    height: 100%;
}

.tool-header {
    display: flex;
    justify-content: flex-start;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 8px;
}

.tool-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: flex-start;
    margin-top: 12px;
}

.tool-info {
    flex: 0 0 auto;
    order: 1; /* Show info first */
}

.tool-info h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 8px;
    line-height: 1.3;
}

.tool-description {
    font-size: 0.95rem;
    color: #6b7280;
    line-height: 1.5;
    margin: 0 0 8px 0;
}

.tool-video-preview {
    flex: 0 0 auto;
    margin: 12px 0;
    order: 2; /* Show video after description but before details */
}

.tool-video-preview .video-source {
    margin-top: 8px;
    margin-bottom: 0;
    color: #9ca3af;
    font-size: 0.85rem;
}

/* Enhanced video thumbnail for 2-column layout */
.tool-video-preview .video-thumbnail {
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    transition: all 0.3s ease;
    max-height: 200px;
    overflow: hidden;
    background: #f8fafc;
    position: relative;
}

.tool-video-preview .video-thumbnail::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(59, 130, 246, 0.1), rgba(147, 51, 234, 0.1));
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
    pointer-events: none;
}

.tool-video-preview .video-thumbnail:hover::before {
    opacity: 1;
}

.tool-video-preview .video-thumbnail:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18);
}

.tool-video-preview .video-thumbnail img {
    height: 180px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

/* Mobile video preview adjustments */
@media (max-width: 767px) {
    .tool-video-preview .video-thumbnail img {
        height: 160px;
    }
    
    .tool-video-preview .play-overlay {
        width: 60px;
        height: 60px;
        font-size: 20px;
    }
    
    .tool-card {
        min-height: 450px;
        padding: 20px;
    }
    
    .tool-badges {
        margin-top: 8px;
        gap: 6px;
    }
    
    .badge-category, .badge-pricing {
        padding: 4px 8px;
        font-size: 9px;
    }
}

.tool-video-preview .video-thumbnail:hover img {
    transform: scale(1.05);
}

.tool-video-preview .play-overlay {
    width: 70px;
    height: 70px;
    font-size: 24px;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(4px);
    border: 2px solid rgba(255, 255, 255, 0.2);
    z-index: 2;
    transition: all 0.3s ease;
}

.tool-video-preview .play-overlay:active {
    transform: translate(-50%, -50%) scale(0.9);
}

.tool-video-preview .video-thumbnail:hover .play-overlay {
    background: rgba(255, 0, 0, 0.9);
    transform: translate(-50%, -50%) scale(1.1);
}

.tool-video-preview .video-title {
    font-size: 14px;
    font-weight: 600;
    padding: 15px;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.85));
}

/* Video Container Styles for Embedded Playback */
.video-container {
    position: relative;
    width: 100%;
    border-radius: 12px;
    overflow: hidden;
}

.video-container.playing .video-thumbnail {
    display: none;
}

.video-container.playing .video-iframe-container {
    display: block !important;
}

.video-iframe-container {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
    background: #000;
    border-radius: 12px;
    overflow: hidden;
}

.video-iframe-container iframe {
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 12px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.video-iframe-container iframe[src]:not([src="about:blank"]) {
    opacity: 1;
}

.video-close-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
    background: rgba(0, 0, 0, 0.8);
    border: none;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: all 0.2s ease;
    z-index: 10;
    backdrop-filter: blur(4px);
}

.video-close-btn:hover {
    background: rgba(255, 0, 0, 0.9);
    transform: scale(1.1);
}

.video-close-btn:active {
    transform: scale(0.95);
}

/* Loading state for video */
.video-iframe-container.loading::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top: 3px solid #fff;
    border-radius: 50%;
    animation: video-loading-spin 1s linear infinite;
    z-index: 5;
}

@keyframes video-loading-spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Mobile video player adjustments */
@media (max-width: 767px) {
    .video-close-btn {
        width: 32px;
        height: 32px;
        font-size: 12px;
        top: 8px;
        right: 8px;
    }
    
    .video-iframe-container {
        border-radius: 8px;
    }
    
    .video-container {
        border-radius: 8px;
    }
}

.tool-details {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
    order: 3; /* Show details after video */
}

.tool-usefulness h4,
.tool-features h4 {
    font-size: 0.9rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.tool-usefulness h4 i,
.tool-features h4 i {
    color: #3b82f6;
    font-size: 0.8rem;
}

.usefulness-text {
    font-size: 0.85rem;
    color: #6b7280;
    line-height: 1.5;
    margin: 0;
}

.features-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.features-list li {
    background: #f3f4f6;
    color: #4b5563;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 500;
}

/* Pros and Cons Styling for Tool Cards */
.tool-pros-cons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #f3f4f6;
}

.tool-pros h4,
.tool-cons h4 {
    font-size: 0.8rem;
    font-weight: 600;
    margin: 0 0 8px 0;
    display: flex;
    align-items: center;
    gap: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tool-pros h4 {
    color: #059669;
}

.tool-cons h4 {
    color: #d97706;
}

.tool-pros h4 i,
.tool-cons h4 i {
    font-size: 0.7rem;
    opacity: 0.8;
}

.pros-list,
.cons-list {
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: 0.8rem;
    line-height: 1.4;
}

.pros-list li,
.cons-list li {
    padding: 2px 0;
    color: #6b7280;
}

@media (max-width: 768px) {
    .tool-pros-cons {
        grid-template-columns: 1fr;
        gap: 8px;
    }
}

.tool-actions {
    flex: 0 0 auto;
    display: flex;
    gap: 12px;
    margin-top: auto;
    padding-top: 20px;
    border-top: 1px solid #f3f4f6;
    order: 4; /* Show actions at the bottom */
}

.btn-visit-primary {
    flex: 1;
    background: #3b82f6;
    color: white;
    border: none;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.btn-visit-primary:hover {
    background: #2563eb;
}

.btn-copy-secondary {
    flex: 0 0 auto;
    background: #f8f9fa;
    color: #6b7280;
    border: 1px solid #e5e7eb;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.btn-copy-secondary:hover {
    background: #f3f4f6;
    border-color: #d1d5db;
}

.tool-card:focus {
    outline: none;
}


.tool-icon {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 18px;
    flex-shrink: 0;
    background: transparent;
    position: relative;
    overflow: hidden;
}

.tool-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 8px;
    background: transparent;
    padding: 0;
}


.tool-icon .fallback-icon {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    color: white;
    font-size: 36px;
    font-weight: bold;
}

.tool-icon.text-logo {
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    font-size: 18px;
    text-align: center;
    line-height: 1;
}

/* Real app icon styles with proper branding */
.tool-icon.midjourney {
    background: #000000;
    color: white;
    font-weight: 700;
    font-size: 12px;
}

.tool-icon.dalle {
    background: #10a37f;
    color: white;
    font-weight: 700;
    font-size: 11px;
}

.tool-icon.stable-diffusion {
    background: #4c1d95;
    color: white;
    font-weight: 700;
    font-size: 10px;
}

.tool-icon.adobe-firefly {
    background: #ff6b35;
    color: white;
    font-weight: 700;
    font-size: 12px;
}

.tool-icon.leonardo {
    background: #6366f1;
    color: white;
    font-weight: 700;
    font-size: 12px;
}

.tool-icon.artbreeder {
    background: #ff6b6b;
    color: white;
    font-weight: 700;
    font-size: 10px;
}

.tool-icon.canva {
    background: #00c4cc;
    color: white;
    font-weight: 700;
    font-size: 14px;
}

.tool-icon.figma {
    background: #f24e1e;
    color: white;
    font-weight: 700;
    font-size: 14px;
}

.tool-icon.sketch {
    background: #fdad00;
    color: white;
    font-weight: 700;
    font-size: 14px;
}

.tool-icon.adobe-cc {
    background: #ff0000;
    color: white;
    font-weight: 700;
    font-size: 12px;
}

.tool-icon.freepik {
    background: #00d4aa;
    color: white;
    font-weight: 700;
    font-size: 11px;
}

.tool-icon.vecteezy {
    background: #4c1d95;
    color: white;
    font-weight: 700;
    font-size: 12px;
}

.tool-icon.unsplash {
    background: #000000;
    color: white;
    font-weight: 700;
    font-size: 10px;
}

.tool-icon.pixabay {
    background: #00c4cc;
    color: white;
    font-weight: 700;
    font-size: 11px;
}

.tool-icon.brandcrowd {
    background: #ff6b35;
    color: white;
    font-weight: 700;
    font-size: 9px;
}

.tool-icon.looka {
    background: #6366f1;
    color: white;
    font-weight: 700;
    font-size: 14px;
}

.tool-icon.chatgpt {
    background: #10a37f;
    color: white;
    font-weight: 700;
    font-size: 11px;
}

.tool-icon.claude {
    background: #d97757;
    color: white;
    font-weight: 700;
    font-size: 12px;
}

.tool-icon.perplexity {
    background: #20b2aa;
    color: white;
    font-weight: 700;
    font-size: 9px;
}

.tool-icon.poe {
    background: #6366f1;
    color: white;
    font-weight: 700;
    font-size: 14px;
}

.tool-icon.pi {
    background: #ff6b6b;
    color: white;
    font-weight: 700;
    font-size: 16px;
}

.tool-icon.character-ai {
    background: #00c4cc;
    color: white;
    font-weight: 700;
    font-size: 8px;
}

.tool-icon.runway {
    background: #000000;
    color: white;
    font-weight: 700;
    font-size: 10px;
}

.tool-icon.pika {
    background: #ff6b35;
    color: white;
    font-weight: 700;
    font-size: 12px;
}

.tool-icon.synthesia {
    background: #6366f1;
    color: white;
    font-weight: 700;
    font-size: 10px;
}

.tool-icon.lumen5 {
    background: #4c1d95;
    color: white;
    font-weight: 700;
    font-size: 12px;
}

.tool-icon.heygen {
    background: #ff6b6b;
    color: white;
    font-weight: 700;
    font-size: 11px;
}

.tool-icon.invideo {
    background: #00c4cc;
    color: white;
    font-weight: 700;
    font-size: 10px;
}

.tool-icon.pictory {
    background: #000000;
    color: white;
    font-weight: 700;
    font-size: 11px;
}

.tool-icon.kapwing {
    background: #ff6b35;
    color: white;
    font-weight: 700;
    font-size: 11px;
}

/* AI Writing & Content */
.tool-icon.jasper {
    background: #00d4aa;
    color: white;
    font-weight: 700;
    font-size: 12px;
}

.tool-icon.copy-ai {
    background: #6366f1;
    color: white;
    font-weight: 700;
    font-size: 10px;
}

.tool-icon.writesonic {
    background: #ff6b6b;
    color: white;
    font-weight: 700;
    font-size: 9px;
}

.tool-icon.wordtune {
    background: #4c1d95;
    color: white;
    font-weight: 700;
    font-size: 10px;
}

.tool-icon.grammarly {
    background: #15c39a;
    color: white;
    font-weight: 700;
    font-size: 10px;
}

.tool-icon.hemingway {
    background: #ff6b35;
    color: white;
    font-weight: 700;
    font-size: 9px;
}

.tool-icon.quillbot {
    background: #667eea;
    color: white;
    font-weight: 700;
    font-size: 10px;
}

.tool-icon.sudowrite {
    background: #000000;
    color: white;
    font-weight: 700;
    font-size: 9px;
}

.tool-icon.rytr {
    background: #00c4cc;
    color: white;
    font-weight: 700;
    font-size: 14px;
}

.tool-icon.contentbot {
    background: #ff6b35;
    color: white;
    font-weight: 700;
    font-size: 9px;
}

/* AI Programming & Development */
.tool-icon.github-copilot {
    background: #000000;
    color: white;
    font-weight: 700;
    font-size: 9px;
}

.tool-icon.cursor {
    background: #6366f1;
    color: white;
    font-weight: 700;
    font-size: 12px;
}

.tool-icon.replit {
    background: #f7931e;
    color: white;
    font-weight: 700;
    font-size: 12px;
}

.tool-icon.tabnine {
    background: #00d4aa;
    color: white;
    font-weight: 700;
    font-size: 10px;
}

.tool-icon.kite {
    background: #ff6b6b;
    color: white;
    font-weight: 700;
    font-size: 14px;
}

.tool-icon.codota {
    background: #4c1d95;
    color: white;
    font-weight: 700;
    font-size: 10px;
}

.tool-icon.intellicode {
    background: #0078d4;
    color: white;
    font-weight: 700;
    font-size: 9px;
}

.tool-icon.codesnippets {
    background: #00c4cc;
    color: white;
    font-weight: 700;
    font-size: 8px;
}

.tool-icon.debuild {
    background: #ff6b35;
    color: white;
    font-weight: 700;
    font-size: 9px;
}

.tool-icon.whatthediff {
    background: #6366f1;
    color: white;
    font-weight: 700;
    font-size: 8px;
}

/* AI Audio & Music */
.tool-icon.elevenlabs {
    background: #000000;
    color: white;
    font-weight: 700;
    font-size: 9px;
}

.tool-icon.mubert {
    background: #6366f1;
    color: white;
    font-weight: 700;
    font-size: 12px;
}

.tool-icon.descript {
    background: #ff6b35;
    color: white;
    font-weight: 700;
    font-size: 10px;
}

.tool-icon.play-ht {
    background: #00d4aa;
    color: white;
    font-weight: 700;
    font-size: 9px;
}

.tool-icon.amper {
    background: #ff6b6b;
    color: white;
    font-weight: 700;
    font-size: 12px;
}

.tool-icon.soundraw {
    background: #4c1d95;
    color: white;
    font-weight: 700;
    font-size: 9px;
}

.tool-icon.boomy {
    background: #00c4cc;
    color: white;
    font-weight: 700;
    font-size: 12px;
}

.tool-icon.aiva {
    background: #ff6b35;
    color: white;
    font-weight: 700;
    font-size: 14px;
}

.tool-icon.ecrett {
    background: #6366f1;
    color: white;
    font-weight: 700;
    font-size: 10px;
}

.tool-icon.landr {
    background: #000000;
    color: white;
    font-weight: 700;
    font-size: 14px;
}

/* AI Business & Productivity */
.tool-icon.notion-ai {
    background: #000000;
    color: white;
    font-weight: 700;
    font-size: 9px;
}

.tool-icon.chatgpt-plus {
    background: #10a37f;
    color: white;
    font-weight: 700;
    font-size: 8px;
}

.tool-icon.claude-pro {
    background: #d97757;
    color: white;
    font-weight: 700;
    font-size: 8px;
}

.tool-icon.anthropic {
    background: #ff6b35;
    color: white;
    font-weight: 700;
    font-size: 9px;
}

.tool-icon.openai {
    background: #10a37f;
    color: white;
    font-weight: 700;
    font-size: 12px;
}

.tool-icon.midjourney-pro {
    background: #000000;
    color: white;
    font-weight: 700;
    font-size: 8px;
}

.tool-icon.runway-pro {
    background: #000000;
    color: white;
    font-weight: 700;
    font-size: 8px;
}

.tool-icon.adobe-sensei {
    background: #ff0000;
    color: white;
    font-weight: 700;
    font-size: 9px;
}

.tool-icon.microsoft-365 {
    background: #0078d4;
    color: white;
    font-weight: 700;
    font-size: 8px;
}

.tool-icon.google-workspace {
    background: #4285f4;
    color: white;
    font-weight: 700;
    font-size: 8px;
}

/* AI Education & Learning */
.tool-icon.khan-academy {
    background: #1865f2;
    color: white;
    font-weight: 700;
    font-size: 9px;
}

.tool-icon.coursera {
    background: #0056d2;
    color: white;
    font-weight: 700;
    font-size: 10px;
}

.tool-icon.udemy {
    background: #ec5252;
    color: white;
    font-weight: 700;
    font-size: 12px;
}

.tool-icon.edx {
    background: #2a73cc;
    color: white;
    font-weight: 700;
    font-size: 14px;
}

.tool-icon.skillshare {
    background: #ff6b35;
    color: white;
    font-weight: 700;
    font-size: 9px;
}

.tool-icon.pluralsight {
    background: #f15b2a;
    color: white;
    font-weight: 700;
    font-size: 9px;
}

.tool-icon.linkedin-learning {
    background: #0077b5;
    color: white;
    font-weight: 700;
    font-size: 8px;
}

.tool-icon.masterclass {
    background: #000000;
    color: white;
    font-weight: 700;
    font-size: 9px;
}

.tool-icon.duolingo {
    background: #58cc02;
    color: white;
    font-weight: 700;
    font-size: 10px;
}

.tool-icon.memrise {
    background: #ff6b6b;
    color: white;
    font-weight: 700;
    font-size: 10px;
}

/* AI Agents */
.tool-icon.zapier {
    background: #ff6b35;
    color: white;
    font-weight: 700;
    font-size: 12px;
}

.tool-icon.ifttt {
    background: #0099ff;
    color: white;
    font-weight: 700;
    font-size: 14px;
}

.tool-icon.integromat {
    background: #6366f1;
    color: white;
    font-weight: 700;
    font-size: 9px;
}

.tool-icon.automate-io {
    background: #00d4aa;
    color: white;
    font-weight: 700;
    font-size: 8px;
}

.tool-icon.workato {
    background: #ff6b6b;
    color: white;
    font-weight: 700;
    font-size: 10px;
}

.tool-icon.pipedream {
    background: #4c1d95;
    color: white;
    font-weight: 700;
    font-size: 9px;
}

.tool-icon.n8n {
    background: #000000;
    color: white;
    font-weight: 700;
    font-size: 14px;
}

.tool-icon.node-red {
    background: #8f0000;
    color: white;
    font-weight: 700;
    font-size: 9px;
}

.tool-icon.huginn {
    background: #00c4cc;
    color: white;
    font-weight: 700;
    font-size: 10px;
}

.tool-icon.agentflow {
    background: #ff6b35;
    color: white;
    font-weight: 700;
    font-size: 9px;
}

/* AI 3D Modeling */
.tool-icon.blender {
    background: #f5792a;
    color: white;
    font-weight: 700;
    font-size: 10px;
}

.tool-icon.autodesk {
    background: #0696d7;
    color: white;
    font-weight: 700;
    font-size: 9px;
}

.tool-icon.sketchfab {
    background: #1caad9;
    color: white;
    font-weight: 700;
    font-size: 9px;
}

.tool-icon.tinkercad {
    background: #00c4cc;
    color: white;
    font-weight: 700;
    font-size: 9px;
}

.tool-icon.fusion360 {
    background: #0696d7;
    color: white;
    font-weight: 700;
    font-size: 8px;
}

.tool-icon.rhino {
    background: #000000;
    color: white;
    font-weight: 700;
    font-size: 12px;
}

.tool-icon.zbrush {
    background: #6366f1;
    color: white;
    font-weight: 700;
    font-size: 10px;
}

.tool-icon.maya {
    background: #00a0e9;
    color: white;
    font-weight: 700;
    font-size: 14px;
}

.tool-icon.3ds-max {
    background: #0696d7;
    color: white;
    font-weight: 700;
    font-size: 8px;
}

.tool-icon.cinema4d {
    background: #ff6b35;
    color: white;
    font-weight: 700;
    font-size: 8px;
}

/* AI Gaming */
.tool-icon.unity {
    background: #000000;
    color: white;
    font-weight: 700;
    font-size: 12px;
}

.tool-icon.unreal {
    background: #0e0e0e;
    color: white;
    font-weight: 700;
    font-size: 9px;
}

.tool-icon.godot {
    background: #478cbf;
    color: white;
    font-weight: 700;
    font-size: 10px;
}

.tool-icon.cryengine {
    background: #00c4cc;
    color: white;
    font-weight: 700;
    font-size: 9px;
}

.tool-icon.lumberyard {
    background: #ff9900;
    color: white;
    font-weight: 700;
    font-size: 9px;
}

.tool-icon.construct {
    background: #6366f1;
    color: white;
    font-weight: 700;
    font-size: 10px;
}

.tool-icon.game-maker {
    background: #ff6b6b;
    color: white;
    font-weight: 700;
    font-size: 8px;
}

.tool-icon.rpg-maker {
    background: #4c1d95;
    color: white;
    font-weight: 700;
    font-size: 8px;
}

.tool-icon.scratch {
    background: #ff6b35;
    color: white;
    font-weight: 700;
    font-size: 10px;
}

.tool-icon.roblox {
    background: #00c4cc;
    color: white;
    font-weight: 700;
    font-size: 10px;
}

/* Prompt Engineering */
.tool-icon.promptbase {
    background: #000000;
    color: white;
    font-weight: 700;
    font-size: 9px;
}

.tool-icon.prompts {
    background: #6366f1;
    color: white;
    font-weight: 700;
    font-size: 10px;
}

.tool-icon.prompthero {
    background: #ff6b35;
    color: white;
    font-weight: 700;
    font-size: 9px;
}

.tool-icon.promptable {
    background: #00d4aa;
    color: white;
    font-weight: 700;
    font-size: 9px;
}

.tool-icon.promptperfect {
    background: #ff6b6b;
    color: white;
    font-weight: 700;
    font-size: 8px;
}

.tool-icon.promptify {
    background: #4c1d95;
    color: white;
    font-weight: 700;
    font-size: 9px;
}

.tool-icon.promptcraft {
    background: #00c4cc;
    color: white;
    font-weight: 700;
    font-size: 8px;
}

.tool-icon.promptgenius {
    background: #6366f1;
    color: white;
    font-weight: 700;
    font-size: 8px;
}

.tool-icon.promptmaster {
    background: #ff6b35;
    color: white;
    font-weight: 700;
    font-size: 8px;
}

.tool-icon.promptwizard {
    background: #000000;
    color: white;
    font-weight: 700;
    font-size: 9px;
}

/* AI Library */
.tool-icon.huggingface {
    background: #ffd43b;
    color: #000000;
    font-weight: 700;
    font-size: 8px;
}

.tool-icon.tensorflow {
    background: #ff6f00;
    color: white;
    font-weight: 700;
    font-size: 9px;
}

.tool-icon.pytorch {
    background: #ee4c2c;
    color: white;
    font-weight: 700;
    font-size: 10px;
}

.tool-icon.keras {
    background: #d00000;
    color: white;
    font-weight: 700;
    font-size: 12px;
}

.tool-icon.scikit-learn {
    background: #f7931e;
    color: white;
    font-weight: 700;
    font-size: 8px;
}

.tool-icon.opencv {
    background: #5c3ee8;
    color: white;
    font-weight: 700;
    font-size: 10px;
}

.tool-icon.spacy {
    background: #09a3d5;
    color: white;
    font-weight: 700;
    font-size: 12px;
}

.tool-icon.nltk {
    background: #4c1d95;
    color: white;
    font-weight: 700;
    font-size: 14px;
}

.tool-icon.gensim {
    background: #ff6b35;
    color: white;
    font-weight: 700;
    font-size: 10px;
}

.tool-icon.transformers {
    background: #ffd43b;
    color: #000000;
    font-weight: 700;
    font-size: 8px;
}

/* AI Navigation */
.tool-icon.futurepedia {
    background: #000000;
    color: white;
    font-weight: 700;
    font-size: 9px;
}

.tool-icon.thereisanaiforthat {
    background: #6366f1;
    color: white;
    font-weight: 700;
    font-size: 8px;
}

.tool-icon.aitoolhunt {
    background: #ff6b35;
    color: white;
    font-weight: 700;
    font-size: 8px;
}

.tool-icon.aitoolsdirectory {
    background: #00d4aa;
    color: white;
    font-weight: 700;
    font-size: 8px;
}

.tool-icon.aitoolguide {
    background: #ff6b6b;
    color: white;
    font-weight: 700;
    font-size: 8px;
}

.tool-icon.aitoolfinder {
    background: #4c1d95;
    color: white;
    font-weight: 700;
    font-size: 8px;
}

.tool-icon.aitoolscout {
    background: #00c4cc;
    color: white;
    font-weight: 700;
    font-size: 8px;
}

.tool-icon.aitooltracker {
    background: #6366f1;
    color: white;
    font-weight: 700;
    font-size: 8px;
}

.tool-icon.aitoolwatch {
    background: #ff6b35;
    color: white;
    font-weight: 700;
    font-size: 8px;
}

.tool-icon.aitoolalerts {
    background: #000000;
    color: white;
    font-weight: 700;
    font-size: 8px;
}

.tool-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    text-align: left;
    margin-right: 50px;
}

.tool-info h3 {
    font-size: 17px;
    font-weight: 600;
    margin-bottom: 4px;
    color: #1a202c;
    letter-spacing: -0.025em;
    line-height: 1.3;
    text-align: center;
}

.tool-info p {
    font-size: 13px;
    color: #6b7280;
    line-height: 1.4;
    margin: 0;
    text-align: left;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tool-card i:last-child {
    color: #adb5bd;
    font-size: 16px;
    transition: all 0.3s ease;
}

.tool-card:hover i:last-child {
    color: #3498db;
    transform: translateX(3px);
}

.tool-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    cursor: pointer;
}



/* Duplicate rule removed - handled above */

.dropdown-content {
    padding: 24px;
    max-height: 500px;
    overflow-y: auto;
}

.dropdown-header {
    border-bottom: 2px solid #f1f3f5;
    padding-bottom: 16px;
    margin-bottom: 20px;
}

.dropdown-header h3 {
    margin: 0 0 8px 0;
    color: #2c3e50;
    font-size: 18px;
    font-weight: 700;
}

.app-badges {
    display: flex;
    gap: 8px;
}

.badge-category, .badge-pricing {
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.badge-category {
    background: #e3f2fd;
    color: #1976d2;
}

.badge-pricing.pricing-free {
    background: #e8f5e8;
    color: #2e7d32;
}

.badge-pricing.pricing-paid {
    background: #ffebee;
    color: #c62828;
}

.badge-pricing.pricing-freemium {
    background: #fff3e0;
    color: #ef6c00;
}

.dropdown-section {
    margin-bottom: 20px;
}

.dropdown-section h4 {
    color: #2c3e50;
    margin: 0 0 12px 0;
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.dropdown-section h4 i {
    color: #3498db;
    font-size: 12px;
}

.usefulness-text, .best-for-text {
    color: #495057;
    font-size: 13px;
    line-height: 1.5;
    margin: 0 0 12px 0;
}

.pros-section {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #f1f3f5;
}

.pros-section strong {
    color: #2c3e50;
    font-size: 12px;
    font-weight: 600;
}

.pros-list-inline {
    list-style: none;
    padding: 0;
    margin: 8px 0 0 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.pros-list-inline li {
    background: #e8f5e8;
    color: #28a745;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
    border: 1px solid #c3e6c3;
}

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

.features-list li {
    padding: 6px 0;
    font-size: 13px;
    color: #495057;
}



.website-link {
    color: #3498db;
    text-decoration: none;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 500;
}

.website-link:hover {
    color: #2980b9;
    text-decoration: underline;
}

.video-wrapper {
    margin-bottom: 1rem;
}

.video-thumbnail {
    position: relative;
    width: 100%;
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
    margin-bottom: 4px;
}

.video-thumbnail:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.15);
}

.video-thumbnail img {
    width: 100%;
    height: auto;
    display: block;
    aspect-ratio: 16/9;
    object-fit: cover;
}

.play-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background: rgba(0, 0, 0, 0.8);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 20px;
    transition: background 0.2s ease;
}

.video-thumbnail:hover .play-overlay {
    background: rgba(255, 0, 0, 0.9);
}

.video-title {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    color: white;
    padding: 20px 15px 10px;
    font-size: 13px;
    font-weight: 500;
}

.vimeo-placeholder {
    width: 100%;
    aspect-ratio: 16/9;
    background: linear-gradient(135deg, #1ab7ea 0%, #1ab7ea 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
}

.vimeo-placeholder i {
    font-size: 40px;
    margin-bottom: 10px;
}

.vimeo-placeholder .video-title {
    position: static;
    background: none;
    padding: 0;
    font-size: 14px;
    font-weight: 600;
}

.video-source {
    color: #6c757d;
    font-size: 12px;
    margin: 8px 0 0 0;
    display: flex;
    align-items: center;
    gap: 4px;
}

.video-source i {
    color: #28a745;
}

.detail-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
    padding: 6px 0;
}

.detail-label {
    color: #6c757d;
    font-size: 13px;
    font-weight: 500;
    min-width: 80px;
}

.detail-value {
    color: #2c3e50;
    font-size: 13px;
    font-weight: 600;
    text-align: right;
}

.detail-value.pricing-free {
    color: #27ae60;
}

.detail-value.pricing-paid {
    color: #e74c3c;
}

.detail-value.pricing-freemium {
    color: #f39c12;
}

.detail-link {
    color: #3498db;
    text-decoration: none;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: color 0.3s ease;
}

.detail-link:hover {
    color: #2980b9;
}

.detail-link i {
    font-size: 10px;
}

.dropdown-actions {
    display: flex;
    gap: 8px;
    padding-top: 16px;
    border-top: 1px solid #f1f3f5;
}

.dropdown-actions button {
    flex: 1;
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.3s ease;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.btn-visit {
    background: #3498db;
    color: white;
    border: none;
}

.btn-visit:hover {
    background: #2980b9;
    transform: translateY(-1px);
}

.btn-visit:disabled {
    background: #bdc3c7;
    cursor: not-allowed;
}

.btn-copy {
    background: #f8f9fa;
    color: #495057;
    border: 1px solid #e9ecef;
}

.btn-copy:hover {
    background: #e9ecef;
    border-color: #ced4da;
}

.btn-visit-primary {
    background: #007bff;
    color: white;
    border: none;
    flex: 2;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.3s ease;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-visit-primary:hover {
    background: #0056b3;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
}

.btn-visit-primary:disabled {
    background: #bdc3c7;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-copy-secondary {
    background: white;
    color: #6c757d;
    border: 1px solid #dee2e6;
    flex: 1;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.3s ease;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-copy-secondary:hover {
    background: #f8f9fa;
    border-color: #adb5bd;
    color: #495057;
}

/* Section Header */
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e9ecef;
}

.section-header h2 {
    font-size: 24px;
    font-weight: 600;
    color: #2c3e50;
}


.section-tabs {
    display: flex;
    gap: 8px;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .mobile-menu-toggle {
        display: none !important; /* Hide hamburger menu since sidebar is hidden */
    }
    
    .mobile-close-btn {
        display: none !important;
    }
    
    .mobile-overlay {
        display: none !important;
    }
    
    /* Hide AI news section on mobile */
    #ai-news,
    .ai-news-section {
        display: none !important;
    }
    
    /* Tool cards: Enhanced mobile layout with pros/cons visible */
    .tool-card {
        padding: 12px; /* Adequate padding for readable content */
        gap: 8px; /* Small gap for better spacing */
        flex-direction: column; /* Column layout to show all sections */
        text-align: left;
        align-items: stretch;
        border-radius: 8px; /* Proper border radius for modern look */
        background: #f8f9fa;
        border: 1px solid #e9ecef;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        overflow: visible; /* Allow content to be visible */
        min-height: auto; /* Auto height to accommodate all content */
    }
    
    .tool-card .tool-icon {
        flex-shrink: 0;
        width: 40px; /* Compact icon for mobile */
        height: 40px;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 10px;
        font-size: 14px; /* Proportional font for compact icon */
        font-weight: 700;
        margin: 0; /* No margin - icon sits closer to card edge */
    }
    
    .tool-card .tool-info {
        flex: 1;
        text-align: left;
        padding: 4px 0; /* Better padding for readability */
        min-width: 0; /* Allow text to shrink below content size */
        overflow: visible; /* Allow text to be visible */
        max-width: calc(100% - 48px); /* Reserve space for icon + gap */
        margin-right: 0; /* Remove right margin on mobile */
    }
    
    /* Ensure tool details (including pros/cons) are visible on mobile */
    .tool-details {
        display: flex !important;
        flex-direction: column;
        gap: 8px;
        margin-top: 8px;
    }
    
    /* Hide usefulness and features sections on mobile to reduce card height */
    .tool-usefulness,
    .tool-features {
        display: none !important;
    }
    
    /* Show pros/cons on mobile */
    .tool-pros-cons {
        display: grid !important;
        grid-template-columns: 1fr;
        gap: 8px;
        margin-top: 8px;
    }
    
    /* Hide tool actions completely on mobile for clean look */
    .tool-actions {
        display: none !important;
    }
    
    .tool-card .tool-info h3 {
        font-size: 14px; /* Slightly larger for better readability */
        line-height: 1.3;
        margin-bottom: 4px;
        font-weight: 700;
        color: #1f2937;
        white-space: normal; /* Allow text wrapping */
        overflow: visible;
        text-overflow: unset;
        max-width: 100%; /* Ensure text doesn't exceed container */
    }
    
    /* Mobile-specific pros/cons styling */
    .tool-pros h4,
    .tool-cons h4 {
        font-size: 12px !important;
        margin-bottom: 4px !important;
    }
    
    .tool-pros-cons ul {
        margin: 0 !important;
        padding: 0 !important;
    }
    
    .tool-pros-cons li {
        font-size: 11px !important;
        padding: 2px 0 !important;
        line-height: 1.3 !important;
    }
    
    .tool-card .tool-info p {
        font-size: 10px; /* Slightly smaller for better fit */
        line-height: 1.2;
        color: #6b7280;
        font-weight: 500;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        margin: 0;
        max-width: 100%; /* Ensure text doesn't exceed container */
    }
    
    /* Mobile-specific hover/active states */
    .tool-card:hover,
    .tool-card:active {
        background: #ffffff;
        border-color: #d1d5db;
        transform: none; /* Remove transform on mobile for better performance */
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    }
    
    /* Ensure proper mobile navigation layout */
    .main-nav {
        display: flex;
        align-items: center;
        gap: 12px;
        order: 2;
    }
    
    /* Make submit button more prominent on mobile */
    .nav-link.submit-btn {
        order: 3;
        flex-shrink: 0;
    }
    
    .container {
        height: auto; /* Remove fixed height on mobile */
        min-height: calc(100vh - 88px);
        flex-direction: column; /* Stack vertically on mobile */
        flex: 1; /* Allow container to grow and push footer down */
        padding: 0; /* Remove any container padding on mobile */
        margin: 0;
    }
    
    .sidebar {
        position: fixed;
        top: 0;
        left: -280px; /* Hidden by default */
        width: 280px;
        height: 100vh;
        background: white;
        z-index: 1001; /* Above header */
        transition: left 0.3s ease;
        box-shadow: 2px 0 8px rgba(0,0,0,0.1);
        overflow-y: auto;
    }
    
    /* Show sidebar when open */
    .sidebar.open {
        left: 0;
    }
    
    /* Mobile overlay for sidebar */
    .mobile-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        background: rgba(0,0,0,0.5);
        z-index: 1000;
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
    }
    
    .mobile-overlay.active {
        opacity: 1;
        visibility: visible;
    }
    
    /* Restore natural mobile scrolling */
    html, body {
        overflow: visible;
        height: auto;
    }
    
    .main-content {
        width: 100%;
        height: auto;
        min-height: auto;
        flex: 1;
        overflow-y: visible;
        /* Ensure proper touch scrolling */
        -webkit-overflow-scrolling: touch;
        touch-action: pan-y;
        padding: 12px 8px;
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }
    
    /* Mobile menu styles removed since sidebar is hidden on mobile */
    
    .main-content-section {
        max-width: min(98vw, 1400px);
        padding: 4px;
    }
    
    /* Adjust grid for mobile to prevent overflow */
    .category-tools-grid {
        grid-template-columns: 1fr; /* Single column on mobile */
        gap: 0.75rem;
        margin-bottom: 1rem;
        padding: 0;
    }
}

@media (max-width: 768px) {
    .header-content {
        flex-direction: row;
        height: auto;
        padding: 16px 20px;
        gap: 16px;
        justify-content: space-between;
        align-items: center;
        /* Ensure proper layout: logo, search, hamburger + submit */
        display: flex;
        flex-wrap: wrap;
        max-width: 100%;
        overflow: hidden;
        box-sizing: border-box;
    }
    
    /* Hamburger menu hidden on mobile */
    
    .logo {
        flex-shrink: 0;
    }
    
    
    .logo h1 {
        font-size: 20px;
    }
    
    .search-container {
        margin: 0 8px;
    }
    
    .submit-btn {
        padding: 10px 12px !important;
        font-size: 13px;
    }
    
    .mobile-menu-toggle {
        width: 1.75rem;
        height: 1.75rem;
    }
    
    .mobile-menu-toggle span {
        width: 1.75rem;
        height: 0.2rem;
    }
    
    .search-box {
        height: 44px;
        padding: 0; /* Remove padding on mobile */
        width: 100%;
        box-sizing: border-box;
    }
    
    .search-box input {
        padding: 12px 50px 12px 44px;
        font-size: 16px;
    }
    
    .submit-btn {
        padding: 12px 16px !important;
        font-size: 14px;
        min-height: 44px;
        white-space: nowrap;
    }
    
    .main-nav {
        gap: 12px;
        max-width: 100%;
        overflow: hidden;
        flex-wrap: wrap;
    }
    
    .sidebar {
        padding-top: 80px;
    }
    
    .sidebar-nav {
        padding: 20px 16px;
    }
    
    .nav-item {
        padding: 16px 20px;
        font-size: 16px;
        min-height: 56px;
        display: flex;
        align-items: center;
    }
    
    .nav-item i {
        font-size: 20px;
        margin-right: 16px;
    }
}
    
    .main-nav {
        gap: 15px;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    /* tools-grid styles handled by main responsive rules above */
    
    /* tool-card styles handled by main mobile responsive rules above */
    
    .tool-card:hover, .tool-card:focus, .tool-card:active {
        transform: translateY(-2px);
        box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    }
    
    .category-tabs {
        justify-content: center;
    }
    
    .section-header {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }
    
    /* Prevent scroll issues during mobile menu */
    body.mobile-menu-open {
        overflow: hidden;
    }
}

@media (max-width: 480px) {
    .header {
        flex-direction: column; /* Stack header elements vertically */
    }
    
    .header-content {
        padding: 12px 16px 0 16px; /* Remove bottom padding */
        gap: 12px;
    }
    
    .search-container {
        position: relative;
        margin: 0;
        padding: 8px;
        width: 100%;
        max-width: 200px;
        box-sizing: border-box;
        order: 10;
    }
    
    .main-content {
        margin-top: 60px; /* Add space for search bar below header */
    }
    
    .submit-btn {
        padding: 10px 12px !important;
        font-size: 13px;
    }
    
    .mobile-menu-toggle {
        width: 1.75rem;
        height: 1.75rem;
    }
    
    .mobile-menu-toggle span {
        width: 1.75rem;
        height: 0.2rem;
    }
    
    /* tools-grid styles handled by main responsive rules above */
    
    /* tool-card styles handled by main mobile responsive rules above */
    
    .tool-card:active {
        transform: scale(0.98);
    }
    
    .tool-icon {
        width: 65px;
        height: 65px;
        font-size: 28px;
    }
    
    .nav-item {
        padding: 10px 15px;
    }
    
    .sub-item {
        padding: 6px 15px;
    }
}

/* Hide sidebar scrollbar for cleaner appearance */
.sidebar::-webkit-scrollbar {
    display: none;
}

.sidebar {
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
}

/* Animation for tool cards */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.tool-card {
    animation: fadeInUp 0.6s ease forwards;
}

.tool-card:nth-child(1) { animation-delay: 0.1s; }
.tool-card:nth-child(2) { animation-delay: 0.2s; }
.tool-card:nth-child(3) { animation-delay: 0.3s; }
.tool-card:nth-child(4) { animation-delay: 0.4s; }
.tool-card:nth-child(5) { animation-delay: 0.5s; }
.tool-card:nth-child(6) { animation-delay: 0.6s; }
.tool-card:nth-child(7) { animation-delay: 0.7s; }
.tool-card:nth-child(8) { animation-delay: 0.8s; }

/* Submit Modal Styles */
#submit-modal-overlay.submit-modal {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    z-index: 1000000 !important;
    display: none !important;
    opacity: 0 !important;
    transition: opacity 0.3s ease !important;
    visibility: hidden !important;
}

#submit-modal-overlay.submit-modal.active {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
}

#submit-modal-overlay.submit-modal .modal-overlay {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background: rgba(0, 0, 0, 0.5) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    z-index: 1000001 !important;
    opacity: 1 !important;
    visibility: visible !important;
}

#submit-modal-overlay.submit-modal .modal-content {
    background: white !important;
    border-radius: 12px !important;
    padding: 0 !important;
    max-width: 500px !important;
    width: 90% !important;
    max-height: 80vh !important;
    overflow-y: auto !important;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1) !important;
    animation: modalSlideIn 0.3s ease !important;
    position: relative !important;
    z-index: 1000002 !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.submit-modal .modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid #e9ecef;
}

.submit-modal .modal-header h2 {
    margin: 0;
    color: #2c3e50;
    font-size: 20px;
}

.submit-modal .modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #6c757d;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.submit-modal .modal-close:hover {
    background: #f8f9fa;
    color: #495057;
}

.submit-modal .modal-body {
    padding: 24px;
}

.submit-modal .submit-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.submit-modal .form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.submit-modal .form-group label {
    font-weight: 500;
    color: #2c3e50;
}

.submit-modal .form-group input,
.submit-modal .form-group textarea,
.submit-modal .form-group select {
    padding: 10px 12px;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.submit-modal .form-group input:focus,
.submit-modal .form-group textarea:focus,
.submit-modal .form-group select:focus {
    outline: none;
    border-color: #3498db;
}

.submit-modal .form-actions {
    display: flex;
    gap: 12px;
    margin-top: 8px;
}

.submit-modal .btn-primary {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.submit-modal .btn-primary:hover {
    background: linear-gradient(135deg, #2980b9 0%, #1f5f8b 100%);
    transform: translateY(-1px);
}

.submit-modal .btn-secondary {
    background: #6c757d;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.submit-modal .btn-secondary:hover {
    background: #5a6268;
    transform: translateY(-1px);
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Main Navigation Section Styles */
.main-content-section {
    padding: 20px;
    max-width: min(95vw, 1600px);
    margin: 0 auto;
    width: 100%;
}

.main-content-section .section-header {
    text-align: center;
    margin-bottom: 40px;
}

.main-content-section .section-header h1 {
    font-size: 2.5rem;
    color: #2c3e50;
    margin-bottom: 10px;
    font-weight: 700;
}

.main-content-section .section-header p {
    font-size: 1.1rem;
    color: #7f8c8d;
    max-width: 600px;
    margin: 0 auto;
}

/* Tutorials Section */
.tutorials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
    margin-top: 30px;
}

.tutorial-card {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border: 1px solid #e9ecef;
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.tutorial-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.tutorial-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 20px;
    flex-shrink: 0;
}

.tutorial-content h3 {
    margin: 0 0 8px 0;
    color: #2c3e50;
    font-size: 1.1rem;
    font-weight: 600;
}

.tutorial-content p {
    margin: 0 0 12px 0;
    color: #7f8c8d;
    font-size: 0.9rem;
    line-height: 1.5;
}

.tutorial-meta {
    display: flex;
    gap: 12px;
}

.tutorial-meta span {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
}

.difficulty {
    background: #e8f5e8;
    color: #27ae60;
}

.duration {
    background: #fff3cd;
    color: #856404;
}

/* Encyclopedia Section */
.encyclopedia-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    margin-top: 30px;
}

.encyclopedia-card {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border: 1px solid #e9ecef;
}

.encyclopedia-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.encyclopedia-card h3 {
    margin: 0 0 12px 0;
    color: #2c3e50;
    font-size: 1.2rem;
    font-weight: 600;
}

.encyclopedia-card p {
    margin: 0 0 16px 0;
    color: #7f8c8d;
    font-size: 0.9rem;
    line-height: 1.6;
}

.encyclopedia-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.encyclopedia-tags .tag {
    padding: 4px 12px;
    border-radius: 16px;
    font-size: 0.8rem;
    font-weight: 500;
    background: #f8f9fa;
    color: #6c757d;
    border: 1px solid #e9ecef;
}

/* Library Section */
.library-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
    margin-top: 30px;
}

.library-card {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border: 1px solid #e9ecef;
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.library-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.library-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    background: linear-gradient(135deg, #ff6b35 0%, #f7931e 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 20px;
    flex-shrink: 0;
}

.library-content h3 {
    margin: 0 0 8px 0;
    color: #2c3e50;
    font-size: 1.1rem;
    font-weight: 600;
}

.library-content p {
    margin: 0 0 12px 0;
    color: #7f8c8d;
    font-size: 0.9rem;
    line-height: 1.5;
}

.library-meta {
    display: flex;
    gap: 12px;
    align-items: center;
}

.library-meta span {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
}

.language {
    background: #e3f2fd;
    color: #1976d2;
}

.stars {
    background: #fff3e0;
    color: #f57c00;
}

/* Trending Section */
.trending-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
    margin-top: 30px;
}

.trending-card {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border: 1px solid #e9ecef;
    display: flex;
    align-items: flex-start;
    gap: 16px;
    position: relative;
}

.trending-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.trending-rank {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ff6b35 0%, #f7931e 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
}

.trending-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    background: linear-gradient(135deg, #9b59b6 0%, #8e44ad 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 20px;
    flex-shrink: 0;
}

.trending-content h3 {
    margin: 0 0 8px 0;
    color: #2c3e50;
    font-size: 1.1rem;
    font-weight: 600;
}

.trending-content p {
    margin: 0 0 12px 0;
    color: #7f8c8d;
    font-size: 0.9rem;
    line-height: 1.5;
}

.trending-stats {
    display: flex;
    gap: 12px;
    align-items: center;
}

.trending-stats span {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
}

.growth {
    background: #e8f5e8;
    color: #27ae60;
}

.users {
    background: #e3f2fd;
    color: #1976d2;
}

/* Active navigation link */
.nav-link.active {
    color: #3498db !important;
    font-weight: 600;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .main-content-section {
        padding: 15px;
        max-width: min(96vw, 1000px);
    }
    
    .main-content-section .section-header h1 {
        font-size: 2rem;
    }
    
    .tutorials-grid,
    .encyclopedia-grid,
    .library-grid,
    .trending-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .tutorial-card,
    .library-card,
    .trending-card {
        padding: 20px;
    }
}

/* Local Development Message Styles */
.local-dev-message {
    text-align: center;
    padding: 60px 30px;
    background: #fef3c7;
    border: 2px dashed #f59e0b;
    border-radius: 12px;
    margin: 20px;
    color: #92400e;
}

.local-dev-message i {
    font-size: 48px;
    color: #f59e0b;
    margin-bottom: 20px;
    display: block;
}

.local-dev-message h3 {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 16px;
    color: #92400e;
}

.local-dev-message p {
    font-size: 16px;
    margin-bottom: 12px;
    line-height: 1.5;
}

.local-dev-message .dev-info {
    margin-top: 20px;
    padding: 16px;
    background: #fbbf24;
    border-radius: 8px;
    color: #78350f;
}

.local-dev-message .dev-info small {
    font-size: 14px;
    line-height: 1.4;
}

/* Contact Page Styles - OpenAI Style */
.contact-page-container {
    min-height: 100vh;
    background: white;
}

.contact-hero {
    padding: 120px 30px 80px;
    text-align: center;
    background: white;
    border-bottom: 1px solid #f1f5f9;
}

.hero-content h1 {
    font-size: 48px;
    font-weight: 700;
    color: white;
    margin-bottom: 24px;
    letter-spacing: -0.02em;
    line-height: 1.1;
}

.hero-content p {
    font-size: 20px;
    color: #6b7280;
    margin: 0 auto;
    max-width: 600px;
    line-height: 1.5;
}

.contact-content {
    padding: 80px 30px;
    max-width: 1200px;
    margin: 0 auto;
}

.contact-grid {
    display: flex;
    justify-content: center;
}

.contact-form-container {
    background: white;
    padding: 0;
    width: 100%;
    max-width: 600px;
}

.modern-contact-form {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-size: 14px;
    font-weight: 500;
    color: #374151;
    margin-bottom: 8px;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 12px 16px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 16px;
    background: white;
    transition: all 0.2s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
    font-family: inherit;
}

.submit-button {
    background: #111827;
    color: white;
    border: none;
    padding: 16px 32px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    align-self: flex-start;
}

.submit-button:hover:not(:disabled) {
    background: #1f2937;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.submit-button:disabled {
    background: #9ca3af;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-loading {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-loading i {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.form-success-message {
    text-align: center;
    padding: 48px 24px;
    background: #f0f9ff;
    border: 1px solid #bae6fd;
    border-radius: 12px;
    margin-top: 32px;
}

.success-icon {
    margin-bottom: 24px;
}

.success-icon i {
    font-size: 48px;
    color: #16a34a;
}

.form-success-message h3 {
    font-size: 24px;
    font-weight: 600;
    color: #111827;
    margin-bottom: 12px;
}

.form-success-message p {
    font-size: 16px;
    color: #6b7280;
    margin: 0;
    line-height: 1.5;
}


/* Responsive Design */
@media (max-width: 768px) {
    .hero-content h1 {
        font-size: 36px;
        color: white;
    }
    
    .hero-content p {
        font-size: 18px;
    }
    
    .contact-hero {
        padding: 80px 20px 60px;
    }
    
    .contact-content {
        padding: 60px 20px;
    }
    
    .form-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

/* Simple About Page Styles - OpenAI Style */
.about-content-simple {
    max-width: 600px;
    margin: 0 auto;
}

.about-text h2 {
    font-size: 24px;
    font-weight: 600;
    color: #111827;
    margin-bottom: 16px;
    margin-top: 48px;
    letter-spacing: -0.02em;
}

.about-text h2:first-child {
    margin-top: 0;
}

.about-text p {
    font-size: 16px;
    line-height: 1.6;
    color: #6b7280;
    margin-bottom: 0;
}

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

.about-text a:hover {
    text-decoration: underline;
}

/* Mobile styles for simple about */
@media (max-width: 768px) {
    .about-content-simple {
        padding: 0 16px;
    }
    
    .about-text h2 {
        font-size: 20px;
        margin-top: 32px;
    }
    
    .about-text h2:first-child {
        margin-top: 0;
    }
}

/* Footer Styles */
.footer {
    background: #f8f9fa;
    color: #6b7280;
    padding: 60px 0 40px;
    margin-top: auto; /* Push footer to bottom */
    border-top: 1px solid #e5e7eb;
}

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

.footer-section {
    display: flex;
    flex-direction: column;
}

.footer-section h3 {
    font-size: 16px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 24px;
    letter-spacing: -0.01em;
}

.footer-section h4 {
    font-size: 14px;
    font-weight: 600;
    color: #9ca3af;
    margin-bottom: 16px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.footer-section p {
    color: #6b7280;
    line-height: 1.6;
    font-size: 14px;
    margin: 0;
}

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

.footer-section ul li {
    margin-bottom: 12px;
}

.footer-section ul li a {
    color: #374151;
    text-decoration: none;
    transition: color 0.2s ease;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
}

.footer-section ul li a:hover {
    color: #111827;
}

.footer-section ul li a i {
    margin-left: 4px;
    font-size: 12px;
    opacity: 0.7;
}

.footer-bottom {
    text-align: center;
    padding-top: 40px;
    margin-top: 40px;
    border-top: 1px solid #e5e7eb;
    color: #9ca3af;
    font-size: 14px;
    font-weight: 500;
}

@media (max-width: 1024px) {
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
        gap: 40px;
    }
}

@media (max-width: 768px) {
    .footer-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .footer {
        padding: 40px 0 30px;
        margin-top: 40px; /* Reduced margin since footer now uses margin-top: auto */
    }
    
    .footer-content {
        padding: 0 20px;
    }
}

/* New Tool Icon Styles */
.tool-icon.bing-create {
    background: #0078d4;
    font-weight: 600;
    font-size: 18px;
}

.tool-icon.bluewillow {
    background: #1e40af;
    font-weight: 600;
    font-size: 18px;
}

.tool-icon.lexica {
    background: #059669;
    font-weight: 600;
    font-size: 20px;
}

.tool-icon.artstation {
    background: #1f2937;
    font-weight: 600;
    font-size: 16px;
}

.tool-icon.deviantart {
    background: #05cc47;
    font-weight: 600;
    font-size: 16px;
}

.tool-icon.notion {
    background: #000000;
    font-weight: 600;
    font-size: 20px;
}

.tool-icon.quillbot {
    background: #ff6b35;
    font-weight: 600;
    font-size: 20px;
}

.tool-icon.wordtune {
    background: #3b82f6;
    font-weight: 600;
    font-size: 16px;
}

.tool-icon.rytr {
    background: #10b981;
    font-weight: 600;
    font-size: 20px;
}

.tool-icon.sudowrite {
    background: #8b5cf6;
    font-weight: 600;
    font-size: 16px;
}

.tool-icon.hyperwrite {
    background: #f59e0b;
    font-weight: 600;
    font-size: 16px;
}

.tool-icon.blackbox {
    background: #000000;
    font-weight: 600;
    font-size: 18px;
}

.tool-icon.mintlify {
    background: #10b981;
    font-weight: 600;
    font-size: 20px;
}

.tool-icon.debuild {
    background: #3b82f6;
    font-weight: 600;
    font-size: 16px;
}

.tool-icon.builder {
    background: #f59e0b;
    font-weight: 600;
    font-size: 20px;
}

.tool-icon.descript {
    background: #ef4444;
    font-weight: 600;
    font-size: 20px;
}

.tool-icon.uberduck {
    background: #8b5cf6;
    font-weight: 600;
    font-size: 16px;
}

.tool-icon.voicemod {
    background: #06b6d4;
    font-weight: 600;
    font-size: 16px;
}

.tool-icon.suno {
    background: #f97316;
    font-weight: 600;
    font-size: 20px;
}

.tool-icon.audiostack {
    background: #059669;
    font-weight: 600;
    font-size: 16px;
}

/* AI News Section */
.ai-news-section {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    margin: 0 0 2rem 0;
    border: 1px solid #e5e7eb;
    overflow: hidden;
    transition: all 0.3s ease;
}

.ai-news-section.collapsed .news-content {
    display: none;
}

.ai-news-section.collapsed .toggle-news i {
    transform: rotate(180deg);
}

.news-header {
    padding: 1.5rem 2rem;
    background: white;
    color: #1f2937;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #e5e7eb;
}

.news-header h2 {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0;
}

.news-header h2 i {
    font-size: 1.25rem;
}

.news-actions {
    display: flex;
    gap: 0.5rem;
}

.news-actions button {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    color: #64748b;
    padding: 0.5rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    min-height: 36px;
}

.news-actions button:hover {
    background: #667eea;
    color: white;
    transform: translateY(-1px);
    border-color: #667eea;
}

.refresh-news.loading i {
    animation: spin 1s linear infinite;
}

.news-content {
    padding: 2rem;
    background: #fafbfc;
}

.news-loading {
    text-align: center;
    padding: 3rem 2rem;
}

.news-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid #e5e7eb;
    border-top: 3px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
    gap: clamp(1rem, 2vw, 2rem);
    margin-bottom: 1rem;
}

/* Better news grid layouts for different screen sizes */
@media (min-width: 1200px) {
    .news-grid {
        grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
        gap: 1.5rem;
    }
}

@media (min-width: 1600px) {
    .news-grid {
        grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
        gap: 2rem;
    }
}

.news-item {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border: 1px solid #e5e7eb;
    transition: all 0.3s ease;
    cursor: pointer;
}

.news-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.news-item-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.news-source {
    background: #667eea;
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.news-date {
    color: #6b7280;
    font-size: 0.875rem;
    white-space: nowrap;
}

.news-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1f2937;
    line-height: 1.4;
    margin-bottom: 0.75rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-description {
    color: #6b7280;
    font-size: 0.9rem;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 1rem;
}

.news-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.news-tag {
    background: #f3f4f6;
    color: #374151;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
}

.news-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #f3f4f6;
}

.news-category {
    background: #f0f9ff;
    color: #0ea5e9;
    padding: 0.25rem 0.75rem;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: capitalize;
}

.news-read-more {
    color: #667eea;
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    transition: color 0.3s ease;
}

.news-read-more:hover {
    color: #764ba2;
}

.news-error {
    text-align: center;
    padding: 3rem 2rem;
    color: #dc2626;
}

.news-error i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.retry-link {
    color: #667eea;
    cursor: pointer;
    text-decoration: underline;
    font-weight: 600;
}

.retry-link:hover {
    color: #764ba2;
}

/* Enhanced News Article Styles */
.news-article {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    transition: all 0.3s ease;
    opacity: 0;
    animation: fadeInUp 0.6s ease forwards;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border: 1px solid #e5e7eb;
}

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

.news-article:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.article-image {
    width: 100%;
    height: 180px;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 1rem;
}

.article-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.article-image:hover img {
    transform: scale(1.05);
}

.article-content {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.article-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.875rem;
    color: #64748b;
}

.article-source {
    background: #f1f5f9;
    color: #475569;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-weight: 500;
    font-size: 0.8rem;
}

.article-time {
    color: #94a3b8;
}

.article-title {
    font-size: 1.1rem;
    line-height: 1.4;
    margin: 0;
    font-weight: 600;
}

.article-title a {
    color: #1f2937;
    text-decoration: none;
    transition: color 0.3s ease;
}

.article-title a:hover {
    color: #667eea;
}

.article-description {
    color: #64748b;
    line-height: 1.5;
    font-size: 0.9rem;
}

.article-actions {
    margin-top: 0.5rem;
}

.read-more-btn {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

.read-more-btn:hover {
    color: #4f46e5;
    transform: translateX(3px);
}

.no-news {
    text-align: center;
    padding: 3rem 1rem;
    color: #64748b;
}

.no-news i {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: #cbd5e1;
}

.news-last-updated {
    color: #94a3b8;
    font-size: 0.8rem;
    margin-top: 1rem;
    text-align: center;
}

/* Responsive Design */
/* Responsive Typography */
@media (max-width: 768px) {
    h1 { font-size: 2.5rem; }
    h2 { font-size: 2rem; }
    h3 { font-size: 1.5rem; }
    h4 { font-size: 1.25rem; }
    
    .main-content {
        padding: 20px clamp(16px, 2vw, 24px);
    }
    
    .main-content-section {
        max-width: min(90vw, 1200px);
        padding: 16px 12px;
    }
    
    
    .content-title h2 {
        font-size: 28px;
    }
    
    /* tools-grid styles handled by main responsive rules above */
    
    /* tool-card styles handled by main mobile responsive rules above */
    
    .tool-icon {
        width: 70px;
        height: 70px;
        font-size: 26px;
    }
    
    .tool-actions {
        top: 4px; /* Move closer to top edge */
        right: 4px; /* Move closer to right edge */
        gap: 2px; /* Reduce spacing between buttons */
    }
    
    .tool-dropdown-btn {
        width: 20px; /* Much smaller button */
        height: 20px;
        font-size: 9px; /* Smaller font */
    }
    
    .tool-info h3 {
        font-size: 18px;
    }
    
    .ai-news-section {
        margin: 0 1rem 1.5rem;
    }
    
    .news-header {
        padding: 1rem 1.5rem;
    }
    
    .news-header h2 {
        font-size: 1.25rem;
    }
    
    .news-content {
        padding: 1.5rem;
    }
    
    .news-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .news-item {
        padding: 1.25rem;
    }
    
    .news-item-header {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .news-date {
        align-self: flex-start;
    }
}

@media (max-width: 480px) {
    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    h3 { font-size: 1.25rem; }
    
    .main-content {
        padding: 16px clamp(12px, 2vw, 20px);
    }
    
    .main-content-section {
        max-width: min(95vw, 800px);
        padding: 12px 8px;
    }
    
    /* tools-grid styles handled by main responsive rules above */
    
    
    .content-title h2 {
        font-size: 24px;
    }
    
    /* tools-grid styles handled by main responsive rules above */
    
    .tool-card {
        padding: 2px;
        gap: 0px;
    }
    
    .tool-icon {
        width: 68px;
        height: 68px;
        font-size: 24px;
    }
    
    .tool-info h3 {
        font-size: 16px;
    }
    
    .tool-info p {
        font-size: 14px;
    }
    
    .ai-news-section {
        margin: 0 0.75rem 1rem;
        border-radius: 12px;
    }
    
    .news-header {
        padding: 0.875rem 1rem;
    }
    
    .news-content {
        padding: 1rem;
    }
    
    .news-item {
        padding: 1rem;
        border-radius: 8px;
    }
}

/* Submit Tool Modal Styles (Generic) */
.modal-overlay:not(.submit-modal .modal-overlay) {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-overlay.active:not(.submit-modal .modal-overlay) {
    opacity: 1;
    visibility: visible;
}

.modal-container {
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    transform: scale(0.9) translateY(20px);
    transition: all 0.3s ease;
}

.modal-overlay.active .modal-container {
    transform: scale(1) translateY(0);
}

.modal-header {
    padding: 2rem 2rem 1rem;
    border-bottom: 1px solid #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-header h2 {
    color: #1a202c;
    font-size: 1.75rem;
    font-weight: 700;
    margin: 0;
}

.modal-close {
    background: #f8fafc;
    border: none;
    border-radius: 8px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #6b7280;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: #e2e8f0;
    color: #374151;
}

.modal-content {
    padding: 1rem 2rem 2rem;
}

.modal-subtitle {
    color: #6b7280;
    font-size: 1rem;
    margin-bottom: 2rem;
    line-height: 1.6;
}

.submit-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-group label {
    font-weight: 600;
    font-size: 0.875rem;
    color: #374151;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 0.75rem 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 1rem;
    font-family: 'Inter', sans-serif;
    transition: all 0.3s ease;
    background: white;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
    line-height: 1.5;
}

.form-group small {
    color: #6b7280;
    font-size: 0.75rem;
    line-height: 1.4;
}

.checkbox-group {
    flex-direction: row;
    align-items: flex-start;
    gap: 0.75rem;
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    cursor: pointer;
    font-size: 0.875rem;
    line-height: 1.5;
    color: #374151;
    font-weight: 400 !important;
    text-transform: none !important;
    letter-spacing: normal !important;
}

.checkbox-label input[type="checkbox"] {
    display: none;
}

.checkmark {
    width: 20px;
    height: 20px;
    border: 2px solid #e5e7eb;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    transition: all 0.3s ease;
    flex-shrink: 0;
    margin-top: 2px;
}

.checkbox-label input[type="checkbox"]:checked + .checkmark {
    background: #667eea;
    border-color: #667eea;
}

.checkbox-label input[type="checkbox"]:checked + .checkmark::after {
    content: '✓';
    color: white;
    font-size: 12px;
    font-weight: bold;
}

.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 1rem;
    padding-top: 1.5rem;
    border-top: 1px solid #f1f5f9;
}

.btn {
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
}

.btn-primary {
    background: #667eea;
    color: white;
}

.btn-primary:hover {
    background: #5a67d8;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.btn-secondary {
    background: #f8fafc;
    color: #6b7280;
    border: 1px solid #e5e7eb;
}

.btn-secondary:hover {
    background: #e2e8f0;
    color: #374151;
}

.submit-success {
    text-align: center;
    padding: 2rem 0;
}

.success-icon {
    margin-bottom: 1.5rem;
}

.success-icon i {
    font-size: 4rem;
    color: #10b981;
}

.submit-success h3 {
    color: #1a202c;
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.submit-success p {
    color: #6b7280;
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 2rem;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

/* Responsive Modal */
@media (max-width: 768px) {
    .modal-container {
        width: 95%;
        max-height: 95vh;
    }
    
    .modal-header {
        padding: 1.5rem 1.5rem 1rem;
    }
    
    .modal-header h2 {
        font-size: 1.5rem;
    }
    
    .modal-content {
        padding: 1rem 1.5rem 1.5rem;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .btn {
        justify-content: center;
    }
}

/* Legal Pages Styles */
.legal-page-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 40px 20px;
}

.legal-header {
    text-align: center;
    margin-bottom: 48px;
    padding-bottom: 24px;
    border-bottom: 2px solid #e9ecef;
}

.legal-header h1 {
    font-size: 2.5rem;
    color: #2c3e50;
    margin-bottom: 12px;
    font-weight: 700;
}

.legal-header .subtitle {
    font-size: 1.1rem;
    color: #7f8c8d;
    margin: 0;
}

.legal-header .last-updated {
    font-size: 0.9rem;
    color: #95a5a6;
    margin: 8px 0 0 0;
}

.legal-content {
    line-height: 1.6;
}

.legal-section {
    margin-bottom: 32px;
}

.legal-section h2 {
    color: #2c3e50;
    font-size: 1.5rem;
    margin-bottom: 16px;
    font-weight: 600;
    border-left: 4px solid #3498db;
    padding-left: 16px;
}

.legal-section h3 {
    color: #34495e;
    font-size: 1.2rem;
    margin: 20px 0 12px 0;
    font-weight: 600;
}

.legal-section p {
    color: #2c3e50;
    margin-bottom: 12px;
}

.legal-section ul, .legal-section ol {
    margin: 12px 0;
    padding-left: 24px;
}

.legal-section li {
    color: #2c3e50;
    margin-bottom: 8px;
    line-height: 1.5;
}

.contact-info {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 12px;
    border-left: 4px solid #3498db;
    margin-top: 16px;
}

.contact-info p {
    margin: 4px 0;
    color: #2c3e50;
}

.contact-info strong {
    color: #2c3e50;
}

/* About page specific styles */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 24px;
    margin: 24px 0;
}

.feature-card {
    background: white;
    padding: 24px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    text-align: center;
    border: 1px solid #e9ecef;
}

.feature-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    color: white;
    font-size: 24px;
}

.feature-card h3 {
    color: #2c3e50;
    margin-bottom: 8px;
    font-size: 1.1rem;
}

.feature-card p {
    color: #6b7280;
    font-size: 0.9rem;
}

.values-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin: 24px 0;
}

.value-item {
    padding: 20px;
    border-left: 4px solid #3498db;
    background: #f8f9fa;
    border-radius: 8px;
}

.value-item h3 {
    color: #2c3e50;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.value-item h3 i {
    color: #3498db;
}

/* Contact page specific styles */
.contact-page-content {
    max-width: 900px;
}

.contact-intro {
    text-align: center;
    margin-bottom: 48px;
    padding: 24px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 16px;
}

.contact-methods {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    margin-bottom: 48px;
}

.contact-card {
    background: white;
    padding: 24px;
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    text-align: center;
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
}

.contact-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}

.contact-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    color: white;
    font-size: 24px;
}

.contact-card h3 {
    color: #2c3e50;
    margin-bottom: 8px;
    font-size: 1.1rem;
}

.contact-card p {
    color: #6b7280;
    font-size: 0.9rem;
    margin-bottom: 12px;
}

.contact-link {
    color: #3498db;
    text-decoration: none;
    font-weight: 500;
}

.contact-link:hover {
    text-decoration: underline;
}

.contact-form-section {
    background: white;
    padding: 32px;
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    border: 1px solid #e9ecef;
    margin-bottom: 32px;
}

.contact-form-section h2 {
    text-align: center;
    margin-bottom: 24px;
    color: #2c3e50;
}

.contact-form .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.contact-form .form-group {
    margin-bottom: 20px;
}

.contact-form label {
    display: block;
    margin-bottom: 8px;
    color: #2c3e50;
    font-weight: 500;
}

.contact-form input,
.contact-form select,
.contact-form textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.contact-form .btn-submit {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 14px 32px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 auto;
}

.contact-form .btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.3);
}

.company-info {
    background: white;
    padding: 24px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    border: 1px solid #e9ecef;
}

.info-card h3 {
    color: #2c3e50;
    margin-bottom: 8px;
}

.company-details p {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 8px 0;
}

.company-details i {
    color: #3498db;
    width: 16px;
}

.faq-section {
    margin-top: 24px;
}

.faq-item {
    background: white;
    padding: 24px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    border: 1px solid #e9ecef;
    margin-bottom: 16px;
}

.faq-item h3 {
    color: #2c3e50;
    margin-bottom: 12px;
    font-size: 1rem;
}

.faq-item p {
    color: #6b7280;
    margin: 0;
}

/* Cookie policy specific styles */
.cookie-type {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin: 16px 0;
    border-left: 4px solid #3498db;
}

.cookie-type h3 {
    color: #2c3e50;
    margin-bottom: 8px;
}

.third-party-section {
    background: white;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    margin: 16px 0;
}

.third-party-section h3 {
    color: #2c3e50;
    margin-bottom: 12px;
}

/* Mobile responsiveness for legal pages */
@media (max-width: 768px) {
    .legal-page-container {
        padding: 20px 16px;
    }
    
    .legal-header h1 {
        font-size: 2rem;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .values-section {
        grid-template-columns: 1fr;
    }
    
    .contact-methods {
        grid-template-columns: 1fr;
    }
    
    .contact-form .form-row {
        grid-template-columns: 1fr;
    }
}

/* Fallback News Message Styles */
.fallback-message {
    text-align: center;
    padding: 40px 20px;
    color: #6b7280;
}

.fallback-message i {
    font-size: 48px;
    color: #9ca3af;
    margin-bottom: 16px;
}

.fallback-message h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 8px;
}

.fallback-message p {
    font-size: 1rem;
    margin-bottom: 20px;
}

.loading-dots {
    display: inline-flex;
    gap: 4px;
}

.loading-dots span {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: #3b82f6;
    animation: bounce 1.4s infinite ease-in-out both;
}

.loading-dots span:nth-child(1) {
    animation-delay: -0.32s;
}

.loading-dots span:nth-child(2) {
    animation-delay: -0.16s;
}

@keyframes bounce {
    0%, 80%, 100% {
        transform: scale(0);
    }
    40% {
        transform: scale(1);
    }
}

/* Mobile-specific styles for new card layout */
@media (max-width: 767px) {
    .tool-card {
        min-height: 300px;
        padding: 20px;
    }
    
    .tool-info h3 {
        font-size: 1.1rem;
    }
    
    .tool-description {
        font-size: 0.9rem;
    }
    
    .tool-details {
        gap: 12px;
    }
    
    .usefulness-text {
        font-size: 0.8rem;
    }
    
    .features-list li {
        font-size: 0.75rem;
        padding: 3px 6px;
    }
    
    .tool-actions {
        flex-direction: column;
        gap: 8px;
    }
    
    .btn-copy-secondary {
        flex: 1;
    }
}

/* Optimized Icon Loading Styles */
.optimized-icon {
    width: 32px !important;
    height: 32px !important;
    border-radius: 4px;
    background-color: #f8fafc;
    transition: opacity 0.3s ease;
    object-fit: cover;
}

.optimized-icon:not(.icon-loaded):not(.icon-fallback) {
    opacity: 0.6;
    background: linear-gradient(45deg, #f1f5f9 25%, transparent 25%), 
                linear-gradient(-45deg, #f1f5f9 25%, transparent 25%), 
                linear-gradient(45deg, transparent 75%, #f1f5f9 75%), 
                linear-gradient(-45deg, transparent 75%, #f1f5f9 75%);
    background-size: 4px 4px;
    background-position: 0 0, 0 2px, 2px -2px, -2px 0px;
    animation: loading-shimmer 1.5s infinite linear;
}

.optimized-icon.icon-loaded {
    opacity: 1;
    background-color: transparent;
}

.optimized-icon.icon-fallback {
    opacity: 1;
    background-color: transparent;
}

@keyframes loading-shimmer {
    0% {
        background-position: 0 0, 0 2px, 2px -2px, -2px 0px;
    }
    100% {
        background-position: 4px 4px, 4px 6px, 6px 2px, 2px 4px;
    }
}

/* Ensure icon containers don't cause layout shift */
.tool-icon img, .favicon-icon {
    display: block;
    width: 32px;
    height: 32px;
}

/* Cache headers for locally cached icons handled in _headers file */
