﻿#toast-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 400px;
    pointer-events: none;
}

.toast {
    pointer-events: auto;
}

.toast {
    background: #fff;
    border-radius: 12px;
    padding: 1rem 1.5rem;
    box-shadow: 0 8px 25px rgb(0 0 0 / 30%);
    display: flex;
    align-items: center;
    gap: 1rem;
    animation: slideIn 0.3s ease-out;
    border-left: 4px solid;
    min-width: 400px;
    position: relative;
    overflow: hidden;
}

    .toast::before {
        content: '';
        position: absolute;
        bottom: 0;
        left: 0;
        height: 3px;
        background: currentColor;
        animation: progress 5s linear;
        width: 100%;
    }

@keyframes progress {
    from {
        width: 100%;
    }

    to {
        width: 0%;
    }
}

.toast.success {
    border-left-color: #10b981;
    color: #10b981;
}

.toast.error {
    border-left-color: #ef4444;
    color: #ef4444;
}

.toast.warning {
    border-left-color: #f59e0b;
    color: #f59e0b;
}

.toast.info {
    border-left-color: #3b82f6;
    color: #3b82f6;
}

.toast-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.toast.success .toast-icon {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
}

.toast.error .toast-icon {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.toast.warning .toast-icon {
    background: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
}

.toast.info .toast-icon {
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
}

.toast-content {
    flex: 1;
    color: #2c3e50;
}

.toast-message {
    font-size: 12px;
    color: #676E8A;
    line-height: 1.5;
    font-weight: 500;
}

.toast-close {
    background: none;
    border: none;
    color: #6c757d;
    cursor: pointer;
    font-size: 1.2rem;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

    .toast-close:hover {
        background: rgba(0, 0, 0, 0.05);
        color: #2c3e50;
    }

@keyframes slideIn {
    from {
        transform: translateX(400px);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }

    to {
        transform: translateX(400px);
        opacity: 0;
    }
}

.toast.removing {
    animation: slideOut 0.3s ease-out forwards;
}

@media (max-width: 768px) {
    #toast-container {
        right: 10px;
        left: 10px;
        max-width: none;
    }

    .toast {
        min-width: auto;
    }
}

img.imagelogo {
    width: 100%;
    height: 100% !important;
}

.ri-spin {
    display: inline-block; /* ensure transform works */
    animation: ri-spin 1s linear infinite;
    transform-origin: center center;
    /* size like fa-lg */
    font-size: 1.25rem;
}

@keyframes ri-spin {
    100% {
        transform: rotate(360deg);
    }
}



/* GRID */
.rank-grid {
    max-width: 1200px;
    margin: auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(221px, 1fr));
    gap: 18px;
}

/* COMMON BADGE */
.rank-badge {
    position: relative;
    height: 52px;
    border-radius: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #0f0b18;
    overflow: hidden;
}

    /* STANDARD NEON BORDER */
    .rank-badge::before {
        content: "";
        position: absolute;
        inset: -2px;
        border-radius: 30px;
        background: conic-gradient( from 0deg, transparent, var(--glow), transparent );
        animation: spin 4s linear infinite;
    }

    .rank-badge::after {
        content: "";
        position: absolute;
        inset: 2px;
        border-radius: 28px;
        background: #0f0b18;
        z-index: 0;
    }

.rank-content {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 1px;
}

.rank-icon {
    font-size: 18px;
    filter: drop-shadow(0 0 6px var(--glow));
}

/* ================= RANK COLORS ================= */

.royal {
    --glow: #4da6ff;
}

    .royal .rank-text {
        color: #4da6ff;
    }

.elite {
    --glow: #9b7cff;
}

    .elite .rank-text {
        color: #b58cff;
    }

.mentor {
    --glow: #ffcc70;
}

    .mentor .rank-text {
        color: #ffcc70;
    }

.crown {
    --glow: #ffd700;
}

    .crown .rank-text {
        background: linear-gradient(90deg,#ffd700,#ff9f1c);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
    }

.infinity {
    --glow: #00f2ff;
}

    .infinity .rank-text {
        background: linear-gradient(90deg,#00f2ff,#7c4dff);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
    }

.quantum {
    --glow: #ff4ecd;
}

    .quantum .rank-text {
        background: linear-gradient(90deg,#ff4ecd,#7c4dff);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
    }

/* ================= ☠ SUPREME OVERLORD ================= */

.overlord {
    --glow: #ff0000;
}

    /* FIRE BORDER */
    .overlord::before {
        background: conic-gradient( from 0deg, #ff0000, #ff6a00, #ffd700, #ff0000 );
        animation: fireSpin 2.2s linear infinite;
    }

    /* FIRE AURA */
    .overlord::after {
        box-shadow: inset 0 0 20px rgba(255,0,0,.25), 0 0 25px rgba(255,0,0,.6), 0 0 45px rgba(255,60,0,.9);
    }

    /* TEXT FIRE GRADIENT */
    .overlord .rank-text {
        background: linear-gradient( 90deg, #ff0000, #ff6a00, #ffd700, #ff0000 );
        background-size: 300% 300%;
        animation: fireText 2.5s linear infinite;
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
    }

    /* SKULL PULSE */
    .overlord .rank-icon {
        animation: skullPulse 1.4s ease-in-out infinite;
        filter: drop-shadow(0 0 10px red);
    }

/* ================= ANIMATIONS ================= */

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes fireSpin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes fireText {
    0% {
        background-position: 0% 50%
    }

    50% {
        background-position: 100% 50%
    }

    100% {
        background-position: 0% 50%
    }
}

@keyframes skullPulse {
    0%,100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.18);
    }
}



.overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .75);
    backdrop-filter: blur(8px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}
.popup {
    width: 360px;
    padding: 13px;
    border-radius: 26px;
    background: linear-gradient(180deg, #1b1330, #0f081c);
    border: 1px solid rgba(124, 77, 255, .4);
    text-align: center;
}
    .popup .rank {
        color: #ffb347;
        font-weight: 800;
        margin-top: 10px;
    }

    .popup p {
        margin: 6px 0;
        color: #ddd;
    }



.reward-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .75);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 999;
}
.reward-popup {
    background: linear-gradient(180deg, #1b1233, #0f081c);
    padding: 40px;
    border-radius: 24px;
    text-align: center;
    width: 360px;
    border: 1px solid rgba(124, 77, 255, .25);
}
.reward-icon {
    font-size: 48px;
    margin-bottom: 15px;
    animation: coin .8s ease infinite alternate;
}
.reward-popup button {
    background: linear-gradient(135deg, #ffb347, #7c4dff);
    border: none;
    padding: 14px 28px;
    border-radius: 14px;
    font-weight: 600;
    cursor: pointer;
}