/* 
 * Glow & Motion - A modern CSS animation library
 * Author: Antigravity
 * Description: Premium animations, glowing effects, and animated borders for modern web interfaces.
 */

:root {
    /* Color Palette - Adapted to #01001FEB (Deep Indigo) */
    --gm-primary: #818cf8;
    /* Bright Indigo */
    --gm-secondary: #c084fc;
    /* Bright Purple */
    --gm-accent: #22d3ee;
    /* Cyan Neon */
    --gm-success: #34d399;
    --gm-warning: #fbbf24;
    --gm-danger: #f87171;
    --gm-background: #01001f;
    --gm-surface: #0a0a33;
    --gm-text: #e0e7ff;

    /* Neon Glows - Re-tuned for deep indigo background */
    --gm-glow-primary: 0 0 15px rgba(129, 140, 248, 0.6);
    --gm-glow-secondary: 0 0 15px rgba(192, 132, 252, 0.6);
    --gm-glow-accent: 0 0 15px rgba(34, 211, 238, 0.6);

    /* Animation Tokens */
    --gm-transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --gm-transition-base: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --gm-transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    --gm-ease-out: cubic-bezier(0.34, 1.56, 0.64, 1);
    /* Bouncy spring-like */
}

/* Base Button Reset & Style */
.gm-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    background: var(--gm-primary);
    color: white;
    transition: all var(--gm-transition-base);
    overflow: hidden;
    /* Important for shine/border effects */
    z-index: 1;
}

/* --- GLOW EFFECTS --- */

/* Breathing Glow Animation */
@keyframes gm-pulse-glow {

    0%,
    100% {
        box-shadow: 0 0 5px rgba(129, 140, 248, 0.4);
    }

    50% {
        box-shadow: 0 0 20px rgba(129, 140, 248, 0.8);
    }
}

.gm-glow-pulse:hover {
    animation: gm-pulse-glow 2s infinite ease-in-out;
}

/* Neon Glow (Static on hover) */
.gm-glow-neon:hover {
    box-shadow: var(--gm-glow-primary), 0 0 30px rgba(129, 140, 248, 0.3);
    transform: translateY(-2px);
}

/* --- BORDER ANIMATIONS --- */

/* Circling Border (Orbit) */
.gm-border-orbit {
    background: transparent;
    padding: 15px;
    /* Border thickness */
    position: relative;
    animation: gm-rotate 2s linear infinite;
    animation-play-state: paused;
    text-decoration: none;
}

.gm-border-orbit:hover {
    animation-play-state: running;
    background-image: conic-gradient(from var(--angle), transparent 70%, var(--gm-accent), var(--gm-primary));
}

.gm-border-orbit::before {
    content: '';
    position: absolute;
    inset: 2px;
    background: color-mix(in oklab, var(--accent-2) 100%, transparent);
    border-radius: 999px;
    z-index: -1;
}

@property --angle {
    syntax: '<angle>';
    initial-value: 0deg;
    inherits: false;
}

@keyframes gm-rotate {
    from {
        --angle: 0deg;
    }

    to {
        --angle: 360deg;
    }
}

/* --- SHINE EFFECTS --- */

.gm-shine-sweep::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(90deg,
            transparent,
            rgba(255, 255, 255, 0.4),
            transparent);
    transform: skewX(-20deg);
    transition: none;
}

.gm-shine-sweep:hover::after {
    left: 200%;
    transition: all 0.6s ease-in-out;
}

/* --- UTILITY ANIMATIONS --- */

.gm-hover-lift:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

.gm-hover-expand:hover {
    transform: scale(1.05);
    transition-timing-function: var(--gm-ease-out);
}

/* --- CARD EFFECTS --- */

.gm-card-glass {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    border-radius: 16px;
    padding: 2rem;
    transition: var(--gm-transition-base);
}

.gm-card-hover:hover {
    transform: translateY(-8px) scale(1.02);
    border-color: var(--gm-primary);
    box-shadow: 0 12px 40px 0 rgba(0, 0, 0, 0.5), var(--gm-glow-primary);
}

/* --- INPUT EFFECTS --- */

.gm-input-group {
    position: relative;
    width: 100%;
    margin-bottom: 1.5rem;
}

.gm-input {
    width: 100%;
    padding: 0.75rem 0;
    font-size: 1rem;
    color: var(--gm-text);
    background: transparent;
    border: none;
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
    outline: none;
    transition: var(--gm-transition-base);
}

.gm-input-focus-glow:focus {
    border-bottom-color: var(--gm-primary);
    filter: drop-shadow(0 2px 8px rgba(129, 140, 248, 0.4));
}

.gm-input-underline-draw::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--gm-accent);
    transition: var(--gm-transition-base);
    transform: translateX(-50%);
}

.gm-input-group:focus-within .gm-input-underline-draw::after {
    width: 100%;
}

/* --- TEXT EFFECTS --- */

.gm-text-shimmer {
    background: linear-gradient(90deg,
            var(--gm-text) 0%,
            var(--gm-primary) 25%,
            var(--gm-text) 50%,
            var(--gm-primary) 75%,
            var(--gm-text) 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gm-shimmer 3s linear infinite;
}

@keyframes gm-shimmer {
    to {
        background-position: 200% center;
    }
}

.gm-text-gradient-animate {
    background: linear-gradient(-45deg,
            var(--gm-primary),
            var(--gm-secondary),
            var(--gm-accent),
            var(--gm-success));
    background-size: 400% 400%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gm-gradient-flow 10s ease infinite;
}

@keyframes gm-gradient-flow {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

/* --- STATUS INDICATORS --- */

.gm-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    background: var(--gm-surface);
    font-size: 0.875rem;
    font-weight: 500;
}

.gm-badge-ping::before {
    content: "";
    width: 8px;
    height: 8px;
    background: var(--gm-success);
    border-radius: 50%;
    position: relative;
    box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.7);
    animation: gm-ping 1.5s infinite cubic-bezier(0.66, 0, 0, 1);
}

@keyframes gm-ping {
    to {
        box-shadow: 0 0 0 10px rgba(52, 211, 153, 0);
    }
}