/*
 --- MSEndpoint Global Neve Modernization CSS ---
*/

@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;700&family=Inter:wght@300;400;500;600;700&display=swap');

/* Conditional Mode Settings with Chrome Auto-Dark Override Protection */
:root {
    color-scheme: dark light;
}

/* Force dark Studio X palette onto vanilla Neve Containers as default base */
:root,
[data-neve-theme="dark"],
html.neve-dark-theme,
html.neve-dark-theme~* {
    color-scheme: dark;
    --nv-primary-accent: #6366f1 !important;
    --nv-secondary-accent: #4f46e5 !important;
    --nv-site-bg: #050505 !important;
    --nv-light-bg: #0a0a0a !important;
    --nv-dark-bg: #000000 !important;
    --nv-text-color: #e2e8f0 !important;
    --nv-text-dark-bg: #f8fafc !important;
    --nv-card-bg: rgba(10, 10, 10, 0.4) !important;
    --nv-card-bg-hover: rgba(10, 10, 10, 0.5) !important;
    --nv-card-border: rgba(255, 255, 255, 0.05) !important;
    --nv-card-shadow: rgba(0, 0, 0, 0.5) !important;
}

[data-neve-theme="light"],
html.neve-light-theme,
html.neve-light-theme~* {
    color-scheme: only light !important;
    /* Protects against chrome://flags/#enable-force-dark */
    --nv-primary-accent: #6366f1 !important;
    --nv-secondary-accent: #4f46e5 !important;
    --nv-site-bg: #f8fafc !important;
    --nv-light-bg: #ffffff !important;
    --nv-dark-bg: #e2e8f0 !important;
    --nv-text-color: #0f172a !important;
    --nv-text-dark-bg: #1e293b !important;
    --nv-card-bg: rgba(255, 255, 255, 0.6) !important;
    --nv-card-bg-hover: rgba(255, 255, 255, 0.8) !important;
    --nv-card-border: rgba(0, 0, 0, 0.05) !important;
    --nv-card-shadow: rgba(0, 0, 0, 0.05) !important;
}

body {
    background-color: var(--nv-site-bg) !important;
    color: var(--nv-text-color) !important;
    font-family: 'Inter', sans-serif !important;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Glass panel modernization */
.nv-content-wrap,
.neve-main>.container,
article.type-post,
article.type-page {
    background: var(--nv-card-bg) !important;
    backdrop-filter: blur(24px) !important;
    -webkit-backdrop-filter: blur(24px) !important;
    border: 1px solid var(--nv-card-border) !important;
    border-radius: 30px !important;
    padding: 30px !important;
    box-shadow: 0 25px 50px -12px var(--nv-card-shadow) !important;
}

body.home .neve-main>.container,
body.home .nv-content-wrap,
body.home article.type-page {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

.nv-index-posts .nv-post-wrap {
    background: var(--nv-card-bg-hover) !important;
    border: 1px solid var(--nv-card-border) !important;
    border-radius: 20px !important;
    backdrop-filter: blur(16px) !important;
    -webkit-backdrop-filter: blur(16px) !important;
    transition: all 0.3s ease !important;
}

.nv-index-posts .nv-post-wrap:hover {
    transform: translateY(-5px) !important;
    box-shadow: 0 20px 25px -5px rgba(99, 102, 241, 0.2) !important;
    border-color: rgba(99, 102, 241, 0.3) !important;
}

h1.entry-title,
.page-title,
.nv-page-title {
    background: linear-gradient(to right, #818cf8, #a78bfa, #f472b6);
    -webkit-background-clip: text;
    color: transparent;
    display: inline-block;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
    font-weight: 700;
    letter-spacing: -0.05em;
}

/* --- Academy CTA Hero --- */
.studio-x-cta-section {
    position: relative;
    background-color: #050505;
    color: #ffffff;
    padding: 100px 20px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

#hero-particles {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: auto;
    z-index: 1;
}

.studio-x-cta-content.glass-lab {
    position: relative;
    z-index: 2;
    background: rgba(10, 10, 10, 0.4);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 40px;
    padding: 60px 40px;
    max-width: 900px;
    width: 100%;
    text-align: center;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.studio-x-title {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-weight: 600;
    font-size: 2.75rem;
    letter-spacing: -0.05em;
    margin-bottom: 20px;
    color: #ffffff;
}

.text-gradient-purple {
    background: linear-gradient(to right, #818cf8, #a78bfa, #f472b6);
    -webkit-background-clip: text;
    color: transparent;
}

.studio-x-desc {
    font-weight: 400;
    font-size: 1.25rem;
    color: #94a3b8;
    margin-bottom: 50px;
}

.studio-x-btn {
    display: inline-block;
    background-color: #6366f1;
    color: #ffffff !important;
    font-weight: 600;
    font-size: 16px;
    padding: 16px 36px;
    border-radius: 12px;
    text-decoration: none !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.studio-x-btn:hover {
    background-color: #4f46e5;
    transform: scale(1.05);
    box-shadow: 0 10px 25px -5px rgba(99, 102, 241, 0.4);
}

.bouncers-container {
    display: flex;
    justify-content: center;
    gap: 32px;
    margin-bottom: 50px;
}

.bouncer {
    width: 98px;
    height: 98px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    will-change: transform;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.03);
    font-size: 32px;
    color: #34d399;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

/* --- Deduction Overlay --- */
.deduction-overlay {
    position: fixed;
    inset: 0;
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 9998;
    background-image:
        linear-gradient(rgba(99, 102, 241, 0.15) 1px, transparent 1px),
        linear-gradient(90deg, rgba(99, 102, 241, 0.15) 1px, transparent 1px);
    background-size: 50px 50px;
    mask-image: radial-gradient(circle 200px at var(--mouse-x, 50%) var(--mouse-y, 50%), transparent 0%, rgba(0, 0, 0, 1) 100%);
    -webkit-mask-image: radial-gradient(circle 200px at var(--mouse-x, 50%) var(--mouse-y, 50%), transparent 0%, rgba(0, 0, 0, 1) 100%);
}

.deduction-scanline {
    position: fixed;
    top: -10px;
    left: 0;
    right: 0;
    height: 10px;
    background: linear-gradient(to bottom, transparent, rgba(99, 102, 241, 0.5));
    box-shadow: 0px 5px 15px rgba(99, 102, 241, 0.3);
    pointer-events: none;
    z-index: 9998;
    opacity: 0;
    animation: scanVertical 6s linear infinite;
    transition: opacity 0.4s;
}

@keyframes scanVertical {
    0% {
        transform: translateY(-100vh);
    }

    100% {
        transform: translateY(200vh);
    }
}

body.deduction-active .deduction-overlay,
body.deduction-active .deduction-scanline {
    opacity: 1;
}

.deduction-badge {
    position: fixed;
    top: 20px;
    right: 20px;
    background: rgba(10, 10, 10, 0.85);
    border: 1px solid #6366f1;
    color: #6366f1;
    padding: 10px 20px;
    font-size: 14px;
    font-family: 'JetBrains Mono', monospace;
    border-radius: 4px;
    z-index: 9999;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.4s;
    pointer-events: none;
}

body.deduction-active .deduction-badge {
    opacity: 1;
    transform: translateY(0);
}

.deduction-clue {
    display: inline-block;
    opacity: 0;
    color: #6366f1 !important;
    font-size: 0.85em;
    font-family: 'JetBrains Mono', monospace;
    margin-left: 10px;
    transition: opacity 0.4s;
    transform: translateY(5px);
    pointer-events: none;
}

body.deduction-active .deduction-clue {
    opacity: 1;
    transform: translateY(0);
}

/* --- Advanced Cookie Banner & Mini Pill --- */
.mse-cookie-mini {
    position: fixed;
    bottom: 20px;
    left: 20px;
    background: #111111;
    border-radius: 40px;
    height: 48px;
    display: flex;
    align-items: center;
    padding: 0 14px;
    cursor: pointer;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
    z-index: 99999;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    transform: translateX(-200%);
    overflow: hidden;
    white-space: nowrap;
    width: 48px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.mse-cookie-mini.show {
    transform: translateX(0);
}

.mse-cookie-mini:hover {
    width: 170px;
    background: #171717;
}

.mse-cookie-mini-icon {
    min-width: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mse-cookie-mini-text {
    font-weight: 700;
    font-size: 11.5px;
    color: #ffffff;
    margin-left: 14px;
    opacity: 0;
    transition: opacity 0.2s;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.mse-cookie-mini:hover .mse-cookie-mini-text {
    opacity: 1;
    transition-delay: 0.1s;
}

.mse-cookie-advanced-banner {
    position: fixed;
    bottom: 20px;
    left: 20px;
    transform: translateX(-200%);
    width: 90%;
    max-width: 340px;
    background: #171717;
    color: #ffffff;
    padding: 24px;
    z-index: 100000;
    border-radius: 12px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7);
    transition: all 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    border: 1px solid rgba(255, 255, 255, 0.05);
    max-height: 90vh;
    overflow-y: auto;
}

.mse-cookie-advanced-banner.expanded {
    max-width: 700px;
}

.mse-cookie-advanced-banner.show {
    transform: translateX(0);
}

.mse-cookie-advanced-banner.closing {
    transform: translateX(-200%) scale(0);
    opacity: 0;
}

.mse-cookie-header .mse-cookie-icons {
    display: flex;
    justify-content: flex-end;
    gap: 15px;
    margin-bottom: 10px;
    color: #94a3b8;
}

.mse-cookie-header .mse-cookie-close:hover {
    color: #ffffff;
}

.mse-cookie-header h3 {
    font-size: 16px;
    font-weight: 700;
    margin: 0 0 10px 0;
    color: #ffffff;
}

.mse-cookie-header p {
    font-size: 11.5px;
    line-height: 1.5;
    color: #e2e8f0;
    margin: 0 0 15px 0;
}

.mse-cookie-header a {
    color: #0ea5e9;
    text-decoration: none;
}

.mse-cookie-toggle-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 20px;
}

.mse-cookie-toggle {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-weight: 700;
    font-size: 11px;
    letter-spacing: 0.5px;
    color: #ffffff;
}

.mse-cookie-toggle input {
    display: none;
}

.mse-custom-check {
    width: 18px;
    height: 18px;
    border-radius: 6px;
    background: #0ea5e9;
    border: 1px solid #0ea5e9;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    transition: background 0.2s;
}

.mse-custom-check svg {
    width: 14px;
    height: 14px;
    stroke: #ffffff;
}

.mse-cookie-toggle input:not(:checked)+.mse-custom-check {
    background: transparent;
    border-color: #475569;
}

.mse-cookie-toggle input:not(:checked)+.mse-custom-check svg {
    opacity: 0;
}

.mse-cookie-toggle input:disabled+.mse-custom-check {
    background: #0ea5e9;
    opacity: 0.5;
}

.mse-cookie-toggle input:disabled~span {
    opacity: 0.7;
}

.mse-cookie-actions {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.mse-cookie-btn {
    background: #262626;
    color: #ffffff;
    border: 1px solid #404040;
    padding: 10px 16px;
    border-radius: 30px;
    font-weight: 700;
    font-size: 11px;
    cursor: pointer;
    flex: 1;
    text-align: center;
    transition: all 0.2s;
}

.mse-cookie-btn:hover {
    background: #333333;
}

.mse-cookie-footer {
    display: flex;
    flex-direction: column;
    align-items: center;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 15px;
}

.mse-cookie-details-btn {
    background: transparent;
    border: none;
    color: #cbd5e1;
    font-size: 11px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.mse-cookie-details-btn:hover {
    color: #ffffff;
}

.mse-cookie-tabs {
    display: flex;
    width: 100%;
    margin-top: 20px;
}

.tab-item {
    flex: 1;
    text-align: center;
    padding: 12px;
    font-size: 11px;
    font-weight: 700;
    color: #94a3b8;
    cursor: pointer;
    border-bottom: 2px solid transparent;
}

.tab-item.active {
    color: #0ea5e9;
    border-bottom: 2px solid #0ea5e9;
}

.mse-cookie-subtabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 15px;
    justify-content: center;
}

.subtab-item {
    background: #333;
    color: #94a3b8;
    padding: 6px 14px;
    font-size: 11px;
    border-radius: 20px;
    cursor: pointer;
    font-weight: 600;
}

.subtab-item.active {
    background: #0ea5e9;
    color: #fff;
}

.mse-cookie-tables {
    margin-top: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    padding: 10px;
    background: #111111;
}

.main-pane {
    display: none;
}

.main-pane.active {
    display: block;
}

.table-pane {
    display: none;
}

.table-pane.active {
    display: block;
}

.table-desc {
    font-size: 11px;
    color: #94a3b8;
    margin-bottom: 15px;
}

.mse-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 10.5px;
    color: #cbd5e1;
}

.mse-table th {
    text-align: left;
    padding: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    font-weight: 700;
    color: #fff;
}

.mse-table td {
    padding: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    vertical-align: top;
    word-break: break-word;
}

.mse-table tr:last-child td {
    border-bottom: none;
}

.mse-table td:nth-child(1) {
    color: #f8fafc;
    font-weight: 600;
}

.mse-table td:nth-child(2) {
    color: #94a3b8;
}

/* Global Width and Scroll X Safeguard */
html,
body {
    max-width: 100vw;
    overflow-x: hidden;
}

.site-footer,
.nv-footer-content {
    width: 100%;
    max-width: 100vw;
    box-sizing: border-box;
}

/* Hide Basic ThemeIsle Brand Header Block */
.wp-block-themeisle-blocks-advanced-columns-e5e06ebd,
#wp-block-themeisle-blocks-advanced-columns-e5e06ebd {
    display: none !important;
}

/* === Cool Article Engagement Effects === */

@keyframes mse-slide-up {
    from {
        opacity: 0;
        transform: translateY(40px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.mse-cta-card:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.08) !important;
    border-color: rgba(255, 255, 255, 0.2) !important;
}

.mse-cta-glow:hover {
    box-shadow: 0 0 30px rgba(99, 102, 241, 0.3);
    background: rgba(99, 102, 241, 0.15) !important;
}

/* Reading Progress Bar */
.mse-progress-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: transparent;
    z-index: 9999;
}

.mse-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #ec4899, #8b5cf6, #3b82f6);
    width: 0%;
    box-shadow: 0 0 10px rgba(139, 92, 246, 0.8);
    transition: width 0.1s ease-out;
}

/* Achievement Toast Notification */
.mse-achievement-toast {
    position: fixed;
    bottom: -100px;
    right: 20px;
    background: rgba(15, 23, 42, 0.95);
    border: 1px solid rgba(99, 102, 241, 0.4);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), inset 0 0 20px rgba(99, 102, 241, 0.1);
    color: #fff;
    padding: 15px 20px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 15px;
    z-index: 99999;
    opacity: 0;
    transition: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    backdrop-filter: blur(10px);
    cursor: pointer;
    text-decoration: none;
}

.mse-achievement-toast.show {
    bottom: 30px;
    opacity: 1;
}

.mse-achievement-icon {
    font-size: 28px;
    animation: bounce 2s infinite ease-in-out;
}

.mse-achievement-text h4 {
    margin: 0 0 4px 0;
    font-size: 15px;
    font-weight: 700;
    color: #e0e7ff;
}

.mse-achievement-text p {
    margin: 0;
    font-size: 12px;
    color: #94a3b8;
}