/* ========== PREMIUM VISUAL EFFECTS ========== */

/* ========== BUTTON SHATTER SHAKE ========== */
.btn-shaking { animation: btnShake 0.4s ease-in-out; }
@keyframes btnShake {
    0%,100% { transform: translateX(0); }
    10% { transform: translateX(-6px) rotate(-1deg); }
    30% { transform: translateX(6px) rotate(1deg); }
    50% { transform: translateX(-4px); }
    70% { transform: translateX(4px); }
    90% { transform: translateX(-2px); }
}

/* ========== GRADIENT TEXT ========== */
.text-gradient-hero {
    background: linear-gradient(135deg, #0F172A 0%, #334155 30%, #4F46E5 60%, #6366F1 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    background-size: 200% 200%;
    animation: gradientShift 8s ease-in-out infinite;
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.title-lg em {
    background: linear-gradient(120deg, #4F46E5 0%, #6366F1 25%, #818CF8 50%, #6366F1 75%, #4F46E5 100%);
    background-size: 300% 100%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: shimmer 4s linear infinite;
}

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

/* ========== CARD GLOW ON HOVER ========== */
.product-card,
.pcard,
.dl-card,
.tech-detail-card,
.model-card,
.value-card,
.contact-card {
    position: relative;
}

.product-card::after,
.pcard::after,
.dl-card::after,
.tech-detail-card::after,
.model-card::after,
.value-card::after,
.contact-card::after {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: inherit;
    background: linear-gradient(135deg,
        rgba(79, 70, 229, 0) 0%,
        rgba(79, 70, 229, 0.06) 50%,
        rgba(139, 92, 246, 0) 100%
    );
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: -1;
    filter: blur(20px);
    pointer-events: none;
}

.product-card:hover::after,
.pcard:hover::after,
.dl-card:hover::after,
.tech-detail-card:hover::after,
.model-card:hover::after,
.value-card:hover::after,
.contact-card:hover::after {
    opacity: 1;
}

/* ========== ANIMATED GRADIENT BORDER ========== */
.tech-detail-card,
.model-card,
.value-card,
.contact-card,
.dl-card {
    overflow: hidden;
}

.tech-detail-card::before,
.model-card::before,
.value-card::before,
.contact-card::before,
.dl-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6, #06b6d4, #6366f1);
    background-size: 300% 300%;
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.4s ease;
    animation: borderRotate 4s linear infinite;
    z-index: 1;
    pointer-events: none;
}

.tech-detail-card:hover::before,
.model-card:hover::before,
.value-card:hover::before,
.contact-card:hover::before,
.dl-card:hover::before {
    opacity: 1;
}

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

/* ========== GLASSMORPHISM ========== */
.glass-card {
    background: rgba(255, 255, 255, 0.7) !important;
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    border: 1px solid rgba(0, 0, 0, 0.06) !important;
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.06),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

/* ========== NOISE TEXTURE ========== */
body::after {
    content: '';
    position: fixed;
    inset: 0;
    z-index: 9999;
    pointer-events: none;
    opacity: 0.012;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    background-repeat: repeat;
    background-size: 256px 256px;
}

/* ========== BUTTON ENHANCEMENTS ========== */
.btn {
    position: relative;
    overflow: hidden;
}

.btn::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at var(--ripple-x, 50%) var(--ripple-y, 50%),
        rgba(255, 255, 255, 0.25) 0%,
        transparent 60%
    );
    opacity: 0;
    transition: opacity 0.6s ease;
    pointer-events: none;
}

.btn:active::after {
    opacity: 1;
    transition: opacity 0s;
}

.btn-primary {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-primary:hover {
    box-shadow: 0 8px 36px rgba(79, 70, 229, 0.3), 0 0 60px rgba(79, 70, 229, 0.08);
    transform: translateY(-3px) scale(1.02);
}

.btn-primary:active {
    transform: translateY(-1px) scale(0.98);
}

.btn-ghost:hover {
    box-shadow: 0 8px 32px rgba(13, 148, 136, 0.25), 0 0 48px rgba(13, 148, 136, 0.06);
}

/* ========== NAV LINK ANIMATED UNDERLINE ========== */
.nav-link::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--gradient-main);
    border-radius: 1px;
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1), left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-link:hover::before {
    width: 60%;
    left: 20%;
}

.nav-link.nav-cta::before { display: none; }

/* ========== ENHANCED SECTION DIVIDER ========== */
.fp-section + .fp-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(79, 70, 229, 0.05) 20%,
        rgba(79, 70, 229, 0.15) 50%,
        rgba(79, 70, 229, 0.05) 80%,
        transparent 100%
    );
    box-shadow: none;
    z-index: 1;
    pointer-events: none;
}

/* ========== DOWNLOAD SECTION ENHANCEMENTS ========== */
.sec-download {
    background: radial-gradient(ellipse at center top, rgba(79, 70, 229, 0.03) 0%, transparent 60%),
                var(--color-bg-alt);
}

.dl-card {
    overflow: hidden;
}

.dl-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 200%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(0, 0, 0, 0.01) 25%,
        rgba(0, 0, 0, 0.02) 50%,
        rgba(0, 0, 0, 0.01) 75%,
        transparent 100%
    );
    animation: cardShine 6s ease-in-out infinite;
    pointer-events: none;
}

@keyframes cardShine {
    0%, 100% { transform: translateX(-50%); }
    50% { transform: translateX(50%); }
}

.dl-emoji {
    font-size: 3rem;
    margin-bottom: 22px;
    filter: drop-shadow(0 4px 12px rgba(79, 70, 229, 0.15));
}

.dl-features {
    display: flex;
    justify-content: center;
    gap: 24px;
    flex-wrap: wrap;
    margin-top: 32px;
}

.dl-feature {
    font-size: 0.82rem;
    color: var(--color-text-mid);
    display: flex;
    align-items: center;
    gap: 6px;
}

.dl-feature span {
    color: #34d399;
    font-weight: 700;
}

/* ========== TOAST NOTIFICATION ========== */
.toast {
    position: fixed;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 12px;
    padding: 14px 28px;
    color: var(--color-text);
    font-size: 0.88rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.1), 0 0 30px rgba(79, 70, 229, 0.05);
    z-index: 10000;
    opacity: 0;
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.5s ease;
    pointer-events: none;
    white-space: nowrap;
}

.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
    pointer-events: auto;
}

.toast-icon {
    font-size: 1.2rem;
}

.toast-icon-svg {
    color: var(--color-accent-light);
    flex-shrink: 0;
}

.toast-progress {
    position: absolute;
    bottom: 0;
    left: 12px;
    right: 12px;
    height: 2px;
    background: rgba(0, 0, 0, 0.04);
    border-radius: 1px;
    overflow: hidden;
}

.toast-progress-bar {
    height: 100%;
    background: var(--gradient-main);
    border-radius: 1px;
    animation: toastCountdown 3s linear forwards;
}

@keyframes toastCountdown {
    from { width: 100%; }
    to { width: 0%; }
}

/* ========== VIDEO DEMO WRAPPER ========== */
.mp-video-wrap {
    flex: 1;
    position: relative;
    overflow: hidden;
    border-radius: 0 0 12px 12px;
}

.mp-video-wrap video {
    display: block;
    width: 100%;
    height: 108%;
    object-fit: cover;
    margin-top: -8%;
}

/* ========== TYPOGRAPHY REFINEMENTS ========== */
.title-lg {
    font-weight: 800;
    letter-spacing: -0.03em;
}

.hero-title {
    font-weight: 900;
}

.stat-num {
    font-weight: 900;
    letter-spacing: -0.05em;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
    .dl-features {
        gap: 12px;
    }
    .dl-feature {
        font-size: 0.75rem;
    }
    /* Toast: full-width on mobile */
    .toast {
        left: 16px;
        right: 16px;
        transform: translateY(100px);
        white-space: normal;
        font-size: 0.82rem;
        padding: 12px 20px;
        bottom: 24px;
    }
    .toast.show {
        transform: translateY(0);
    }
}

@media (max-width: 480px) {
    .toast {
        left: 12px;
        right: 12px;
        padding: 10px 16px;
        font-size: 0.78rem;
    }
}

/* ========== REDUCED MOTION ========== */
@media (prefers-reduced-motion: reduce) {
    .title-lg em,
    .text-gradient-hero {
        animation: none !important;
    }
    .dl-card::before {
        animation: none !important;
    }
}
