/* ============================================================
   VEROE BEYOND - PREMIUM PUBLIC CONSOLE V6
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@200;300;400;500;600;700;800&family=JetBrains+Mono:wght@400;700&family=Bricolage+Grotesque:opsz,wght@12..96,200..800&family=Outfit:wght@100;300;400;600;900&display=swap');

:root {
    /* Premium Color System (HSL) */
    --h-primary: 196;
    --h-secondary: 260;
    --h-accent: 330;

    --bg-deep: hsl(var(--h-primary), 30%, 3%);
    --bg-surface: hsla(var(--h-primary), 20%, 6%, 0.4);
    --bg-card: hsla(var(--h-primary), 20%, 8%, 0.6);

    --neon-cyan: hsl(var(--h-primary), 100%, 50%);
    --neon-purple: hsl(var(--h-secondary), 100%, 60%);
    --neon-pink: hsl(var(--h-accent), 100%, 55%);
    --neon-green: hsl(150, 100%, 45%);

    --text-high: hsl(0, 0%, 100%);
    --text-mid: hsl(var(--h-primary), 10%, 75%);
    --text-low: hsl(var(--h-primary), 10%, 45%);

    --border: hsla(0, 0%, 100%, 0.1);
    --border-bright: hsla(var(--h-primary), 100%, 50%, 0.3);

    --shadow-premium: 0 40px 100px -20px rgba(0, 0, 0, 0.8);
    --glass-blur: blur(25px) saturate(180%);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    background-color: var(--bg-deep) !important;
}

body {
    background: transparent !important;
    color: var(--text-high);
    font-family: 'Plus Jakarta Sans', sans-serif;
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* --- CINEMATIC BACKGROUND --- */
.immersive-overlay {
    position: fixed;
    inset: 0;
    display: block;
    z-index: -10;
    pointer-events: none;
}

.noise-overlay {
    position: fixed;
    inset: 0;
    z-index: -5;
    opacity: 0.05;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
    pointer-events: none;
}

/* --- NAVIGATION & PROFILE --- */
.user-profile {
    position: fixed;
    top: 30px;
    right: 40px;
    z-index: 2000;
    display: flex;
    align-items: center;
    gap: 15px;
    background: hsla(0, 0%, 0%, 0.4);
    backdrop-filter: var(--glass-blur);
    padding: 10px 24px;
    border-radius: 100px;
    border: 1px solid var(--border);
    transition: 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}

.user-profile:hover {
    border-color: var(--border-bright);
    background: hsla(0, 0%, 0%, 0.6);
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0, 245, 255, 0.1);
}

#userAvatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid var(--neon-cyan);
    box-shadow: 0 0 15px hsla(var(--h-primary), 100%, 50%, 0.3);
}

#userName {
    font-weight: 800;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
}

.auth-btn {
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: #fff;
    padding: 8px 18px;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: 0.3s;
}

.auth-btn:hover {
    background: var(--neon-cyan);
    color: #000;
    border-color: var(--neon-cyan);
}

/* --- VIEWER CONTAINER --- */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 100px 40px;
}

/* --- PASTE DETAIL SYSTEM --- */
.paste-header {
    margin-bottom: 60px;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 40px;
}

@media (max-width: 900px) {
    .paste-header {
        flex-direction: column;
        align-items: flex-start;
    }
}

.paste-info h2 {
    font-family: 'Outfit', sans-serif;
    font-size: 4.5rem;
    font-weight: 950;
    line-height: 0.9;
    letter-spacing: -3px;
    margin-bottom: 25px;
    background: linear-gradient(to bottom, #fff, var(--text-mid));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.paste-meta {
    display: flex;
    gap: 25px;
    align-items: center;
    font-family: 'JetBrains Mono', monospace;
}

.language-tag {
    background: hsla(var(--h-primary), 100%, 50%, 0.1);
    color: var(--neon-cyan);
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 700;
    border: 1px solid hsla(var(--h-primary), 100%, 50%, 0.2);
    text-transform: uppercase;
}

/* --- CODE CONTEXT ENGINE --- */
.code-container {
    background: var(--bg-card);
    backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border);
    border-radius: 40px;
    overflow: hidden;
    box-shadow: var(--shadow-premium);
}

.code-header {
    background: hsla(0, 0%, 100%, 0.03);
    padding: 25px 40px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.code-title {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
    color: var(--text-mid);
    letter-spacing: 1px;
}

#pasteContentContainer {
    padding: 50px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.05rem;
    line-height: 1.7;
}

.hljs {
    background: transparent !important;
}

/* --- REACTION MATRIX --- */
.reactions-matrix {
    display: flex;
    gap: 15px;
}

.reaction-trigger {
    background: hsla(0, 0%, 100%, 0.03);
    border: 1px solid var(--border);
    padding: 12px 24px;
    border-radius: 20px;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}

.reaction-trigger:hover {
    background: hsla(var(--h-primary), 100%, 50%, 0.1);
    border-color: var(--neon-cyan);
    transform: translateY(-4px);
}

.reaction-trigger.active {
    background: var(--neon-cyan);
    color: #000;
    border-color: var(--neon-cyan);
    box-shadow: 0 10px 30px rgba(0, 245, 255, 0.3);
}

.reaction-trigger .icon {
    font-size: 1.2rem;
}

.reaction-trigger .count {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 800;
    font-size: 0.9rem;
}

/* --- MODALS V6 --- */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: hsla(0, 0%, 0%, 0.92);
    backdrop-filter: blur(40px);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
}

.modal-overlay.active {
    display: flex;
}

.modal-box {
    background: var(--bg-surface);
    border: 1px solid var(--border-bright);
    border-radius: 48px;
    padding: 60px;
    width: 600px;
    max-width: 90%;
    text-align: center;
    box-shadow: 0 50px 100px rgba(0, 0, 0, 1);
}

/* --- TOAST SYSTEM --- */
.toast-container {
    position: fixed;
    bottom: 50px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 100000;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.toast {
    background: hsla(0, 0%, 0%, 0.8);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-bright);
    padding: 16px 32px;
    border-radius: 100px;
    color: #fff;
    font-weight: 700;
    font-size: 0.9rem;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    animation: toastScaleIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes toastScaleIn {
    from {
        opacity: 0;
        transform: scale(0.8) translateY(20px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* --- ARBITRARY UTILS --- */
.loader {
    width: 50px;
    height: 50px;
    border: 3px solid var(--border);
    border-top-color: var(--neon-cyan);
    border-radius: 50%;
    animation: premiumSpin 1.5s cubic-bezier(0.68, -0.55, 0.265, 1.55) infinite;
}

@keyframes premiumSpin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* ============================================
   VOLUME CONTROL
   ============================================ */

.volume-control {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 200000;
    display: flex;
    align-items: center;
    gap: 15px;
}

.volume-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-highlight);
    color: var(--text-secondary);
    transition: all 0.3s ease;
}

.volume-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--primary-start);
    transform: scale(1.1);
    box-shadow: 0 0 20px rgba(0, 245, 255, 0.3);
}

.volume-btn.active-volume {
    border-color: var(--primary-start);
    color: var(--primary-start);
    background: rgba(0, 245, 255, 0.1);
}

.volume-arrow {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-primary);
    font-weight: 600;
    font-size: 0.9rem;
    opacity: 0;
    transform: translateX(-20px);
    transition: all 0.5s ease;
    pointer-events: none;
}

.volume-arrow.visible {
    opacity: 1;
    transform: translateX(0);
    animation: bounceRight 1.5s infinite;
}

.volume-arrow svg {
    width: 30px;
    height: 20px;
}

@keyframes bounceRight {

    0%,
    100% {
        transform: translateX(0);
    }

    50% {
        transform: translateX(-5px);
    }
}

@media (max-width: 768px) {
    .volume-control {
        bottom: 20px;
        right: 20px;
    }

    .volume-arrow span {
        display: none;
    }
}

.volume-control-inner {
    display: flex;
    align-items: center;
    background: rgba(0, 0, 0, 0.6);
    padding: 8px 16px;
    border-radius: 30px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

.volume-control-inner .volume-btn {
    background: none;
    border: none;
    padding: 0;
    width: auto;
    height: auto;
    backdrop-filter: none;
    box-shadow: none;
}

input[type=range] {
    width: 100px;
    margin-left: 10px;
    height: 4px;
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.2);
    outline: none;
    appearance: none;
    cursor: pointer;
}

input[type=range]::-webkit-slider-thumb {
    appearance: none;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #fff;
    cursor: pointer;
    transition: transform 0.1s;
}

input[type=range]::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

@media (max-width: 768px) {
    input[type=range] {
        width: 60px;
        /* Smaller slider on mobile */
    }
}

/* ============================================
   MARKDOWN & EMBED RENDERING
   ============================================ */

.markdown-body {
    color: var(--text-primary);
    line-height: 1.6 !important;
    word-wrap: break-word !important;
    font-family: var(--font-sans) !important;
    white-space: normal !important;
}

/* Reset for when markdown is inside code/pre */
code.markdown-body {
    display: block !important;
    white-space: normal !important;
    font-family: var(--font-sans) !important;
    background: transparent !important;
    padding: 0 !important;
    border: none !important;
}

.markdown-body h1,
.markdown-body h2,
.markdown-body h3,
.markdown-body h4,
.markdown-body h5,
.markdown-body h6 {
    margin-top: 1.5rem !important;
    margin-bottom: 1rem !important;
    font-weight: 700 !important;
    line-height: 1.25 !important;
    color: var(--primary-start) !important;
}

.markdown-body p {
    margin-bottom: 1rem !important;
}

.markdown-body a {
    color: var(--primary-start) !important;
    text-decoration: none !important;
    border-bottom: 1px solid rgba(0, 245, 255, 0.3);
    transition: all 0.2s;
}

.markdown-body a:hover {
    border-bottom-color: var(--primary-start) !important;
    background: rgba(0, 245, 255, 0.1);
}

.markdown-body img {
    max-width: 100% !important;
    height: auto !important;
    border-radius: 12px;
    margin: 1.5rem 0 !important;
    box-shadow: var(--shadow-lg);
}

/* Responsive Embeds (Frames, Videos) */
.markdown-body iframe,
.markdown-body video,
.markdown-body .video-wrapper {
    width: 100% !important;
    max-width: 100% !important;
    aspect-ratio: 16 / 9;
    height: auto !important;
    min-height: 300px;
    border-radius: 12px;
    border: 1px solid var(--border);
    margin: 2rem 0 !important;
    background: #000;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
}

/* Fix for pre-wrapped containers */
#pasteContentContainer.markdown-body {
    white-space: normal !important;
    overflow-x: hidden !important;
}

.markdown-body pre {
    background: rgba(0, 0, 0, 0.3) !important;
    padding: 1.5rem !important;
    border-radius: 12px !important;
    margin: 1.5rem 0 !important;
    overflow-x: auto !important;
    border: 1px solid var(--border) !important;
    white-space: pre !important;
}

.markdown-body code:not(.hljs) {
    background: rgba(255, 255, 255, 0.1) !important;
    padding: 0.2rem 0.4rem !important;
    border-radius: 4px !important;
    font-family: var(--font-mono) !important;
    font-size: 0.9em !important;
}

.markdown-body blockquote {
    padding: 0 1rem !important;
    color: var(--text-secondary) !important;
    border-left: 4px solid var(--primary-start) !important;
    margin: 1.5rem 0 !important;
    font-style: italic;
}

.markdown-body ul,
.markdown-body ol {
    margin-bottom: 1rem !important;
    padding-left: 2rem !important;
}

.markdown-body li {
    margin-bottom: 0.5rem !important;
}

/* ============================================
   REACTIONS MATRIX
   ============================================ */
.reactions-matrix {
    display: flex;
    /* Force visible by default */
    gap: 15px;
    align-items: center;
    background: rgba(255, 255, 255, 0.03);
    padding: 12px 20px;
    border-radius: 50px;
    border: 1px solid var(--border);
    backdrop-filter: blur(20px);
}

.reaction-trigger {
    background: transparent;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 12px;
    transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1);
    color: var(--text-secondary);
}

.reaction-trigger .icon {
    font-size: 1.2rem;
    transition: transform 0.3s;
}

.reaction-trigger .count {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    font-weight: 700;
}

.reaction-trigger:hover {
    background: rgba(255, 255, 255, 0.05);
    transform: translateY(-2px);
}

.reaction-trigger:active {
    transform: scale(0.95);
}

/* Specific States */
.reaction-trigger.heart:hover .icon {
    color: #ef4444;
    filter: drop-shadow(0 0 10px #ef4444);
}

.reaction-trigger.star:hover .icon {
    color: #f59e0b;
    filter: drop-shadow(0 0 10px #f59e0b);
}

.reaction-trigger.like:hover .icon {
    color: #3b82f6;
    filter: drop-shadow(0 0 10px #3b82f6);
}

/* Responsive Viewer Header */
@media (min-width: 768px) {
    .paste-header {
        display: flex;
        justify-content: space-between;
        align-items: flex-end;
    }
}

@media (max-width: 767px) {
    .reactions-matrix {
        margin-top: 20px;
        width: 100%;
        justify-content: center;
    }
}

/* ============================================
   LEGAL NOTICE & GATEKEEPER
   ============================================ */
.legal-overlay {
    position: fixed;
    inset: 0;
    z-index: 200000;
    background: #000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.legal-overlay.active {
    display: flex;
    opacity: 1;
}

.legal-notice-card {
    background: #06060a !important;
    border: 3px solid #FE4A49 !important;
    border-radius: 24px;
    padding: 2.5rem;
    max-width: 1000px;
    width: 100%;
    box-shadow: 0 0 60px rgba(254, 74, 73, 0.3);
    position: relative;
    animation: nexus-card-slide-in 1.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes nexus-card-slide-in {
    0% {
        opacity: 0;
        transform: translateY(50px) scale(0.95);
    }

    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.legal-notice-header {
    margin-bottom: 2.5rem;
    border-bottom: 1px solid rgba(254, 74, 73, 0.2);
    padding-bottom: 1.5rem;
}

.legal-notice-header h2 {
    color: #FE4A49;
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    letter-spacing: -1px;
    text-transform: uppercase;
    text-shadow: 0 0 20px rgba(254, 74, 73, 0.4);
}

.legal-notice-ref {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1rem;
    color: #888;
    background: rgba(254, 74, 73, 0.1);
    display: inline-block;
    padding: 6px 16px;
    border-radius: 10px;
    border: 1px solid rgba(254, 74, 73, 0.3);
}

.legal-notice-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
}

@media (max-width: 1000px) {
    .legal-notice-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

.lang-header {
    font-size: 0.75rem;
    font-weight: 800;
    color: #555;
    letter-spacing: 2px;
    margin-bottom: 1.5rem;
    border-left: 3px solid #FE4A49;
    padding-left: 10px;
}

.legal-notice-section ol {
    padding-left: 1.2rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.legal-notice-section li {
    font-size: 1rem;
    font-weight: 600;
    color: #fff;
    line-height: 1.5;
    opacity: 0.95;
    list-style-type: decimal;
}

.legal-notice-section li::marker {
    color: #FE4A49;
    font-weight: 900;
    font-size: 1.1rem;
}

.legal-notice-footer {
    margin-top: 2.5rem;
    display: flex;
    justify-content: flex-end;
}