/* ===== RDGH USER MENU DROPDOWN ===== */

/* Profile Section */
.rdgh-user-profile-section {
    padding: 1.25rem;
    border-bottom: 1px solid rgba(71, 85, 105, 0.3);
}

.rdgh-profile-header {
    display: flex;
    gap: 0.875rem;
    margin-bottom: 1rem;
    align-items: center;
}

.rdgh-avatar-wrapper {
    position: relative;
    flex-shrink: 0;
}

.rdgh-user-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    border: 3px solid rgba(168, 197, 218, 0.4);
    object-fit: cover;
    transition: border-color 0.3s ease;
}

/* VIP Level Border Colors - Menggunakan warna dari VIP badge system */
.rdgh-avatar-wrapper[data-vip-level="0"] .rdgh-user-avatar {
    border-color: #94a3b8;
}

.rdgh-avatar-wrapper[data-vip-level="1"] .rdgh-user-avatar,
.rdgh-avatar-wrapper[data-vip-level="2"] .rdgh-user-avatar {
    border-color: #d4a574;
}

.rdgh-avatar-wrapper[data-vip-level="3"] .rdgh-user-avatar,
.rdgh-avatar-wrapper[data-vip-level="4"] .rdgh-user-avatar {
    border-color: #e4e4e7;
}

.rdgh-avatar-wrapper[data-vip-level="5"] .rdgh-user-avatar,
.rdgh-avatar-wrapper[data-vip-level="6"] .rdgh-user-avatar {
    border-color: #fbbf24;
}

.rdgh-avatar-wrapper[data-vip-level="7"] .rdgh-user-avatar,
.rdgh-avatar-wrapper[data-vip-level="8"] .rdgh-user-avatar {
    border-color: #cbd5e1;
    box-shadow: 0 0 15px rgba(226, 232, 240, 0.5);
}

.rdgh-avatar-wrapper[data-vip-level="9"] .rdgh-user-avatar {
    border-color: #94a3b8;
    box-shadow: 0 0 20px var(--text-muted);
}

.rdgh-avatar-wrapper[data-vip-level="10"] .rdgh-user-avatar {
    border-color: #A8C5DA;
    box-shadow: 0 0 25px rgba(168, 197, 218, 0.8);
    animation: vipPurplePulse 3s ease-in-out infinite;
}

@keyframes vipPurplePulse {
    0%, 100% {
        box-shadow: 0 0 25px rgba(168, 197, 218, 0.8);
    }
    50% {
        box-shadow: 0 0 35px rgba(168, 197, 218, 1);
    }
}


.rdgh-user-info {
    flex: 1;
    min-width: 0;
}

.rdgh-username-row {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    margin-bottom: 0.25rem;
}

.rdgh-username-actions {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    flex-shrink: 0;
    margin-left: auto;
    overflow: visible; /* Allow language dropdown to overflow */
}

.rdgh-username-actions .lang-switcher-wrapper {
    position: relative;
    overflow: visible; /* Ensure dropdown not clipped */
}

.rdgh-icon-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: rgba(168, 197, 218, 0.1);
    border: 1px solid rgba(168, 197, 218, 0.2);
    border-radius: 8px;
    color: #A8C5DA;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.rdgh-icon-btn:active {
    transform: scale(0.95);
    background: rgba(168, 197, 218, 0.25);
}

.rdgh-icon-btn:hover {
    background: rgba(168, 197, 218, 0.2);
    border-color: rgba(168, 197, 218, 0.3);
    transform: translateY(-2px);
}

.rdgh-username {
    font-size: 1.0625rem;
    font-weight: 600;
    color: #f1f5f9;
    margin: 0;
    line-height: 1.2;
}

.rdgh-user-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.25rem;
}

.rdgh-user-id {
    font-size: 0.8125rem;
    color: #94a3b8;
    font-weight: 400;
}

.rdgh-vip-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.125rem 0.5rem;
    background: linear-gradient(135deg, #94a3b8, #64748b);
    color: #0f172a;
    font-size: 0.6875rem;
    font-weight: 700;
    border-radius: 0.25rem;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}


.rdgh-vip-clickable {
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.rdgh-vip-clickable:hover {
    opacity: 0.85;
}

.rdgh-user-email {
    font-size: 0.8125rem;
    color: #94a3b8;
    margin: 0;
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
}

.rdgh-user-email .rdgh-verified-badge {
    color: #10b981;
    flex-shrink: 0;
    display: inline-flex;
    vertical-align: middle;
}

.rdgh-username-row .rdgh-verified-badge {
    color: #10b981;
    flex-shrink: 0;
}

/* VIP Progress Section */
.rdgh-vip-progress-section {
    margin-top: 0.875rem;
    padding: 0.875rem;
    background: rgba(99, 102, 241, 0.08);
    border-radius: 0.5rem;
    border: 1px solid rgba(99, 102, 241, 0.15);
}

.rdgh-vip-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.rdgh-vip-label {
    font-size: 0.8125rem;
    color: #94a3b8;
    font-weight: 500;
}

.rdgh-vip-value {
    font-size: 0.9375rem;
    font-weight: 700;
    color: #A8C5DA;
}

.rdgh-progress-container {
    margin-top: 0.5rem;
}

.rdgh-progress-bar {
    height: 8px;
    background: rgba(20, 27, 45, 0.8);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 0.5rem;
    border: 1px solid rgba(71, 85, 105, 0.4);
}

.rdgh-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #A8C5DA, #A8C5DA);
    border-radius: 4px;
    transition: width 0.5s ease;
    position: relative;
    box-shadow: 0 0 10px rgba(168, 197, 218, 0.5);
}

.rdgh-progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: rdghShimmer 2s infinite;
}

@keyframes rdghShimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.rdgh-progress-text {
    display: flex;
    justify-content: space-between;
    font-size: 0.6875rem;
}

.rdgh-progress-text span:first-child {
    color: #cbd5e1;
    font-weight: 500;
}

.rdgh-next-vip-req {
    color: #A8C5DA;
    font-weight: 600;
}

.rdgh-vip-progress-link {
    color: #cbd5e1;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.2s ease;
}

.rdgh-vip-progress-link:hover {
    color: #A8C5DA;
}

/* Balance Section */
.rdgh-balance-section {
    padding: 1rem 1.25rem;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.5rem;
    border-bottom: 1px solid rgba(71, 85, 105, 0.3);
}

.rdgh-balance-card {
    background: transparent;
    border: none;
    border-radius: 0;
    padding: 0;
    min-width: 0;
}

.rdgh-balance-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    color: #94a3b8;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.rdgh-balance-header svg {
    opacity: 0.7;
}

.rdgh-balance-content {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.rdgh-balance-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.rdgh-balance-label {
    font-size: 0.8125rem;
    color: #94a3b8;
}

.rdgh-balance-value {
    font-size: 0.9375rem;
    font-weight: 600;
}

.rdgh-balance-value.available {
    color: #10b981;
}

.rdgh-balance-value.locked {
    color: #f59e0b;
}

.rdgh-balance-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 0.5rem;
    border-top: 1px solid rgba(71, 85, 105, 0.3);
    margin-top: 0.25rem;
    font-weight: 600;
    font-size: 0.8125rem;
    color: #cbd5e1;
}

.rdgh-total-value {
    color: #f1f5f9;
    font-size: 1rem;
}

/* Quick Actions */
.rdgh-quick-actions {
    display: flex;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    border-bottom: 1px solid var(--border-titanium);
}

.rdgh-action-link {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    text-decoration: none;
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: 0.3px;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.rdgh-action-deposit {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
    border-color: rgba(16, 185, 129, 0.3);
}

.rdgh-action-deposit:hover {
    background: rgba(16, 185, 129, 0.25) !important;
    border-color: #10b981 !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3) !important;
}

.rdgh-action-withdraw {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
    border-color: rgba(239, 68, 68, 0.3);
}

.rdgh-action-withdraw:hover {
    background: rgba(239, 68, 68, 0.25) !important;
    border-color: #ef4444 !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3) !important;
}

/* Navigation Menu */
.rdgh-user-nav {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding: 0.5rem;
    border-bottom: 1px solid rgba(71, 85, 105, 0.3);
}

.rdgh-nav-item {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    color: #f1f5f9;
    text-decoration: none;
    transition: all 0.2s ease;
    position: relative;
    gap: 0.75rem;
    border-radius: 8px;
}

.rdgh-nav-item:hover {
    background: var(--bg-hover), 0.5);
}

.rdgh-nav-item:hover::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 18px;
    background: var(--titanium-silver);
    border-radius: 0 2px 2px 0;
}

.rdgh-nav-item.active {
    background: rgba(203, 213, 225, 0.12);
    color: var(--titanium-silver);
}

.rdgh-nav-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 24px;
    background: var(--titanium-silver);
    border-radius: 0 2px 2px 0;
    box-shadow: 0 0 8px rgba(203, 213, 225, 0.4);
}

.rdgh-nav-item.active svg:first-child {
    color: var(--titanium-silver);
}

.rdgh-nav-item svg:first-child {
    flex-shrink: 0;
    color: #94a3b8;
}

.rdgh-nav-item span {
    flex: 1;
    font-size: 0.875rem;
    font-weight: 500;
}

.rdgh-nav-arrow {
    color: #64748b;
    opacity: 0.6;
    transition: all 0.2s ease;
}

.rdgh-nav-item:hover .rdgh-nav-arrow {
    opacity: 1;
    transform: translateX(3px);
}

/* Logout Section */
.rdgh-logout-section {
    padding: 0.875rem 1rem;
    margin-top: auto;
}

.rdgh-logout-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.625rem 1rem;
    background: transparent;
    color: #ef4444;
    border: 1px solid #ef4444;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.rdgh-logout-btn:hover {
    background: #ef4444;
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.rdgh-logout-btn svg {
    flex-shrink: 0;
}

/* Sidebar Panel (dari kanan, full height) */
.user-dropdown {
    position: fixed !important;
    top: 0 !important;
    right: -420px !important;
    bottom: 0 !important;
    width: 420px !important;
    max-width: 90vw !important;
    height: 100vh !important;
    background: linear-gradient(180deg, var(--bg-secondary) 0%, var(--bg-tertiary) 100%) !important;
    border-radius: 0 !important;
    border: none !important;
    border-left: 1px solid rgba(71, 85, 105, 0.6) !important;
    box-shadow: -8px 0 40px rgba(0, 0, 0, 0.5) !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    transition: right 0.35s cubic-bezier(0.4, 0, 0.2, 1) !important;
    z-index: 10000 !important;
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
    display: flex !important;
    flex-direction: column !important;
    padding: 0 !important;
    margin: 0 !important;
}

.user-dropdown::-webkit-scrollbar {
    width: 6px;
}

.user-dropdown::-webkit-scrollbar-track {
    background: rgba(20, 27, 45, 0.5);
    border-radius: 4px;
}

.user-dropdown::-webkit-scrollbar-thumb {
    background: rgba(168, 197, 218, 0.3);
    border-radius: 4px;
    transition: background 0.2s;
}

.user-dropdown::-webkit-scrollbar-thumb:hover {
    background: rgba(168, 197, 218, 0.5);
}

.user-dropdown.show {
    right: 0 !important;
    display: flex !important;
}

/* Responsive Design */
@media (max-width: 768px) {
    .user-dropdown {
        width: 100vw;
        max-width: 420px;
        right: -100vw !important;
    }

    .user-dropdown.show {
        right: 0 !important;
    }

    .rdgh-balance-section {
        padding: 0.875rem 1rem;
        gap: 0.875rem;
    }

    .rdgh-balance-card {
        background: rgba(20, 27, 45, 0.6);
        border: 1px solid rgba(71, 85, 105, 0.3);
        border-radius: 0.5rem;
        padding: 0.875rem;
    }

    .rdgh-balance-header {
        font-size: 0.6875rem;
    }

    .rdgh-balance-value {
        font-size: 0.875rem;
    }

    .rdgh-balance-label {
        font-size: 0.75rem;
    }
}

@media (max-width: 480px) {
    .user-dropdown {
        width: 100vw !important;
        max-width: 100vw !important;
        right: -100vw !important;
        top: 0 !important;
        bottom: 0 !important;
        height: 100vh !important;
        overflow-y: auto !important;
        overflow-x: hidden !important;
        -webkit-overflow-scrolling: touch !important;
        display: flex !important;
        flex-direction: column !important;
        overscroll-behavior: contain !important;
    }

    .user-dropdown.show {
        right: 0 !important;
    }

    .rdgh-balance-section {
        grid-template-columns: 1fr;
        padding: 0.75rem;
        gap: 0.75rem;
    }

    .rdgh-balance-card {
        background: rgba(20, 27, 45, 0.6);
        border: 1px solid rgba(71, 85, 105, 0.3);
        border-radius: 0.5rem;
        padding: 0.75rem;
    }

    .rdgh-user-profile-section {
        padding: 0.875rem;
    }

    .rdgh-username {
        font-size: 0.9375rem;
    }

    .rdgh-user-avatar {
        width: 56px;
        height: 56px;
    }

    .rdgh-profile-header {
        gap: 0.75rem;
    }

    .rdgh-vip-progress-section {
        padding: 0.75rem;
    }

    .rdgh-balance-card {
        padding: 0.75rem;
    }

    .rdgh-quick-actions {
        flex-direction: column;
        gap: 0.625rem;
        padding: 0.875rem;
    }

    .rdgh-action-link {
        width: 100%;
        padding: 0.75rem 1rem;
        font-size: 0.875rem;
    }

    .rdgh-action-deposit {
        background: rgba(16, 185, 129, 0.15) !important;
        color: #10b981 !important;
        border-color: rgba(16, 185, 129, 0.3) !important;
    }

    .rdgh-action-withdraw {
        background: rgba(239, 68, 68, 0.15) !important;
        color: #ef4444 !important;
        border-color: rgba(239, 68, 68, 0.3) !important;
    }

    .rdgh-user-nav {
        flex: 0 0 auto;
    }

    .rdgh-logout-section {
        padding: 0.875rem;
        margin-top: 1rem;
        flex-shrink: 0;
    }

    .rdgh-logout-btn {
        width: 100%;
        padding: 0.75rem 1rem;
        font-size: 0.875rem;
    }

    .rdgh-nav-item {
        padding: 0.875rem 1rem;
    }
}

@media (min-width: 2560px) {
    .user-dropdown {
        width: 480px !important;
        right: -480px !important;
    }

    .rdgh-username {
        font-size: 1.25rem;
    }

    .rdgh-user-avatar {
        width: 72px;
        height: 72px;
    }

    .rdgh-balance-value {
        font-size: 1.125rem;
    }

    .rdgh-vip-value {
        font-size: 1rem;
    }
}
