/**
 * Modern Artwork Styling
 * Gradients, glassmorphism, neumorphism, and artistic effects
 */

/* ═══════════════════════════════════════════════════════════════
   ANIMATED GRADIENT BACKGROUNDS
   ═══════════════════════════════════════════════════════════════ */

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

header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    background-size: 200% 200%;
    animation: gradientShift 15s ease infinite;
    position: relative;
    overflow: hidden;
}

/* Animated mesh overlay */
header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(circle at 20% 50%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
    animation: meshMove 20s ease infinite;
}

@keyframes meshMove {
    0%, 100% {
        opacity: 0.3;
        transform: translate(0, 0);
    }
    50% {
        opacity: 0.6;
        transform: translate(20px, -20px);
    }
}

/* ═══════════════════════════════════════════════════════════════
   GLASSMORPHISM EFFECTS
   ═══════════════════════════════════════════════════════════════ */

.glass-card {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.card,
.info-box,
.highlight,
.success-box,
.warning-box,
.error-box {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

/* Dark glass variant */
.glass-dark {
    background: rgba(31, 41, 55, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
}

/* ═══════════════════════════════════════════════════════════════
   NEUMORPHISM EFFECTS
   ═══════════════════════════════════════════════════════════════ */

.neuro-card {
    background: #f0f0f3;
    border-radius: 20px;
    box-shadow:
        12px 12px 24px rgba(174, 174, 192, 0.4),
        -12px -12px 24px rgba(255, 255, 255, 0.8);
}

.neuro-pressed {
    background: #f0f0f3;
    border-radius: 20px;
    box-shadow:
        inset 8px 8px 16px rgba(174, 174, 192, 0.4),
        inset -8px -8px 16px rgba(255, 255, 255, 0.8);
}

.neuro-button {
    background: #f0f0f3;
    border: none;
    border-radius: 12px;
    padding: 1rem 2rem;
    box-shadow:
        6px 6px 12px rgba(174, 174, 192, 0.4),
        -6px -6px 12px rgba(255, 255, 255, 0.8);
    transition: all 0.2s;
}

.neuro-button:hover {
    box-shadow:
        8px 8px 16px rgba(174, 174, 192, 0.4),
        -8px -8px 16px rgba(255, 255, 255, 0.8);
}

.neuro-button:active {
    box-shadow:
        inset 4px 4px 8px rgba(174, 174, 192, 0.4),
        inset -4px -4px 8px rgba(255, 255, 255, 0.8);
}

/* ═══════════════════════════════════════════════════════════════
   GRADIENT TEXT EFFECTS
   ═══════════════════════════════════════════════════════════════ */

.gradient-text {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 8s ease infinite;
}

h1.gradient-text,
h2.gradient-text {
    font-weight: 800;
}

/* ═══════════════════════════════════════════════════════════════
   3D TRANSFORM EFFECTS
   ═══════════════════════════════════════════════════════════════ */

.card-3d {
    transform-style: preserve-3d;
    transition: transform 0.6s;
}

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

.float-on-hover {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.float-on-hover:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

/* ═══════════════════════════════════════════════════════════════
   ANIMATED BORDERS
   ═══════════════════════════════════════════════════════════════ */

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

.animated-border {
    position: relative;
    border-radius: 12px;
}

.animated-border::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, #667eea, #764ba2, #f093fb, #667eea);
    background-size: 400%;
    border-radius: 12px;
    z-index: -1;
    animation: borderAnimation 3s ease infinite;
}

/* ═══════════════════════════════════════════════════════════════
   GLOW EFFECTS
   ═══════════════════════════════════════════════════════════════ */

@keyframes glow {
    0%, 100% {
        box-shadow: 0 0 20px rgba(102, 126, 234, 0.5);
    }
    50% {
        box-shadow: 0 0 40px rgba(102, 126, 234, 0.8);
    }
}

.glow-on-hover:hover {
    animation: glow 2s ease infinite;
}

.soft-glow {
    box-shadow: 0 0 30px rgba(102, 126, 234, 0.3);
}

/* ═══════════════════════════════════════════════════════════════
   GRADIENT MESH BACKGROUNDS
   ═══════════════════════════════════════════════════════════════ */

.mesh-background {
    background:
        radial-gradient(at 0% 0%, rgba(102, 126, 234, 0.1) 0px, transparent 50%),
        radial-gradient(at 100% 0%, rgba(118, 75, 162, 0.1) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(240, 147, 251, 0.1) 0px, transparent 50%),
        radial-gradient(at 0% 100%, rgba(254, 228, 64, 0.1) 0px, transparent 50%);
}

/* ═══════════════════════════════════════════════════════════════
   PARTICLE DECORATION
   ═══════════════════════════════════════════════════════════════ */

.floating-particles {
    position: relative;
    overflow: hidden;
}

.floating-particles::before,
.floating-particles::after {
    content: '';
    position: absolute;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(102, 126, 234, 0.2), transparent);
    animation: float 20s ease-in-out infinite;
}

.floating-particles::before {
    top: 10%;
    left: 10%;
    animation-delay: 0s;
}

.floating-particles::after {
    bottom: 10%;
    right: 10%;
    animation-delay: 10s;
}

@keyframes float {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    33% {
        transform: translate(30px, -30px) scale(1.1);
    }
    66% {
        transform: translate(-20px, 20px) scale(0.9);
    }
}

/* ═══════════════════════════════════════════════════════════════
   LIQUID MORPHING SHAPES
   ═══════════════════════════════════════════════════════════════ */

@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%;
    }
}

.morphing-blob {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    animation: morph 8s ease-in-out infinite;
}

/* ═══════════════════════════════════════════════════════════════
   PARALLAX SCROLL EFFECTS
   ═══════════════════════════════════════════════════════════════ */

.parallax-layer {
    transition: transform 0.5s cubic-bezier(0.23, 1, 0.32, 1);
}

/* Applied via JavaScript based on scroll position */

/* ═══════════════════════════════════════════════════════════════
   FADE-IN ON SCROLL
   ═══════════════════════════════════════════════════════════════ */

.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in-up.visible {
    opacity: 1;
    transform: translateY(0);
}

.fade-in-left {
    opacity: 0;
    transform: translateX(-30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in-left.visible {
    opacity: 1;
    transform: translateX(0);
}

.fade-in-right {
    opacity: 0;
    transform: translateX(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in-right.visible {
    opacity: 1;
    transform: translateX(0);
}

/* Staggered animations */
.fade-in-up:nth-child(1) { transition-delay: 0.1s; }
.fade-in-up:nth-child(2) { transition-delay: 0.2s; }
.fade-in-up:nth-child(3) { transition-delay: 0.3s; }
.fade-in-up:nth-child(4) { transition-delay: 0.4s; }
.fade-in-up:nth-child(5) { transition-delay: 0.5s; }

/* ═══════════════════════════════════════════════════════════════
   HOVER TILT EFFECT
   ═══════════════════════════════════════════════════════════════ */

.tilt-card {
    transition: transform 0.3s ease;
}

/* Applied via JavaScript for mouse tracking */

/* ═══════════════════════════════════════════════════════════════
   RIPPLE EFFECT
   ═══════════════════════════════════════════════════════════════ */

.ripple {
    position: relative;
    overflow: hidden;
}

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

.ripple:active::after {
    width: 300px;
    height: 300px;
}

/* ═══════════════════════════════════════════════════════════════
   LOADING SKELETONS
   ═══════════════════════════════════════════════════════════════ */

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

.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 1000px 100%;
    animation: shimmer 2s infinite linear;
    border-radius: 8px;
}

.skeleton-text {
    height: 1rem;
    margin: 0.5rem 0;
}

.skeleton-title {
    height: 2rem;
    width: 60%;
    margin: 1rem 0;
}

.skeleton-card {
    height: 200px;
    border-radius: 12px;
}

/* ═══════════════════════════════════════════════════════════════
   TOAST NOTIFICATIONS
   ═══════════════════════════════════════════════════════════════ */

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 1rem 1.5rem;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    animation: slideInRight 0.3s ease;
    z-index: 10000;
    display: flex;
    align-items: center;
    gap: 1rem;
    max-width: 400px;
}

.toast.toast-out {
    animation: slideOutRight 0.3s ease;
}

.toast-success {
    border-left: 4px solid #10b981;
}

.toast-error {
    border-left: 4px solid #ef4444;
}

.toast-warning {
    border-left: 4px solid #f59e0b;
}

.toast-info {
    border-left: 4px solid #3b82f6;
}

/* ═══════════════════════════════════════════════════════════════
   MICRO-INTERACTIONS
   ═══════════════════════════════════════════════════════════════ */

/* Button press effect */
.btn-press:active {
    transform: scale(0.95);
}

/* Smooth scale */
.scale-on-hover {
    transition: transform 0.2s ease;
}

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

/* Rotate on hover */
.rotate-on-hover {
    transition: transform 0.3s ease;
}

.rotate-on-hover:hover {
    transform: rotate(5deg);
}

/* Pulse animation */
@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.05);
        opacity: 0.9;
    }
}

.pulse {
    animation: pulse 2s ease infinite;
}

/* Heartbeat */
@keyframes heartbeat {
    0%, 100% {
        transform: scale(1);
    }
    10%, 30% {
        transform: scale(0.9);
    }
    20%, 40% {
        transform: scale(1.1);
    }
}

.heartbeat {
    animation: heartbeat 1.5s ease infinite;
}

/* Bounce */
@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-20px);
    }
    60% {
        transform: translateY(-10px);
    }
}

.bounce {
    animation: bounce 2s ease infinite;
}

/* ═══════════════════════════════════════════════════════════════
   GRADIENT ACCENTS
   ═══════════════════════════════════════════════════════════════ */

.gradient-border-bottom {
    border-bottom: 3px solid;
    border-image: linear-gradient(90deg, #667eea, #764ba2, #f093fb) 1;
}

.gradient-underline {
    position: relative;
    display: inline-block;
}

.gradient-underline::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -2px;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, #667eea, #764ba2, #f093fb);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.gradient-underline:hover::after {
    transform: scaleX(1);
}

/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE ARTWORK
   ═══════════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
    .glass-card,
    .card {
        backdrop-filter: blur(5px);
        -webkit-backdrop-filter: blur(5px);
    }

    .neuro-card {
        box-shadow:
            8px 8px 16px rgba(174, 174, 192, 0.3),
            -8px -8px 16px rgba(255, 255, 255, 0.6);
    }

    .toast {
        max-width: calc(100vw - 40px);
    }
}

/* ═══════════════════════════════════════════════════════════════
   REDUCED MOTION
   ═══════════════════════════════════════════════════════════════ */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    header {
        animation: none;
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    }
}

/* ═══════════════════════════════════════════════════════════════
   DARK MODE ENHANCEMENTS
   ═══════════════════════════════════════════════════════════════ */

@media (prefers-color-scheme: dark) {
    .glass-card,
    .card {
        background: rgba(31, 41, 55, 0.7);
        border-color: rgba(255, 255, 255, 0.1);
    }

    .neuro-card {
        background: #1a1a1a;
        box-shadow:
            12px 12px 24px rgba(0, 0, 0, 0.5),
            -12px -12px 24px rgba(50, 50, 50, 0.5);
    }

    .toast {
        background: rgba(31, 41, 55, 0.95);
        color: white;
    }

    .skeleton {
        background: linear-gradient(90deg, #2a2a2a 25%, #3a3a3a 50%, #2a2a2a 75%);
        background-size: 1000px 100%;
    }
}
