/* ================================================
   ADVANCED EFFECTS - Premium Visual Effects
   ================================================ */

/* ===== Glassmorphism ===== */
.glass {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.glass-dark {
    background: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.glass-purple {
    background: rgba(156, 132, 204, 0.15);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(156, 132, 204, 0.3);
    box-shadow: 0 8px 32px rgba(156, 132, 204, 0.2);
}

/* ===== Gradient Mesh Backgrounds ===== */
.gradient-mesh {
    position: relative;
    overflow: hidden;
}

.gradient-mesh::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 20% 50%, rgba(156, 132, 204, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(179, 153, 212, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 40% 20%, rgba(156, 132, 204, 0.2) 0%, transparent 50%);
    animation: meshMove 20s ease-in-out infinite;
    pointer-events: none;
}

@keyframes meshMove {

    0%,
    100% {
        transform: translate(0, 0) rotate(0deg);
    }

    33% {
        transform: translate(5%, 5%) rotate(120deg);
    }

    66% {
        transform: translate(-5%, 5%) rotate(240deg);
    }
}

.gradient-bg {
    background: linear-gradient(135deg, #b399d4 0%, #9c84cc 50%, #7d69a8 100%);
}

.gradient-bg-subtle {
    background: linear-gradient(135deg, #fafafa 0%, #f0f0f0 100%);
}

.gradient-text {
    background: linear-gradient(135deg, #b399d4 0%, #9c84cc 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.animated-gradient {
    background: linear-gradient(-45deg,
            #b399d4,
            #9c84cc,
            #7d69a8,
            #b399d4);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
}

@keyframes gradientShift {

    0%,
    100% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }
}

/* ===== 3D Transform Effects ===== */
.transform-3d {
    transform-style: preserve-3d;
    perspective: 1000px;
}

.card-3d {
    transition: transform 0.6s cubic-bezier(0.23, 1, 0.32, 1);
}

.card-3d:hover {
    transform: rotateY(10deg) rotateX(10deg) scale(1.05);
}

.flip-card {
    perspective: 1000px;
}

.flip-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.8s;
    transform-style: preserve-3d;
}

.flip-card:hover .flip-card-inner {
    transform: rotateY(180deg);
}

.flip-card-front,
.flip-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
}

.flip-card-back {
    transform: rotateY(180deg);
}

/* ===== Neumorphism ===== */
.neomorph {
    background: #f0f0f0;
    border-radius: 16px;
    box-shadow:
        8px 8px 16px rgba(163, 177, 198, 0.6),
        -8px -8px 16px rgba(255, 255, 255, 0.5);
}

.neomorph-inset {
    background: #f0f0f0;
    border-radius: 16px;
    box-shadow:
        inset 8px 8px 16px rgba(163, 177, 198, 0.6),
        inset -8px -8px 16px rgba(255, 255, 255, 0.5);
}

.neomorph-purple {
    background: linear-gradient(145deg, #a88fba, #8d75a0);
    box-shadow:
        8px 8px 16px rgba(125, 105, 168, 0.4),
        -8px -8px 16px rgba(179, 153, 212, 0.4);
}

/* ===== Parallax Effects ===== */
.parallax {
    position: relative;
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}

.parallax-layer {
    position: absolute;
    width: 100%;
    height: 100%;
    transition: transform 0.1s ease-out;
}

/* ===== Advanced Shadows ===== */
.shadow-soft {
    box-shadow:
        0 2px 4px rgba(0, 0, 0, 0.05),
        0 8px 16px rgba(0, 0, 0, 0.05);
}

.shadow-medium {
    box-shadow:
        0 4px 8px rgba(0, 0, 0, 0.08),
        0 12px 24px rgba(0, 0, 0, 0.08);
}

.shadow-hard {
    box-shadow:
        0 8px 16px rgba(0, 0, 0, 0.12),
        0 16px 32px rgba(0, 0, 0, 0.12);
}

.shadow-purple {
    box-shadow:
        0 4px 12px rgba(156, 132, 204, 0.2),
        0 12px 32px rgba(156, 132, 204, 0.15);
}

.shadow-purple-intense {
    box-shadow:
        0 8px 24px rgba(156, 132, 204, 0.3),
        0 16px 48px rgba(156, 132, 204, 0.25);
}

/* ===== Overlay Effects ===== */
.overlay {
    position: relative;
}

.overlay::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.overlay:hover::before {
    opacity: 1;
}

.overlay-gradient::before {
    background: linear-gradient(180deg,
            transparent 0%,
            rgba(156, 132, 204, 0.8) 100%);
}

/* ===== Border Effects ===== */
.border-gradient {
    position: relative;
    background: white;
    border-radius: 12px;
}

.border-gradient::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 12px;
    padding: 2px;
    background: linear-gradient(135deg, #b399d4, #9c84cc);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: exclude;
    pointer-events: none;
}

.border-animated {
    position: relative;
    border: 2px solid transparent;
    background:
        linear-gradient(white, white) padding-box,
        linear-gradient(135deg, #b399d4, #9c84cc) border-box;
    border-radius: 12px;
}

/* ===== Glow Effects ===== */
.glow-purple {
    box-shadow: 0 0 20px rgba(156, 132, 204, 0.6);
}

.glow-hover {
    transition: box-shadow 0.3s ease;
}

.glow-hover:hover {
    box-shadow:
        0 0 20px rgba(156, 132, 204, 0.6),
        0 0 40px rgba(156, 132, 204, 0.4),
        0 0 60px rgba(156, 132, 204, 0.2);
}

/* ===== Text Effects ===== */
.text-shadow-soft {
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.text-shadow-hard {
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.3);
}

.text-glow {
    text-shadow:
        0 0 10px rgba(156, 132, 204, 0.8),
        0 0 20px rgba(156, 132, 204, 0.6),
        0 0 30px rgba(156, 132, 204, 0.4);
}

.text-stroke {
    -webkit-text-stroke: 1px rgba(156, 132, 204, 0.5);
}

/* ===== Backdrop Filters ===== */
.blur-sm {
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.blur-md {
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.blur-lg {
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
}

/* ===== Clip Path Effects ===== */
.clip-diagonal {
    clip-path: polygon(0 0, 100% 0, 100% 85%, 0 100%);
}

.clip-wave {
    clip-path: polygon(0% 0%,
            100% 0%,
            100% 85%,
            75% 90%,
            50% 85%,
            25% 90%,
            0% 85%);
}

.clip-arrow {
    clip-path: polygon(0 0, 100% 0, 100% 70%, 50% 100%, 0 70%);
}

/* ===== Morphing Shapes ===== */
.morph-circle {
    border-radius: 50%;
    transition: border-radius 0.5s ease;
}

.morph-circle:hover {
    border-radius: 20%;
}

/* ===== Image Effects ===== */
.image-zoom {
    overflow: hidden;
}

.image-zoom img {
    transition: transform 0.5s ease;
}

.image-zoom:hover img {
    transform: scale(1.2);
}

.image-tilt {
    transition: transform 0.3s ease;
}

.image-tilt:hover {
    transform: perspective(1000px) rotateY(10deg);
}

/* ===== Responsive Utilities ===== */
@media (max-width: 768px) {
    .gradient-mesh::before {
        animation-duration: 30s;
    }

    .card-3d:hover {
        transform: scale(1.02);
    }
}