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

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

/* Confetti Animation */
.confetti-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    overflow: hidden;
}

.confetti {
    position: absolute;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    animation: confetti-fall 3s linear forwards;
    opacity: 0;
}

@keyframes confetti-fall {
    0% {
        transform: translateY(-100vh) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(100vh) rotate(720deg);
        opacity: 0;
    }
}

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #FF3B5C;
}

/* Dark mode scrollbar */
.dark ::-webkit-scrollbar-track {
    background: #1f2937;
}

.dark ::-webkit-scrollbar-thumb {
    background: #9B59B6;
}

.dark ::-webkit-scrollbar-thumb:hover {
    background: #FF69B4;
}

/* Fade in animation for content */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Apply fade in to main content */
.max-w-4xl > div {
    animation: fadeIn 0.5s ease-out;
}

/* Smooth transitions */
button, a {
    transition: all 0.3s ease;
}

/* Focus styles for accessibility */
button:focus, a:focus {
    outline: 3px solid #FF69B4;
    outline-offset: 2px;
}

/* Print styles */
@media print {
    nav, .confetti-container, footer {
        display: none;
    }
    
    body {
        background: white !important;
    }
    
    .max-w-4xl > div {
        box-shadow: none !important;
        page-break-inside: avoid;
    }
}

/* Mobile optimizations */
@media (max-width: 640px) {
    .text-6xl {
        font-size: 3rem;
    }
    
    .text-4xl {
        font-size: 2rem;
    }
}

/* Prevent text selection on UI elements */
button, nav {
    user-select: none;
    -webkit-user-select: none;
}

/* Ensure code blocks are scrollable on small screens */
code {
    max-width: 100%;
    overflow-x: auto;
    display: block;
}