/* ===== ZXH Facebook Video Downloader - Custom Styles ===== */
:root {
    --bg-deep: #050b1a;
    --accent: #1877F2;
}
* { box-sizing: border-box; }
body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-deep);
    color: #e2e8f0;
    min-height: 100vh;
    margin: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.glass-panel {
    background: rgba(12,20,38,0.65);
    backdrop-filter: blur(22px);
    -webkit-backdrop-filter: blur(22px);
    border: 1px solid rgba(255,255,255,0.07);
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
    border-radius: 28px;
}
.zxh-gradient {
    background: linear-gradient(135deg, #1877F2 0%, #0d5ec9 40%, #0a3f8a 100%);
}
.zxh-text-gradient {
    background: linear-gradient(to right, #60a5fa, #1d4ed8, #60a5fa);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: textShine 3s ease-in-out infinite alternate;
}
@keyframes textShine {
    0% { background-position: 0% center; }
    100% { background-position: 200% center; }
}
.loader-spinner {
    width: 22px; height: 22px;
    border: 3px solid rgba(255,255,255,0.5);
    border-top-color: #fff;
    border-radius: 50%;
    display: inline-block;
    animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.btn-shimmer {
    position: relative;
    overflow: hidden;
}
.btn-shimmer::after {
    content: '';
    position: absolute;
    top: -50%; left: -50%;
    width: 200%; height: 200%;
    background: linear-gradient(60deg, transparent 40%, rgba(255,255,255,0.08) 45%, rgba(255,255,255,0.15) 50%, rgba(255,255,255,0.08) 55%, transparent 60%);
    animation: shimmerMove 3s infinite linear;
}
@keyframes shimmerMove { 0% { transform: translateX(-100%) rotate(0deg); } 100% { transform: translateX(100%) rotate(0deg); } }
.download-btn {
    transition: all 0.2s ease;
    cursor: pointer;
}
.download-btn:active { transform: scale(0.94); }
.download-btn:hover:not(:disabled) {
    background: rgba(30,64,120,0.7);
    border-color: rgba(96,165,250,0.5);
    box-shadow: 0 0 25px rgba(24,119,242,0.3);
}
.download-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
}
.pulse-ring {
    animation: pulseRing 2s ease-out infinite;
}
@keyframes pulseRing {
    0% { box-shadow: 0 0 0 0 rgba(24,119,242,0.5); }
    70% { box-shadow: 0 0 0 20px rgba(24,119,242,0); }
    100% { box-shadow: 0 0 0 0 rgba(24,119,242,0); }
}
.toast {
    position: fixed;
    bottom: 30px; left: 50%;
    transform: translateX(-50%) translateY(120px);
    background: #1e293b;
    color: #e2e8f0;
    padding: 14px 28px;
    border-radius: 50px;
    font-weight: 600; font-size: 14px;
    z-index: 9999;
    border: 1px solid rgba(255,255,255,0.15);
    box-shadow: 0 15px 35px rgba(0,0,0,0.6);
    transition: transform 0.4s cubic-bezier(0.175,0.885,0.32,1.275);
    pointer-events: none;
}
.toast.show { transform: translateX(-50%) translateY(0); }
.toast.success { border-color: rgba(34,197,94,0.5); background: #0f1f1a; }
.toast.error { border-color: rgba(239,68,68,0.5); background: #1f1010; }
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ===== PWA Install Popup Overlay (custom, Tailwind classes in HTML) ===== */
.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, #1877F2, #0a3f8a);
    -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, #1877F2, #0d5ec9);
    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(24,119,242,0.35);
}
.btn-premium:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 35px rgba(24,119,242,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; }