/* ===== ZXH Official Pixels - Custom Styles ===== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=Poppins:wght@400;500;600;700;800&display=swap');

body {
    font-family: 'Poppins', sans-serif;
    color: #ffffff;
    overflow-y: scroll;
    background-color: #000; /* Fallback */
}

.thumb-aspect {
    aspect-ratio: 16 / 10;
}

::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.4);
}

/* Glassmorphism Classes */
.glass-panel {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.glass-card {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
}

.glass-input {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.img-gradient {
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0) 50%);
}

.hero-search-focus {
    box-shadow: 0 0 0 4px rgba(6, 182, 212, 0.3), 0 20px 40px -10px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255,255,255,0.3) inset;
}

.shimmer {
    background: rgba(255, 255, 255, 0.05);
    background-image: linear-gradient(to right, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.15) 20%, rgba(255, 255, 255, 0.05) 40%, rgba(255, 255, 255, 0.05) 100%);
    background-repeat: no-repeat;
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite linear;
}

@keyframes shimmer {
    0% { background-position: -100% 0; }
    100% { background-position: 100% 0; }
}

.modal-enter {
    animation: modalFadeIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.modal-leave {
    animation: modalFadeOut 0.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes modalFadeIn {
    from { opacity: 0; transform: scale(0.98) translateY(10px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

@keyframes modalFadeOut {
    from { opacity: 1; transform: scale(1) translateY(0); }
    to { opacity: 0; transform: scale(0.98) translateY(10px); }
}

.toast-enter {
    animation: toastIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes toastIn {
    from { opacity: 0; transform: translateY(100%) scale(0.9); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.fade-in {
    animation: fadeIn 0.5s ease forwards;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.hide-scrollbar::-webkit-scrollbar {
    display: none;
}

.hide-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

#header-search-form {
    display: none;
}

#mobile-search-trigger {
    display: none;
}

body.app-active #mobile-search-trigger {
    display: flex;
}

@media (min-width: 768px) {
    #header-search-form {
        display: flex;
        opacity: 0;
        transform: translateY(-10px);
        pointer-events: none;
        transition: opacity 0.5s ease, transform 0.5s ease;
    }
    body.app-active #header-search-form {
        opacity: 1;
        transform: translateY(0);
        pointer-events: auto;
    }
    body.app-active #mobile-search-trigger {
        display: none;
    }
}

body.mobile-search-open #header-search-form {
    display: flex;
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(20px);
    z-index: 50;
    padding: 0 16px;
    align-items: center;
    animation: slideDown 0.3s ease forwards;
    opacity: 1;
    transform: none;
    pointer-events: auto;
}

body.mobile-search-open #mobile-search-trigger {
    display: none;
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ===== PWA INSTALL POPUP ===== */
.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 10vh;
    backdrop-filter: blur(5px);
}
.popup-content {
    background: linear-gradient(145deg, #ffffff 0%, #f8f9fa 100%);
    color: #333;
    border-radius: 30px;
    padding: 2.5rem 2rem;
    max-width: 400px;
    width: 90%;
    margin: 0 auto;
    position: relative;
    box-shadow: 0 25px 60px rgba(0,0,0,0.5);
    animation: slideDown 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    text-align: center;
}
@keyframes slideDown {
    from { transform: translateY(-100%); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}
.popup-close-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background: transparent;
    border: none;
    color: #999;
    font-size: 1.5rem;
    cursor: pointer;
    line-height: 1;
    padding: 5px;
    transition: color 0.3s;
}
.popup-close-btn:hover { color: #333; }
.popup-content img {
    width: 80px;
    height: 80px;
    border-radius: 20px;
    object-fit: cover;
    margin: 0 auto 20px;
    display: block;
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}
.popup-content h2 {
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 10px;
    background: linear-gradient(135deg, #06b6d4, #3b82f6);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.popup-content p {
    color: #666;
    font-size: 0.95rem;
    margin-bottom: 25px;
}
.btn-premium {
    background: linear-gradient(135deg, #06b6d4, #3b82f6);
    border: none;
    color: white;
    padding: 15px 25px;
    border-radius: 15px;
    font-weight: 700;
    font-size: 1.1rem;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 10px 25px rgba(6, 182, 212, 0.35);
}
.btn-premium:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 35px rgba(6, 182, 212, 0.5);
}
.not-now-btn {
    background: transparent;
    border: none;
    color: #999;
    font-size: 0.9rem;
    text-decoration: underline;
    cursor: pointer;
    margin-top: 20px;
    transition: color 0.3s;
}
.not-now-btn:hover { color: #555; }

/* ===== Utility classes used in popup ===== */
.max-w-sm { max-width: 400px; }
.w-20 { width: 80px; }
.h-20 { height: 80px; }
.rounded-2xl { border-radius: 20px; }
.mx-auto { margin-left: auto; margin-right: auto; }
.mb-4 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-6 { margin-bottom: 1.5rem; }
.text-center { text-align: center; }
.text-xl { font-size: 1.8rem; }
.font-bold { font-weight: 700; }
.text-gray-500 { color: #666; }
.text-sm { font-size: 0.95rem; }
.text-gray-400 { color: #999; }
.mt-3 { margin-top: 1rem; }
.underline { text-decoration: underline; }
.cursor-pointer { cursor: pointer; }
.bg-transparent { background: transparent; }
.border-none { border: none; }