/**
 * PlantPedia World-Class Styles
 * Premium UI/UX Design System
 */

/* ===== PREMIUM VARIABLES ===== */
:root {
    /* Premium Colors */
    --premium-gold: linear-gradient(135deg, #FFD700, #FFA500);
    --premium-purple: linear-gradient(135deg, #667eea, #764ba2);
    --premium-green: linear-gradient(135deg, #11998e, #38ef7d);
    --premium-pink: linear-gradient(135deg, #f093fb, #f5576c);
    --premium-blue: linear-gradient(135deg, #4facfe, #00f2fe);
    
    /* Glassmorphism */
    --glass-bg: rgba(255, 255, 255, 0.25);
    --glass-border: rgba(255, 255, 255, 0.18);
    --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
    
    /* Animations */
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* ===== PREMIUM COMPONENTS ===== */

/* Floating Action Buttons */
.fab-container {
    position: fixed;
    bottom: 80px;
    right: 20px;
    z-index: 9999;
}

.fab-button {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--premium-purple);
    color: white;
    border: none;
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
    cursor: pointer;
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
}

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

.fab-button:hover::before {
    width: 100px;
    height: 100px;
}

.fab-button:hover {
    transform: scale(1.1) rotate(90deg);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.6);
}

/* Premium Cards */
.premium-card {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 30px;
    box-shadow: var(--glass-shadow);
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
}

.premium-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--premium-gold);
    transform: scaleX(0);
    transition: transform 0.3s;
}

.premium-card:hover::before {
    transform: scaleX(1);
}

.premium-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 60px rgba(31, 38, 135, 0.5);
}

/* Animated Gradients */
.animated-gradient {
    background: linear-gradient(270deg, #667eea, #764ba2, #f093fb, #f5576c);
    background-size: 800% 800%;
    animation: gradientShift 15s ease infinite;
}

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

/* Neumorphism Elements */
.neumorphic {
    background: #f0f0f0;
    border-radius: 20px;
    box-shadow: 20px 20px 60px #d1d1d1, -20px -20px 60px #ffffff;
    transition: var(--transition-smooth);
}

.neumorphic:active {
    box-shadow: inset 20px 20px 60px #d1d1d1, inset -20px -20px 60px #ffffff;
}

/* Premium Buttons */
.btn-premium {
    background: var(--premium-purple);
    color: white;
    border: none;
    padding: 15px 40px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

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

.btn-premium:hover::after {
    width: 300px;
    height: 300px;
}

.btn-premium:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.5);
}

/* Skeleton Loading */
.skeleton {
    position: relative;
    overflow: hidden;
    background: #f0f0f0;
}

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

@keyframes skeleton-loading {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* Pulse Animation */
.pulse {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(102, 126, 234, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(102, 126, 234, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(102, 126, 234, 0);
    }
}

/* Floating Labels */
.form-group-premium {
    position: relative;
    margin-bottom: 30px;
}

.form-group-premium input {
    width: 100%;
    padding: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 1rem;
    transition: var(--transition-smooth);
    background: transparent;
}

.form-group-premium label {
    position: absolute;
    top: 50%;
    left: 15px;
    transform: translateY(-50%);
    font-size: 1rem;
    color: #999;
    pointer-events: none;
    transition: var(--transition-smooth);
}

.form-group-premium input:focus,
.form-group-premium input:valid {
    border-color: #667eea;
    outline: none;
}

.form-group-premium input:focus ~ label,
.form-group-premium input:valid ~ label {
    top: -10px;
    left: 10px;
    font-size: 0.85rem;
    color: #667eea;
    background: white;
    padding: 0 5px;
}

/* Progress Rings */
.progress-ring {
    width: 120px;
    height: 120px;
    position: relative;
}

.progress-ring svg {
    transform: rotate(-90deg);
}

.progress-ring circle {
    fill: none;
    stroke-width: 10;
    stroke-linecap: round;
    transition: stroke-dashoffset 1s ease;
}

.progress-ring .bg {
    stroke: #f0f0f0;
}

.progress-ring .progress {
    stroke: url(#gradient);
    stroke-dasharray: 377;
    stroke-dashoffset: 377;
    animation: fillProgress 2s ease forwards;
}

@keyframes fillProgress {
    to {
        stroke-dashoffset: 94; /* 75% progress */
    }
}

/* Morphing Shapes */
.morph-shape {
    width: 200px;
    height: 200px;
    background: var(--premium-purple);
    animation: morph 8s ease-in-out infinite;
    border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
    position: absolute;
    opacity: 0.8;
}

@keyframes morph {
    0%, 100% {
        border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
        transform: rotate(0deg);
    }
    25% {
        border-radius: 30% 60% 70% 40% / 50% 60% 30% 60%;
        transform: rotate(90deg);
    }
    50% {
        border-radius: 40% 60% 60% 40% / 70% 30% 40% 60%;
        transform: rotate(180deg);
    }
    75% {
        border-radius: 70% 30% 30% 70% / 30% 70% 70% 30%;
        transform: rotate(270deg);
    }
}

/* Particle Effects */
.particles {
    position: absolute;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
}

.particle {
    position: absolute;
    width: 10px;
    height: 10px;
    background: #667eea;
    border-radius: 50%;
    animation: float-particle 10s infinite;
}

@keyframes float-particle {
    0%, 100% {
        transform: translateY(0) translateX(0);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-100vh) translateX(100px);
        opacity: 0;
    }
}

/* Liquid Button */
.btn-liquid {
    position: relative;
    padding: 20px 40px;
    color: #fff;
    text-decoration: none;
    text-transform: uppercase;
    font-size: 1.2rem;
    letter-spacing: 2px;
    border-radius: 40px;
    background: linear-gradient(90deg, #667eea, #764ba2);
    overflow: hidden;
}

.btn-liquid::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s;
}

.btn-liquid:hover::before {
    left: 100%;
}

/* 3D Card Flip */
.card-3d {
    width: 300px;
    height: 400px;
    perspective: 1000px;
}

.card-3d-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.8s;
    transform-style: preserve-3d;
}

.card-3d:hover .card-3d-inner {
    transform: rotateY(180deg);
}

.card-3d-front,
.card-3d-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.card-3d-front {
    background: var(--premium-purple);
}

.card-3d-back {
    background: var(--premium-pink);
    transform: rotateY(180deg);
}

/* Glow Effects */
.glow {
    box-shadow: 0 0 20px rgba(102, 126, 234, 0.5),
                0 0 40px rgba(102, 126, 234, 0.3),
                0 0 60px rgba(102, 126, 234, 0.1);
    animation: glow-pulse 2s ease-in-out infinite alternate;
}

@keyframes glow-pulse {
    from {
        box-shadow: 0 0 20px rgba(102, 126, 234, 0.5),
                    0 0 40px rgba(102, 126, 234, 0.3),
                    0 0 60px rgba(102, 126, 234, 0.1);
    }
    to {
        box-shadow: 0 0 30px rgba(102, 126, 234, 0.8),
                    0 0 60px rgba(102, 126, 234, 0.5),
                    0 0 90px rgba(102, 126, 234, 0.3);
    }
}

/* Hover Effects Collection */
.hover-lift {
    transition: var(--transition-smooth);
}

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

.hover-rotate {
    transition: var(--transition-smooth);
}

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

.hover-shine::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: left 0.5s;
}

.hover-shine:hover::before {
    left: 100%;
}

/* Scroll Animations */
.scroll-reveal {
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.8s ease;
}

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

.scroll-scale {
    transform: scale(0.8);
    opacity: 0;
    transition: all 0.8s ease;
}

.scroll-scale.revealed {
    transform: scale(1);
    opacity: 1;
}

/* Premium Tooltips */
.tooltip-premium {
    position: relative;
}

.tooltip-premium::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%) scale(0);
    background: var(--premium-purple);
    color: white;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 0.85rem;
    white-space: nowrap;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    transition: var(--transition-bounce);
    pointer-events: none;
}

.tooltip-premium:hover::after {
    transform: translateX(-50%) scale(1);
}

/* Mobile Optimizations */
@media (max-width: 768px) {
    .premium-card {
        padding: 20px;
        border-radius: 15px;
    }
    
    .btn-premium {
        padding: 12px 30px;
        font-size: 0.95rem;
    }
    
    .fab-button {
        width: 48px;
        height: 48px;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    :root {
        --glass-bg: rgba(0, 0, 0, 0.25);
        --glass-border: rgba(255, 255, 255, 0.1);
    }
    
    .premium-card {
        background: var(--glass-bg);
    }
    
    .neumorphic {
        background: #1a1a1a;
        box-shadow: 20px 20px 60px #0d0d0d, -20px -20px 60px #272727;
    }
}

/* Print Styles */
@media print {
    .fab-container,
    .particles,
    .morph-shape {
        display: none !important;
    }
    
    .premium-card {
        box-shadow: none;
        border: 1px solid #ddd;
    }
}
