/* 청담 - 3D 효과 스타일시트 */

/* ===== 3D Floating Animation ===== */
.floating-3d {
    animation: floating3D 6s ease-in-out infinite;
    transform-style: preserve-3d;
}

@keyframes floating3D {
    0%, 100% {
        transform: translateY(0) rotateX(0) rotateY(0);
    }
    25% {
        transform: translateY(-10px) rotateX(2deg) rotateY(2deg);
    }
    50% {
        transform: translateY(-5px) rotateX(0) rotateY(-2deg);
    }
    75% {
        transform: translateY(-15px) rotateX(-2deg) rotateY(1deg);
    }
}

/* ===== Perspective Container ===== */
.perspective-container {
    perspective: 1000px;
    perspective-origin: 50% 50%;
}

/* ===== 3D Card Effects ===== */
.card-3d-tilt {
    transform-style: preserve-3d;
    transition: transform 0.5s cubic-bezier(0.23, 1, 0.32, 1);
}

.card-3d-tilt:hover {
    transform: rotateX(5deg) rotateY(5deg) translateZ(10px);
}

/* ===== Glow Effects ===== */
.glow-effect {
    position: relative;
}

.glow-effect::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg,
        #6366f1, #ec4899, #06b6d4, #6366f1);
    background-size: 400% 400%;
    border-radius: inherit;
    z-index: -1;
    filter: blur(15px);
    opacity: 0;
    transition: opacity 0.3s ease;
    animation: gradientShift 3s ease infinite;
}

.glow-effect:hover::before {
    opacity: 0.7;
}

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

/* ===== Parallax Layers ===== */
.parallax-container {
    position: relative;
    transform-style: preserve-3d;
    overflow: hidden;
}

.parallax-layer {
    position: absolute;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
}

.parallax-layer-back {
    transform: translateZ(-100px) scale(2);
}

.parallax-layer-base {
    transform: translateZ(0);
}

.parallax-layer-front {
    transform: translateZ(100px) scale(0.9);
}

/* ===== Neon Text Effect ===== */
.neon-text {
    text-shadow:
        0 0 5px currentColor,
        0 0 10px currentColor,
        0 0 20px currentColor,
        0 0 40px var(--primary-color),
        0 0 80px var(--primary-color);
    animation: neonPulse 1.5s ease-in-out infinite alternate;
}

@keyframes neonPulse {
    from {
        text-shadow:
            0 0 5px currentColor,
            0 0 10px currentColor,
            0 0 20px currentColor,
            0 0 40px var(--primary-color),
            0 0 80px var(--primary-color);
    }
    to {
        text-shadow:
            0 0 2px currentColor,
            0 0 5px currentColor,
            0 0 10px currentColor,
            0 0 20px var(--primary-color),
            0 0 40px var(--primary-color);
    }
}

/* ===== Holographic Effect ===== */
.holographic {
    position: relative;
    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.1) 0%,
        rgba(255, 255, 255, 0.05) 50%,
        rgba(255, 255, 255, 0.1) 100%
    );
    overflow: hidden;
}

.holographic::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent 30%,
        rgba(99, 102, 241, 0.1) 40%,
        rgba(236, 72, 153, 0.1) 50%,
        rgba(6, 182, 212, 0.1) 60%,
        transparent 70%
    );
    animation: holographicShine 3s linear infinite;
}

@keyframes holographicShine {
    0% { transform: translateX(-50%) translateY(-50%) rotate(0deg); }
    100% { transform: translateX(-50%) translateY(-50%) rotate(360deg); }
}

/* ===== Glass Morphism Enhanced ===== */
.glass-morphism {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.3),
        inset 0 0 0 1px rgba(255, 255, 255, 0.05);
}

/* ===== Depth Shadow ===== */
.depth-shadow {
    box-shadow:
        0 2px 4px rgba(0, 0, 0, 0.1),
        0 4px 8px rgba(0, 0, 0, 0.1),
        0 8px 16px rgba(0, 0, 0, 0.1),
        0 16px 32px rgba(0, 0, 0, 0.1),
        0 32px 64px rgba(0, 0, 0, 0.1);
}

/* ===== Animated Border ===== */
.animated-border {
    position: relative;
    background: transparent;
}

.animated-border::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: inherit;
    padding: 2px;
    background: linear-gradient(
        90deg,
        #6366f1,
        #ec4899,
        #06b6d4,
        #6366f1
    );
    background-size: 300% 100%;
    -webkit-mask:
        linear-gradient(#fff 0 0) content-box,
        linear-gradient(#fff 0 0);
    mask:
        linear-gradient(#fff 0 0) content-box,
        linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    animation: borderFlow 3s linear infinite;
}

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

/* ===== Ripple Effect ===== */
.ripple {
    position: relative;
    overflow: hidden;
}

.ripple::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.ripple:active::after {
    width: 300%;
    height: 300%;
    opacity: 0;
}

/* ===== Shimmer Loading ===== */
.shimmer {
    position: relative;
    overflow: hidden;
}

.shimmer::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.1),
        transparent
    );
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* ===== Floating Elements ===== */
.float-slow {
    animation: floatSlow 8s ease-in-out infinite;
}

.float-medium {
    animation: floatMedium 5s ease-in-out infinite;
}

.float-fast {
    animation: floatFast 3s ease-in-out infinite;
}

@keyframes floatSlow {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(5deg); }
}

@keyframes floatMedium {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-15px) rotate(-3deg); }
}

@keyframes floatFast {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-10px) rotate(2deg); }
}

/* ===== Rotate Animations ===== */
.rotate-slow {
    animation: rotateSlow 20s linear infinite;
}

.rotate-medium {
    animation: rotateMedium 10s linear infinite;
}

@keyframes rotateSlow {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes rotateMedium {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* ===== Scale Effects ===== */
.scale-hover {
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.scale-hover:hover {
    transform: scale(1.05);
}

.scale-hover:active {
    transform: scale(0.98);
}

/* ===== Blur Fade ===== */
.blur-fade-in {
    animation: blurFadeIn 0.5s ease-out forwards;
}

@keyframes blurFadeIn {
    from {
        opacity: 0;
        filter: blur(10px);
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        filter: blur(0);
        transform: translateY(0);
    }
}

/* ===== Morphing Shape ===== */
.morph-shape {
    animation: morph 8s ease-in-out infinite;
}

@keyframes morph {
    0%, 100% {
        border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
    }
    50% {
        border-radius: 30% 60% 70% 40% / 50% 60% 30% 60%;
    }
}

/* ===== Text Reveal ===== */
.text-reveal {
    overflow: hidden;
}

.text-reveal span {
    display: inline-block;
    animation: textReveal 0.8s cubic-bezier(0.77, 0, 0.175, 1) forwards;
    opacity: 0;
    transform: translateY(100%);
}

@keyframes textReveal {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== Stagger Animation Helper ===== */
.stagger-1 { animation-delay: 0.1s; }
.stagger-2 { animation-delay: 0.2s; }
.stagger-3 { animation-delay: 0.3s; }
.stagger-4 { animation-delay: 0.4s; }
.stagger-5 { animation-delay: 0.5s; }
.stagger-6 { animation-delay: 0.6s; }

/* ===== Gradient Animation ===== */
.gradient-animate {
    background-size: 200% 200%;
    animation: gradientMove 5s ease infinite;
}

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

/* ===== Particle Orbit ===== */
.orbit-container {
    position: relative;
}

.orbit-particle {
    position: absolute;
    animation: orbit 4s linear infinite;
}

@keyframes orbit {
    from {
        transform: rotate(0deg) translateX(50px) rotate(0deg);
    }
    to {
        transform: rotate(360deg) translateX(50px) rotate(-360deg);
    }
}

/* ===== Elastic Scale ===== */
.elastic-scale {
    transition: transform 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.elastic-scale:hover {
    transform: scale(1.1);
}

/* ===== Typewriter Effect ===== */
.typewriter {
    overflow: hidden;
    border-right: 2px solid var(--primary-color);
    white-space: nowrap;
    animation:
        typing 3.5s steps(40, end),
        blink-caret 0.75s step-end infinite;
}

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

@keyframes blink-caret {
    from, to { border-color: transparent; }
    50% { border-color: var(--primary-color); }
}

/* ===== 3D Button Press ===== */
.btn-3d-press {
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.1s;
}

.btn-3d-press::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: inherit;
    border-radius: inherit;
    transform: translateZ(-10px);
    filter: brightness(0.7);
}

.btn-3d-press:active {
    transform: translateZ(-5px);
}

/* ===== Spotlight Effect ===== */
.spotlight {
    position: relative;
    overflow: hidden;
}

.spotlight::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(
        circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
        rgba(255, 255, 255, 0.1) 0%,
        transparent 50%
    );
    pointer-events: none;
}
