/**
 * SIM AL-ASY'ARIYYAH
 * RGB Gaming Animations
 * 
 * File ini berisi animasi RGB gaming untuk header, sidebar, dan loading spinner
 */

/* ============================================
   RGB RAINBOW GRADIENT ANIMATION
   ============================================ */

@keyframes rgb-rainbow {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

@keyframes rgb-glow {

    0%,
    100% {
        box-shadow: 0 0 20px rgba(255, 0, 255, 0.5),
            0 0 40px rgba(0, 255, 255, 0.3),
            0 0 60px rgba(255, 255, 0, 0.2);
    }

    33% {
        box-shadow: 0 0 20px rgba(0, 255, 255, 0.5),
            0 0 40px rgba(255, 255, 0, 0.3),
            0 0 60px rgba(255, 0, 255, 0.2);
    }

    66% {
        box-shadow: 0 0 20px rgba(255, 255, 0, 0.5),
            0 0 40px rgba(255, 0, 255, 0.3),
            0 0 60px rgba(0, 255, 255, 0.2);
    }
}

@keyframes rgb-border {
    0% {
        border-color: #ff00ff;
    }

    33% {
        border-color: #00ffff;
    }

    66% {
        border-color: #ffff00;
    }

    100% {
        border-color: #ff00ff;
    }
}

@keyframes rgb-text {

    0%,
    100% {
        color: #ff00ff;
        text-shadow: 0 0 10px rgba(255, 0, 255, 0.8),
            0 0 20px rgba(255, 0, 255, 0.5);
    }

    33% {
        color: #00ffff;
        text-shadow: 0 0 10px rgba(0, 255, 255, 0.8),
            0 0 20px rgba(0, 255, 255, 0.5);
    }

    66% {
        color: #ffff00;
        text-shadow: 0 0 10px rgba(255, 255, 0, 0.8),
            0 0 20px rgba(255, 255, 0, 0.5);
    }
}

/* ============================================
   RGB HEADER
   ============================================ */

.rgb-header {
    position: relative;
    background: linear-gradient(45deg,
            #ff00ff,
            #00ffff,
            #ffff00,
            #ff00ff);
    background-size: 400% 400%;
    animation: rgb-rainbow 8s ease infinite;
}

.rgb-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg,
            rgba(255, 0, 255, 0.3),
            rgba(0, 255, 255, 0.3),
            rgba(255, 255, 0, 0.3),
            rgba(255, 0, 255, 0.3));
    background-size: 400% 400%;
    animation: rgb-rainbow 6s ease infinite reverse;
    opacity: 0.7;
}

.rgb-header-content {
    position: relative;
    z-index: 1;
}

/* ============================================
   RGB SIDEBAR
   ============================================ */

.rgb-sidebar {
    position: relative;
    border-right: 3px solid #ff00ff;
    animation: rgb-border 4s linear infinite;
}

.rgb-sidebar::before {
    content: '';
    position: absolute;
    top: 0;
    right: -3px;
    width: 3px;
    height: 100%;
    background: linear-gradient(180deg,
            #ff00ff,
            #00ffff,
            #ffff00,
            #ff00ff);
    background-size: 100% 400%;
    animation: rgb-rainbow 6s ease infinite;
}

.rgb-sidebar-item:hover {
    background: linear-gradient(90deg,
            rgba(255, 0, 255, 0.1),
            rgba(0, 255, 255, 0.1));
    border-left: 3px solid;
    border-image: linear-gradient(180deg,
            #ff00ff,
            #00ffff,
            #ffff00) 1;
    animation: rgb-glow 2s ease infinite;
}

.rgb-sidebar-item.active {
    background: linear-gradient(90deg,
            rgba(255, 0, 255, 0.2),
            rgba(0, 255, 255, 0.2));
    border-left: 4px solid;
    border-image: linear-gradient(180deg,
            #ff00ff,
            #00ffff) 1;
    animation: rgb-glow 3s ease infinite;
}

/* ============================================
   RGB LOADING SPINNER
   ============================================ */

.rgb-spinner-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.rgb-spinner-container {
    position: relative;
    width: 200px;
    height: 200px;
}

.rgb-spinner {
    position: absolute;
    width: 100%;
    height: 100%;
    border: 8px solid transparent;
    border-top-color: #ff00ff;
    border-right-color: #00ffff;
    border-bottom-color: #ffff00;
    border-left-color: #ff00ff;
    border-radius: 50%;
    animation: rgb-spin 1.5s linear infinite, rgb-glow 2s ease infinite;
}

@keyframes rgb-spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.rgb-spinner::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80%;
    height: 80%;
    border: 6px solid transparent;
    border-top-color: #00ffff;
    border-right-color: #ffff00;
    border-bottom-color: #ff00ff;
    border-left-color: #00ffff;
    border-radius: 50%;
    animation: rgb-spin 1s linear infinite reverse;
}

.rgb-spinner::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60%;
    height: 60%;
    border: 4px solid transparent;
    border-top-color: #ffff00;
    border-right-color: #ff00ff;
    border-bottom-color: #00ffff;
    border-left-color: #ffff00;
    border-radius: 50%;
    animation: rgb-spin 0.7s linear infinite;
}

.rgb-spinner-logo {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1;
    animation: rgb-pulse 2s ease infinite;
}

@keyframes rgb-pulse {

    0%,
    100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }

    50% {
        transform: translate(-50%, -50%) scale(1.1);
        opacity: 0.8;
    }
}

.rgb-spinner-logo img {
    width: 60px;
    height: 60px;
    object-fit: contain;
    filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.5));
}

.rgb-spinner-text {
    margin-top: 220px;
    color: #fff;
    font-size: 18px;
    font-weight: 600;
    text-align: center;
    animation: rgb-text 3s ease infinite;
}

/* ============================================
   RGB BUTTON
   ============================================ */

.rgb-button {
    position: relative;
    background: linear-gradient(45deg,
            #ff00ff,
            #00ffff,
            #ffff00,
            #ff00ff);
    background-size: 400% 400%;
    animation: rgb-rainbow 8s ease infinite;
    border: none;
    color: #fff;
    font-weight: 600;
    text-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
    transition: all 0.3s ease;
}

.rgb-button:hover {
    animation: rgb-rainbow 4s ease infinite, rgb-glow 2s ease infinite;
    transform: translateY(-2px);
}

.rgb-button:active {
    transform: translateY(0);
}

/* ============================================
   RGB CARD
   ============================================ */

.rgb-card {
    position: relative;
    border: 2px solid transparent;
    background: linear-gradient(#fff, #fff) padding-box,
        linear-gradient(45deg, #ff00ff, #00ffff, #ffff00, #ff00ff) border-box;
    background-size: 100% 100%, 400% 400%;
    animation: rgb-rainbow 8s ease infinite;
}

.rgb-card:hover {
    animation: rgb-rainbow 4s ease infinite, rgb-glow 2s ease infinite;
}

/* ============================================
   RGB BADGE
   ============================================ */

.rgb-badge {
    background: linear-gradient(45deg,
            #ff00ff,
            #00ffff,
            #ffff00,
            #ff00ff);
    background-size: 400% 400%;
    animation: rgb-rainbow 6s ease infinite;
    color: #fff;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 20px;
    display: inline-block;
    text-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
}

/* ============================================
   RGB PROGRESS BAR
   ============================================ */

.rgb-progress {
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    overflow: hidden;
}

.rgb-progress-bar {
    height: 100%;
    background: linear-gradient(90deg,
            #ff00ff,
            #00ffff,
            #ffff00,
            #ff00ff);
    background-size: 400% 100%;
    animation: rgb-rainbow 3s ease infinite;
    transition: width 0.3s ease;
}

/* ============================================
   RGB DIVIDER
   ============================================ */

.rgb-divider {
    height: 2px;
    background: linear-gradient(90deg,
            transparent,
            #ff00ff,
            #00ffff,
            #ffff00,
            #ff00ff,
            transparent);
    background-size: 400% 100%;
    animation: rgb-rainbow 6s ease infinite;
    margin: 20px 0;
}

/* ============================================
   FADE IN ANIMATION
   ============================================ */

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.5s ease;
}

/* ============================================
   SLIDE IN ANIMATION
   ============================================ */

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.slide-in-left {
    animation: slideInLeft 0.5s ease;
}

.slide-in-right {
    animation: slideInRight 0.5s ease;
}

/* ============================================
   RGB GAMING BUTTON (BORDER ANIMATION)
   ============================================ */
.btn-rgb-gaming {
    position: relative;
    background: transparent;
    /* Background handled by pseudo-element */
    color: #fff !important;
    /* Force white text */
    border: none;
    border-radius: 8px;
    padding: 10px 20px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    overflow: visible;
    z-index: 1;
    transition: all 0.3s ease;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    margin-right: 5px;
    /* Spacing between buttons */
}

/* The Animated Gradient Border */
.btn-rgb-gaming::before {
    content: '';
    position: absolute;
    top: -3px;
    left: -3px;
    right: -3px;
    bottom: -3px;
    background: linear-gradient(45deg, #ff00ff, #00ffff, #ffff00, #ff00ff);
    background-size: 400% 400%;
    z-index: -2;
    border-radius: 10px;
    animation: rgb-rainbow 3s ease infinite;
}

/* The Inner Background */
.btn-rgb-gaming::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    right: 2px;
    bottom: 2px;
    background: #111;
    /* Dark inner background */
    z-index: -1;
    border-radius: 6px;
    transition: background 0.3s ease;
}

/* Hover Effects */
.btn-rgb-gaming:hover {
    color: #fff;
    box-shadow: 0 0 20px rgba(255, 0, 255, 0.4);
    transform: translateY(-2px);
}

.btn-rgb-gaming:hover::before {
    animation: rgb-rainbow 1.5s linear infinite;
    /* Speed up on hover */
    filter: blur(2px);
    /* Slight glow */
}

.btn-rgb-gaming:hover::after {
    background: #222;
    /* Slightly lighter on hover */
}

/* Optional: Icon colors inside button to match theme */
.btn-rgb-gaming i {
    color: #00ffff;
    text-shadow: 0 0 5px rgba(0, 255, 255, 0.5);
}