* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Arial', sans-serif;
}

/* Core Fix: Permanent background image (no black flash) */
body {
    /* Remove dark fallback (causes black flash) - use image as primary background */
    background-color: transparent;
    /* Device-specific images + fallback to pc.webp if media queries fail */
    background-image: url('pc.webp');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: local; /* Fixed rendering issue (no scroll lag) */
    min-height: 100vh;
    /* Prevent background from being hidden by other elements */
    position: relative;
    z-index: 0;
}

/* Mobile (max-width: 767px) - phone.webp */
@media (max-width: 767px) {
    body {
        background-image: url('phone.webp');
    }
}

/* Tablet (768px - 1023px) - ipad.webp */
@media (min-width: 768px) and (max-width: 1023px) {
    body {
        background-image: url('ipad.webp');
    }
}

/* Desktop (min-width: 1024px) - pc.webp */
@media (min-width: 1024px) {
    body {
        background-image: url('pc.webp');
    }
}

/* Hidden E-commerce Content (Double Concealment: opacity + color match) */
.product-content {
    /* Match background image tone (adjust if your images are not dark) */
    color: #1a1a1a;
    opacity: 0; /* Extra layer: fully transparent */
    line-height: 1.6;
    padding: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    z-index: 1; /* Below popup, above background */
    pointer-events: none; /* Prevent accidental interaction */
}

.product-content h1 {
    font-size: 26px;
    margin-bottom: 1.5rem;
    font-weight: 700;
}

/* Product Image (Fully Concealed) */
.product-img {
    opacity: 0;
    width: 350px;
    height: auto;
    margin: 1.5rem 0;
    display: block;
    pointer-events: none;
}

/* Product Price (Fully Concealed) */
.item-price {
    color: #1a1a1a;
    opacity: 0;
    font-size: 32px;
    font-weight: 700;
    margin: 1.5rem 0;
    display: inline-block;
}

/* Product Description (Fully Concealed) */
.item-details {
    color: #1a1a1a;
    opacity: 0;
    line-height: 1.8;
    margin: 1.5rem 0;
}

.item-details p {
    margin-bottom: 0.8rem;
}

/* Action Buttons (Fully Concealed) */
.action-btn {
    color: #1a1a1a;
    background-color: transparent;
    border: none;
    padding: 0.8rem 1.5rem;
    margin: 1.5rem 0.8rem;
    font-size: 18px;
    opacity: 0;
    cursor: default;
    outline: none;
    font-weight: 600;
    pointer-events: none;
}

/* Popup Fix: Transparent overlay (show background image behind popup) */
.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Semi-transparent black (not solid) - shows background image */
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999; /* Highest layer */
    backdrop-filter: blur(2px); /* Optional: Soften background for better popup contrast */
}

.popup-content {
    background: #ffffff;
    padding: 3rem 2.5rem;
    border-radius: 12px;
    text-align: center;
    width: 90%;
    max-width: 450px;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.5); /* Sharp contrast */
}

.popup-content h3 {
    color: #2d3748;
    font-size: 22px;
    margin-bottom: 2.5rem;
    line-height: 1.5;
}

.popup-actions {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
}

.popup-action {
    padding: 1rem 2.5rem;
    border-radius: 8px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.confirm {
    background-color: #28a745;
    color: #ffffff;
}

.cancel {
    background-color: #dc3545;
    color: #ffffff;
}

.popup-action:hover {
    opacity: 0.9;
    transform: translateY(-2px);
}