/* NetPack - Enhanced Section Effects CSS v2.0 */

/* ============================================
   TOAST NOTIFICATIONS
   ============================================ */
.toast {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    background: var(--card-bg, #fff);
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    transform: translateX(120%);
    transition: transform 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    min-width: 280px;
    border-left: 4px solid;
}

.toast.show {
    transform: translateX(0);
}

.toast-success {
    border-color: #10b981;
}
.toast-success i { color: #10b981; }

.toast-error {
    border-color: #ef4444;
}
.toast-error i { color: #ef4444; }

.toast-info {
    border-color: #4A6BB5;
}
.toast-info i { color: #4A6BB5; }

.toast-warning {
    border-color: #f59e0b;
}
.toast-warning i { color: #f59e0b; }

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

.toast span {
    color: var(--text-primary, #333);
    font-weight: 500;
}

/* ============================================
   ACHIEVEMENT POPUP
   ============================================ */
.achievement-popup {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(-100px);
    background: linear-gradient(135deg, #4A6BB5, #667eea);
    color: white;
    padding: 20px 30px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 20px 60px rgba(74, 107, 181, 0.5);
    z-index: 10003;
    transition: transform 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.achievement-popup.show {
    transform: translateX(-50%) translateY(0);
}

.achievement-icon {
    font-size: 2.5rem;
    animation: bounce-trophy 0.5s ease infinite;
}

@keyframes bounce-trophy {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

.achievement-title {
    font-size: 0.85rem;
    opacity: 0.9;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.achievement-name {
    font-size: 1.3rem;
    font-weight: 700;
    margin: 4px 0;
}

.achievement-desc {
    font-size: 0.9rem;
    opacity: 0.85;
}

/* ============================================
   CONFETTI ANIMATION
   ============================================ */
@keyframes confetti-fall {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(100vh) rotate(720deg);
        opacity: 0;
    }
}

/* ============================================
   RAINBOW MODE (Easter Egg)
   ============================================ */
.rainbow-mode {
    animation: rainbow-bg 2s linear infinite;
}

@keyframes rainbow-bg {
    0% { filter: hue-rotate(0deg); }
    100% { filter: hue-rotate(360deg); }
}

/* ============================================
   HEADER SECTION - Enhanced Effects
   ============================================ */
header {
    position: relative;
    overflow: hidden;
}

header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 50%, rgba(74, 107, 181, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(102, 126, 234, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 20%, rgba(74, 107, 181, 0.08) 0%, transparent 50%);
    animation: headerPulse 15s ease-in-out infinite;
    pointer-events: none;
}

@keyframes headerPulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.8; transform: scale(1.05); }
}

.centerHeader h1,
.centerHeader .creative {
    animation: floatHeader 6s ease-in-out infinite;
}

.centerHeader .creative {
    animation-delay: 0.5s;
}

@keyframes floatHeader {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

/* Header Stats Animation */
.header-stats {
    animation: fadeInUp 1s ease-out 0.5s both;
}

.stat-item {
    transition: transform 0.3s ease;
}

.stat-item:hover {
    transform: translateY(-5px);
}

/* ============================================
   FEATURED TOOLS SECTION - Enhanced
   ============================================ */
.featured-tools-section {
    position: relative;
    overflow: hidden;
}

.featured-tools-section::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: 
        linear-gradient(45deg, transparent 30%, rgba(74, 107, 181, 0.05) 50%, transparent 70%);
    animation: waveMove 20s linear infinite;
    pointer-events: none;
}

@keyframes waveMove {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Featured Tool Cards - Enhanced */
.featured-tool-card {
    transform-style: preserve-3d;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    opacity: 0;
    transform: translateY(30px);
}

.featured-tool-card.active {
    opacity: 1;
    transform: translateY(0);
}

.featured-tool-card:hover {
    box-shadow: 0 20px 40px rgba(74, 107, 181, 0.3);
}

.featured-tool-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(74, 107, 181, 0.1) 0%, transparent 50%);
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
}

.featured-tool-card:hover::after {
    opacity: 1;
}

/* Tool Preview Cards */
.tool-preview-card {
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.tool-preview-card:hover {
    transform: translateY(-10px) scale(1.02);
}

.tool-preview-card .card-highlight {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #4A6BB5, #667eea, #764ba2);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.tool-preview-card:hover .card-highlight {
    transform: scaleX(1);
}

/* ============================================
   ABOUT SECTION - Ripple Effect
   ============================================ */
#about {
    position: relative;
    overflow: hidden;
}

#about::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(74, 107, 181, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    animation: ripple 8s ease-out infinite;
    pointer-events: none;
}

@keyframes ripple {
    0% {
        width: 300px;
        height: 300px;
        opacity: 0.8;
    }
    100% {
        width: 1500px;
        height: 1500px;
        opacity: 0;
    }
}

/* Service cards with stagger animation */
.circ li {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.circ li.active {
    opacity: 1;
    transform: translateY(0);
}

.circ li:hover {
    opacity: 1 !important;
    animation: glowPulse 1.5s ease-in-out infinite;
}

@keyframes glowPulse {
    0%, 100% {
        box-shadow: 0 0 20px rgba(74, 107, 181, 0.3);
    }
    50% {
        box-shadow: 0 0 40px rgba(74, 107, 181, 0.6);
    }
}

/* ============================================
   IN-HOUSE SECTION - Parallax Layers
   ============================================ */
#In-House {
    position: relative;
    overflow: hidden;
}

#In-House::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        linear-gradient(135deg, transparent 0%, rgba(74, 107, 181, 0.03) 50%, transparent 100%);
    animation: parallaxSlide 25s ease-in-out infinite;
    pointer-events: none;
}

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

/* Card flip effect on hover */
.card {
    transition: all 0.6s cubic-bezier(0.23, 1, 0.32, 1);
    transform-style: preserve-3d;
    opacity: 0;
    transform: translateY(30px);
}

.card.active {
    opacity: 1;
    transform: translateY(0);
}

.card:hover {
    transform: translateY(-15px) scale(1.02);
}

/* Shimmer effect on card images */
.card_image {
    position: relative;
    overflow: hidden;
}

.card_image::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent 30%,
        rgba(255, 255, 255, 0.3) 50%,
        transparent 70%
    );
    transform: translateX(-100%);
    transition: transform 0.6s;
}

.card:hover .card_image::after {
    transform: translateX(100%);
}

/* ============================================
   WORK SECTION - Zoom & Tilt
   ============================================ */
#Work {
    position: relative;
    overflow: hidden;
}

#Work::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(ellipse at top left, rgba(74, 107, 181, 0.05) 0%, transparent 50%),
        radial-gradient(ellipse at bottom right, rgba(102, 126, 234, 0.05) 0%, transparent 50%);
    animation: breathe 10s ease-in-out infinite;
    pointer-events: none;
}

@keyframes breathe {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

.workMainImg {
    perspective: 1000px;
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.workMainImg:hover {
    transform: translateY(-10px) rotateY(5deg);
}

.workMainImg img {
    transition: transform 0.6s ease;
}

.workMainImg:hover img {
    transform: scale(1.1);
}

/* ============================================
   CONTACT SECTION - Magnetic Field
   ============================================ */
#Contact {
    position: relative;
    overflow: hidden;
}

#Contact::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at center, rgba(74, 107, 181, 0.08) 0%, transparent 70%);
    transform: translate(-50%, -50%);
    animation: magneticPulse 12s ease-in-out infinite;
    pointer-events: none;
}

@keyframes magneticPulse {
    0%, 100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.5;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.2);
        opacity: 1;
    }
}

.mail input,
.mail textarea {
    transition: all 0.3s ease;
}

.mail input:focus,
.mail textarea:focus {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(74, 107, 181, 0.2);
}

/* ============================================
   SCROLL ANIMATIONS
   ============================================ */
.scroll-reveal {
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.scroll-reveal.active {
    opacity: 1;
    transform: translateY(0);
}

.scroll-reveal-left {
    opacity: 0;
    transform: translateX(-50px);
    transition: all 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.scroll-reveal-left.active {
    opacity: 1;
    transform: translateX(0);
}

.scroll-reveal-right {
    opacity: 0;
    transform: translateX(50px);
    transition: all 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.scroll-reveal-right.active {
    opacity: 1;
    transform: translateX(0);
}

/* ============================================
   RIPPLE EFFECT
   ============================================ */
.ripple-effect {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.6);
    transform: scale(0);
    animation: rippleAnimation 0.6s ease-out;
    pointer-events: none;
}

@keyframes rippleAnimation {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

/* ============================================
   CTA BUTTONS - Enhanced
   ============================================ */
.tools-cta-button {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.tools-cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(74, 107, 181, 0.4);
}

.tools-cta-button .button-glow {
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: buttonGlow 3s infinite;
}

@keyframes buttonGlow {
    0% { left: -100%; }
    50%, 100% { left: 100%; }
}

/* ============================================
   LOADING ANIMATIONS
   ============================================ */
@keyframes shimmer {
    0% { background-position: -1000px 0; }
    100% { background-position: 1000px 0; }
}

.loading-shimmer {
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(74, 107, 181, 0.1) 50%,
        transparent 100%
    );
    background-size: 1000px 100%;
    animation: shimmer 2s infinite;
}

/* ============================================
   FADE IN UP ANIMATION
   ============================================ */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   DARK MODE ADJUSTMENTS
   ============================================ */
body.dark header::before {
    background: 
        radial-gradient(circle at 20% 50%, rgba(74, 107, 181, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(102, 126, 234, 0.15) 0%, transparent 50%);
}

body.dark .featured-tools-section::before {
    background: 
        linear-gradient(45deg, transparent 30%, rgba(74, 107, 181, 0.08) 50%, transparent 70%);
}

body.dark #about::after {
    background: radial-gradient(circle, rgba(74, 107, 181, 0.15) 0%, transparent 70%);
}

body.dark .circ li:hover {
    box-shadow: 0 0 30px rgba(74, 107, 181, 0.5);
}

body.dark .toast {
    background: var(--card-bg, #1a1a2e);
}

body.dark .toast span {
    color: var(--text-primary, #fff);
}

body.dark #cursor-glow {
    background: radial-gradient(circle, rgba(102, 126, 234, 0.2) 0%, transparent 70%);
}

/* ============================================
   SCROLL TO TOP BUTTON HOVER
   ============================================ */
#scroll-to-top:hover {
    background: linear-gradient(135deg, #667eea, #764ba2);
}

/* ============================================
   PERFORMANCE OPTIMIZATIONS
   ============================================ */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    #floating-particles,
    #cursor-glow {
        display: none !important;
    }
}

/* Disable heavy effects on mobile */
@media (max-width: 768px) {
    header::before,
    .featured-tools-section::before,
    #about::after,
    #In-House::before,
    #Work::before,
    #Contact::before {
        animation: none;
    }
    
    .featured-tool-card:hover {
        transform: translateY(-5px);
    }
    
    .card:hover {
        transform: translateY(-10px);
    }
    
    #scroll-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
    }
    
    .achievement-popup {
        left: 10px;
        right: 10px;
        transform: translateX(0) translateY(-100px);
        padding: 15px 20px;
    }
    
    .achievement-popup.show {
        transform: translateX(0) translateY(0);
    }
    
    #toast-container {
        left: 10px;
        right: 10px;
        bottom: 10px;
    }
    
    .toast {
        min-width: auto;
    }
}

/* ============================================
   CURSOR EFFECTS (Desktop Only)
   ============================================ */
@media (min-width: 769px) {
    .featured-tool-card,
    .card,
    .workMainImg,
    .circ li,
    .tool-preview-card {
        cursor: pointer;
    }
    
    .featured-tool-card:hover,
    .card:hover,
    .workMainImg:hover {
        transition: transform 0.2s ease-out;
    }
}

/* ============================================
   KEYBOARD FOCUS STYLES
   ============================================ */
.mini-tool-btn:focus-visible,
.tools-cta-button:focus-visible,
button:focus-visible {
    outline: 3px solid #4A6BB5;
    outline-offset: 2px;
}

/* ============================================
   STAT NUMBERS ANIMATION
   ============================================ */
.stat-number {
    display: inline-block;
    font-variant-numeric: tabular-nums;
}

.stat-number.counted {
    animation: countPop 0.3s ease-out;
}

@keyframes countPop {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}
