.darkveil-shell {
    position: relative;
    overflow: hidden;
    isolation: isolate;
}

.site-darkveil-bg {
    position: fixed;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 0;
    background:
        radial-gradient(circle at top left, rgba(59, 130, 246, 0.14), transparent 30%),
        radial-gradient(circle at 82% 18%, rgba(16, 185, 129, 0.1), transparent 26%),
        linear-gradient(180deg, #040404 0%, #08090d 45%, #040404 100%);
}

.site-darkveil-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 18% 22%, rgba(59, 130, 246, 0.08), transparent 18%),
        radial-gradient(circle at 84% 12%, rgba(16, 185, 129, 0.07), transparent 16%),
        radial-gradient(circle at 50% 82%, rgba(255, 255, 255, 0.03), transparent 20%);
    z-index: 0;
}

.site-darkveil-bg::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(4, 4, 4, 0.06);
    z-index: 0;
}

.site-darkveil-bg .darkveil-canvas {
    opacity: 0.74;
}

.site-darkveil-orb {
    position: absolute;
    width: 34rem;
    height: 34rem;
    border-radius: 999px;
    filter: blur(110px);
    opacity: 0.22;
    z-index: 0;
}

.site-darkveil-orb-primary {
    top: -12rem;
    left: -10rem;
    background: #2563eb;
}

.site-darkveil-orb-secondary {
    right: -12rem;
    top: 8rem;
    background: #10b981;
    opacity: 0.16;
}

.site-darkveil-orb-tertiary {
    bottom: -16rem;
    left: 50%;
    transform: translateX(-50%);
    background: #0f172a;
    opacity: 0.28;
}

.site-shell {
    position: relative;
    z-index: 1;
    min-height: 100vh;
}

.darkveil-shell::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at top left, rgba(59, 130, 246, 0.16), transparent 34%),
        radial-gradient(circle at 82% 18%, rgba(16, 185, 129, 0.12), transparent 28%),
        linear-gradient(135deg, rgba(9, 9, 11, 0.92), rgba(16, 24, 39, 0.94));
    pointer-events: none;
    z-index: 0;
}

.darkveil-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
    opacity: 0.88;
    pointer-events: none;
    z-index: 0;
}

.darkveil-content {
    position: relative;
    z-index: 1;
}

.darkveil-glow {
    position: absolute;
    inset: auto auto -80px -40px;
    width: 240px;
    height: 240px;
    border-radius: 999px;
    background: rgba(59, 130, 246, 0.18);
    filter: blur(60px);
    pointer-events: none;
    z-index: 0;
}

.darkveil-glow-secondary {
    inset: -80px -60px auto auto;
    background: rgba(16, 185, 129, 0.12);
}

body.light-theme .darkveil-shell::before {
    background:
        radial-gradient(circle at top left, rgba(59, 130, 246, 0.12), transparent 34%),
        radial-gradient(circle at 82% 18%, rgba(16, 185, 129, 0.08), transparent 28%),
        linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(241, 245, 249, 0.96));
}

body.light-theme .site-darkveil-bg {
    background:
        radial-gradient(circle at top left, rgba(59, 130, 246, 0.05), transparent 28%),
        radial-gradient(circle at 82% 18%, rgba(16, 185, 129, 0.035), transparent 24%),
        linear-gradient(180deg, #fbfdff 0%, #f7fafd 42%, #f1f5f9 100%);
}

body.light-theme .site-darkveil-bg::before {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.78) 0%, rgba(255, 255, 255, 0.7) 38%, rgba(248, 250, 252, 0.74) 100%);
}

body.light-theme .site-darkveil-bg::after {
    background:
        radial-gradient(circle at 18% 22%, rgba(59, 130, 246, 0.028), transparent 18%),
        radial-gradient(circle at 84% 12%, rgba(16, 185, 129, 0.025), transparent 16%),
        radial-gradient(circle at 50% 82%, rgba(148, 163, 184, 0.08), transparent 20%);
}

body.light-theme .site-darkveil-bg .darkveil-canvas {
    opacity: 0.12;
}

body.light-theme .site-darkveil-orb {
    opacity: 0.08;
}

body.light-theme .site-darkveil-orb-secondary {
    opacity: 0.05;
}

body.light-theme .site-darkveil-orb-tertiary {
    opacity: 0.1;
}

body.light-theme .darkveil-canvas {
    opacity: 0.22;
}

body.light-theme .darkveil-glow {
    background: rgba(59, 130, 246, 0.1);
}

body.light-theme .darkveil-glow-secondary {
    background: rgba(16, 185, 129, 0.08);
}

@media (prefers-reduced-motion: reduce) {
    .darkveil-canvas {
        display: none;
    }
}
