/* LeetPrompt Main CSS - Core Layout and Base Styles */

/* CSS Reset and Base Styles */
*, *::before, *::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Typography Enhancements */
h1, h2, h3, h4, h5, h6 {
    line-height: 1.2;
    margin-bottom: 0.5em;
}

p {
    margin-bottom: 1em;
}

/* Focus States for Accessibility */
button:focus,
a:focus,
input:focus,
textarea:focus,
select:focus {
    outline: 2px solid #3498db;
    outline-offset: 2px;
}

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

/* Container Utility */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.25rem;
}

/* Layout Utilities */
.section-padding {
    padding: 5rem 0;
}

.section-padding-sm {
    padding: 2rem 0;
}


/* Mobile Menu CSS-only Toggle */
#mobile-menu-toggle:checked ~ #mobile-nav {
    display: block !important;
}

/* Card Hover Effects */
.card-hover {
    transition: transform 300ms ease, box-shadow 300ms ease;
}

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

/* Button Base Styles */
.btn-base {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 0.5rem;
    transition: all 300ms ease;
    cursor: pointer;
    border: none;
    font-size: 1rem;
}

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

.btn-base:active {
    transform: translateY(0);
}

/* Gradient Utilities */
.gradient-hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.gradient-section {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

/* Code Block Styling */
.code-block {
    background-color: #2d3748;
    color: #e2e8f0;
    padding: 1rem;
    border-radius: 0.5rem;
    font-family: 'Monaco', 'Consolas', 'Courier New', monospace;
    font-size: 0.875rem;
    line-height: 1.5;
    overflow-x: auto;
}

/* Loading Spinner */
.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

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

/* Responsive Utilities */
@media (max-width: 768px) {
    .section-padding {
        padding: 3rem 0;
    }
    
    .container {
        padding: 0 1rem;
    }
    
    h1 {
        font-size: 2.5rem;
    }
    
    h2 {
        font-size: 2rem;
    }
}

/* Skip Link for Accessibility */
.skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    background: #3498db;
    color: white;
    padding: 8px;
    text-decoration: none;
    border-radius: 3px;
    z-index: 1000;
}

.skip-link:focus {
    top: 6px;
}

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

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

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

.animate-float-delayed {
    animation: float 8s ease-in-out infinite;
    animation-delay: 2s;
}

.animate-gradient {
    background-size: 200% 200%;
    animation: gradient 4s ease infinite;
}

.animate-gradient-delayed {
    background-size: 200% 200%;
    animation: gradient 4s ease infinite;
    animation-delay: 2s;
}

/* Demo Steps Transition */
.demo-step {
    transition: all 0.3s ease-in-out;
}

.demo-step.hidden {
    opacity: 0;
    pointer-events: none;
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    .animate-float,
    .animate-float-delayed,
    .animate-gradient,
    .animate-gradient-delayed {
        animation: none;
    }
    
    .demo-step {
        transition: none;
    }
    
    .transform,
    .hover\\:scale-105,
    .hover\\:scale-110 {
        transform: none !important;
    }
}

/* Print Styles */
@media print {
    .no-print {
        display: none !important;
    }
    
    a[href]:after {
        content: " (" attr(href) ")";
    }
    
    .shadow-card,
    .shadow-header,
    .shadow-hero {
        box-shadow: none !important;
    }
}