/* Import Google Fonts - Better font selection */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=JetBrains+Mono:wght@400;500;600&display=swap');

/* Define CSS variables for light and dark themes */
:root {
    --primary-bg-light: #f8fafc;
    --secondary-bg-light: #e2e8f0;
    --card-bg-light: #ffffff;
    --text-color-light: #1e293b;
    --accent-color-light: #3b82f6;
    --light-accent-light: #0f172a;
    --gradient-light: linear-gradient(135deg, #667eea 0%, #764ba2 100%);

    --primary-bg-dark: #0f172a;
    --secondary-bg-dark: #1e293b;
    --card-bg-dark: #334155;
    --text-color-dark: #f1f5f9;
    --accent-color-dark: #60a5fa;
    --light-accent-dark: #f8fafc;
    --gradient-dark: linear-gradient(135deg, #667eea 0%, #764ba2 100%);

    /* Default to dark theme variables */
    --primary-bg: var(--primary-bg-dark);
    --secondary-bg: var(--secondary-bg-dark);
    --card-bg: var(--card-bg-dark);
    --text-color: var(--text-color-dark);
    --accent-color: var(--accent-color-dark);
    --light-accent: var(--light-accent-dark);
    --gradient: var(--gradient-dark);
}

/* Apply light theme variables when data-theme is 'light' */
[data-theme="light"] {
    --primary-bg: var(--primary-bg-light);
    --secondary-bg: var(--secondary-bg-light);
    --card-bg: var(--card-bg-light);
    --text-color: var(--text-color-light);
    --accent-color: var(--accent-color-light);
    --light-accent: var(--light-accent-light);
    --gradient: var(--gradient-light);
}

/* Base body styles with better font */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--primary-bg);
    color: var(--text-color);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    line-height: 1.6;
    font-weight: 400;
}

/* Smooth scrolling for anchor links */
html {
    scroll-behavior: smooth;
}

/* Enhanced transitions for smooth animations */
* {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 0 20px rgba(96, 165, 250, 0.3); }
    50% { box-shadow: 0 0 40px rgba(96, 165, 250, 0.6); }
}

@keyframes gradient-shift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes slide-in-left {
    0% { transform: translateX(-100px); opacity: 0; }
    100% { transform: translateX(0); opacity: 1; }
}

@keyframes slide-in-right {
    0% { transform: translateX(100px); opacity: 0; }
    100% { transform: translateX(0); opacity: 1; }
}

@keyframes bounce-in {
    0% { transform: scale(0.3); opacity: 0; }
    50% { transform: scale(1.05); }
    70% { transform: scale(0.9); }
    100% { transform: scale(1); opacity: 1; }
}

/* Header Navigation Hover Effect */
.nav-link {
    position: relative;
    padding: 8px 16px;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--gradient);
    border-radius: 8px;
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: -1;
}

.nav-link:hover::before {
    opacity: 0.1;
    transform: scale(1);
}

.nav-link:hover {
    transform: translateY(-2px);
    color: var(--accent-color);
}

/* Enhanced Hero Button Animation */
.hero-button {
    position: relative;
    background: var(--gradient);
    background-size: 200% 200%;
    animation: gradient-shift 3s ease infinite;
    border: none;
    border-radius: 50px;
    padding: 16px 32px;
    font-weight: 600;
    font-size: 1.1rem;
    color: white;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.hero-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.6s;
}

.hero-button:hover::before {
    left: 100%;
}

.hero-button:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    animation-duration: 1s;
}

/* Enhanced Card Hover Animation */
.card-hover {
    background: var(--card-bg);
    border-radius: 20px;
    padding: 24px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

.card-hover::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--gradient);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}

.card-hover:hover::before {
    opacity: 0.05;
}

.card-hover:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.2);
    border-color: var(--accent-color);
}

.card-hover .feature-icon {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-hover:hover .feature-icon {
    transform: scale(1.2) rotate(5deg);
    color: var(--accent-color);
}

/* Download button animations */
.download-button {
    position: relative;
    background: var(--gradient);
    border: none;
    border-radius: 16px;
    padding: 20px 24px;
    font-weight: 600;
    color: white;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

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

.download-button:hover::after {
    width: 300px;
    height: 300px;
}

.download-button:hover {
    transform: translateY(-8px) scale(1.05);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
}

/* Coming Soon Button */
.coming-soon-button {
    cursor: not-allowed;
    opacity: 0.6;
    filter: grayscale(100%);
    pointer-events: none;
    background: var(--secondary-bg) !important;
    color: var(--text-color) !important;
}

/* Header glowing effect */
header {
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

header:hover {
    box-shadow: 0 0 40px rgba(96, 165, 250, 0.3);
    border-color: var(--accent-color);
}

/* Contact icon enhanced hover effect */
.contact-icon-hover {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.contact-icon-hover::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--gradient);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}

.contact-icon-hover:hover::before {
    opacity: 0.1;
}

.contact-icon-hover:hover {
    transform: translateY(-8px) scale(1.05);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.contact-icon-hover img {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.contact-icon-hover:hover img {
    transform: scale(1.1) rotate(5deg);
}

/* Spinner styles */
.spinner {
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top: 4px solid var(--accent-color);
    border-radius: 50%;
    width: 24px;
    height: 24px;
    animation: spin 1s linear infinite;
}

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

/* Back to top button enhancement */
#backToTopBtn {
    background: var(--gradient);
    border: none;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    animation: pulse-glow 2s infinite;
}

#backToTopBtn:hover {
    transform: translateY(-3px) scale(1.1);
    animation: none;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
}

/* Typography enhancements */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.025em;
}

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

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

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

/* Code font */
code {
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    font-weight: 500;
    background: rgba(96, 165, 250, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.9em;
}

/* Mobile specific adjustments */
@media (max-width: 768px) {
    header {
        margin: 0;
        border-radius: 0;
        border-left: none;
        border-right: none;
    }
    
    .hero-button {
        padding: 14px 28px;
        font-size: 1rem;
    }
    
    .card-hover {
        padding: 20px;
    }
}

/* Loading animation for page transitions */
.page-transition {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.6s ease forwards;
}

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

/* Stagger animation delays */
.stagger-1 { animation-delay: 0.1s; }
.stagger-2 { animation-delay: 0.2s; }
.stagger-3 { animation-delay: 0.3s; }
.stagger-4 { animation-delay: 0.4s; }
.stagger-5 { animation-delay: 0.5s; }
.stagger-6 { animation-delay: 0.6s; }