/* ========================================
   HOGP - Advanced Animations Stylesheet
   ======================================== */

/* Optimization for mobile - reduce animations on weak devices */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* Typing Animation */
.typing-effect {
    overflow: hidden;
    border-left: 3px solid var(--accent-purple);
    white-space: nowrap;
    animation: typing 3.5s steps(40, end), blink-caret 0.75s step-end infinite;
}

@media (max-width: 768px) {
    .typing-effect {
        white-space: normal;
        border-left: none;
        animation: none;
    }
}

@keyframes typing {
    from { width: 0 }
    to { width: 100% }
}

@keyframes blink-caret {
    from, to { border-color: transparent }
    50% { border-color: var(--accent-purple) }
}

/* Floating Animation */
@keyframes floating {
    0% { transform: translateY(0px) rotate(0deg); }
    25% { transform: translateY(-15px) rotate(2deg); }
    50% { transform: translateY(-5px) rotate(0deg); }
    75% { transform: translateY(-20px) rotate(-2deg); }
    100% { transform: translateY(0px) rotate(0deg); }
}

@media (max-width: 768px) {
    @keyframes floating {
        0%, 100% { transform: translateY(0); }
        50% { transform: translateY(-8px); }
    }
}

.floating-element {
    animation: floating 6s ease-in-out infinite;
}

.floating-delay-1 {
    animation-delay: 1s;
}

.floating-delay-2 {
    animation-delay: 2s;
}

/* Glitch Effect */
.glitch {
    position: relative;
}

.glitch::before,
.glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.glitch::before {
    left: 2px;
    text-shadow: -2px 0 #ff00c1;
    clip: rect(44px, 450px, 56px, 0);
    animation: glitch-anim 5s infinite linear alternate-reverse;
}

.glitch::after {
    left: -2px;
    text-shadow: -2px 0 #00fff9;
    clip: rect(44px, 450px, 56px, 0);
    animation: glitch-anim2 5s infinite linear alternate-reverse;
}

@keyframes glitch-anim {
    0% { clip: rect(31px, 9999px, 94px, 0); }
    20% { clip: rect(62px, 9999px, 85px, 0); }
    40% { clip: rect(15px, 9999px, 5px, 0); }
    60% { clip: rect(89px, 9999px, 54px, 0); }
    80% { clip: rect(3px, 9999px, 91px, 0); }
    100% { clip: rect(75px, 9999px, 28px, 0); }
}

@keyframes glitch-anim2 {
    0% { clip: rect(65px, 9999px, 100px, 0); }
    20% { clip: rect(18px, 9999px, 20px, 0); }
    40% { clip: rect(99px, 9999px, 76px, 0); }
    60% { clip: rect(41px, 9999px, 17px, 0); }
    80% { clip: rect(82px, 9999px, 43px, 0); }
    100% { clip: rect(7px, 9999px, 69px, 0); }
}

/* Neon Glow */
.neon-text {
    color: #fff;
    text-shadow: 0 0 7px #fff,
    0 0 10px #fff,
    0 0 21px #fff,
    0 0 42px var(--accent-purple),
    0 0 82px var(--accent-purple),
    0 0 92px var(--accent-purple),
    0 0 102px var(--accent-purple),
    0 0 151px var(--accent-purple);
    animation: neon-flicker 1.5s infinite alternate;
}

@keyframes neon-flicker {
    0%, 19%, 21%, 23%, 25%, 54%, 56%, 100% {
        text-shadow: 0 0 7px #fff,
        0 0 10px #fff,
        0 0 21px #fff,
        0 0 42px var(--accent-purple),
        0 0 82px var(--accent-purple),
        0 0 92px var(--accent-purple),
        0 0 102px var(--accent-purple),
        0 0 151px var(--accent-purple);
    }
    20%, 24%, 55% {
        text-shadow: none;
    }
}

/* Shimmer Effect */
.shimmer {
    background: linear-gradient(90deg,
    transparent,
    rgba(255,255,255,0.1),
    transparent
    );
    background-size: 200% 100%;
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

/* Rotating Border */
.rotating-border {
    position: relative;
    overflow: hidden;
}

.rotating-border::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(
            transparent,
            var(--accent-purple),
            transparent 30%
    );
    animation: rotate-border 4s linear infinite;
}

.rotating-border::after {
    content: '';
    position: absolute;
    inset: 2px;
    background: var(--bg-primary);
    border-radius: inherit;
}

@keyframes rotate-border {
    100% { transform: rotate(360deg); }
}

/* Hover Lift */
.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
}

@media (max-width: 768px) {
    .hover-lift:hover {
        transform: translateY(-5px);
    }
}

/* Scale In */
@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.scale-in {
    animation: scaleIn 0.5s ease forwards;
}

/* Slide Down */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.slide-down {
    animation: slideDown 0.4s ease forwards;
}

/* Bounce In */
@keyframes bounceIn {
    0% { transform: scale(0.3); opacity: 0; }
    50% { transform: scale(1.05); }
    70% { transform: scale(0.9); }
    100% { transform: scale(1); opacity: 1; }
}

.bounce-in {
    animation: bounceIn 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55) forwards;
}

/* Loading Skeleton */
.skeleton {
    background: linear-gradient(90deg,
    var(--bg-secondary) 25%,
    rgba(255,255,255,0.05) 50%,
    var(--bg-secondary) 75%
    );
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
}

@keyframes skeleton-loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Text Reveal */
.text-reveal {
    position: relative;
    overflow: hidden;
}

.text-reveal::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-primary);
    animation: text-reveal 1.5s cubic-bezier(0.77, 0, 0.175, 1) forwards;
}

@keyframes text-reveal {
    from { transform: translateX(0); }
    to { transform: translateX(101%); }
}

/* Particles Background */
#particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

@media (max-width: 768px) {
    #particles {
        opacity: 0.5;
    }
}

/* Progress Bar Animation */
.progress-bar {
    width: 100%;
    height: 4px;
    background: var(--bg-secondary);
    border-radius: 2px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: var(--gradient-primary);
    border-radius: 2px;
    transition: width 1.5s ease;
}

/* Gradient Text Animation */
.gradient-text-animate {
    background: linear-gradient(
            to right,
            var(--accent-purple) 20%,
            var(--accent-cyan) 40%,
            var(--accent-cyan) 60%,
            var(--accent-purple) 80%
    );
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradient-shift 3s linear infinite;
}

@keyframes gradient-shift {
    to { background-position: 200% center; }
}