/* Global Styles */
body {
    font-family: 'Arial', sans-serif;
    background-color: #0c1013;
    color: white;
    line-height: 1.6;
}

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

::-webkit-scrollbar-track {
    background: #1a2130;
}

::-webkit-scrollbar-thumb {
    background: #6d28d9;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #5b21b6;
}

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

/* Hover Effects */
.hover\:scale-105:hover {
    transform: scale(1.05);
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .md\:grid-cols-3 {
        grid-template-columns: 1fr;
    }
    .feature-highlights {
        grid-template-columns: 1fr !important;
        gap: 1.5rem !important;
        max-width: 100vw !important;
        margin-left: auto !important;
        margin-right: auto !important;
    }
    .enhanced-card {
        width: 100% !important;
        max-width: 350px;
        margin-left: auto;
        margin-right: auto;
        margin-bottom: 0;
    }
}

@media (min-width: 769px) {
    .feature-highlights {
        max-width: 1200px;
        gap: 1.5rem;
        margin-left: auto;
        margin-right: auto;
    }
    .enhanced-card {
        min-width: 0;
        margin-bottom: 0;
    }
}

/* Additional Custom Styles */
.tool-card {
    transition: all 0.3s ease;
}

.tool-card:hover {
    box-shadow: 0 10px 20px rgba(109, 40, 217, 0.2);
}

.py-16 {
    padding-top: 4rem;
    padding-bottom: 0 !important;
}

/* Prevent Flash and Shaking */
html {
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.3s ease;
}

html.theme-loaded {
    visibility: visible;
    opacity: 1;
}

/* Prevent scrollbar from causing layout shift */
html {
    scrollbar-gutter: stable;
}

/* Ensure content doesn't shift during load */
body {
    min-height: 100vh;
    overflow-x: hidden;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Smooth transitions for theme changes */
* {
    transition: background-color 0.3s ease, 
                color 0.3s ease, 
                border-color 0.3s ease,
                box-shadow 0.3s ease;
}

:root {
    --bg-primary: #ffffff;
    --bg-secondary: #f3f4f6;
    --text-primary: #1f2937;
    --text-secondary: #4b5563;
    --accent-color: #6d28d9;
    --border-color: #e5e7eb;
    --card-bg: #ffffff;
    --hover-bg: #f9fafb;
}

[data-theme="dark"] {
    --bg-primary: #0c1013;
    --bg-secondary: #1a2130;
    --text-primary: #ffffff;
    --text-secondary: #9ca3af;
    --accent-color: #6d28d9;
    --border-color: #374151;
    --card-bg: #1a2130;
    --hover-bg: #2d3748;
}

/* Prevent Flash of Unstyled Content */
html {
    visibility: visible;
    opacity: 1;
}

html.loading {
    visibility: hidden;
    opacity: 0;
}

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
}

.theme-toggle {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 50;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    padding: 0.5rem;
    border-radius: 9999px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: none; /* Hide by default */
}

.theme-toggle:hover {
    transform: scale(1.1);
}

/* Add styles to hide theme icons by default */
[data-theme-icon] {
    display: none;
}

/* Show light icon by default */
[data-theme-icon="light"] {
    display: block;
}

/* Show dark icon when dark theme is active */
[data-theme="dark"] [data-theme-icon="dark"] {
    display: block;
}

[data-theme="dark"] [data-theme-icon="light"] {
    display: none;
}

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

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

.text-theme-primary {
    color: var(--text-primary);
}

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

.border-theme {
    border-color: var(--border-color);
}

.card {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
}

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

/* Mobile Navigation Styles */
.mobile-nav {
    position: fixed;
    top: 0;
    left: -100%;
    width: 80%;
    max-width: 300px;
    height: 100vh;
    background-color: var(--bg-primary);
    z-index: 1000;
    transition: left 0.3s ease-in-out;
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.1);
}

.mobile-nav.active {
    left: 0;
}

.mobile-nav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 999;
    display: none;
}

.mobile-nav-overlay.active {
    display: block;
}

.mobile-nav-header {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.mobile-nav-close {
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
}

.mobile-nav-menu {
    padding: 1rem;
}

.mobile-nav-item {
    padding: 0.75rem 1rem;
    color: var(--text-primary);
    text-decoration: none;
    display: flex;
    align-items: center;
    border-radius: 0.5rem;
    transition: background-color 0.3s ease;
}

.mobile-nav-item:hover {
    background-color: var(--hover-bg);
}

.mobile-nav-item i {
    margin-right: 0.75rem;
    color: var(--accent-color);
}

@media (min-width: 768px) {
    .theme-toggle {
        display: block; /* Show only on desktop */
    }
    .mobile-nav-toggle {
        display: none;
    }
}
.newsletter-popup {
    background: rgba(0,0,0,0.40);
    backdrop-filter: blur(8px);
    animation: popup-bg-fade 0.5s;
}
@keyframes popup-bg-fade {
    from { opacity: 0; }
    to { opacity: 1; }
}
.animate-popup-fade-in {
    animation: popup-fade-in 0.5s cubic-bezier(.4,0,.2,1);
}
@keyframes popup-fade-in {
    from { opacity: 0; transform: translateY(40px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}
.theme-popup-content {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, var(--bg-secondary, #f3f4f6) 80%, #6d28d91a 100%);
    box-shadow: 0 12px 40px 0 #6d28d91a, 0 2px 12px 0 #6d28d91a;
    border-radius: 1.5rem;
    border: none;
    transition: background 0.3s, box-shadow 0.3s;
}
[data-theme="dark"] .theme-popup-content {
    background: linear-gradient(135deg, var(--bg-secondary, #1a2130) 80%, #6d28d933 100%);
}

.enhanced-card {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
    padding: 1.5rem;
    transition: box-shadow 0.2s, background 0.2s;
    margin-bottom: 0;
    width: 100%;
}
.enhanced-card:hover {
    background-color: var(--hover-bg);
    box-shadow: 0 4px 16px rgba(109, 40, 217, 0.08);
}