/* Overload Ladder Theme System
   Ported from RDL's theme engine: each theme sets a body background + a
   matching nav/footer gradient. Backgrounds are procedural (CSS gradients +
   an inline noise texture) so no branding artwork is required yet. */

body {
    background-attachment: fixed;
    transition: background 0.3s ease;
}

body::before {
    content: '';
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTAwJSIgaGVpZ2h0PSIxMDAlIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjxkZWZzPjxmaWx0ZXIgaWQ9ImEiIHg9IjAiIHk9IjAiPjxmZVR1cmJ1bGVuY2UgdHlwZT0iZnJhY3RhbE5vaXNlIiBiYXNlRnJlcXVlbmN5PSIuMDAyIiBudW1PY3RhdmVzPSIyIi8+PGZlQ29sb3JNYXRyaXggdmFsdWVzPSIwIDAgMCAwIDEgMCAwIDAgMCAwIDAgMCAwIDAgMSAwIDAgMCAwIC41Ii8+PC9maWx0ZXI+PC9kZWZzPjxyZWN0IHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InRyYW5zcGFyZW50Ii8+PHJlY3Qgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIgZmlsdGVyPSJ1cmwoI2EpIiBvcGFjaXR5PSIuMDUiLz48L3N2Zz4=');
    opacity: 0.25;
    z-index: -1;
    pointer-events: none;
}

/* Default — deep blue/violet space */
body, body.theme-default {
    background: radial-gradient(ellipse at top, #131a2e 0%, #0a0a12 100%);
}
body.theme-default nav, body.theme-default footer {
    background: linear-gradient(to bottom, rgba(20, 25, 55, 0.92), rgba(15, 18, 40, 0.92));
    box-shadow: 0 0 20px rgba(79, 140, 255, 0.15);
}

/* Purple Nebula */
body.theme-purple {
    background: radial-gradient(ellipse at bottom, #1B2735 0%, #090A0F 100%);
}
body.theme-purple nav, body.theme-purple footer {
    background: linear-gradient(to bottom, rgba(40, 0, 80, 0.9), rgba(90, 30, 140, 0.75));
    box-shadow: 0 0 20px rgba(138, 43, 226, 0.3);
}
body.theme-purple { --accent: #b866ff; --accent-hover: #cf94ff; }

/* Cyberpunk */
body.theme-cyberpunk {
    background: linear-gradient(145deg, #201830, #2a1c3d);
}
body.theme-cyberpunk nav, body.theme-cyberpunk footer {
    background: linear-gradient(to right, rgba(50, 10, 70, 0.95), rgba(70, 15, 90, 0.95));
    border-bottom: 2px solid rgba(255, 0, 200, 0.25);
    box-shadow: 0 0 15px rgba(255, 0, 200, 0.2);
}
body.theme-cyberpunk { --accent: #ff2fd0; --accent-hover: #ff6fe0; }

/* Emerald */
body.theme-emerald {
    background: linear-gradient(to bottom, #071f12, #0c2818);
}
body.theme-emerald nav, body.theme-emerald footer {
    background: linear-gradient(to right, rgba(15, 60, 40, 0.9), rgba(25, 80, 60, 0.9));
    border-bottom: 2px solid rgba(80, 200, 120, 0.2);
    box-shadow: 0 0 15px rgba(80, 200, 120, 0.1);
}
body.theme-emerald { --accent: #4cd97b; --accent-hover: #74e79c; }

/* Gold */
body.theme-gold {
    background: linear-gradient(145deg, #1a1308, #262111);
}
body.theme-gold nav, body.theme-gold footer {
    background: linear-gradient(to right, rgba(70, 50, 10, 0.9), rgba(90, 70, 20, 0.9));
    border-bottom: 2px solid rgba(212, 175, 55, 0.3);
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.2);
}
body.theme-gold { --accent: #d4af37; --accent-hover: #e6c860; }

/* Ocean */
body.theme-ocean {
    background: linear-gradient(160deg, #041b26, #06222f);
}
body.theme-ocean nav, body.theme-ocean footer {
    background: linear-gradient(to right, rgba(5, 45, 65, 0.92), rgba(10, 60, 85, 0.9));
    border-bottom: 2px solid rgba(64, 190, 220, 0.25);
    box-shadow: 0 0 15px rgba(64, 190, 220, 0.15);
}
body.theme-ocean { --accent: #40bedc; --accent-hover: #6fd6ef; }

/* High Contrast — pure black, maximum readability */
body.theme-contrast {
    background: #000;
}
body.theme-contrast::before { content: none; }
body.theme-contrast nav, body.theme-contrast footer {
    background: #000;
    border-bottom: 2px solid #fff;
    box-shadow: none;
}
body.theme-contrast { --accent: #ffdd00; --accent-hover: #ffe94d; }
