.bg-scene {
    position: fixed;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
}

.bg-grid {
    position: absolute;
    inset: -1px;
    background-image:
        linear-gradient(rgba(255, 214, 214, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 214, 214, 0.04) 1px, transparent 1px);
    background-size: 48px 48px;
    mask-image: radial-gradient(ellipse 80% 60% at 50% 20%, black 30%, transparent 75%);
    -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 20%, black 30%, transparent 75%);
    animation: grid-drift 40s linear infinite;
}

@keyframes grid-drift {
    from { background-position: 0 0, 0 0; }
    to { background-position: 48px 48px, 48px 48px; }
}

.bg-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(90px);
    opacity: 0.35;
    animation: blob-float 22s ease-in-out infinite;
}

.bg-blob-1 {
    width: 480px;
    height: 480px;
    top: -140px;
    left: -100px;
    background: radial-gradient(circle, #5e2828, transparent 70%);
    animation-duration: 26s;
}

.bg-blob-2 {
    width: 420px;
    height: 420px;
    top: 200px;
    right: -140px;
    background: radial-gradient(circle, #7a3a3a, transparent 70%);
    animation-duration: 30s;
    animation-delay: -8s;
}

.bg-blob-3 {
    width: 360px;
    height: 360px;
    bottom: -120px;
    left: 30%;
    background: radial-gradient(circle, #ff7c7c, transparent 70%);
    opacity: 0.18;
    animation-duration: 34s;
    animation-delay: -16s;
}

@keyframes blob-float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(40px, -30px) scale(1.08); }
    66% { transform: translate(-30px, 25px) scale(0.95); }
}

.bg-mouse-glow {
    position: absolute;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(254, 214, 214, 0.06), transparent 70%);
    transform: translate(-50%, -50%);
    left: var(--mx, 50%);
    top: var(--my, 50%);
    transition: left 0.4s ease-out, top 0.4s ease-out;
}

.bg-particles {
    position: absolute;
    inset: 0;
}

.bg-particle {
    position: absolute;
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: var(--color-pale-rose);
    opacity: 0.5;
    box-shadow: 0 0 6px 1px rgba(254, 214, 214, 0.5);
    animation: particle-drift linear infinite;
}

@keyframes particle-drift {
    0% { transform: translateY(0) translateX(0); opacity: 0; }
    10% { opacity: 0.6; }
    90% { opacity: 0.6; }
    100% { transform: translateY(-120vh) translateX(30px); opacity: 0; }
}

.bg-cards {
    position: absolute;
    inset: 0;
}

.bg-card {
    position: absolute;
    width: 190px;
    padding: 14px 16px;
    background: rgba(30, 14, 14, 0.4);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 214, 214, 0.1);
    border-radius: var(--radius-md);
    animation: card-float ease-in-out infinite;
    opacity: 0.85;
}

.bg-card-title {
    font-family: var(--font-mono);
    font-size: 13px;
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.bg-card-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.bg-card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 11px;
    color: var(--color-text-faint);
    font-family: var(--font-mono);
}

.bg-card-1 {
    top: 12%;
    left: 6%;
    animation-duration: 14s;
}

.bg-card-2 {
    top: 58%;
    left: 2%;
    animation-duration: 17s;
    animation-delay: -4s;
}

.bg-card-3 {
    top: 20%;
    right: 5%;
    animation-duration: 15s;
    animation-delay: -8s;
}

.bg-card-4 {
    top: 65%;
    right: 8%;
    animation-duration: 19s;
    animation-delay: -2s;
}

@keyframes card-float {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    25% { transform: translate(14px, -18px) rotate(1deg); }
    50% { transform: translate(-8px, 10px) rotate(-1deg); }
    75% { transform: translate(10px, 16px) rotate(0.5deg); }
}

@media (max-width: 900px) {
    .bg-card-1, .bg-card-2, .bg-card-3, .bg-card-4 {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .bg-grid, .bg-blob, .bg-particle, .bg-card {
        animation: none;
    }
}
