/* Core Styles matching Home */
body {
    background-color: #ffffff;
    min-height: 100vh;
    transition: background-color 0.3s ease, color 0.3s ease;
}
html.dark body { background-color: #000000; }

/* Pattern */
.bg-pattern {
    background-image: url('../../images/Background.webp');
    background-size: 400px;
    background-repeat: repeat;
    background-position: center;
    animation: bgMove 120s linear infinite;
}
@keyframes bgMove {
    0% { background-position: 0 0; }
    100% { background-position: 400px 400px; }
}
html:not(.dark) .bg-pattern { filter: opacity(0.06); }
html.dark .bg-pattern { filter: invert(1) opacity(0.11); }

/* Glass Card */
.glass-panel {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(0, 0, 0, 0.1);
}
html.dark .glass-panel {
    background: rgba(20, 20, 20, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Glows */
.glow-red-border {
    box-shadow: 0 0 0 1px rgba(220, 38, 38, 0.2), 0 10px 30px -5px rgba(220, 38, 38, 0.15);
}
.glow-purple-border { box-shadow: 0 0 0 1px rgba(147, 51, 234, 0.2), 0 10px 30px -5px rgba(147, 51, 234, 0.15); }
.glow-blue-border { box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.2), 0 10px 30px -5px rgba(37, 99, 235, 0.15); }
.glow-orange-border { box-shadow: 0 0 0 1px rgba(234, 88, 12, 0.2), 0 10px 30px -5px rgba(234, 88, 12, 0.15); }
.glow-pink-border { box-shadow: 0 0 0 1px rgba(219, 39, 119, 0.2), 0 10px 30px -5px rgba(219, 39, 119, 0.15); }
.glow-sky-border { box-shadow: 0 0 0 1px rgba(14, 165, 233, 0.2), 0 10px 30px -5px rgba(14, 165, 233, 0.15); }
.glow-green-border { box-shadow: 0 0 0 1px rgba(22, 163, 74, 0.2), 0 10px 30px -5px rgba(22, 163, 74, 0.15); }

/* Button Glare */

/* Button Glare */
.btn-glare { position: relative; overflow: hidden; }
.btn-glare::before {
    content: ''; position: absolute; top: 0; left: -100%; width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transform: skewX(-25deg); animation: glare var(--glare-duration, 3s) infinite; animation-delay: var(--glare-delay, 0s); pointer-events: none; z-index: 10;
}
@keyframes glare {
    0% { left: -100%; } 20% { left: 200%; } 100% { left: 200%; }
}

/* QR Code Styling */
#wa-qr img,
#wa-qr canvas {
    margin: 0 auto;
    border-radius: 8px;
    border: 1px solid rgba(0, 0, 0, 0.05); /* Faint dark border for light mode */
    max-width: 100%;
    width: 128px;
    height: auto;
}
html.dark #wa-qr img,
html.dark #wa-qr canvas {
    border-color: rgba(255, 255, 255, 0.1); /* Very faint white border for dark mode */
}

/* Special styling for YouTube thumbnail preview */
#wa-qr.youtube-mode {
    background-color: transparent;
    padding: 0;
    box-shadow: none;
}

/* Custom Scrollbar for Emoji Picker */
.custom-scrollbar::-webkit-scrollbar { width: 6px; }
.custom-scrollbar::-webkit-scrollbar-track { background: transparent; }
.custom-scrollbar::-webkit-scrollbar-thumb { background-color: rgba(156, 163, 175, 0.5); border-radius: 20px; }
.no-scrollbar::-webkit-scrollbar { display: none; }
.no-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }

/* QR Pattern Mask for Color Picker Icon */
.qr-mask {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='black'%3E%3Cpath d='M3 3h6v6H3V3zm2 2v2h2V5H5zm8-2h6v6h-6V3zm2 2v2h2V5h-2zM3 15h6v6H3v-6zm2 2v2h2v-2H5zm8 4h2v2h-2v-2zm-2-2h2v2h-2v-2zm4 0h2v2h-2v-2zm2 2h2v2h-2v-2zm-2-6h2v2h-2v-2zm2 2h2v2h-2v-2zm-6-2h2v2h-2v-2zm2 2h2v2h-2v-2z'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='black'%3E%3Cpath d='M3 3h6v6H3V3zm2 2v2h2V5H5zm8-2h6v6h-6V3zm2 2v2h2V5h-2zM3 15h6v6H3v-6zm2 2v2h2v-2H5zm8 4h2v2h-2v-2zm-2-2h2v2h-2v-2zm4 0h2v2h-2v-2zm2 2h2v2h-2v-2zm-2-6h2v2h-2v-2zm2 2h2v2h-2v-2zm-6-2h2v2h-2v-2zm2 2h2v2h-2v-2z'/%3E%3C/svg%3E");
    -webkit-mask-size: 85%;
    mask-size: 85%;
    -webkit-mask-position: center;
    mask-position: center;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    background-image: none;
}

/* Minimal Select Dropdown (Matching Country Picker) */
.glass-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%236b7280' stroke-width='2'%3e%3cpath stroke-linecap='round' stroke-linejoin='round' d='M19 9l-7 7-7-7'/%3e%3c/svg%3e");
    background-position: right 0.75rem center;
    background-repeat: no-repeat;
    background-size: 1rem 1rem;
    padding-right: 2.5rem;
}
html.dark .glass-select {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%239ca3af' stroke-width='2'%3e%3cpath stroke-linecap='round' stroke-linejoin='round' d='M19 9l-7 7-7-7'/%3e%3c/svg%3e");
}

/* --- MOBILE PERFORMANCE PATCH --- */
@media screen and (max-width: 768px) {
    /* Stop background animation */
    .bg-pattern {
        animation: none !important;
        background-attachment: scroll !important;
    }
    /* Remove heavy glows on mobile */
    .glow-red-border, .glow-purple-border, .glow-blue-border, .glow-orange-border, .glow-pink-border, .glow-sky-border, .glow-green-border, .card-base {
        box-shadow: none !important;
    }

    /* Specific Borders for Mobile */
    .glow-red-border { border: 1px solid rgba(220, 38, 38, 0.5) !important; }
    .glow-purple-border { border: 1px solid rgba(147, 51, 234, 0.5) !important; }
    .glow-blue-border { border: 1px solid rgba(37, 99, 235, 0.5) !important; }
    .glow-orange-border { border: 1px solid rgba(234, 88, 12, 0.5) !important; }
    .glow-pink-border { border: 1px solid rgba(219, 39, 119, 0.5) !important; }
    .glow-sky-border { border: 1px solid rgba(14, 165, 233, 0.5) !important; }
    .glow-green-border { border: 1px solid rgba(22, 163, 74, 0.5) !important; }

    /* Thicker stroke on light mode */
    html:not(.dark) .glow-red-border { border-width: 2px !important; }
    html:not(.dark) .glow-purple-border { border-width: 2px !important; }
    html:not(.dark) .glow-blue-border { border-width: 2px !important; }
    html:not(.dark) .glow-orange-border { border-width: 2px !important; }
    html:not(.dark) .glow-pink-border { border-width: 2px !important; }
    html:not(.dark) .glow-sky-border { border-width: 2px !important; }
    html:not(.dark) .glow-green-border { border-width: 2px !important; }

    /* Disable blur filters */
    .blur-content, [class*="backdrop-blur"] {
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
    }
}

/* Hide Header on Mobile Footer Intersection */
.header-hidden-mobile {
    transform: translate(-50%, -200%) !important; /* Maintain X centering, move Y up */
    opacity: 0;
    pointer-events: none;
}