/* Tailwind CSS - Base Layer */
@import url('https://cdn.jsdelivr.net/npm/tailwindcss@2.2.19/dist/tailwind.min.css');

/* Override Tailwind's Sticky/Fixed utilities for header */
.fixed.liquid-glass-header,
header.liquid-glass-header,
.liquid-glass-header {
    position: fixed !important;
}

/* Custom Styles */
:root {
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --secondary-gradient: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

/* Typography */
body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

/* iOS 26 Liquid Glass Header Effect */
header.liquid-glass-header {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    z-index: 9999 !important;
    
    /* Liquid Glass Base */
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    
    /* Glass Border & Glow */
    border-bottom: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow: 
        0 8px 32px rgba(31, 38, 135, 0.15),
        0 4px 12px rgba(0, 0, 0, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.6),
        inset 0 -1px 0 rgba(255, 255, 255, 0.2);
    
    /* Subtle animation for living glass effect */
    animation: shimmer 8s ease-in-out infinite;
    position: relative;
    overflow: hidden;
}

/* Glossy overlay for extra depth */
.liquid-glass-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 200%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.1) 20%,
        rgba(255, 255, 255, 0.3) 50%,
        rgba(255, 255, 255, 0.1) 80%,
        transparent
    );
    animation: gloss 12s ease-in-out infinite;
    pointer-events: none;
}

/* Refraction effect layer */
.liquid-glass-header::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(
        ellipse at top,
        rgba(255, 255, 255, 0.25) 0%,
        transparent 70%
    );
    pointer-events: none;
}

/* Shimmer animation for living glass */
@keyframes shimmer {
    0%, 100% {
        opacity: 1;
        box-shadow: 
            0 8px 32px rgba(31, 38, 135, 0.15),
            0 4px 12px rgba(0, 0, 0, 0.08),
            inset 0 1px 0 rgba(255, 255, 255, 0.6),
            inset 0 -1px 0 rgba(255, 255, 255, 0.2);
    }
    50% {
        opacity: 0.98;
        box-shadow: 
            0 8px 32px rgba(31, 38, 135, 0.2),
            0 4px 16px rgba(0, 0, 0, 0.1),
            inset 0 1px 0 rgba(255, 255, 255, 0.7),
            inset 0 -1px 0 rgba(255, 255, 255, 0.3);
    }
}

/* Gloss sweep animation */
@keyframes gloss {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(100%);
    }
}

/* Prose Styles for Markdown Content - Direct CSS */
.prose {
    color: #374151;
    max-width: none;
    line-height: 1.75;
}

.prose h1, 
.prose h2, 
.prose h3, 
.prose h4 {
    color: #111827;
    font-weight: 700;
    line-height: 1.3;
}

.prose h1 {
    font-size: 2.25rem;
    margin-top: 0;
    margin-bottom: 1.5rem;
}

.prose h2 {
    font-size: 1.875rem;
    margin-top: 2rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e5e7eb;
}

.prose h3 {
    font-size: 1.5rem;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

.prose h4 {
    font-size: 1.25rem;
    margin-top: 1.25rem;
    margin-bottom: 0.5rem;
}

.prose p {
    margin-bottom: 1rem;
    color: #4b5563;
    line-height: 1.75;
}

.prose ul, 
.prose ol {
    margin-bottom: 1rem;
    padding-left: 1.5rem;
}

.prose ul {
    list-style-type: disc;
}

.prose ol {
    list-style-type: decimal;
}

.prose li {
    margin-bottom: 0.5rem;
    color: #4b5563;
    line-height: 1.75;
}

.prose ul li::marker {
    color: #8b5cf6;
}

.prose strong {
    font-weight: 600;
    color: #111827;
}

.prose em {
    font-style: italic;
    color: #374151;
}

.prose a {
    color: #7c3aed;
    text-decoration: underline;
    transition: color 0.15s;
}

.prose a:hover {
    color: #6d28d9;
}

.prose hr {
    margin: 2rem 0;
    border-color: #e5e7eb;
}

.prose blockquote {
    border-left: 4px solid #8b5cf6;
    padding-left: 1rem;
    font-style: italic;
    color: #4b5563;
    margin: 1rem 0;
}

.prose code {
    background-color: #f3f4f6;
    padding: 0.125rem 0.375rem;
    border-radius: 0.25rem;
    font-size: 0.875rem;
    font-family: 'Courier New', monospace;
    color: #7c3aed;
}

.prose pre {
    background-color: #1f2937;
    color: #f3f4f6;
    padding: 1rem;
    border-radius: 0.5rem;
    overflow-x: auto;
    margin: 1rem 0;
    font-size: 0.875rem;
    line-height: 1.5;
}

.prose pre code {
    background-color: transparent;
    padding: 0;
    color: inherit;
    font-size: inherit;
}

.prose img {
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    margin: 1.5rem 0;
}

.prose table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
}

.prose th {
    background-color: #f9fafb;
    border: 1px solid #e5e7eb;
    padding: 0.75rem;
    text-align: left;
    font-weight: 600;
}

.prose td {
    border: 1px solid #e5e7eb;
    padding: 0.75rem;
}

/* Module Cards */
.module-card {
    background-color: white;
    border-radius: 0.75rem;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
    border: 1px solid #e5e7eb;
    padding: 1.5rem;
    transition: box-shadow 0.15s;
}

.module-card:hover {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

/* Animations */
@keyframes gradient {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

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

/* Responsive Design */
@media (max-width: 768px) {
    .prose h1 {
        font-size: 1.875rem;
    }
    
    .prose h2 {
        font-size: 1.5rem;
    }
    
    .prose h3 {
        font-size: 1.25rem;
    }
    
    .prose h4 {
        font-size: 1.125rem;
    }
    
    .prose {
        font-size: 0.875rem;
    }
}