/* 
   =============================================
   THINKSPACE PREMIUM THEMES ENGINE (V2.0)
   World-Class Aesthetic Collection
   =============================================
*/

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,700;1,400&family=Lora:ital,wght@0,400;0,600;1,400&family=Fira+Code:wght@400;600&family=Space+Grotesk:wght@400;700&family=DM+Sans:wght@400;500;700&family=Cormorant+Garamond:ital,wght@0,400;0,700;1,400&family=Syne:wght@400;700;800&display=swap');

/* 1. Zen Minimalist (Apple-like Ultra Clean) */
.theme-zen-minimalist {
    --th-bg-main: #fbfbfd;
    --th-bg-image: none;
    --th-bg-card: #ffffff;
    --th-text-main: #1d1d1f;
    --th-text-muted: #86868b;
    --th-primary: #0066cc;
    --th-primary-light: rgba(0, 102, 204, 0.08);
    --th-border: rgba(0, 0, 0, 0.05);
    --th-hero-bg: #ffffff;
    --th-hero-text: #1d1d1f;
    --th-font-title: 'Inter', -apple-system, sans-serif;
    --th-font-body: 'Inter', -apple-system, sans-serif;
    --th-radius: 20px;
    --th-shadow: 0 20px 40px -10px rgba(0,0,0,0.04), 0 1px 3px rgba(0,0,0,0.02);
    --th-backdrop-filter: none;
}

/* 2. Midnight Elegance (Luxury High-End) */
.theme-midnight-elegance {
    --th-bg-main: #050505;
    --th-bg-image: radial-gradient(circle at 50% 0%, #1a1a1a 0%, #050505 70%);
    --th-bg-card: rgba(18, 18, 18, 0.7);
    --th-text-main: #f8fafc;
    --th-text-muted: #a3a3a3;
    --th-primary: #d4af37; /* Metallic Gold */
    --th-primary-light: rgba(212, 175, 55, 0.1);
    --th-border: rgba(212, 175, 55, 0.2);
    --th-hero-bg: transparent;
    --th-hero-text: #d4af37;
    --th-font-title: 'Cormorant Garamond', serif;
    --th-font-body: 'DM Sans', sans-serif;
    --th-radius: 12px;
    --th-shadow: 0 30px 60px rgba(0,0,0,0.8), inset 0 1px 0 rgba(255,255,255,0.05);
    --th-backdrop-filter: blur(16px);
}

/* 3. Cyberpunk Neon (Futuristic Sci-Fi) */
.theme-cyberpunk-neon {
    --th-bg-main: #020204;
    --th-bg-image: linear-gradient(to bottom, #090914, #020204);
    --th-bg-card: rgba(10, 10, 20, 0.8);
    --th-text-main: #e2e8f0;
    --th-text-muted: #64748b;
    --th-primary: #00f0ff; /* Neon Cyan */
    --th-primary-light: rgba(0, 240, 255, 0.15);
    --th-border: rgba(0, 240, 255, 0.3);
    --th-hero-bg: rgba(255, 0, 85, 0.05);
    --th-hero-text: #ff0055; /* Neon Pink */
    --th-font-title: 'Space Grotesk', sans-serif;
    --th-font-body: 'Fira Code', monospace;
    --th-radius: 0px;
    --th-shadow: 0 0 20px rgba(0, 240, 255, 0.15), inset 0 0 10px rgba(255, 0, 85, 0.1);
    --th-backdrop-filter: blur(8px);
}
.theme-cyberpunk-neon .ln-article-card {
    border-left: 3px solid #00f0ff !important;
    border-right: 3px solid #ff0055 !important;
}

/* 4. Nature's Whisper (Organic Earthy) */
.theme-natures-whisper {
    --th-bg-main: #f4f1eb;
    --th-bg-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23e0dac8' fill-opacity='0.4'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    --th-bg-card: #ffffff;
    --th-text-main: #2d381e;
    --th-text-muted: #737c64;
    --th-primary: #5c713b;
    --th-primary-light: rgba(92, 113, 59, 0.1);
    --th-border: #e2dfd3;
    --th-hero-bg: #ece9df;
    --th-hero-text: #2d381e;
    --th-font-title: 'Lora', serif;
    --th-font-body: 'Lora', serif;
    --th-radius: 24px;
    --th-shadow: 0 15px 35px rgba(92, 113, 59, 0.05);
    --th-backdrop-filter: none;
}

/* 5. Ocean Breeze (Glassmorphism & Gradients) */
.theme-ocean-breeze {
    --th-bg-main: #e0f2fe;
    --th-bg-image: linear-gradient(120deg, #a1c4fd 0%, #c2e9fb 100%);
    --th-bg-card: rgba(255, 255, 255, 0.65);
    --th-text-main: #0f172a;
    --th-text-muted: #334155;
    --th-primary: #0284c7;
    --th-primary-light: rgba(2, 132, 199, 0.15);
    --th-border: rgba(255, 255, 255, 0.5);
    --th-hero-bg: transparent;
    --th-hero-text: #0369a1;
    --th-font-title: 'Outfit', sans-serif;
    --th-font-body: 'DM Sans', sans-serif;
    --th-radius: 30px;
    --th-shadow: 0 20px 40px rgba(0, 0, 0, 0.08), inset 0 1px 0 rgba(255,255,255,0.6);
    --th-backdrop-filter: blur(20px);
}

/* 6. Sunset Glow (Vibrant Warmth) */
.theme-sunset-glow {
    --th-bg-main: #fff5f5;
    --th-bg-image: radial-gradient(at 100% 0%, #ffedd5 0px, transparent 50%), radial-gradient(at 0% 100%, #fee2e2 0px, transparent 50%);
    --th-bg-card: rgba(255, 255, 255, 0.85);
    --th-text-main: #431407;
    --th-text-muted: #9a3412;
    --th-primary: #ea580c;
    --th-primary-light: rgba(234, 88, 12, 0.1);
    --th-border: rgba(253, 186, 116, 0.4);
    --th-hero-bg: linear-gradient(135deg, #fef08a 0%, #f97316 100%);
    --th-hero-text: #ffffff;
    --th-font-title: 'Syne', sans-serif;
    --th-font-body: 'DM Sans', sans-serif;
    --th-radius: 16px;
    --th-shadow: 0 15px 30px rgba(234, 88, 12, 0.1);
    --th-backdrop-filter: blur(10px);
}

/* 7. Vintage Typewriter (Classic Academia) */
.theme-vintage-typewriter {
    --th-bg-main: #f4ecd8;
    --th-bg-image: none;
    --th-bg-card: #fdfaf6;
    --th-text-main: #3b3024;
    --th-text-muted: #705e49;
    --th-primary: #8b4513;
    --th-primary-light: rgba(139, 69, 19, 0.08);
    --th-border: #dcd0bc;
    --th-hero-bg: #e8dbbd;
    --th-hero-text: #3b3024;
    --th-font-title: 'Playfair Display', serif;
    --th-font-body: 'Cormorant Garamond', serif;
    --th-radius: 2px;
    --th-shadow: 4px 4px 0px rgba(139, 69, 19, 0.1);
    --th-backdrop-filter: none;
}
.theme-vintage-typewriter .ln-article-body {
    font-size: 1.25rem !important;
}

/* 8. Tech Innovator (Dark Mode Hacker) */
.theme-tech-innovator {
    --th-bg-main: #0f172a;
    --th-bg-image: none;
    --th-bg-card: #1e293b;
    --th-text-main: #f8fafc;
    --th-text-muted: #94a3b8;
    --th-primary: #38bdf8;
    --th-primary-light: rgba(56, 189, 248, 0.15);
    --th-border: #334155;
    --th-hero-bg: #0f172a;
    --th-hero-text: #38bdf8;
    --th-font-title: 'Space Grotesk', sans-serif;
    --th-font-body: 'Inter', sans-serif;
    --th-radius: 12px;
    --th-shadow: 0 10px 30px rgba(0,0,0,0.5);
    --th-backdrop-filter: none;
}

/* 9. Pastel Dream (Soft Vaporwave) */
.theme-pastel-dream {
    --th-bg-main: #faf5ff;
    --th-bg-image: linear-gradient(135deg, #f3e8ff 0%, #fae8ff 50%, #ffe4e6 100%);
    --th-bg-card: rgba(255, 255, 255, 0.7);
    --th-text-main: #4c1d95;
    --th-text-muted: #7c3aed;
    --th-primary: #d946ef;
    --th-primary-light: rgba(217, 70, 239, 0.1);
    --th-border: rgba(255, 255, 255, 0.8);
    --th-hero-bg: transparent;
    --th-hero-text: #86198f;
    --th-font-title: 'Outfit', sans-serif;
    --th-font-body: 'Nunito', sans-serif;
    --th-radius: 40px;
    --th-shadow: 0 15px 35px rgba(217, 70, 239, 0.15), inset 0 1px 0 #ffffff;
    --th-backdrop-filter: blur(12px);
}

/* 10. Monochrome Classic (Brutalist High Contrast) */
.theme-monochrome-classic {
    --th-bg-main: #ffffff;
    --th-bg-image: none;
    --th-bg-card: #ffffff;
    --th-text-main: #000000;
    --th-text-muted: #555555;
    --th-primary: #000000;
    --th-primary-light: #e5e5e5;
    --th-border: #000000;
    --th-hero-bg: #000000;
    --th-hero-text: #ffffff;
    --th-font-title: 'Syne', sans-serif;
    --th-font-body: 'Inter', sans-serif;
    --th-radius: 0px;
    --th-shadow: 12px 12px 0px #000000;
    --th-backdrop-filter: none;
}
.theme-monochrome-classic .ln-article-card {
    border: 3px solid #000 !important;
}

/* ====================================================================
   APPLY THEME VARIABLES TO ENGINE
   ==================================================================== */

.ln-article-engine {
    background-color: var(--th-bg-main);
    background-image: var(--th-bg-image);
    background-size: cover;
    background-attachment: fixed;
    background-position: center;
    color: var(--th-text-main);
    font-family: var(--th-font-body);
    min-height: 100vh;
    transition: background 0.4s ease;
}

.ln-article-engine .ln-article-card {
    background: var(--th-bg-card) !important;
    border: 1px solid var(--th-border) !important;
    border-radius: var(--th-radius) !important;
    box-shadow: var(--th-shadow) !important;
    backdrop-filter: var(--th-backdrop-filter) !important;
    -webkit-backdrop-filter: var(--th-backdrop-filter) !important;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.ln-article-engine .modern-hero-header {
    background: var(--th-hero-bg) !important;
    color: var(--th-hero-text) !important;
    border-radius: var(--th-radius) !important;
    border: 1px solid var(--th-border);
    backdrop-filter: var(--th-backdrop-filter) !important;
    -webkit-backdrop-filter: var(--th-backdrop-filter) !important;
}

.ln-article-engine h1, 
.ln-article-engine h2, 
.ln-article-engine h3,
.ln-article-engine .ln-article-title {
    font-family: var(--th-font-title) !important;
    color: var(--th-text-main);
    letter-spacing: -0.02em;
}

.ln-article-engine .ln-article-body {
    color: var(--th-text-main);
}

.ln-article-engine a {
    color: var(--th-primary);
    text-decoration-color: transparent;
    transition: text-decoration-color 0.2s ease, color 0.2s ease;
}
.ln-article-engine a:hover {
    text-decoration-color: var(--th-primary);
}

.ln-article-engine .premium-back-link {
    color: var(--th-text-muted);
    font-family: var(--th-font-title);
    font-weight: 600;
}
.ln-article-engine .premium-back-link:hover {
    color: var(--th-primary);
    transform: translateX(-4px);
}

.ln-article-engine .ln-sidebar-widget {
    background: var(--th-bg-card);
    border: 1px solid var(--th-border);
    border-radius: var(--th-radius);
    box-shadow: var(--th-shadow);
    backdrop-filter: var(--th-backdrop-filter);
    -webkit-backdrop-filter: var(--th-backdrop-filter);
}

.ln-article-engine .ln-toc-link.active {
    color: var(--th-primary);
    border-left-color: var(--th-primary);
    font-weight: bold;
    background-color: var(--th-primary-light);
    border-radius: 0 4px 4px 0;
}

.ln-article-engine blockquote {
    border-left: 4px solid var(--th-primary) !important;
    color: var(--th-text-muted) !important;
    background-color: var(--th-primary-light);
    padding: 1.25rem 1.5rem !important;
    border-radius: 0 var(--th-radius) var(--th-radius) 0;
    font-style: italic;
    font-size: 1.1em;
}

.ln-article-engine th {
    background-color: var(--th-primary-light) !important;
    color: var(--th-primary) !important;
    border-bottom: 2px solid var(--th-primary) !important;
}

.ln-article-engine td {
    border-bottom: 1px solid var(--th-border) !important;
}

.ln-article-engine .ln-post-category-badge {
    background-color: var(--th-primary-light) !important;
    color: var(--th-primary) !important;
    border-color: var(--th-primary) !important;
    font-family: var(--th-font-title);
    font-weight: 700;
    transition: transform 0.2s ease;
}
.ln-article-engine .ln-post-category-badge:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--th-primary-light);
}

/* Buttons inside the engine */
.ln-article-engine .btn-primary {
    background-color: var(--th-primary) !important;
    color: var(--th-bg-main) !important;
    border: none;
    border-radius: var(--th-radius);
    box-shadow: 0 4px 15px var(--th-primary-light);
    font-family: var(--th-font-title);
    font-weight: 700;
}
.ln-article-engine .btn-primary:hover {
    filter: brightness(1.1);
    transform: translateY(-1px);
}

