/* Widget Styles */
#frogames-rpg-widget {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 9998;
    /* Below Cookie Banner (9999) */
    font-family: 'Inter', system-ui, sans-serif;
}

/* Pill Design (Cyberpunk/Glass) */
#frogames-rpg-widget .rpg-pill {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(15, 23, 42, 0.85);
    /* Slate 900 */
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 10px 16px;
    border-radius: 99px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    overflow: hidden;
    position: relative;
}

/* Hover Effects */
#frogames-rpg-widget .rpg-pill:hover {
    transform: translateY(-2px);
    background: rgba(15, 23, 42, 0.95);
    border-color: rgba(68, 156, 185, 0.5);
    /* Frogames Teal */
    box-shadow: 0 8px 30px rgba(68, 156, 185, 0.25);
}

#frogames-rpg-widget .rpg-pill::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: 0.5s;
}

#frogames-rpg-widget .rpg-pill:hover::before {
    left: 100%;
}

/* Icon */
#frogames-rpg-widget .rpg-icon {
    color: #f1c40f;
    /* Gold Star */
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Info Text */
#frogames-rpg-widget .rpg-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 80px;
}

#frogames-rpg-widget .rpg-level {
    font-size: 11px;
    font-weight: 700;
    color: #ffffff;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    line-height: 1;
}

/* Mini XP Bar */
#frogames-rpg-widget .rpg-xp-bar {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    overflow: hidden;
}

#frogames-rpg-widget .rpg-xp-fill {
    height: 100%;
    background: linear-gradient(90deg, #4facfe 0%, #00f2fe 100%);
    box-shadow: 0 0 8px rgba(0, 242, 254, 0.6);
}

#frogames-rpg-widget .rpg-xp-text {
    font-size: 9px;
    color: #94a3b8;
    line-height: 1;
}

/* Mobile Hide? */
@media (max-width: 768px) {
    #frogames-rpg-widget {
        bottom: 16px;
        right: 16px;
    }

    #frogames-rpg-widget .rpg-pill {
        padding: 8px 12px;
    }
}

/* MODAL STYLES */
#frogames-rpg-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

#frogames-rpg-modal.active {
    opacity: 1;
    pointer-events: all;
}

#frogames-rpg-modal .modal-content {
    width: 90%;
    height: 85%;
    max-width: 1200px;
    background: #0f172a;
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    position: relative;
    transform: scale(0.95);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

#frogames-rpg-modal.active .modal-content {
    transform: scale(1);
}

#frogames-rpg-iframe {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}

#frogames-rpg-modal .close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    z-index: 10;
}

#frogames-rpg-modal .close-btn:hover {
    background: #ef4444;
    transform: rotate(90deg);
}

#frogames-rpg-modal .loading-spinner {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-family: 'Inter', sans-serif;
}