/* ===== EPIC LIGHT MODE BACKGROUND ===== */
.light-mode-epic-bg {
    display: none;
}

[data-theme="light"] .light-mode-epic-bg {
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
    overflow: hidden;
}

/* ===== LAYER 1: GRADIENT ORBS ===== */
.orb-layer {
    position: absolute;
    width: 100%;
    height: 100%;
}

.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.12;
    animation: float-orb 25s infinite ease-in-out;
}

.orb-1 {
    width: 700px;
    height: 700px;
    top: -300px;
    right: -300px;
    background: radial-gradient(circle at 30% 30%, rgba(0, 102, 204, 0.15), rgba(59, 130, 246, 0.08), transparent);
    animation-delay: 0s;
}

.orb-2 {
    width: 600px;
    height: 600px;
    bottom: -250px;
    left: -250px;
    background: radial-gradient(circle at 70% 70%, rgba(0, 102, 204, 0.12), rgba(14, 165, 233, 0.06), transparent);
    animation-delay: 8s;
}

.orb-3 {
    width: 500px;
    height: 500px;
    top: 40%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: radial-gradient(circle, rgba(59, 130, 246, 0.1), transparent);
    animation-delay: 15s;
}

@keyframes float-orb {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    33% {
        transform: translate(60px, -60px) scale(1.1);
    }
    66% {
        transform: translate(-60px, 60px) scale(0.9);
    }
}

/* ===== LAYER 2: GEOMETRIC SHAPES ===== */
.shapes-layer {
    position: absolute;
    width: 100%;
    height: 100%;
}

.shape {
    position: absolute;
    border: 2px solid var(--color-border);
    opacity: 0.08;
}

/* Circles */
.circle-1 {
    width: 300px;
    height: 300px;
    top: 15%;
    left: 10%;
    border-radius: 50%;
    animation: rotate-shape 30s infinite linear, float-shape 20s infinite ease-in-out;
}

.circle-2 {
    width: 200px;
    height: 200px;
    bottom: 20%;
    right: 15%;
    border-radius: 50%;
    animation: rotate-shape 25s infinite linear reverse, float-shape 18s infinite ease-in-out;
    animation-delay: 3s;
}

/* Square */
.square-1 {
    width: 250px;
    height: 250px;
    top: 60%;
    left: 20%;
    border-radius: 20px;
    animation: rotate-shape 35s infinite linear, float-shape 22s infinite ease-in-out;
    animation-delay: 5s;
}

/* Triangle */
.triangle-1 {
    width: 0;
    height: 0;
    border-left: 100px solid transparent;
    border-right: 100px solid transparent;
    border-bottom: 180px solid var(--color-border);
    top: 25%;
    right: 25%;
    opacity: 0.06;
    animation: rotate-shape 28s infinite linear, float-shape 19s infinite ease-in-out;
    animation-delay: 7s;
}

/* Diamond */
.diamond-1 {
    width: 180px;
    height: 180px;
    bottom: 35%;
    left: 35%;
    transform: rotate(45deg);
    border-radius: 10px;
    animation: rotate-shape 32s infinite linear reverse, float-shape 21s infinite ease-in-out;
    animation-delay: 2s;
}

/* Hexagon */
.hexagon-1 {
    width: 150px;
    height: 150px;
    top: 45%;
    right: 10%;
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    animation: rotate-shape 26s infinite linear, float-shape 17s infinite ease-in-out;
    animation-delay: 10s;
}

@keyframes rotate-shape {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

@keyframes float-shape {
    0%, 100% {
        transform: translate(0, 0);
    }
    25% {
        transform: translate(30px, -40px);
    }
    50% {
        transform: translate(-30px, -60px);
    }
    75% {
        transform: translate(40px, -30px);
    }
}

/* ===== LAYER 3: GRID LINES ===== */
.grid-layer {
    position: absolute;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(var(--color-border) 1px, transparent 1px),
        linear-gradient(90deg, var(--color-border) 1px, transparent 1px);
    background-size: 60px 60px;
    opacity: 0.03;
    animation: grid-drift 60s linear infinite;
}

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

/* ===== LAYER 4: CODE SYMBOLS ===== */
.code-layer {
    position: absolute;
    width: 100%;
    height: 100%;
    font-family: var(--font-mono);
    font-size: 4rem;
    font-weight: 700;
    color: var(--color-border);
}

.code-symbol {
    position: absolute;
    opacity: 0.04;
    animation: float-code 35s infinite ease-in-out;
}

.code-symbol:nth-child(1) { 
    top: 8%; 
    left: 12%; 
    animation-delay: 0s;
    font-size: 3.5rem;
}

.code-symbol:nth-child(2) { 
    top: 22%; 
    right: 18%; 
    animation-delay: 4s;
    font-size: 4.5rem;
}

.code-symbol:nth-child(3) { 
    top: 55%; 
    left: 8%; 
    animation-delay: 8s;
    font-size: 3rem;
}

.code-symbol:nth-child(4) { 
    bottom: 25%; 
    right: 12%; 
    animation-delay: 2s;
    font-size: 5rem;
}

.code-symbol:nth-child(5) { 
    bottom: 12%; 
    left: 28%; 
    animation-delay: 12s;
    font-size: 3.8rem;
}

.code-symbol:nth-child(6) { 
    top: 38%; 
    right: 32%; 
    animation-delay: 6s;
    font-size: 4.2rem;
}

.code-symbol:nth-child(7) { 
    top: 70%; 
    left: 45%; 
    animation-delay: 10s;
    font-size: 3.3rem;
}

.code-symbol:nth-child(8) { 
    bottom: 45%; 
    right: 8%; 
    animation-delay: 14s;
    font-size: 4.8rem;
}

@keyframes float-code {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
        opacity: 0.04;
    }
    25% {
        transform: translateY(-50px) rotate(5deg);
        opacity: 0.06;
    }
    50% {
        transform: translateY(-80px) rotate(-5deg);
        opacity: 0.08;
    }
    75% {
        transform: translateY(-50px) rotate(3deg);
        opacity: 0.06;
    }
}

/* ===== LAYER 5: ANIMATED LINES ===== */
.lines-layer {
    position: absolute;
    width: 100%;
    height: 100%;
}

.line {
    position: absolute;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--color-border) 20%, var(--color-border) 80%, transparent);
    opacity: 0.1;
}

.line-1 {
    width: 120%;
    top: 18%;
    left: -10%;
    animation: slide-line-1 20s infinite linear;
}

.line-2 {
    width: 150%;
    top: 52%;
    left: -25%;
    animation: slide-line-2 28s infinite linear reverse;
}

.line-3 {
    width: 100%;
    bottom: 28%;
    left: -50%;
    animation: slide-line-3 24s infinite linear;
}

@keyframes slide-line-1 {
    from {
        transform: translateX(0) rotate(-2deg);
    }
    to {
        transform: translateX(30%) rotate(-2deg);
    }
}

@keyframes slide-line-2 {
    from {
        transform: translateX(0) rotate(3deg);
    }
    to {
        transform: translateX(-30%) rotate(3deg);
    }
}

@keyframes slide-line-3 {
    from {
        transform: translateX(0) rotate(-1deg);
    }
    to {
        transform: translateX(50%) rotate(-1deg);
    }
}

/* ===== HIDE IN DARK MODE ===== */
[data-theme="dark"] .light-mode-epic-bg {
    display: none;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    /* Reduce complexity on mobile */
    .orb {
        filter: blur(60px);
    }
    
    .shape {
        opacity: 0.04;
    }
    
    .code-symbol {
        font-size: 2.5rem !important;
        opacity: 0.03;
    }
    
    .grid-layer {
        opacity: 0.02;
    }
}

@media (max-width: 480px) {
    /* Hide some elements on very small screens */
    .shapes-layer .triangle-1,
    .shapes-layer .hexagon-1,
    .code-symbol:nth-child(n+5) {
        display: none;
    }
}
