/**
 * Gaming-themed Effects for Auth Pages
 * 
 * Additional styles for unique gaming elements
 *
 * @package OutputLag
 * @since 1.0.0
 */

/* Retro Gaming Scanlines Effect */
.auth-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(255, 255, 255, 0.01) 2px,
        rgba(255, 255, 255, 0.01) 4px
    );
    pointer-events: none;
    z-index: 1;
    opacity: 0.5;
}

/* Pixel art corners */
.auth-card {
    position: relative;
}

.auth-card .pixel-corner {
    position: absolute;
    width: 24px;
    height: 24px;
    opacity: 0.3;
}

.pixel-corner::before,
.pixel-corner::after {
    content: '';
    position: absolute;
    background: var(--color-primary-blue);
}

.pixel-corner.top-left {
    top: -1px;
    left: -1px;
}

.pixel-corner.top-left::before {
    width: 100%;
    height: 4px;
    top: 0;
    left: 0;
}

.pixel-corner.top-left::after {
    width: 4px;
    height: 100%;
    top: 0;
    left: 0;
}

.pixel-corner.bottom-right {
    bottom: -1px;
    right: -1px;
    transform: rotate(180deg);
}

.pixel-corner.bottom-right::before {
    width: 100%;
    height: 4px;
    top: 0;
    left: 0;
    background: var(--color-secondary-pink);
}

.pixel-corner.bottom-right::after {
    width: 4px;
    height: 100%;
    top: 0;
    left: 0;
    background: var(--color-secondary-pink);
}

/* Gaming achievement style for success messages */
.auth-success {
    position: relative;
    overflow: hidden;
}

.auth-success::before {
    content: '⭐';
    position: absolute;
    left: -20px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 40px;
    opacity: 0.1;
    animation: achievement-slide 2s ease-out;
}

@keyframes achievement-slide {
    from {
        left: -40px;
        opacity: 0;
    }
    to {
        left: -20px;
        opacity: 0.1;
    }
}

/* Level up animation for registration */
.register-page .auth-success {
    animation: level-up 0.6s ease-out;
}

@keyframes level-up {
    0% {
        transform: scale(0.9);
        opacity: 0;
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Game console button styling */
.btn-primary {
    position: relative;
    overflow: hidden;
}

.btn-primary::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-primary:active::after {
    width: 300px;
    height: 300px;
}

/* Glitch effect on error */
.auth-error {
    animation: glitch-shake 0.3s ease-out;
}

@keyframes glitch-shake {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-2px); }
    40% { transform: translateX(2px); }
    60% { transform: translateX(-2px); }
    80% { transform: translateX(2px); }
}

/* RGB lighting effect for focused inputs */
@keyframes rgb-glow {
    0% { box-shadow: 0 0 20px rgba(255, 0, 0, 0.3); }
    33% { box-shadow: 0 0 20px rgba(0, 255, 0, 0.3); }
    66% { box-shadow: 0 0 20px rgba(0, 0, 255, 0.3); }
    100% { box-shadow: 0 0 20px rgba(255, 0, 0, 0.3); }
}

.form-input:focus {
    animation: rgb-glow 3s linear infinite;
}

/* Power-up style for password strength */
.strength-fill {
    position: relative;
}

.strength-fill::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 4px;
    background: rgba(255, 255, 255, 0.8);
    animation: power-pulse 1s ease-in-out infinite;
}

@keyframes power-pulse {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 1; }
}

/* D-pad navigation hint */
.auth-page-wrapper::after {
    content: '↑↓←→';
    position: fixed;
    bottom: 20px;
    right: 20px;
    font-size: 24px;
    opacity: 0.05;
    font-family: monospace;
    letter-spacing: 4px;
}

/* Loading bar style */
.auth-form.loading::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, 
        var(--color-primary-blue) 0%,
        var(--color-secondary-pink) 50%,
        var(--color-primary-blue) 100%
    );
    background-size: 200% 100%;
    animation: loading-slide 1s linear infinite;
    z-index: 10;
}

@keyframes loading-slide {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Coin collect animation for checkbox */
.form-checkbox {
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.form-checkbox:checked {
    animation: coin-flip 0.5s ease-out;
}

@keyframes coin-flip {
    0% { transform: rotateY(0); }
    50% { transform: rotateY(180deg) scale(1.2); }
    100% { transform: rotateY(360deg); }
}

/* XP bar style divider */
.auth-divider::before {
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.1) 10%,
        rgba(255, 255, 255, 0.1) 90%,
        transparent 100%
    );
    height: 2px;
    top: calc(50% - 1px);
}

.auth-divider::after {
    content: '';
    position: absolute;
    top: calc(50% - 4px);
    left: 50%;
    transform: translateX(-50%);
    width: 8px;
    height: 8px;
    background: var(--color-primary-blue);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--color-primary-blue);
}