/**
 * Page-Specific Backgrounds - BOTBUSTER Theme
 * Each page gets a unique background from the backgrounds folder
 */

/* Base background styling for all pages */
body {
    background-color: #000 !important;
    position: relative;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Background image with reduced saturation */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-size: cover !important;
    background-position: center 90% !important;
    background-attachment: fixed !important;
    background-repeat: no-repeat !important;
    filter: saturate(0.3);
    z-index: -2;
    pointer-events: none;
}

/* Dark overlay for better text readability */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: -1;
    pointer-events: none;
}

/* Ensure content is above the overlay */
body > * {
    position: relative;
    z-index: 1;
}

/* Landing Page - BG4 */
body.page-home,
body.page-index {
    background-image: url('../images/backgrounds/BG4.jpeg') !important;
}

body.page-home::before,
body.page-index::before {
    background-image: url('../images/backgrounds/BG4.jpeg') !important;
}

/* App Page - BG2 */
body.page-app {
    background-image: url('../images/backgrounds/BG2.jpeg') !important;
}

body.page-app::before {
    background-image: url('../images/backgrounds/BG2.jpeg') !important;
}

/* Settings Page - BG3 */
body.page-settings {
    background-image: url('../images/backgrounds/BG3.jpeg') !important;
}

body.page-settings::before {
    background-image: url('../images/backgrounds/BG3.jpeg') !important;
}

/* Pricing Page - BG4 */
body.page-pricing {
    background-image: url('../images/backgrounds/BG4.jpeg') !important;
}

body.page-pricing::before {
    background-image: url('../images/backgrounds/BG4.jpeg') !important;
}

/* Admin Page - BG5 */
body.page-admin {
    background-image: url('../images/backgrounds/BG5.jpeg') !important;
}

body.page-admin::before {
    background-image: url('../images/backgrounds/BG5.jpeg') !important;
}

/* Sign In/Sign Up Pages - Cycle through backgrounds */
body.page-signin {
    background-image: url('../images/backgrounds/BG3.jpeg') !important;
}

body.page-signin::before {
    background-image: url('../images/backgrounds/BG3.jpeg') !important;
}

body.page-signup {
    background-image: url('../images/backgrounds/BG3.jpeg') !important;
}

body.page-signup::before {
    background-image: url('../images/backgrounds/BG3.jpeg') !important;
}

/* Payment Success Page - BG2 */
body.page-payment-success {
    background-image: url('../images/backgrounds/BG2.jpeg') !important;
}

body.page-payment-success::before {
    background-image: url('../images/backgrounds/BG2.jpeg') !important;
}

/* Payment Canceled Page - BG5 */
body.page-payment-canceled {
    background-image: url('../images/backgrounds/BG5.jpeg') !important;
}

body.page-payment-canceled::before {
    background-image: url('../images/backgrounds/BG5.jpeg') !important;
}

/* Select Plan Page - BG4 */
body.page-select-plan {
    background-image: url('../images/backgrounds/BG4.jpeg') !important;
}

body.page-select-plan::before {
    background-image: url('../images/backgrounds/BG4.jpeg') !important;
}

/* Account Page - BG2 */
body.page-account {
    background-image: url('../images/backgrounds/BG2.jpeg') !important;
}

body.page-account::before {
    background-image: url('../images/backgrounds/BG2.jpeg') !important;
}

/* Mobile optimization - use smaller overlay for performance */
@media (max-width: 767px) {
    body::before {
        background-attachment: scroll;
    }
}

/* Tablet optimization */
@media (min-width: 768px) and (max-width: 1023px) {
    body::before {
        background: rgba(0, 0, 0, 0.72);
    }
}

/* High-resolution displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    body {
        background-size: cover;
    }
}

/* Reduced motion preference - disable fixed attachment */
@media (prefers-reduced-motion: reduce) {
    body {
        background-attachment: scroll;
    }
}

/* Print styles - remove background */
@media print {
    body {
        background: white !important;
    }

    body::before {
        display: none !important;
    }
}
