/**
 * GMAHK Advent - Modern & Professional Theme Stylesheet
 * Ultra-sleek Glassmorphism, Micro-animations & High-Contrast Visuals
 */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;1,400;1,600&family=Outfit:wght@400;500;600;700;800;900&display=swap');

:root {
    --brand-primary: #2563eb;
    --brand-primary-hover: #1d4ed8;
    --brand-accent: #0ea5e9;
    --brand-accent-gold: #f59e0b;
    --bg-light: #f8fafc;
    --bg-dark: #090d16;
    --surface-light: #ffffff;
    --surface-dark: #111827;
    --text-primary-light: #0f172a;
    --text-muted-light: #475569;
    --text-primary-dark: #f8fafc;
    --text-muted-dark: #94a3b8;
    --border-light: rgba(226, 232, 240, 0.8);
    --border-dark: rgba(255, 255, 255, 0.08);
}

html {
    scroll-behavior: smooth;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    transition: background-color 0.4s ease, color 0.4s ease;
    overflow-x: hidden;
}

/* Headings font family */
h1, h2, h3, h4, h5, h6, .font-display {
    font-family: 'Outfit', 'Plus Jakarta Sans', sans-serif;
    letter-spacing: -0.02em;
}

/* Custom Sleek Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

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

html.dark ::-webkit-scrollbar-track {
    background: #090d16;
}

::-webkit-scrollbar-thumb {
    background: #94a3b8;
    border-radius: 9999px;
    border: 2px solid #f1f5f9;
}

html.dark ::-webkit-scrollbar-thumb {
    background: #334155;
    border: 2px solid #090d16;
}

::-webkit-scrollbar-thumb:hover {
    background: #2563eb;
}

html.dark ::-webkit-scrollbar-thumb:hover {
    background: #3b82f6;
}

/* Glassmorphism Classes */
.glass-panel {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(226, 232, 240, 0.8);
}

html.dark .glass-panel {
    background: rgba(17, 24, 39, 0.75);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.glass-card {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(226, 232, 240, 0.9);
    box-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.05);
}

html.dark .glass-card {
    background: rgba(17, 24, 39, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.07);
    box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.5);
}

/* Gradient Text Utilities */
.gradient-text-primary {
    background: linear-gradient(135deg, #2563eb 0%, #0ea5e9 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

html.dark .gradient-text-primary {
    background: linear-gradient(135deg, #60a5fa 0%, #38bdf8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.gradient-text-gold {
    background: linear-gradient(135deg, #d97706 0%, #fbbf24 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Glow Effects */
.glow-primary {
    box-shadow: 0 0 25px -5px rgba(37, 99, 235, 0.35);
}

html.dark .glow-primary {
    box-shadow: 0 0 30px -5px rgba(59, 130, 246, 0.4);
}

.glow-subtle {
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.08);
}

html.dark .glow-subtle {
    box-shadow: 0 15px 35px -10px rgba(0, 0, 0, 0.6);
}

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

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

@keyframes pulseGlow {
    0%, 100% { opacity: 0.4; transform: scale(1); }
    50% { opacity: 0.8; transform: scale(1.05); }
}

.animate-pulse-glow {
    animation: pulseGlow 4s ease-in-out infinite;
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

.animate-shimmer {
    background: linear-gradient(90deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0.15) 50%, rgba(255,255,255,0) 100%);
    background-size: 200% 100%;
    animation: shimmer 3s infinite;
}

/* Card Hover Elevate */
.hover-elevate {
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.35s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.35s ease;
}

.hover-elevate:hover {
    transform: translateY(-4px);
}

/* Form Controls Focus State */
input:focus, textarea:focus, select:focus {
    outline: none !important;
    border-color: #3b82f6 !important;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.25) !important;
}

/* Contrast enhancement & Alignment for Prose database content */
.prose {
    color: #334155;
}

html.dark .prose {
    color: #cbd5e1;
}

.prose strong {
    color: #0f172a;
    font-weight: 700;
}

html.dark .prose strong {
    color: #f8fafc;
}

.prose h1, .prose h2, .prose h3, .prose h4 {
    color: #0f172a;
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
}

html.dark .prose h1, html.dark .prose h2, html.dark .prose h3, html.dark .prose h4 {
    color: #f8fafc;
}

.prose a {
    color: #2563eb;
    text-decoration: underline;
    text-underline-offset: 3px;
    font-weight: 600;
}

html.dark .prose a {
    color: #60a5fa;
}

.prose blockquote {
    border-left: 4px solid #2563eb;
    background: #f1f5f9;
    padding: 1rem 1.5rem;
    border-radius: 0 1rem 1rem 0;
    color: #1e293b;
    font-style: italic;
}

html.dark .prose blockquote {
    border-left: 4px solid #3b82f6;
    background: rgba(255, 255, 255, 0.04);
    color: #e2e8f0;
}

/* Precise Rich Text / WYSIWYG Alignment Support (Center, Right, Left, Justify) */
.prose [style*="text-align:center"],
.prose [style*="text-align: center"],
.prose [align="center"] {
    text-align: center !important;
}

.prose [style*="text-align:center"] img,
.prose [style*="text-align: center"] img,
.prose [align="center"] img,
.prose img[style*="text-align:center"],
.prose img[style*="text-align: center"] {
    display: inline-block !important;
    margin-left: auto !important;
    margin-right: auto !important;
    vertical-align: middle;
}

.prose [style*="text-align:right"],
.prose [style*="text-align: right"],
.prose [align="right"] {
    text-align: right !important;
}

.prose [style*="text-align:right"] img,
.prose [style*="text-align: right"] img,
.prose [align="right"] img {
    margin-left: auto !important;
    margin-right: 0 !important;
    display: inline-block !important;
}

.prose [style*="text-align:left"],
.prose [style*="text-align: left"],
.prose [align="left"] {
    text-align: left !important;
}

.prose [style*="text-align:justify"],
.prose [style*="text-align: justify"],
.prose [align="justify"] {
    text-align: justify !important;
}

.prose img {
    border-radius: 1rem;
    max-width: 100%;
    height: auto;
    box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.08);
}

html.dark .prose img {
    box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

/* Interactive Badge */
.badge-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0.85rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

/* Print Optimization */
@media print {
    .navbar, footer, .no-print, button, .theme-toggle {
        display: none !important;
    }
    body {
        background: #ffffff !important;
        color: #000000 !important;
    }
    .glass-card, .glass-panel {
        background: #ffffff !important;
        border: 1px solid #cccccc !important;
        box-shadow: none !important;
    }
}